@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | public $conditions; |
49 | 49 | |
50 | 50 | /** |
51 | - * @param Logger $logger |
|
51 | + * @param Monolog\Logger $logger |
|
52 | 52 | * @param array |
53 | 53 | */ |
54 | 54 | public function __construct($logger, $conditions) |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
69 | - * @return mixed |
|
69 | + * @return boolean |
|
70 | 70 | */ |
71 | 71 | public function getDumpValues() |
72 | 72 | { |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | * @param string $author |
267 | 267 | * @param string $filename |
268 | 268 | * @param int $filesize |
269 | - * @param array $recipient_ids |
|
269 | + * @param unknown_type|null $recipient_ids |
|
270 | 270 | */ |
271 | 271 | public function _createNewSentWork($uploader_id, $title, $description, $author, $filename, $filesize, $recipient_ids) |
272 | 272 | { |
@@ -584,6 +584,7 @@ discard block |
||
584 | 584 | |
585 | 585 | /** |
586 | 586 | * Deletes all the received categories and work of this person |
587 | + * @param integer $id |
|
587 | 588 | */ |
588 | 589 | function deleteReceivedWorkFolder($id) |
589 | 590 | { |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | /** |
24 | 24 | * This function is a wrapper function for the multiple actions feature. |
25 | -* @return Mixed If there is a problem, return a string message, otherwise nothing |
|
25 | +* @return string|null If there is a problem, return a string message, otherwise nothing |
|
26 | 26 | * @author Patrick Cool <[email protected]>, Ghent University |
27 | 27 | * @version march 2006 |
28 | 28 | */ |
@@ -209,9 +209,9 @@ discard block |
||
209 | 209 | * |
210 | 210 | * @param $id the id of the file we are moving |
211 | 211 | * @param $target the id of the folder we are moving to |
212 | -* @param $part are we moving a received file or a sent file? |
|
212 | +* @param string $part are we moving a received file or a sent file? |
|
213 | 213 | * |
214 | -* @return language string |
|
214 | +* @return string string |
|
215 | 215 | * |
216 | 216 | * @author Patrick Cool <[email protected]>, Ghent University |
217 | 217 | * @version march 2006 |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | * @param $id the unique id of the file |
291 | 291 | * @param $part are we dealing with a sent or with a received file? |
292 | 292 | * |
293 | -* @return html code |
|
293 | +* @return string code |
|
294 | 294 | * |
295 | 295 | * @author Patrick Cool <[email protected]>, Ghent University |
296 | 296 | * @version march 2006 |
@@ -737,6 +737,7 @@ discard block |
||
737 | 737 | } |
738 | 738 | |
739 | 739 | /** |
740 | +* @param string $user_id |
|
740 | 741 | * @return boolean indicating if user with user_id=$user_id is a course member |
741 | 742 | * @todo check if this function is still necessary. There might be a library function for this. |
742 | 743 | */ |
@@ -860,7 +861,7 @@ discard block |
||
860 | 861 | } |
861 | 862 | |
862 | 863 | /** |
863 | - * @return array|null|string |
|
864 | + * @return string|null |
|
864 | 865 | */ |
865 | 866 | function store_add_dropbox() |
866 | 867 | { |
@@ -1077,7 +1078,7 @@ discard block |
||
1077 | 1078 | /** |
1078 | 1079 | * This function returns the html code to display the feedback messages on a given dropbox file |
1079 | 1080 | * @param $feedback_array an array that contains all the feedback messages about the given document. |
1080 | -* @return html code |
|
1081 | +* @return string code |
|
1081 | 1082 | * @todo add the form for adding new comment (if the other party has not deleted it yet). |
1082 | 1083 | * |
1083 | 1084 | * @author Patrick Cool <[email protected]>, Ghent University |
@@ -1094,7 +1095,7 @@ discard block |
||
1094 | 1095 | |
1095 | 1096 | /** |
1096 | 1097 | * this function returns the code for the form for adding a new feedback message to a dropbox file. |
1097 | -* @return html code |
|
1098 | +* @return string code |
|
1098 | 1099 | * |
1099 | 1100 | * @author Patrick Cool <[email protected]>, Ghent University |
1100 | 1101 | * @version march 2006 |
@@ -1155,7 +1156,7 @@ discard block |
||
1155 | 1156 | } |
1156 | 1157 | |
1157 | 1158 | /** |
1158 | -* @return a language string (depending on the success or failure. |
|
1159 | +* @return string language string (depending on the success or failure. |
|
1159 | 1160 | * |
1160 | 1161 | * @author Patrick Cool <[email protected]>, Ghent University |
1161 | 1162 | * @version march 2006 |
@@ -186,6 +186,7 @@ discard block |
||
186 | 186 | * Reads answer information from the data base ordered by parameter |
187 | 187 | * @param string Field we want to order by |
188 | 188 | * @param string DESC or ASC |
189 | + * @param string $field |
|
189 | 190 | * @author Frederic Vauthier |
190 | 191 | */ |
191 | 192 | public function readOrderedBy($field, $order='ASC') |
@@ -300,6 +301,7 @@ discard block |
||
300 | 301 | * returns the question ID of the destination question |
301 | 302 | * |
302 | 303 | * @author Julio Montoya |
304 | + * @param integer $id |
|
303 | 305 | * @return integer - the question ID |
304 | 306 | */ |
305 | 307 | public function selectDestination($id) |
@@ -321,6 +323,7 @@ discard block |
||
321 | 323 | |
322 | 324 | /** |
323 | 325 | * return array answer by id else return a bool |
326 | + * @param integer $auto_id |
|
324 | 327 | */ |
325 | 328 | public function selectAnswerByAutoId($auto_id) |
326 | 329 | { |
@@ -435,6 +438,7 @@ discard block |
||
435 | 438 | * |
436 | 439 | * @author Olivier Brouckaert |
437 | 440 | * @param - integer $id - answer ID |
441 | + * @param integer $id |
|
438 | 442 | * @return integer - 0 if bad answer, not 0 if good answer |
439 | 443 | */ |
440 | 444 | public function isCorrect($id) |
@@ -447,6 +451,7 @@ discard block |
||
447 | 451 | * |
448 | 452 | * @author Olivier Brouckaert |
449 | 453 | * @param - integer $id - answer ID |
454 | + * @param integer $id |
|
450 | 455 | * @return string - answer comment |
451 | 456 | */ |
452 | 457 | public function selectComment($id) |
@@ -459,6 +464,7 @@ discard block |
||
459 | 464 | * |
460 | 465 | * @author Olivier Brouckaert |
461 | 466 | * @param - integer $id - answer ID |
467 | + * @param integer $id |
|
462 | 468 | * @return integer - answer weighting |
463 | 469 | */ |
464 | 470 | public function selectWeighting($id) |
@@ -483,6 +489,7 @@ discard block |
||
483 | 489 | * |
484 | 490 | * @author Olivier Brouckaert |
485 | 491 | * @param integer Answer ID |
492 | + * @param integer $id |
|
486 | 493 | * @return integer Answer position |
487 | 494 | */ |
488 | 495 | public function selectHotspotCoordinates($id) |
@@ -495,6 +502,7 @@ discard block |
||
495 | 502 | * |
496 | 503 | * @author Toon Keppens |
497 | 504 | * @param integer Answer ID |
505 | + * @param integer $id |
|
498 | 506 | * @return integer Answer position |
499 | 507 | */ |
500 | 508 | public function selectHotspotType($id) |
@@ -550,6 +558,7 @@ discard block |
||
550 | 558 | * @param string $destination |
551 | 559 | * @param string $hotspot_coordinates |
552 | 560 | * @param string $hotspot_type |
561 | + * @param integer $autoId |
|
553 | 562 | */ |
554 | 563 | public function updateAnswers( |
555 | 564 | $autoId, |
@@ -720,6 +729,7 @@ discard block |
||
720 | 729 | * @author Olivier Brouckaert |
721 | 730 | * @param int question id |
722 | 731 | * @param array destination course info (result of the function api_get_course_info() ) |
732 | + * @param string $newQuestionId |
|
723 | 733 | */ |
724 | 734 | public function duplicate($newQuestionId, $course_info = null) |
725 | 735 | { |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | } |
284 | 284 | |
285 | 285 | /** |
286 | - * @return int |
|
286 | + * @return string |
|
287 | 287 | */ |
288 | 288 | public function selectPassPercentage() |
289 | 289 | { |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | * tells if questions are selected randomly, and if so returns the draws |
379 | 379 | * |
380 | 380 | * @author Olivier Brouckaert |
381 | - * @return integer - 0 if not random, otherwise the draws |
|
381 | + * @return boolean - 0 if not random, otherwise the draws |
|
382 | 382 | */ |
383 | 383 | public function isRandom() |
384 | 384 | { |
@@ -1856,7 +1856,7 @@ discard block |
||
1856 | 1856 | * @param int int lp id |
1857 | 1857 | * @param int int lp item id |
1858 | 1858 | * @param int int lp item_view id |
1859 | - * @param float $weight |
|
1859 | + * @param integer $weight |
|
1860 | 1860 | * @param array question list |
1861 | 1861 | */ |
1862 | 1862 | public function save_stat_track_exercise_info( |
@@ -4121,6 +4121,7 @@ discard block |
||
4121 | 4121 | /** |
4122 | 4122 | * Sends a notification when a user ends an examn |
4123 | 4123 | * |
4124 | + * @param integer $exe_id |
|
4124 | 4125 | */ |
4125 | 4126 | public function send_mail_notification_for_exam($question_list_answers, $origin, $exe_id) |
4126 | 4127 | { |
@@ -4201,6 +4202,7 @@ discard block |
||
4201 | 4202 | /** |
4202 | 4203 | * Sends a notification when a user ends an examn |
4203 | 4204 | * |
4205 | + * @param integer $exe_id |
|
4204 | 4206 | */ |
4205 | 4207 | function send_notification_for_open_questions($question_list_answers, $origin, $exe_id) |
4206 | 4208 | { |
@@ -4298,6 +4300,9 @@ discard block |
||
4298 | 4300 | } |
4299 | 4301 | } |
4300 | 4302 | |
4303 | + /** |
|
4304 | + * @param integer $exe_id |
|
4305 | + */ |
|
4301 | 4306 | function send_notification_for_oral_questions($question_list_answers, $origin, $exe_id) |
4302 | 4307 | { |
4303 | 4308 | if (api_get_course_setting('email_alert_manager_on_new_quiz') != 1 ) { |
@@ -4391,7 +4396,7 @@ discard block |
||
4391 | 4396 | |
4392 | 4397 | /** |
4393 | 4398 | * @param array $user_data result of api_get_user_info() |
4394 | - * @param null $start_date |
|
4399 | + * @param string $start_date |
|
4395 | 4400 | * @param null $duration |
4396 | 4401 | * @param string $ip Optional. The user IP |
4397 | 4402 | * @return string |
@@ -4449,7 +4454,7 @@ discard block |
||
4449 | 4454 | * @param int Maximum number of attempts (0 if no limit) |
4450 | 4455 | * @param int Feedback type |
4451 | 4456 | * @todo this was function was added due the import exercise via CSV |
4452 | - * @return int New exercise ID |
|
4457 | + * @return string New exercise ID |
|
4453 | 4458 | */ |
4454 | 4459 | public function createExercise( |
4455 | 4460 | $title, |
@@ -10,6 +10,10 @@ |
||
10 | 10 | if ( count( get_included_files() ) == 1 ) die( '---' ); |
11 | 11 | |
12 | 12 | if (!function_exists('mime_content_type')) { |
13 | + |
|
14 | + /** |
|
15 | + * @param string $filename |
|
16 | + */ |
|
13 | 17 | function mime_content_type($filename) { |
14 | 18 | return DocumentManager::file_get_mime_type((string)$filename); |
15 | 19 | } |
@@ -55,6 +55,8 @@ discard block |
||
55 | 55 | * Gets the uploaded file (from $_FILES) and unzip it to the given directory |
56 | 56 | * @param string The directory where to do the work |
57 | 57 | * @param string The path of the temporary directory where the exercise was uploaded and unzipped |
58 | + * @param string $baseWorkDir |
|
59 | + * @param string $uploadPath |
|
58 | 60 | * @return bool True on success, false on failure |
59 | 61 | */ |
60 | 62 | function get_and_unzip_uploaded_exercise($baseWorkDir, $uploadPath) { |
@@ -229,7 +231,10 @@ discard block |
||
229 | 231 | * @param string Path to the directory with the file to be parsed (without final /) |
230 | 232 | * @param string Name of the last directory part for the file (without /) |
231 | 233 | * @param string Name of the file to be parsed (including extension) |
232 | - * @return mixed True on success, error message on error |
|
234 | + * @param string $exercisePath |
|
235 | + * @param string $file |
|
236 | + * @param string $questionFile |
|
237 | + * @return string|boolean True on success, error message on error |
|
233 | 238 | * @assert ('','','') === false |
234 | 239 | */ |
235 | 240 | function aiken_parse_file(&$exercise_info, $exercisePath, $file, $questionFile) { |
@@ -30,6 +30,8 @@ discard block |
||
30 | 30 | * Unzip the exercise in the temp folder |
31 | 31 | * @param string The path of the temporary directory where the exercise was uploaded and unzipped |
32 | 32 | * @param string |
33 | + * @param string $baseWorkDir |
|
34 | + * @param string $uploadPath |
|
33 | 35 | * @return bool |
34 | 36 | */ |
35 | 37 | function get_and_unzip_uploaded_exercise($baseWorkDir, $uploadPath) |
@@ -217,9 +219,9 @@ discard block |
||
217 | 219 | |
218 | 220 | /** |
219 | 221 | * Parses a given XML file and fills global arrays with the elements |
220 | - * @param $exercisePath |
|
221 | - * @param $file |
|
222 | - * @param $questionFile |
|
222 | + * @param string $exercisePath |
|
223 | + * @param string $file |
|
224 | + * @param string $questionFile |
|
223 | 225 | * @return bool |
224 | 226 | */ |
225 | 227 | function parse_file($exercisePath, $file, $questionFile) |
@@ -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 | { |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | |
155 | 155 | /** |
156 | 156 | * Constructor. |
157 | - * @param $exe The Exercise instance to export |
|
157 | + * @param Exercise $exe The Exercise instance to export |
|
158 | 158 | * @author Amand Tihon <[email protected]> |
159 | 159 | */ |
160 | 160 | function ImsSection($exe) |
@@ -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; |