@@ -458,8 +458,8 @@ |
||
| 458 | 458 | } else if(param == 'cmi.core.student_name'){ |
| 459 | 459 | // ---- cmi.core.student_name |
| 460 | 460 | <?php |
| 461 | - $who = addslashes($user['lastname']).', '.addslashes($user['firstname']); |
|
| 462 | - echo "result='$who';"; |
|
| 461 | + $who = addslashes($user['lastname']).', '.addslashes($user['firstname']); |
|
| 462 | + echo "result='$who';"; |
|
| 463 | 463 | ?> |
| 464 | 464 | } else if(param == 'cmi.core.lesson_location'){ |
| 465 | 465 | // ---- cmi.core.lesson_location |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | return false; |
| 100 | 100 | } |
| 101 | 101 | } else { |
| 102 | - return false; |
|
| 102 | + return false; |
|
| 103 | 103 | } |
| 104 | 104 | } |
| 105 | 105 | |
@@ -25,10 +25,10 @@ discard block |
||
| 25 | 25 | ); |
| 26 | 26 | public $is_course_model = true; |
| 27 | 27 | |
| 28 | - public function __construct() |
|
| 28 | + public function __construct() |
|
| 29 | 29 | { |
| 30 | 30 | $this->table = Database::get_course_table(TABLE_TIMELINE); |
| 31 | - } |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * Get the count of elements |
@@ -68,16 +68,16 @@ discard block |
||
| 68 | 68 | /** |
| 69 | 69 | * Displays the title + grid |
| 70 | 70 | */ |
| 71 | - public function listing() |
|
| 71 | + public function listing() |
|
| 72 | 72 | { |
| 73 | - // action links |
|
| 74 | - $html = '<div class="actions">'; |
|
| 73 | + // action links |
|
| 74 | + $html = '<div class="actions">'; |
|
| 75 | 75 | //$html .= '<a href="career_dashboard.php">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>'; |
| 76 | - $html .= '<a href="'.api_get_self().'?action=add">'.Display::return_icon('add.png', get_lang('Add'), '', '32').'</a>'; |
|
| 77 | - $html .= '</div>'; |
|
| 76 | + $html .= '<a href="'.api_get_self().'?action=add">'.Display::return_icon('add.png', get_lang('Add'), '', '32').'</a>'; |
|
| 77 | + $html .= '</div>'; |
|
| 78 | 78 | $html .= Display::grid_html('timelines'); |
| 79 | 79 | return $html; |
| 80 | - } |
|
| 80 | + } |
|
| 81 | 81 | |
| 82 | 82 | public function get_status_list() |
| 83 | 83 | { |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | $item['asset'] = array('media' => $item['media'], |
| 261 | 261 | 'credit' => $item['media_credit'], |
| 262 | 262 | 'caption' => $item['media_caption'], |
| 263 | - ); |
|
| 263 | + ); |
|
| 264 | 264 | |
| 265 | 265 | //Cleaning items |
| 266 | 266 | unset($item['id']); |
@@ -26,10 +26,10 @@ discard block |
||
| 26 | 26 | public $answer; |
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | - * Constructor. |
|
| 30 | - * |
|
| 31 | - * @param Ims2Question $question Ims2Question object we want to export. |
|
| 32 | - */ |
|
| 29 | + * Constructor. |
|
| 30 | + * |
|
| 31 | + * @param Ims2Question $question Ims2Question object we want to export. |
|
| 32 | + */ |
|
| 33 | 33 | public function __construct($question) |
| 34 | 34 | { |
| 35 | 35 | $this->question = $question; |
@@ -38,11 +38,11 @@ discard block |
||
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | - * Start the XML flow. |
|
| 42 | - * |
|
| 43 | - * This opens the <item> block, with correct attributes. |
|
| 44 | - * |
|
| 45 | - */ |
|
| 41 | + * Start the XML flow. |
|
| 42 | + * |
|
| 43 | + * This opens the <item> block, with correct attributes. |
|
| 44 | + * |
|
| 45 | + */ |
|
| 46 | 46 | public function start_item() |
| 47 | 47 | { |
| 48 | 48 | $categoryTitle = ''; |
@@ -66,49 +66,49 @@ discard block |
||
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
| 69 | - * End the XML flow, closing the </item> tag. |
|
| 70 | - * |
|
| 71 | - */ |
|
| 69 | + * End the XML flow, closing the </item> tag. |
|
| 70 | + * |
|
| 71 | + */ |
|
| 72 | 72 | public function end_item() |
| 73 | 73 | { |
| 74 | 74 | return "</assessmentItem>\n"; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | - * Start the itemBody |
|
| 79 | - * |
|
| 80 | - */ |
|
| 78 | + * Start the itemBody |
|
| 79 | + * |
|
| 80 | + */ |
|
| 81 | 81 | public function start_item_body() |
| 82 | 82 | { |
| 83 | 83 | return ' <itemBody>'."\n"; |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | - * End the itemBody part. |
|
| 88 | - * |
|
| 89 | - */ |
|
| 87 | + * End the itemBody part. |
|
| 88 | + * |
|
| 89 | + */ |
|
| 90 | 90 | public function end_item_body() |
| 91 | 91 | { |
| 92 | 92 | return " </itemBody>\n"; |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | /** |
| 96 | - * add the response processing template used. |
|
| 97 | - * |
|
| 98 | - */ |
|
| 96 | + * add the response processing template used. |
|
| 97 | + * |
|
| 98 | + */ |
|
| 99 | 99 | public function add_response_processing() |
| 100 | 100 | { |
| 101 | 101 | return ' <responseProcessing template="http://www.imsglobal.org/question/qti_v2p1/rptemplates/map_correct"/>'."\n"; |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
| 105 | - * Export the question as an IMS/QTI Item. |
|
| 106 | - * |
|
| 107 | - * This is a default behaviour, some classes may want to override this. |
|
| 108 | - * |
|
| 109 | - * @param $standalone: Boolean stating if it should be exported as a stand-alone question |
|
| 110 | - * @return string string, the XML flow for an Item. |
|
| 111 | - */ |
|
| 105 | + * Export the question as an IMS/QTI Item. |
|
| 106 | + * |
|
| 107 | + * This is a default behaviour, some classes may want to override this. |
|
| 108 | + * |
|
| 109 | + * @param $standalone: Boolean stating if it should be exported as a stand-alone question |
|
| 110 | + * @return string string, the XML flow for an Item. |
|
| 111 | + */ |
|
| 112 | 112 | public function export($standalone = false) |
| 113 | 113 | { |
| 114 | 114 | $head = $foot = ''; |
@@ -201,8 +201,8 @@ discard block |
||
| 201 | 201 | public function export_presentation() |
| 202 | 202 | { |
| 203 | 203 | $out = "<presentation_material><flow_mat><material>\n" |
| 204 | - . " <mattext><![CDATA[".formatExerciseQtiDescription($this->exercise->selectDescription())."]]></mattext>\n" |
|
| 205 | - . "</material></flow_mat></presentation_material>\n"; |
|
| 204 | + . " <mattext><![CDATA[".formatExerciseQtiDescription($this->exercise->selectDescription())."]]></mattext>\n" |
|
| 205 | + . "</material></flow_mat></presentation_material>\n"; |
|
| 206 | 206 | return $out; |
| 207 | 207 | } |
| 208 | 208 | |
@@ -216,15 +216,15 @@ discard block |
||
| 216 | 216 | $out = ''; |
| 217 | 217 | if ($n = $this->exercise->getShuffle()) { |
| 218 | 218 | $out .= "<selection_ordering>" |
| 219 | - . " <selection>\n" |
|
| 220 | - . " <selection_number>".$n."</selection_number>\n" |
|
| 221 | - . " </selection>\n" |
|
| 222 | - . ' <order order_type="Random" />' |
|
| 223 | - . "\n</selection_ordering>\n"; |
|
| 219 | + . " <selection>\n" |
|
| 220 | + . " <selection_number>".$n."</selection_number>\n" |
|
| 221 | + . " </selection>\n" |
|
| 222 | + . ' <order order_type="Random" />' |
|
| 223 | + . "\n</selection_ordering>\n"; |
|
| 224 | 224 | } else { |
| 225 | 225 | $out .= '<selection_ordering sequence_type="Normal">'."\n" |
| 226 | - . " <selection />\n" |
|
| 227 | - . "</selection_ordering>\n"; |
|
| 226 | + . " <selection />\n" |
|
| 227 | + . "</selection_ordering>\n"; |
|
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | return $out; |
@@ -255,18 +255,18 @@ discard block |
||
| 255 | 255 | $head = $foot = ''; |
| 256 | 256 | if ($standalone) { |
| 257 | 257 | $head = '<?xml version = "1.0" encoding = "UTF-8" standalone = "no"?>'."\n" |
| 258 | - . '<!DOCTYPE questestinterop SYSTEM "ims_qtiasiv2p1.dtd">'."\n" |
|
| 259 | - . "<questestinterop>\n"; |
|
| 258 | + . '<!DOCTYPE questestinterop SYSTEM "ims_qtiasiv2p1.dtd">'."\n" |
|
| 259 | + . "<questestinterop>\n"; |
|
| 260 | 260 | $foot = "</questestinterop>\n"; |
| 261 | 261 | } |
| 262 | 262 | $out = $head |
| 263 | - . $this->start_section() |
|
| 264 | - . $this->export_duration() |
|
| 265 | - . $this->export_presentation() |
|
| 266 | - . $this->export_ordering() |
|
| 267 | - . $this->export_questions() |
|
| 268 | - . $this->end_section() |
|
| 269 | - . $foot; |
|
| 263 | + . $this->start_section() |
|
| 264 | + . $this->export_duration() |
|
| 265 | + . $this->export_presentation() |
|
| 266 | + . $this->export_ordering() |
|
| 267 | + . $this->export_questions() |
|
| 268 | + . $this->end_section() |
|
| 269 | + . $foot; |
|
| 270 | 270 | |
| 271 | 271 | return $out; |
| 272 | 272 | } |
@@ -307,11 +307,11 @@ discard block |
||
| 307 | 307 | public $answer; |
| 308 | 308 | |
| 309 | 309 | /** |
| 310 | - * Constructor. |
|
| 311 | - * |
|
| 312 | - * @param Question $question The Question object we want to export. |
|
| 313 | - * @author Anamd Tihon |
|
| 314 | - */ |
|
| 310 | + * Constructor. |
|
| 311 | + * |
|
| 312 | + * @param Question $question The Question object we want to export. |
|
| 313 | + * @author Anamd Tihon |
|
| 314 | + */ |
|
| 315 | 315 | public function __construct($question) |
| 316 | 316 | { |
| 317 | 317 | $this->question = $question; |
@@ -320,35 +320,35 @@ discard block |
||
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | /** |
| 323 | - * Start the XML flow. |
|
| 324 | - * |
|
| 325 | - * This opens the <item> block, with correct attributes. |
|
| 326 | - * |
|
| 327 | - * @author Amand Tihon <[email protected]> |
|
| 328 | - */ |
|
| 323 | + * Start the XML flow. |
|
| 324 | + * |
|
| 325 | + * This opens the <item> block, with correct attributes. |
|
| 326 | + * |
|
| 327 | + * @author Amand Tihon <[email protected]> |
|
| 328 | + */ |
|
| 329 | 329 | public function start_item() |
| 330 | 330 | { |
| 331 | 331 | return '<item title="'.cleanAttribute(formatExerciseQtiDescription($this->question->selectTitle())).'" ident="'.$this->questionIdent.'">'."\n"; |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | 334 | /** |
| 335 | - * End the XML flow, closing the </item> tag. |
|
| 336 | - * |
|
| 337 | - * @author Amand Tihon <[email protected]> |
|
| 338 | - */ |
|
| 335 | + * End the XML flow, closing the </item> tag. |
|
| 336 | + * |
|
| 337 | + * @author Amand Tihon <[email protected]> |
|
| 338 | + */ |
|
| 339 | 339 | public function end_item() |
| 340 | 340 | { |
| 341 | 341 | return "</item>\n"; |
| 342 | 342 | } |
| 343 | 343 | |
| 344 | 344 | /** |
| 345 | - * Create the opening, with the question itself. |
|
| 346 | - * |
|
| 347 | - * This means it opens the <presentation> but doesn't close it, as this is the role of end_presentation(). |
|
| 348 | - * In between, the export_responses from the subclass should have been called. |
|
| 349 | - * |
|
| 350 | - * @author Amand Tihon <[email protected]> |
|
| 351 | - */ |
|
| 345 | + * Create the opening, with the question itself. |
|
| 346 | + * |
|
| 347 | + * This means it opens the <presentation> but doesn't close it, as this is the role of end_presentation(). |
|
| 348 | + * In between, the export_responses from the subclass should have been called. |
|
| 349 | + * |
|
| 350 | + * @author Amand Tihon <[email protected]> |
|
| 351 | + */ |
|
| 352 | 352 | public function start_presentation() |
| 353 | 353 | { |
| 354 | 354 | return '<presentation label="'.$this->questionIdent.'"><flow>'."\n" |
@@ -356,44 +356,44 @@ discard block |
||
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | /** |
| 359 | - * End the </presentation> part, opened by export_header. |
|
| 360 | - * |
|
| 361 | - * @author Amand Tihon <[email protected]> |
|
| 362 | - */ |
|
| 359 | + * End the </presentation> part, opened by export_header. |
|
| 360 | + * |
|
| 361 | + * @author Amand Tihon <[email protected]> |
|
| 362 | + */ |
|
| 363 | 363 | public function end_presentation() |
| 364 | 364 | { |
| 365 | 365 | return "</flow></presentation>\n"; |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | 368 | /** |
| 369 | - * Start the response processing, and declare the default variable, SCORE, at 0 in the outcomes. |
|
| 370 | - * |
|
| 371 | - * @author Amand Tihon <[email protected]> |
|
| 372 | - */ |
|
| 369 | + * Start the response processing, and declare the default variable, SCORE, at 0 in the outcomes. |
|
| 370 | + * |
|
| 371 | + * @author Amand Tihon <[email protected]> |
|
| 372 | + */ |
|
| 373 | 373 | public function start_processing() |
| 374 | 374 | { |
| 375 | 375 | return '<resprocessing><outcomes><decvar vartype="Integer" defaultval="0" /></outcomes>'."\n"; |
| 376 | 376 | } |
| 377 | 377 | |
| 378 | 378 | /** |
| 379 | - * End the response processing part. |
|
| 380 | - * |
|
| 381 | - * @author Amand Tihon <[email protected]> |
|
| 382 | - */ |
|
| 379 | + * End the response processing part. |
|
| 380 | + * |
|
| 381 | + * @author Amand Tihon <[email protected]> |
|
| 382 | + */ |
|
| 383 | 383 | public function end_processing() |
| 384 | 384 | { |
| 385 | 385 | return "</resprocessing>\n"; |
| 386 | 386 | } |
| 387 | 387 | |
| 388 | 388 | /** |
| 389 | - * Export the question as an IMS/QTI Item. |
|
| 390 | - * |
|
| 391 | - * This is a default behaviour, some classes may want to override this. |
|
| 392 | - * |
|
| 393 | - * @param $standalone: Boolean stating if it should be exported as a stand-alone question |
|
| 394 | - * @return string string, the XML flow for an Item. |
|
| 395 | - * @author Amand Tihon <[email protected]> |
|
| 396 | - */ |
|
| 389 | + * Export the question as an IMS/QTI Item. |
|
| 390 | + * |
|
| 391 | + * This is a default behaviour, some classes may want to override this. |
|
| 392 | + * |
|
| 393 | + * @param $standalone: Boolean stating if it should be exported as a stand-alone question |
|
| 394 | + * @return string string, the XML flow for an Item. |
|
| 395 | + * @author Amand Tihon <[email protected]> |
|
| 396 | + */ |
|
| 397 | 397 | public function export($standalone = False) |
| 398 | 398 | { |
| 399 | 399 | global $charset; |
@@ -401,8 +401,8 @@ discard block |
||
| 401 | 401 | |
| 402 | 402 | if ($standalone) { |
| 403 | 403 | $head = '<?xml version = "1.0" encoding = "'.$charset.'" standalone = "no"?>'."\n" |
| 404 | - . '<!DOCTYPE questestinterop SYSTEM "ims_qtiasiv2p1.dtd">'."\n" |
|
| 405 | - . "<questestinterop>\n"; |
|
| 404 | + . '<!DOCTYPE questestinterop SYSTEM "ims_qtiasiv2p1.dtd">'."\n" |
|
| 405 | + . "<questestinterop>\n"; |
|
| 406 | 406 | $foot = "</questestinterop>\n"; |
| 407 | 407 | } |
| 408 | 408 | |
@@ -121,9 +121,9 @@ |
||
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | /** |
| 124 | - * Has anyone done this exercise yet ? |
|
| 125 | - * @return boolean |
|
| 126 | - */ |
|
| 124 | + * Has anyone done this exercise yet ? |
|
| 125 | + * @return boolean |
|
| 126 | + */ |
|
| 127 | 127 | public function has_results() |
| 128 | 128 | { |
| 129 | 129 | $table = Database::get_course_table(TABLE_FORUM_POST); |
@@ -1690,7 +1690,6 @@ discard block |
||
| 1690 | 1690 | * @param string $course_code Course code (optional) |
| 1691 | 1691 | * @param int $session_id Session ID (optional) |
| 1692 | 1692 | * @param bool $order |
| 1693 | - |
|
| 1694 | 1693 | * @return array Array of subcategories |
| 1695 | 1694 | */ |
| 1696 | 1695 | public function get_subcategories( |
@@ -1971,7 +1970,6 @@ discard block |
||
| 1971 | 1970 | * This function, locks a category , only one who can unlock it is |
| 1972 | 1971 | * the platform administrator. |
| 1973 | 1972 | * @param int locked 1 or unlocked 0 |
| 1974 | - |
|
| 1975 | 1973 | * @return boolean|null |
| 1976 | 1974 | * */ |
| 1977 | 1975 | public function lock($locked) |
@@ -185,7 +185,7 @@ |
||
| 185 | 185 | $file_name = basename($source); |
| 186 | 186 | // move onto self illegal: mv a/b/c a/b/c or mv a/b/c a/b |
| 187 | 187 | if (strcasecmp($target, dirname($source)) === 0) { |
| 188 | - return false; |
|
| 188 | + return false; |
|
| 189 | 189 | } |
| 190 | 190 | $isWindowsOS = api_is_windows_os(); |
| 191 | 191 | $canExec = function_exists('exec'); |
@@ -121,9 +121,9 @@ |
||
| 121 | 121 | $oldTableTutorsCompany = 'plugin_sepe_tutors_empresa'; |
| 122 | 122 | $oldTableCompetence = 'plugin_sepe_competencia_docente'; |
| 123 | 123 | $sql = "RENAME TABLE " |
| 124 | - . $oldTableCenters." TO ".self::TABLE_SEPE_CENTERS.", " |
|
| 125 | - . $oldTableTutorsCompany." TO ".self::TABLE_SEPE_TUTORS_COMPANY.", " |
|
| 126 | - . $oldTableCompetence." TO ".self::TABLE_SEPE_TEACHING_COMPETENCE.";"; |
|
| 124 | + . $oldTableCenters." TO ".self::TABLE_SEPE_CENTERS.", " |
|
| 125 | + . $oldTableTutorsCompany." TO ".self::TABLE_SEPE_TUTORS_COMPANY.", " |
|
| 126 | + . $oldTableCompetence." TO ".self::TABLE_SEPE_TEACHING_COMPETENCE.";"; |
|
| 127 | 127 | Database::query($sql); |
| 128 | 128 | |
| 129 | 129 | $sepeCourseActionsTable = self::TABLE_SEPE_COURSE_ACTIONS; |
@@ -781,7 +781,7 @@ |
||
| 781 | 781 | $sql = "SELECT * FROM $tutorTable |
| 782 | 782 | WHERE id='".$tmp_aux['tutor_id']."' |
| 783 | 783 | LIMIT 1"; |
| 784 | - $rs_tutor = Database::query($sql); |
|
| 784 | + $rs_tutor = Database::query($sql); |
|
| 785 | 785 | if (Database::num_rows($rs_tutor)) { |
| 786 | 786 | $tmp = Database::fetch_assoc($rs_tutor); |
| 787 | 787 | |