Browse Source
Update 'locallib.php'
Some fixes to correct errors in activities (inside a block) - this error could be generated by old version of iAssign
Now, every student looking at the block will fix the order (if some error was present)
+ function view_iassigns (): 4135/8556
* added comments ($i_exercise,...)
+ function show_iassign ($title, $iassign_array, $total_of_activities): 4291/8556
* $i -> $total_of_activities
* inserted code: $corect_position = 1;...
+ static function move_change_activity_position ($idFrom, $idTo, $posFrom, $posTo): new - 4956/8556
* to allow order change in 'iassign_statement.position' without presenting interface
* code inherited from 'move_iassign(...)'
* added: "if ($idFrom != $idTo)" to "else" // first update performed successfully - change second only if they are different
+ function move_iassign ($move_action, $target, $return): 4976/8556
* extracted code to the new 'move_change_activity_position(...)'
* "$newentry = new stdClass(); ... print_error('error_update_move_iassign', 'iassign');" -> "$this->move_change_activity_position($this->activity->id, $iassign_target->id, $final_position_source, $final_position_target);"
+ static function get_latest_array_item ($DB, $iassignid, $position): new - 5377/8556
* code inherited from 'view_dates(...)'
* does: $DB->get_record('iassign_statement', array('iassignid' => $this->activity->iassignid, 'position' => $position));
+ function view_dates (): change geration of "<-", "->" and "Home"
* Avoid warning provoked by the "order error" ('iassign_statement.position')
* Was using "$DB->get_record('iassign_statement',...)", now use "$DB->get_records('iassign_statement',...)" through the new function "get_latest_array_item(...)"
+ static function view_ilm ($ilmid, $from): 6427/8538
* comment changed to English
"Faz a leitura do tipo de iLM e realiza a chamada à classe adequada" -> "Get the iLM type and calls its correpondent handler ('Java' or 'HTML5')"