@@ -84,15 +84,18 @@ |
||
| 84 | 84 | //echo do something to logout |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | -function validate_user($user, $pass) { |
|
| 87 | +function validate_user($user, $pass) |
|
| 88 | +{ |
|
| 88 | 89 | return true; |
| 89 | 90 | } |
| 90 | -function filter_xss($val) { |
|
| 91 | +function filter_xss($val) |
|
| 92 | +{ |
|
| 91 | 93 | //do some cleaning |
| 92 | 94 | return $val; |
| 93 | 95 | } |
| 94 | 96 | |
| 95 | -function chamilo_sso_protocol() { |
|
| 97 | +function chamilo_sso_protocol() |
|
| 98 | +{ |
|
| 96 | 99 | //get the sso_protocol from chamilo using webservices |
| 97 | 100 | return 'http://'; |
| 98 | 101 | } |
@@ -671,7 +671,7 @@ |
||
| 671 | 671 | if (api_get_setting('allow_registration') === 'approval') { |
| 672 | 672 | $TABLE_USER = Database::get_main_table(TABLE_MAIN_USER); |
| 673 | 673 | // 1. set account inactive |
| 674 | - $sql = "UPDATE $TABLE_USER SET active='0' WHERE user_id = ".$user_id; |
|
| 674 | + $sql = "update $TABLE_USER SET active='0' WHERE user_id = ".$user_id; |
|
| 675 | 675 | Database::query($sql); |
| 676 | 676 | |
| 677 | 677 | // 2. Send mail to all platform admin |
@@ -380,7 +380,8 @@ |
||
| 380 | 380 | * @param $b |
| 381 | 381 | * @return int |
| 382 | 382 | */ |
| 383 | -function sort_user($a, $b) { |
|
| 383 | +function sort_user($a, $b) |
|
| 384 | +{ |
|
| 384 | 385 | if (is_numeric($a['score']) && is_numeric($b['score'])) { |
| 385 | 386 | if ($a['score'] < $b['score']) { |
| 386 | 387 | return 1; |
@@ -262,7 +262,7 @@ |
||
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | if ($result == 1) { |
| 265 | - echo "User $user_id was added to course TEST"; |
|
| 265 | + echo "user $user_id was added to course TEST"; |
|
| 266 | 266 | } else { |
| 267 | 267 | echo $result; |
| 268 | 268 | } |
@@ -173,7 +173,7 @@ |
||
| 173 | 173 | ); |
| 174 | 174 | |
| 175 | 175 | if ($result) { |
| 176 | - $sql = "UPDATE $table SET |
|
| 176 | + $sql = "update $table SET |
|
| 177 | 177 | url_correction = '".$correctionFilePath."', |
| 178 | 178 | title_correction = '".$correctionTitle."' |
| 179 | 179 | WHERE iid = $workStudentId"; |
@@ -606,7 +606,7 @@ |
||
| 606 | 606 | public function lock($locked) |
| 607 | 607 | { |
| 608 | 608 | $table = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINK); |
| 609 | - $sql = "UPDATE $table SET locked = '".intval($locked)."' |
|
| 609 | + $sql = "update $table SET locked = '".intval($locked)."' |
|
| 610 | 610 | WHERE id='".$this->id."'"; |
| 611 | 611 | Database::query($sql); |
| 612 | 612 | } |
@@ -1890,7 +1890,7 @@ |
||
| 1890 | 1890 | public function lock($locked) |
| 1891 | 1891 | { |
| 1892 | 1892 | $table = Database::get_main_table(TABLE_MAIN_GRADEBOOK_CATEGORY); |
| 1893 | - $sql = "UPDATE $table SET locked = '".intval($locked)."' |
|
| 1893 | + $sql = "update $table SET locked = '".intval($locked)."' |
|
| 1894 | 1894 | WHERE id='".intval($this->id)."'"; |
| 1895 | 1895 | Database::query($sql); |
| 1896 | 1896 | } |
@@ -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) |
@@ -284,7 +284,7 @@ |
||
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | /** |
| 287 | - * @return null |
|
| 287 | + * @return null|integer |
|
| 288 | 288 | */ |
| 289 | 289 | public function getMinimumToValidate() |
| 290 | 290 | { |
@@ -38,7 +38,8 @@ |
||
| 38 | 38 | $new, |
| 39 | 39 | $show_equals = false, |
| 40 | 40 | $format_line_function = 'format_line' |
| 41 | -) { |
|
| 41 | +) |
|
| 42 | +{ |
|
| 42 | 43 | $oldArr = str_split_on_new_line($old); |
| 43 | 44 | $newArr = str_split_on_new_line($new); |
| 44 | 45 | |
@@ -244,7 +244,8 @@ discard block |
||
| 244 | 244 | $poly_answer = convert_coordinates($answer_question, '|'); |
| 245 | 245 | $max_coord = poly_get_max($poly_user, $poly_answer); |
| 246 | 246 | |
| 247 | - if (empty($_GET['hotspot'])) { //no user response |
|
| 247 | + if (empty($_GET['hotspot'])) { |
|
| 248 | +//no user response |
|
| 248 | 249 | $overlap = -2; |
| 249 | 250 | } else { |
| 250 | 251 | $poly_user_compiled = poly_compile($poly_user, $max_coord); |
@@ -346,7 +347,8 @@ discard block |
||
| 346 | 347 | $test = false; |
| 347 | 348 | // if ($answerId == 2 ){$test = true;} for test oars |
| 348 | 349 | |
| 349 | - if (empty($_GET['hotspot'])) { //no user response |
|
| 350 | + if (empty($_GET['hotspot'])) { |
|
| 351 | +//no user response |
|
| 350 | 352 | $overlap = false; |
| 351 | 353 | } else { |
| 352 | 354 | // poly_compile really works tested with gnuplot |