it now detects the last <li> rendered in the main view and adds an item called "materias optativas"