@@ -187,6 +187,7 @@ discard block |
||
187 | 187 | * Reads answer information from the data base ordered by parameter |
188 | 188 | * @param string Field we want to order by |
189 | 189 | * @param string DESC or ASC |
190 | + * @param string $field |
|
190 | 191 | * @author Frederic Vauthier |
191 | 192 | */ |
192 | 193 | public function readOrderedBy($field, $order='ASC') |
@@ -329,6 +330,7 @@ discard block |
||
329 | 330 | |
330 | 331 | /** |
331 | 332 | * return array answer by id else return a bool |
333 | + * @param integer $auto_id |
|
332 | 334 | */ |
333 | 335 | public function selectAnswerByAutoId($auto_id) |
334 | 336 | { |
@@ -443,6 +445,7 @@ discard block |
||
443 | 445 | * |
444 | 446 | * @author Olivier Brouckaert |
445 | 447 | * @param - integer $id - answer ID |
448 | + * @param integer $id |
|
446 | 449 | * @return integer - 0 if bad answer, not 0 if good answer |
447 | 450 | */ |
448 | 451 | public function isCorrect($id) |
@@ -455,6 +458,7 @@ discard block |
||
455 | 458 | * |
456 | 459 | * @author Olivier Brouckaert |
457 | 460 | * @param - integer $id - answer ID |
461 | + * @param integer $id |
|
458 | 462 | * @return string - answer comment |
459 | 463 | */ |
460 | 464 | public function selectComment($id) |
@@ -467,6 +471,7 @@ discard block |
||
467 | 471 | * |
468 | 472 | * @author Olivier Brouckaert |
469 | 473 | * @param - integer $id - answer ID |
474 | + * @param integer $id |
|
470 | 475 | * @return integer - answer weighting |
471 | 476 | */ |
472 | 477 | public function selectWeighting($id) |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | /** |
33 | 33 | * Constructor. |
34 | 34 | * |
35 | - * @param $question Ims2Question object we want to export. |
|
35 | + * @param Ims2Question $question Ims2Question object we want to export. |
|
36 | 36 | */ |
37 | 37 | function ImsAssessmentItem($question) |
38 | 38 | { |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * This is a default behaviour, some classes may want to override this. |
102 | 102 | * |
103 | 103 | * @param $standalone: Boolean stating if it should be exported as a stand-alone question |
104 | - * @return A string, the XML flow for an Item. |
|
104 | + * @return string string, the XML flow for an Item. |
|
105 | 105 | */ |
106 | 106 | function export($standalone = false) |
107 | 107 | { |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | * Export the exercise in IMS/QTI. |
240 | 240 | * |
241 | 241 | * @param bool $standalone Wether it should include XML tag and DTD line. |
242 | - * @return a string containing the XML flow |
|
242 | + * @return string string containing the XML flow |
|
243 | 243 | * @author Amand Tihon <[email protected]> |
244 | 244 | */ |
245 | 245 | function export($standalone) |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | * This is a default behaviour, some classes may want to override this. |
384 | 384 | * |
385 | 385 | * @param $standalone: Boolean stating if it should be exported as a stand-alone question |
386 | - * @return A string, the XML flow for an Item. |
|
386 | + * @return string string, the XML flow for an Item. |
|
387 | 387 | * @author Amand Tihon <[email protected]> |
388 | 388 | */ |
389 | 389 | function export($standalone = False) |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | * |
418 | 418 | * @param int $exerciseId The exercise to export |
419 | 419 | * @param boolean $standalone Wether it should include XML tag and DTD line. |
420 | - * @return The XML as a string, or an empty string if there's no exercise with given ID. |
|
420 | + * @return string XML as a string, or an empty string if there's no exercise with given ID. |
|
421 | 421 | */ |
422 | 422 | function export_exercise_to_qti($exerciseId, $standalone = true) |
423 | 423 | { |
@@ -474,6 +474,9 @@ discard block |
||
474 | 474 | return htmlspecialchars($text); |
475 | 475 | } |
476 | 476 | |
477 | +/** |
|
478 | + * @param string $text |
|
479 | + */ |
|
477 | 480 | function cleanAttribute($text) |
478 | 481 | { |
479 | 482 | return $text; |
@@ -27,6 +27,7 @@ discard block |
||
27 | 27 | * @param int The JavaScript ID for this question. |
28 | 28 | * Due to the nature of interactions, we must have a natural sequence for |
29 | 29 | * questions in the generated JavaScript. |
30 | + * @param integer $js_id |
|
30 | 31 | */ |
31 | 32 | public static function export_question($questionId, $standalone = true, $js_id) |
32 | 33 | { |
@@ -687,7 +688,7 @@ discard block |
||
687 | 688 | /** |
688 | 689 | * Constructor. |
689 | 690 | * |
690 | - * @param $question The Question object we want to export. |
|
691 | + * @param ScormQuestion $question The Question object we want to export. |
|
691 | 692 | */ |
692 | 693 | public function ScormAssessmentItem($question, $standalone = false) |
693 | 694 | { |
@@ -915,7 +916,7 @@ discard block |
||
915 | 916 | * |
916 | 917 | * @param int $exerciseId The exercise to exporte |
917 | 918 | * @param boolean $standalone Wether it should include XML tag and DTD line. |
918 | - * @return The XML as a string, or an empty string if there's no exercise with given ID. |
|
919 | + * @return string XML as a string, or an empty string if there's no exercise with given ID. |
|
919 | 920 | */ |
920 | 921 | public static function export_exercise_to_scorm($exerciseId, $standalone=true) { |
921 | 922 | $exercise = new Exercise(); |
@@ -1091,7 +1092,7 @@ discard block |
||
1091 | 1092 | * This is a default behaviour, some classes may want to override this. |
1092 | 1093 | * |
1093 | 1094 | * @param $standalone: Boolean stating if it should be exported as a stand-alone question |
1094 | - * @return A string, the XML flow for an Item. |
|
1095 | + * @return string string, the XML flow for an Item. |
|
1095 | 1096 | */ |
1096 | 1097 | function export() |
1097 | 1098 | { |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | } |
265 | 265 | |
266 | 266 | /** |
267 | - * @return bool|string |
|
267 | + * @return string|false |
|
268 | 268 | */ |
269 | 269 | public function selectPicturePath() |
270 | 270 | { |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | * @param string $Dimension - Resizing happens proportional according to given dimension: height|width|any |
590 | 590 | * @param integer $Max - Maximum size |
591 | 591 | * |
592 | - * @return boolean - true if success, false if failed |
|
592 | + * @return boolean|null - true if success, false if failed |
|
593 | 593 | * |
594 | 594 | * @author Toon Keppens |
595 | 595 | */ |
@@ -750,6 +750,7 @@ discard block |
||
750 | 750 | |
751 | 751 | /** |
752 | 752 | * Sets extra info |
753 | + * @param string $extra |
|
753 | 754 | */ |
754 | 755 | public function setExtra($extra) |
755 | 756 | { |
@@ -955,6 +956,9 @@ discard block |
||
955 | 956 | } |
956 | 957 | } |
957 | 958 | |
959 | + /** |
|
960 | + * @param integer $exerciseId |
|
961 | + */ |
|
958 | 962 | public function search_engine_edit($exerciseId, $addQs=false, $rmQs=false) |
959 | 963 | { |
960 | 964 | // update search engine and its values table if enabled |
@@ -1273,7 +1277,7 @@ discard block |
||
1273 | 1277 | * |
1274 | 1278 | * @author Olivier Brouckaert |
1275 | 1279 | * @param array $course_info Course info of the destination course |
1276 | - * @return int ID of the new question |
|
1280 | + * @return false|string ID of the new question |
|
1277 | 1281 | */ |
1278 | 1282 | public function duplicate($course_info = []) |
1279 | 1283 | { |
@@ -1649,7 +1653,7 @@ discard block |
||
1649 | 1653 | * @param string $name |
1650 | 1654 | * @param int $course_id |
1651 | 1655 | * @param int $position |
1652 | - * @return bool|int |
|
1656 | + * @return false|string |
|
1653 | 1657 | */ |
1654 | 1658 | static function saveQuestionOption($question_id, $name, $course_id, $position = 0) |
1655 | 1659 | { |
@@ -1870,6 +1874,7 @@ discard block |
||
1870 | 1874 | /** |
1871 | 1875 | * Get course medias |
1872 | 1876 | * @param int course id |
1877 | + * @param integer $course_id |
|
1873 | 1878 | */ |
1874 | 1879 | static function get_course_medias( |
1875 | 1880 | $course_id, |
@@ -1935,7 +1940,7 @@ discard block |
||
1935 | 1940 | } |
1936 | 1941 | |
1937 | 1942 | /** |
1938 | - * @return array |
|
1943 | + * @return integer[] |
|
1939 | 1944 | */ |
1940 | 1945 | public static function get_default_levels() |
1941 | 1946 | { |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | } |
240 | 240 | |
241 | 241 | /** |
242 | - * @param doc_id id of document (id in mainDb.document table) |
|
242 | + * @param doc_id string of document (id in mainDb.document table) |
|
243 | 243 | * @author Sebastien Piraux <[email protected]> |
244 | 244 | * @desc Record information for upload event |
245 | 245 | * used in the works tool to record informations when |
@@ -313,6 +313,9 @@ discard block |
||
313 | 313 | * @param int session_id |
314 | 314 | * @param int learnpath_id (id of the learnpath) |
315 | 315 | * @param int learnpath_item_id (id of the learnpath_item) |
316 | + * @param integer $score |
|
317 | + * @param integer $weighting |
|
318 | + * @param integer $session_id |
|
316 | 319 | * |
317 | 320 | * @author Sebastien Piraux <[email protected]> |
318 | 321 | * @author Julio Montoya Armas <[email protected]> Reworked 2010 |
@@ -414,7 +417,7 @@ discard block |
||
414 | 417 | * @param integer Session ID (from the session table). Default value of null means "get from context". |
415 | 418 | * @param integer Learnpath ID (from c_lp table). Default value of null means "get from context". |
416 | 419 | * @param integer Learnpath item ID (from the c_lp_item table). Default value of null means "get from context". |
417 | - * @return boolean Result of the insert query |
|
420 | + * @return false|string Result of the insert query |
|
418 | 421 | */ |
419 | 422 | public static function saveQuestionAttempt( |
420 | 423 | $score, |
@@ -716,7 +719,6 @@ discard block |
||
716 | 719 | /** |
717 | 720 | * Get every email stored in the database |
718 | 721 | * |
719 | - * @param int $etId |
|
720 | 722 | * @return type |
721 | 723 | * @assert () !== false |
722 | 724 | */ |
@@ -784,11 +786,11 @@ discard block |
||
784 | 786 | /** |
785 | 787 | * Save the new message for one event and for one language |
786 | 788 | * |
787 | - * @param string $eventName |
|
789 | + * @param string $event_name |
|
788 | 790 | * @param array $users |
789 | 791 | * @param string $message |
790 | 792 | * @param string $subject |
791 | - * @param string $eventMessageLanguage |
|
793 | + * @param string $event_message_language |
|
792 | 794 | * @param int $activated |
793 | 795 | */ |
794 | 796 | public static function save_event_type_message($event_name, $users, $message, $subject, $event_message_language, $activated) |
@@ -1102,6 +1104,7 @@ discard block |
||
1102 | 1104 | * @param int exercise id |
1103 | 1105 | * @param int $courseId |
1104 | 1106 | * @param int session id |
1107 | + * @param integer $user_id |
|
1105 | 1108 | * @return array with the results |
1106 | 1109 | * |
1107 | 1110 | */ |
@@ -1197,6 +1200,7 @@ discard block |
||
1197 | 1200 | * @param int exercise id |
1198 | 1201 | * @param int $courseId |
1199 | 1202 | * @param int session id |
1203 | + * @param integer $user_id |
|
1200 | 1204 | * @return array with the results |
1201 | 1205 | * |
1202 | 1206 | */ |
@@ -1286,6 +1290,8 @@ discard block |
||
1286 | 1290 | * @param int lp id |
1287 | 1291 | * @param int lp item id |
1288 | 1292 | * @param string order asc or desc |
1293 | + * @param integer $courseId |
|
1294 | + * @param string $order |
|
1289 | 1295 | * @return array with the results |
1290 | 1296 | * |
1291 | 1297 | */ |
@@ -1345,7 +1351,7 @@ discard block |
||
1345 | 1351 | * @param int exercise id |
1346 | 1352 | * @param int $courseId |
1347 | 1353 | * @param int session id |
1348 | - * @return array with the results |
|
1354 | + * @return string with the results |
|
1349 | 1355 | * |
1350 | 1356 | */ |
1351 | 1357 | public static function count_exercise_attempts_by_user($user_id, $exercise_id, $courseId, $session_id = 0) |
@@ -1521,7 +1527,7 @@ discard block |
||
1521 | 1527 | * @param int exercise id |
1522 | 1528 | * @param int course id |
1523 | 1529 | * @param int session id |
1524 | - * @return array with the results |
|
1530 | + * @return integer with the results |
|
1525 | 1531 | * |
1526 | 1532 | */ |
1527 | 1533 | public static function get_count_exercises_attempted_by_course($courseId, $session_id = 0) |
@@ -1279,6 +1279,7 @@ discard block |
||
1279 | 1279 | |
1280 | 1280 | /** |
1281 | 1281 | * Validates the time control key |
1282 | + * @param integer $exercise_id |
|
1282 | 1283 | */ |
1283 | 1284 | public static function exercise_time_control_is_valid( |
1284 | 1285 | $exercise_id, |
@@ -1412,7 +1413,7 @@ discard block |
||
1412 | 1413 | * @param int $in_direction |
1413 | 1414 | * @param string $in_hotpot_path |
1414 | 1415 | * @param bool $in_get_count |
1415 | - * @param null $where_condition |
|
1416 | + * @param string $where_condition |
|
1416 | 1417 | * @return array|int |
1417 | 1418 | */ |
1418 | 1419 | public static function get_exam_results_hotpotatoes_data( |
@@ -2213,7 +2214,7 @@ discard block |
||
2213 | 2214 | /** |
2214 | 2215 | * Converts a numeric value in a percentage example 0.66666 to 66.67 % |
2215 | 2216 | * @param $value |
2216 | - * @return float Converted number |
|
2217 | + * @return string Converted number |
|
2217 | 2218 | */ |
2218 | 2219 | public static function convert_to_percentage($value) |
2219 | 2220 | { |
@@ -2229,7 +2230,7 @@ discard block |
||
2229 | 2230 | * @param float $score |
2230 | 2231 | * @param float $weight |
2231 | 2232 | * @deprecated seem not to be used |
2232 | - * @return float the score rounded converted to the new range |
|
2233 | + * @return string|null the score rounded converted to the new range |
|
2233 | 2234 | */ |
2234 | 2235 | public static function convert_score($score, $weight) |
2235 | 2236 | { |
@@ -2780,6 +2781,7 @@ discard block |
||
2780 | 2781 | * @param int exercise id |
2781 | 2782 | * @param int $courseId |
2782 | 2783 | * @param int session id |
2784 | + * @param integer $user_count |
|
2783 | 2785 | * @return float Best average score |
2784 | 2786 | */ |
2785 | 2787 | public static function get_best_average_score_by_exercise( |
@@ -3219,8 +3221,9 @@ discard block |
||
3219 | 3221 | } |
3220 | 3222 | |
3221 | 3223 | /** |
3222 | - * @param array $answer |
|
3224 | + * @param string|null $answer |
|
3223 | 3225 | * @param string $user_answer |
3226 | + * @param string|null $current_answer |
|
3224 | 3227 | * @return array |
3225 | 3228 | */ |
3226 | 3229 | public static function check_fill_in_blanks($answer, $user_answer, $current_answer) |
@@ -3848,7 +3851,7 @@ discard block |
||
3848 | 3851 | |
3849 | 3852 | /** |
3850 | 3853 | * @param int $countLetter |
3851 | - * @return mixed |
|
3854 | + * @return string |
|
3852 | 3855 | */ |
3853 | 3856 | public static function detectInputAppropriateClass($countLetter) |
3854 | 3857 | { |
@@ -235,6 +235,7 @@ discard block |
||
235 | 235 | * @param string Course code |
236 | 236 | * @param string Tool ID |
237 | 237 | * @param int Internal ID used in specific tool table |
238 | + * @param string $tool_id |
|
238 | 239 | */ |
239 | 240 | function delete_all_values_for_item($course_id, $tool_id, $ref_id) { |
240 | 241 | $table_sf_values = Database :: get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES); |
@@ -248,6 +249,7 @@ discard block |
||
248 | 249 | * Defaults to the first letter of the name, otherwise iterate through available |
249 | 250 | * letters |
250 | 251 | * @param string Name |
252 | + * @param string $name |
|
251 | 253 | * @return string One-letter code, upper-case |
252 | 254 | */ |
253 | 255 | function get_specific_field_code_from_name($name) { |