@@ -50,7 +50,8 @@ |
||
50 | 50 | $question_values = array(); |
51 | 51 | |
52 | 52 | // Values of question options |
53 | - if (is_array($form_content['values'])) { // Check if data is correct |
|
53 | + if (is_array($form_content['values'])) { |
|
54 | +// Check if data is correct |
|
54 | 55 | foreach ($form_content['values'] as $key => & $value) { |
55 | 56 | $question_values [] = '<input size="3" type="text" id="values['.$key.']" name="values['.$key.']" value="'.$value.'" />'; |
56 | 57 | } |
@@ -1008,7 +1008,8 @@ |
||
1008 | 1008 | Event::event_access_tool(TOOL_DOCUMENT); |
1009 | 1009 | |
1010 | 1010 | /* DISPLAY */ |
1011 | -if ($groupId != 0) { // Add group name after for group documents |
|
1011 | +if ($groupId != 0) { |
|
1012 | +// Add group name after for group documents |
|
1012 | 1013 | $add_group_to_title = ' ('.$group_properties['name'].')'; |
1013 | 1014 | } |
1014 | 1015 |
@@ -99,12 +99,14 @@ |
||
99 | 99 | return $final_array; |
100 | 100 | } |
101 | 101 | |
102 | -function sort_table($a, $b) { |
|
102 | +function sort_table($a, $b) |
|
103 | +{ |
|
103 | 104 | global $tablename_column; |
104 | 105 | return strnatcmp($a[$tablename_column], $b[$tablename_column]); |
105 | 106 | } |
106 | 107 | |
107 | -function rsort_table($a, $b) { |
|
108 | +function rsort_table($a, $b) |
|
109 | +{ |
|
108 | 110 | global $tablename_column; |
109 | 111 | return strnatcmp($b[$tablename_column], $a[$tablename_column]); |
110 | 112 | } |
@@ -715,7 +715,8 @@ |
||
715 | 715 | * @version march 2008 |
716 | 716 | * @author Patrick Cool <[email protected]>, Ghent University, Belgium |
717 | 717 | */ |
718 | -function status_filter($status) { |
|
718 | +function status_filter($status) |
|
719 | +{ |
|
719 | 720 | $statusname = api_get_status_langvars(); |
720 | 721 | return $statusname[$status]; |
721 | 722 | } |
@@ -12,7 +12,8 @@ discard block |
||
12 | 12 | /** |
13 | 13 | * Validates imported data. |
14 | 14 | */ |
15 | -function validate_data($user_classes) { |
|
15 | +function validate_data($user_classes) |
|
16 | +{ |
|
16 | 17 | global $purification_option_for_usernames; |
17 | 18 | $errors = array(); |
18 | 19 | $classcodes = array(); |
@@ -67,7 +68,8 @@ discard block |
||
67 | 68 | /** |
68 | 69 | * Saves imported data. |
69 | 70 | */ |
70 | -function save_data($users_classes, $deleteUsersNotInList = false) { |
|
71 | +function save_data($users_classes, $deleteUsersNotInList = false) |
|
72 | +{ |
|
71 | 73 | |
72 | 74 | global $purification_option_for_usernames; |
73 | 75 | |
@@ -117,7 +119,8 @@ discard block |
||
117 | 119 | * @param string $file Path to the CSV-file |
118 | 120 | * @return array All course-information read from the file |
119 | 121 | */ |
120 | -function parse_csv_data($file) { |
|
122 | +function parse_csv_data($file) |
|
123 | +{ |
|
121 | 124 | $courses = Import::csvToArray($file); |
122 | 125 | return $courses; |
123 | 126 | } |
@@ -10,7 +10,8 @@ |
||
10 | 10 | /** |
11 | 11 | * Validates imported data. |
12 | 12 | */ |
13 | -function validate_data($classes) { |
|
13 | +function validate_data($classes) |
|
14 | +{ |
|
14 | 15 | $errors = array(); |
15 | 16 | $usergroup = new UserGroup(); |
16 | 17 | foreach ($classes as $index => $class) { |
@@ -69,7 +69,8 @@ |
||
69 | 69 | echo "</table>\n"; |
70 | 70 | |
71 | 71 | |
72 | -function get_all_php_files($base_path) { |
|
72 | +function get_all_php_files($base_path) |
|
73 | +{ |
|
73 | 74 | $list = scandir($base_path); |
74 | 75 | $files = array(); |
75 | 76 | foreach ($list as $item) { |
@@ -67,7 +67,8 @@ |
||
67 | 67 | return false; //cannot use if sqlite not installed |
68 | 68 | } |
69 | 69 | $err = Database::query('SELECT * FROM lang_freq'); |
70 | - if ($err === false) { //the database probably does not exist, create it |
|
70 | + if ($err === false) { |
|
71 | +//the database probably does not exist, create it |
|
71 | 72 | $err = Database::query( |
72 | 73 | 'CREATE TABLE lang_freq (' |
73 | 74 | . ' id int PRIMARY KEY AUTO_INCREMENT, ' |
@@ -14,7 +14,8 @@ |
||
14 | 14 | * Get all categories and users ids from gradebook |
15 | 15 | * @return array Categories and users ids |
16 | 16 | */ |
17 | -function getAllCategoriesAndUsers() { |
|
17 | +function getAllCategoriesAndUsers() |
|
18 | +{ |
|
18 | 19 | $table = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT); |
19 | 20 | $jointable = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION); |
20 | 21 | $joinStatement = ' JOIN '.$jointable.' ON '.$table.'.evaluation_id = '.$jointable.'.id'; |