@@ -24,6 +24,10 @@ discard block |
||
24 | 24 | * @param int Question ID |
25 | 25 | * @param int $resultsDisabled |
26 | 26 | * @param string $originalStudentAnswer |
27 | + * @param integer $feedbackType |
|
28 | + * @param string $answer |
|
29 | + * @param integer $id |
|
30 | + * @param integer $questionId |
|
27 | 31 | * @return void |
28 | 32 | */ |
29 | 33 | public static function display_fill_in_blanks_answer($feedbackType, $answer, $id, $questionId, $resultsDisabled, $originalStudentAnswer = '') |
@@ -62,6 +66,10 @@ discard block |
||
62 | 66 | * @param string Answer text |
63 | 67 | * @param int Exercise ID |
64 | 68 | * @param int Question ID |
69 | + * @param integer $feedback_type |
|
70 | + * @param string $answer |
|
71 | + * @param integer $id |
|
72 | + * @param integer $questionId |
|
65 | 73 | * @return void |
66 | 74 | */ |
67 | 75 | static function display_calculated_answer($feedback_type, $answer, $id, $questionId) |
@@ -95,6 +103,9 @@ discard block |
||
95 | 103 | * @param string Answer text |
96 | 104 | * @param int Exercise ID |
97 | 105 | * @param int Question ID |
106 | + * @param integer $feedback_type |
|
107 | + * @param integer $exe_id |
|
108 | + * @param integer $questionId |
|
98 | 109 | * @return void |
99 | 110 | */ |
100 | 111 | static function display_free_answer($feedback_type, $answer, $exe_id, $questionId, $questionScore = null) |
@@ -117,6 +128,12 @@ discard block |
||
117 | 128 | } |
118 | 129 | } |
119 | 130 | |
131 | + /** |
|
132 | + * @param integer $feedback_type |
|
133 | + * @param integer $id |
|
134 | + * @param integer $questionId |
|
135 | + * @param Nanogong $nano |
|
136 | + */ |
|
120 | 137 | static function display_oral_expression_answer($feedback_type, $answer, $id, $questionId, $nano = null) |
121 | 138 | { |
122 | 139 | if (isset($nano)) { |
@@ -158,6 +175,7 @@ discard block |
||
158 | 175 | * @param string $answer |
159 | 176 | * @param string $studentChoice |
160 | 177 | * @param string $answerComment |
178 | + * @param integer $feedback_type |
|
161 | 179 | */ |
162 | 180 | static function display_hotspot_answer($feedback_type, $answerId, $answer, $studentChoice, $answerComment, $in_results_disabled) |
163 | 181 | { |
@@ -224,6 +242,12 @@ discard block |
||
224 | 242 | * @param integer Exercise ID |
225 | 243 | * @param integer Question ID |
226 | 244 | * @param boolean Whether to show the answer comment or not |
245 | + * @param integer $answerType |
|
246 | + * @param string $answer |
|
247 | + * @param string $answerComment |
|
248 | + * @param integer $answerCorrect |
|
249 | + * @param integer $id |
|
250 | + * @param integer $questionId |
|
227 | 251 | * @return void |
228 | 252 | */ |
229 | 253 | static function display_unique_or_multiple_answer( |
@@ -308,6 +332,13 @@ discard block |
||
308 | 332 | * @param integer Exercise ID |
309 | 333 | * @param integer Question ID |
310 | 334 | * @param boolean Whether to show the answer comment or not |
335 | + * @param integer $feedback_type |
|
336 | + * @param integer $answerType |
|
337 | + * @param string $answer |
|
338 | + * @param string $answerComment |
|
339 | + * @param integer $answerCorrect |
|
340 | + * @param integer $id |
|
341 | + * @param integer $questionId |
|
311 | 342 | * @return void |
312 | 343 | */ |
313 | 344 | static function display_multiple_answer_true_false( |
@@ -398,6 +429,13 @@ discard block |
||
398 | 429 | * @param integer Exercise ID |
399 | 430 | * @param integer Question ID |
400 | 431 | * @param boolean Whether to show the answer comment or not |
432 | + * @param integer $feedback_type |
|
433 | + * @param integer $answerType |
|
434 | + * @param string $answer |
|
435 | + * @param string $answerComment |
|
436 | + * @param integer $answerCorrect |
|
437 | + * @param integer $id |
|
438 | + * @param integer $questionId |
|
401 | 439 | * @return void |
402 | 440 | */ |
403 | 441 | static function display_multiple_answer_combination_true_false( |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | * @param string Name of common tag to place each line in |
158 | 158 | * @param string Name of the root element. A root element should always be given. |
159 | 159 | * @param string Encoding in which the data is provided |
160 | - * @return void Prompts the user for a file download |
|
160 | + * @return boolean Prompts the user for a file download |
|
161 | 161 | */ |
162 | 162 | public static function export_complex_table_xml( |
163 | 163 | $data, |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | * @param string $name |
284 | 284 | * @param string $format |
285 | 285 | * |
286 | - * @return bool |
|
286 | + * @return false|null |
|
287 | 287 | */ |
288 | 288 | public static function htmlToOdt($html, $name, $format = 'odt') |
289 | 289 | { |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | } |
124 | 124 | |
125 | 125 | /** |
126 | - * @return array |
|
126 | + * @return string[] |
|
127 | 127 | */ |
128 | 128 | public static function getValidExtraFieldTypes() |
129 | 129 | { |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | |
200 | 200 | /** |
201 | 201 | * @param array $conditions |
202 | - * @param null $order_field_options_by |
|
202 | + * @param string $order_field_options_by |
|
203 | 203 | * |
204 | 204 | * @return array |
205 | 205 | */ |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | /** |
238 | 238 | * @param string $variable |
239 | 239 | * |
240 | - * @return array|bool |
|
240 | + * @return integer |
|
241 | 241 | */ |
242 | 242 | public function get_handler_field_info_by_field_variable($variable) |
243 | 243 | { |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | /** |
320 | 320 | * @param string $handler |
321 | 321 | * |
322 | - * @return array |
|
322 | + * @return string[] |
|
323 | 323 | */ |
324 | 324 | public static function get_extra_fields_by_handler($handler) |
325 | 325 | { |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | } |
497 | 497 | |
498 | 498 | /** |
499 | - * @return array |
|
499 | + * @return string[] |
|
500 | 500 | */ |
501 | 501 | public function get_field_types() |
502 | 502 | { |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | /** |
507 | 507 | * @param int $id |
508 | 508 | * |
509 | - * @return null |
|
509 | + * @return string|null |
|
510 | 510 | */ |
511 | 511 | public function get_field_type_by_id($id) |
512 | 512 | { |
@@ -691,7 +691,6 @@ discard block |
||
691 | 691 | * @param FormValidator $form |
692 | 692 | * @param array $extraData |
693 | 693 | * @param bool $admin_permissions |
694 | - * @param int $user_id |
|
695 | 694 | * @param array $extra |
696 | 695 | * @param int $itemId |
697 | 696 | * @param array $exclude variables of extra field to exclude |
@@ -1592,7 +1591,7 @@ discard block |
||
1592 | 1591 | } |
1593 | 1592 | |
1594 | 1593 | /** |
1595 | - * @return array |
|
1594 | + * @return string[] |
|
1596 | 1595 | */ |
1597 | 1596 | public function getJqgridColumnNames() |
1598 | 1597 | { |
@@ -1832,7 +1831,7 @@ discard block |
||
1832 | 1831 | } |
1833 | 1832 | |
1834 | 1833 | /** |
1835 | - * @param array $columns |
|
1834 | + * @param string[] $columns |
|
1836 | 1835 | * @param array $column_model |
1837 | 1836 | * @param array $extraFields |
1838 | 1837 | * @return array |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
46 | - * @return ExtraField |
|
46 | + * @return string |
|
47 | 47 | */ |
48 | 48 | public function getExtraField() |
49 | 49 | { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | * This function is used with $extraField->addElements() |
73 | 73 | * @param array $params array for the insertion into the *_field_values table |
74 | 74 | * |
75 | - * @return mixed false on empty params, void otherwise |
|
75 | + * @return false|null false on empty params, void otherwise |
|
76 | 76 | * @assert (array()) === false |
77 | 77 | */ |
78 | 78 | public function saveFieldValues($params) |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | * @param int $item_id Item ID (It could be a session_id, course_id or user_id) |
501 | 501 | * @param int $field_id Field ID (the ID from the *_field table) |
502 | 502 | * @param bool $transform Whether to transform the result to a human readable strings |
503 | - * @return mixed A structured array with the field_id and field_value, or false on error |
|
503 | + * @return string A structured array with the field_id and field_value, or false on error |
|
504 | 504 | * @assert (-1,-1) === false |
505 | 505 | */ |
506 | 506 | public function get_values_by_handler_and_field_id($item_id, $field_id, $transform = false) |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | * @param int $item_id Item ID from the original table |
594 | 594 | * @param string $field_variable The name of the field we are looking for |
595 | 595 | * @param bool $transform |
596 | - * @param bool $allVisibility |
|
596 | + * @param bool $visibility |
|
597 | 597 | * |
598 | 598 | * @return mixed Array of results, or false on error or not found |
599 | 599 | * @assert (-1,'') === false |
@@ -145,6 +145,7 @@ |
||
145 | 145 | |
146 | 146 | /** |
147 | 147 | * @param array $dates result of parseDateRange() |
148 | + * @param string $format |
|
148 | 149 | * |
149 | 150 | * @return bool |
150 | 151 | */ |
@@ -25,8 +25,7 @@ |
||
25 | 25 | * Get allowed tags |
26 | 26 | * @param int $mode NO_HTML, STUDENT_HTML, TEACHER_HTML, |
27 | 27 | * STUDENT_HTML_FULLPAGE or TEACHER_HTML_FULLPAGE |
28 | - * @param boolean $fullpage If true, the allowed tags for full-page editing |
|
29 | - * are returned. |
|
28 | + * @return string |
|
30 | 29 | */ |
31 | 30 | static function get_allowed_tags($mode) |
32 | 31 | { |
@@ -9,7 +9,6 @@ |
||
9 | 9 | { |
10 | 10 | /** |
11 | 11 | * @param $value array Uploaded file info (from $_FILES) |
12 | - * @param null $options |
|
13 | 12 | * @return bool |
14 | 13 | */ |
15 | 14 | public function validate($elementValue, $maxSize) |
@@ -16,7 +16,7 @@ |
||
16 | 16 | * |
17 | 17 | * @param string Mobile phone number to be validated |
18 | 18 | * @param string Not using it. Just to respect the declaration |
19 | - * @return boolean Returns true if valid, false otherwise. |
|
19 | + * @return integer Returns true if valid, false otherwise. |
|
20 | 20 | */ |
21 | 21 | function validate($mobilePhoneNumber, $options = null) |
22 | 22 | { |
@@ -456,6 +456,10 @@ discard block |
||
456 | 456 | |
457 | 457 | |
458 | 458 | // Add warning(s) to $this->warnings[] |
459 | + |
|
460 | + /** |
|
461 | + * @param string $message |
|
462 | + */ |
|
459 | 463 | public function warning($message) { |
460 | 464 | |
461 | 465 | if (is_array($message)) { |
@@ -482,6 +486,11 @@ discard block |
||
482 | 486 | |
483 | 487 | |
484 | 488 | // Convert string between charsets -- iconv() wrapper |
489 | + |
|
490 | + /** |
|
491 | + * @param string $out_charset |
|
492 | + * @param string $string |
|
493 | + */ |
|
485 | 494 | public function iconv($in_charset, $out_charset, $string, $drop01 = false) { |
486 | 495 | |
487 | 496 | if ($drop01 && ($string === "\x00" || $string === "\x01")) { |
@@ -509,6 +518,9 @@ discard block |
||
509 | 518 | |
510 | 519 | |
511 | 520 | |
521 | + /** |
|
522 | + * @param string $name |
|
523 | + */ |
|
512 | 524 | public function include_module($name) { |
513 | 525 | |
514 | 526 | if (!file_exists($this->include_path.'module.'.$name.'.php')) { |
@@ -1342,6 +1354,10 @@ discard block |
||
1342 | 1354 | |
1343 | 1355 | |
1344 | 1356 | // Convert Big Endian byte string to int - max 32 bits |
1357 | + |
|
1358 | + /** |
|
1359 | + * @param string $byte_word |
|
1360 | + */ |
|
1345 | 1361 | public static function BigEndian2Int($byte_word, $signed = false) { |
1346 | 1362 | |
1347 | 1363 | $int_value = 0; |
@@ -1391,6 +1407,9 @@ discard block |
||
1391 | 1407 | |
1392 | 1408 | |
1393 | 1409 | |
1410 | + /** |
|
1411 | + * @param string $byte_word |
|
1412 | + */ |
|
1394 | 1413 | public static function BigEndian2Float($byte_word) { |
1395 | 1414 | |
1396 | 1415 | // ANSI/IEEE Standard 754-1985, Standard for Binary Floating Point Arithmetic |
@@ -1478,6 +1497,9 @@ discard block |
||
1478 | 1497 | |
1479 | 1498 | |
1480 | 1499 | |
1500 | + /** |
|
1501 | + * @param string $binary_numerator |
|
1502 | + */ |
|
1481 | 1503 | public static function DecimalBinary2Float($binary_numerator) { |
1482 | 1504 | $numerator = bindec($binary_numerator); |
1483 | 1505 | $denominator = bindec('1'.str_repeat('0', strlen($binary_numerator))); |