@@ -15,6 +15,10 @@ |
||
| 15 | 15 | |
| 16 | 16 | // warning the goal of this function is to enforce rights managment in Chamilo |
| 17 | 17 | // thus default return value is always true |
| 18 | + |
|
| 19 | + /** |
|
| 20 | + * @param string $handler |
|
| 21 | + */ |
|
| 18 | 22 | public static function hasRight($handler) { |
| 19 | 23 | if (array_key_exists($handler, self::$rights_cache)) |
| 20 | 24 | return self::$rights_cache[$handler]; |
@@ -71,6 +71,10 @@ |
||
| 71 | 71 | |
| 72 | 72 | /** |
| 73 | 73 | * Get the terms stored at database |
| 74 | + * @param string $prefix |
|
| 75 | + * @param string $course_code |
|
| 76 | + * @param string $tool_id |
|
| 77 | + * @param integer $ref_id |
|
| 74 | 78 | * @return array Array of terms |
| 75 | 79 | */ |
| 76 | 80 | function get_terms_on_db($prefix, $course_code, $tool_id, $ref_id) { |
@@ -23,6 +23,9 @@ discard block |
||
| 23 | 23 | return chamilo_preprocess_results($results); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | +/** |
|
| 27 | + * @param string $query_string |
|
| 28 | + */ |
|
| 26 | 29 | function chamilo_query_simple_query($query_string, $offset=0, $length=10, $extra=NULL) { |
| 27 | 30 | return xapian_query($query_string, NULL, $offset, $length, $extra); |
| 28 | 31 | } |
@@ -30,7 +33,7 @@ discard block |
||
| 30 | 33 | /** |
| 31 | 34 | * Wrapper for getting boolean queries |
| 32 | 35 | * |
| 33 | - * @param string $query_string The term string |
|
| 36 | + * @param string $term |
|
| 34 | 37 | */ |
| 35 | 38 | function chamilo_get_boolean_query($term) { |
| 36 | 39 | return xapian_get_boolean_query($term); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | /** |
| 100 | 100 | * Simple getter for the db attribute |
| 101 | - * @return object The db attribute |
|
| 101 | + * @return null|XapianWritableDatabase The db attribute |
|
| 102 | 102 | */ |
| 103 | 103 | function getDb() |
| 104 | 104 | { |
@@ -108,6 +108,7 @@ discard block |
||
| 108 | 108 | /** |
| 109 | 109 | * Add this chunk to the chunk array attribute |
| 110 | 110 | * @param string Chunk of text |
| 111 | + * @param IndexableChunk $chunk |
|
| 111 | 112 | * @return void |
| 112 | 113 | */ |
| 113 | 114 | function addChunk($chunk) |
@@ -179,7 +180,7 @@ discard block |
||
| 179 | 180 | * Get document data on a xapian document |
| 180 | 181 | * |
| 181 | 182 | * @param XapianDocument $doc xapian document to push into the db |
| 182 | - * @return mixed xapian document data or FALSE if error |
|
| 183 | + * @return string xapian document data or FALSE if error |
|
| 183 | 184 | */ |
| 184 | 185 | function get_document_data($doc) |
| 185 | 186 | { |
@@ -286,7 +287,7 @@ discard block |
||
| 286 | 287 | * Replace a document in the actual db |
| 287 | 288 | * |
| 288 | 289 | * @param XapianDocument $doc xapian document to push into the db |
| 289 | - * @param Xapian::docid $did xapian document id of the document to replace |
|
| 290 | + * @param integer $did xapian document id of the document to replace |
|
| 290 | 291 | */ |
| 291 | 292 | function replace_document($doc, $did) |
| 292 | 293 | { |
@@ -45,6 +45,8 @@ discard block |
||
| 45 | 45 | * checker path (directory) |
| 46 | 46 | * @param string Absolute path to be checked (with trailing slash) |
| 47 | 47 | * @param string Checker path under which the path should be (absolute path, with trailing slash, get it from api_get_path(SYS_COURSE_PATH)) |
| 48 | + * @param string $abs_path |
|
| 49 | + * @param string $checker_path |
|
| 48 | 50 | * @return bool True if the path is under the checker, false otherwise |
| 49 | 51 | */ |
| 50 | 52 | public static function check_abs_path($abs_path, $checker_path) |
@@ -300,6 +302,7 @@ discard block |
||
| 300 | 302 | * @param string The variable to filter for XSS, this params can be a string or an array (example : array(x,y)) |
| 301 | 303 | * @param int The user status,constant allowed (STUDENT, COURSEMANAGER, ANONYMOUS, COURSEMANAGERLOWSECURITY) |
| 302 | 304 | * @param bool $filter_terms |
| 305 | + * @param integer $user_status |
|
| 303 | 306 | * @return mixed Filtered string or array |
| 304 | 307 | */ |
| 305 | 308 | public static function remove_XSS($var, $user_status = null, $filter_terms = false) |
@@ -453,7 +456,7 @@ discard block |
||
| 453 | 456 | * This method provides specific protection (against XSS and other kinds of attacks) for static images (icons) used by the system. |
| 454 | 457 | * Image paths are supposed to be given by programmers - people who know what they do, anyway, this method encourages |
| 455 | 458 | * a safe practice for generating icon paths, without using heavy solutions based on HTMLPurifier for example. |
| 456 | - * @param string $img_path The input path of the image, it could be relative or absolute URL. |
|
| 459 | + * @param string $image_path The input path of the image, it could be relative or absolute URL. |
|
| 457 | 460 | * @return string Returns sanitized image path or an empty string when the image path is not secure. |
| 458 | 461 | * @author Ivan Tcholakov, March 2011 |
| 459 | 462 | */ |
@@ -326,6 +326,7 @@ discard block |
||
| 326 | 326 | |
| 327 | 327 | /** |
| 328 | 328 | * Gets an element |
| 329 | + * @param integer $gradebook_id |
|
| 329 | 330 | */ |
| 330 | 331 | public function get_skill_info($skill_id, $gradebook_id) |
| 331 | 332 | { |
@@ -544,7 +545,7 @@ discard block |
||
| 544 | 545 | * Gets an element |
| 545 | 546 | * @param int $id |
| 546 | 547 | * |
| 547 | - * @return array|mixed |
|
| 548 | + * @return integer |
|
| 548 | 549 | */ |
| 549 | 550 | public function get($id) |
| 550 | 551 | { |
@@ -885,7 +886,7 @@ discard block |
||
| 885 | 886 | /** |
| 886 | 887 | * Get user's skills |
| 887 | 888 | * |
| 888 | - * @param int $userId User's id |
|
| 889 | + * @param integer $user_id User's id |
|
| 889 | 890 | * @param bool $get_skill_data |
| 890 | 891 | */ |
| 891 | 892 | public function get_user_skills($user_id, $get_skill_data = false) |
@@ -30,6 +30,9 @@ |
||
| 30 | 30 | $this->center_x = intval($offset_x + $this->canvas_x/2 - $this->block_size/2); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | + /** |
|
| 34 | + * @param string $class |
|
| 35 | + */ |
|
| 33 | 36 | function prepare_skill_box($skill, $position, $class) |
| 34 | 37 | { |
| 35 | 38 | $block_id = $skill['id']; |
@@ -443,6 +443,7 @@ |
||
| 443 | 443 | * @param bool hide navigation optionally |
| 444 | 444 | * @param int content per page when show navigation (optional) |
| 445 | 445 | * @param bool sort data optionally |
| 446 | + * @param boolean $visibility_options |
|
| 446 | 447 | * @return string grid html |
| 447 | 448 | */ |
| 448 | 449 | public function display_simple_grid($visibility_options, $hide_navigation = true, $per_page = 20, $sort_data = true, $grid_class = array()) |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | 102 | * @param array $conditions a list of condition (exemple : status=>STUDENT) |
| 103 | - * @param array $order_by a list of fields on which sort |
|
| 103 | + * @param string[] $order_by a list of fields on which sort |
|
| 104 | 104 | * @return array An array with all users of the platform. |
| 105 | 105 | */ |
| 106 | 106 | function get_specific_field_values_list( |
@@ -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) { |