@@ -8,19 +8,19 @@ |
||
8 | 8 | */ |
9 | 9 | class DataForm extends FormValidator |
10 | 10 | { |
11 | - const TYPE_IMPORT = 1; |
|
12 | - const TYPE_EXPORT = 2; |
|
13 | - const TYPE_EXPORT_PDF = 3; |
|
11 | + const TYPE_IMPORT = 1; |
|
12 | + const TYPE_EXPORT = 2; |
|
13 | + const TYPE_EXPORT_PDF = 3; |
|
14 | 14 | |
15 | - /** |
|
16 | - * Builds a form containing form items based on a given parameter |
|
17 | - * @param int form_type 1=import, 2=export |
|
18 | - * @param obj cat_obj the category object |
|
19 | - * @param obj res_obj the result object |
|
20 | - * @param string form name |
|
21 | - * @param method |
|
22 | - * @param action |
|
23 | - */ |
|
15 | + /** |
|
16 | + * Builds a form containing form items based on a given parameter |
|
17 | + * @param int form_type 1=import, 2=export |
|
18 | + * @param obj cat_obj the category object |
|
19 | + * @param obj res_obj the result object |
|
20 | + * @param string form name |
|
21 | + * @param method |
|
22 | + * @param action |
|
23 | + */ |
|
24 | 24 | public function __construct($form_type, $form_name, $method = 'post', $action = null, $target = '', $locked_status) |
25 | 25 | { |
26 | 26 | parent:: __construct($form_name, $method, $action, $target); |
@@ -70,7 +70,7 @@ |
||
70 | 70 | $htmlHeadXtra[] = '<style> |
71 | 71 | body { background: none;} |
72 | 72 | </style>'; |
73 | - Display::display_reduced_header(); |
|
73 | + Display::display_reduced_header(); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | $message = Session::read('attempt_remaining'); |
@@ -97,7 +97,7 @@ |
||
97 | 97 | // Theme calls |
98 | 98 | $show_learn_path = true; |
99 | 99 | if (isset($_SESSION['oLP']) && is_object($_SESSION['oLP'])) { |
100 | - $lp_theme_css = $_SESSION['oLP']->get_theme(); |
|
100 | + $lp_theme_css = $_SESSION['oLP']->get_theme(); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | if ($mode == 'fullpage') { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $oskill = new Skill(); |
71 | 71 | $skill_id = $oskill->add($skill); |
72 | 72 | $parents[$saved_id] = $skill_id; |
73 | - } |
|
73 | + } |
|
74 | 74 | } |
75 | 75 | } |
76 | 76 | |
@@ -81,12 +81,12 @@ discard block |
||
81 | 81 | */ |
82 | 82 | function parse_csv_data($file) |
83 | 83 | { |
84 | - $skills = Import :: csvToArray($file); |
|
85 | - foreach ($skills as $index => $skill) { |
|
86 | - $skills[$index] = $skill; |
|
87 | - } |
|
84 | + $skills = Import :: csvToArray($file); |
|
85 | + foreach ($skills as $index => $skill) { |
|
86 | + $skills[$index] = $skill; |
|
87 | + } |
|
88 | 88 | |
89 | - return $skills; |
|
89 | + return $skills; |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | function element_start($parser, $data) |
96 | 96 | { |
97 | - $data = api_utf8_decode($data); |
|
97 | + $data = api_utf8_decode($data); |
|
98 | 98 | global $skill; |
99 | 99 | global $current_tag; |
100 | 100 | switch ($data) { |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | */ |
112 | 112 | function element_end($parser, $data) |
113 | 113 | { |
114 | - $data = api_utf8_decode($data); |
|
114 | + $data = api_utf8_decode($data); |
|
115 | 115 | global $skill; |
116 | 116 | global $skills; |
117 | 117 | global $current_value; |
@@ -130,9 +130,9 @@ discard block |
||
130 | 130 | */ |
131 | 131 | function character_data($parser, $data) |
132 | 132 | { |
133 | - $data = trim(api_utf8_decode($data)); |
|
134 | - global $current_value; |
|
135 | - $current_value = $data; |
|
133 | + $data = trim(api_utf8_decode($data)); |
|
134 | + global $current_value; |
|
135 | + $current_value = $data; |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | /** |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | xml_parse($parser, api_utf8_encode_xml(file_get_contents($file))); |
155 | 155 | xml_parser_free($parser); |
156 | 156 | |
157 | - return $skills; |
|
157 | + return $skills; |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | $this_section = SECTION_PLATFORM_ADMIN; |
@@ -29,35 +29,35 @@ |
||
29 | 29 | echo '<input type="hidden" name="confirmed" value="yes">'; |
30 | 30 | echo '<table border="0" cellspacing="0" width="100%">'; |
31 | 31 | echo '<tr align="center" id="header3">' . |
32 | - '<td width="15%"><input type="button" value="'.get_lang('AllSlashNone').'" onClick="checkAll();"></td>' . |
|
33 | - '<td width="40%"><b>'.get_lang('Email').'</b></td>' . |
|
34 | - ($is_western_name_order |
|
35 | - ? '<td width="15%"><b>'.get_lang('FirstName').'</b></td>' . |
|
36 | - '<td width="15%"><b>'.get_lang('Name').'</b></td>' |
|
37 | - : '<td width="15%"><b>'.get_lang('Name').'</b></td>' . |
|
38 | - '<td width="15%"><b>'.get_lang('FirstName').'</b></td>') . |
|
39 | - '<td width="15%"><b>'.get_lang('Login').'</b></td>' . |
|
40 | - '</tr>'."\n"; |
|
32 | + '<td width="15%"><input type="button" value="'.get_lang('AllSlashNone').'" onClick="checkAll();"></td>' . |
|
33 | + '<td width="40%"><b>'.get_lang('Email').'</b></td>' . |
|
34 | + ($is_western_name_order |
|
35 | + ? '<td width="15%"><b>'.get_lang('FirstName').'</b></td>' . |
|
36 | + '<td width="15%"><b>'.get_lang('Name').'</b></td>' |
|
37 | + : '<td width="15%"><b>'.get_lang('Name').'</b></td>' . |
|
38 | + '<td width="15%"><b>'.get_lang('FirstName').'</b></td>') . |
|
39 | + '<td width="15%"><b>'.get_lang('Login').'</b></td>' . |
|
40 | + '</tr>'."\n"; |
|
41 | 41 | while (list ($key, $val) = each($nom_form)) { |
42 | - $nbre=$nbre+1; |
|
43 | - if($nbre & 1) $ndiv=2; else $ndiv=3; |
|
44 | - echo '<tr align="center" id="header'.$ndiv.'">'; |
|
45 | - echo '<td><input type="checkbox" name="checkboxes[]" value="'.$key.'" checked="checked"></td>'; |
|
46 | - echo '<td>'.$email_form[$key].'<input type="hidden" name="email_form['.$key.']" size="40" value="'.$email_form[$key].'"></td>'; |
|
47 | - if ($is_western_name_order) { |
|
48 | - echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>'; |
|
49 | - echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>'; |
|
50 | - } else { |
|
51 | - echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>'; |
|
52 | - echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>'; |
|
53 | - } |
|
54 | - echo '<td>'.$username_form[$key].'<input type="hidden" name="username_form['.$key.']" size="10" value="'.$username_form[$key].'">'; |
|
55 | - echo '<input type="hidden" name="tutor_form['.$key.']" value="0">'; |
|
56 | - echo '<input type="hidden" name="admin_form['.$key.']" value="1">'; |
|
57 | - echo '<input type="hidden" name="password_form['.$key.']" value="'.$password_form[$key].'">'; |
|
58 | - echo '<input type="hidden" name="statut['.$key.']" value="'.$statut.'">'; |
|
59 | - echo '</td>'; |
|
60 | - echo '</tr>'; |
|
42 | + $nbre=$nbre+1; |
|
43 | + if($nbre & 1) $ndiv=2; else $ndiv=3; |
|
44 | + echo '<tr align="center" id="header'.$ndiv.'">'; |
|
45 | + echo '<td><input type="checkbox" name="checkboxes[]" value="'.$key.'" checked="checked"></td>'; |
|
46 | + echo '<td>'.$email_form[$key].'<input type="hidden" name="email_form['.$key.']" size="40" value="'.$email_form[$key].'"></td>'; |
|
47 | + if ($is_western_name_order) { |
|
48 | + echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>'; |
|
49 | + echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>'; |
|
50 | + } else { |
|
51 | + echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>'; |
|
52 | + echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>'; |
|
53 | + } |
|
54 | + echo '<td>'.$username_form[$key].'<input type="hidden" name="username_form['.$key.']" size="10" value="'.$username_form[$key].'">'; |
|
55 | + echo '<input type="hidden" name="tutor_form['.$key.']" value="0">'; |
|
56 | + echo '<input type="hidden" name="admin_form['.$key.']" value="1">'; |
|
57 | + echo '<input type="hidden" name="password_form['.$key.']" value="'.$password_form[$key].'">'; |
|
58 | + echo '<input type="hidden" name="statut['.$key.']" value="'.$statut.'">'; |
|
59 | + echo '</td>'; |
|
60 | + echo '</tr>'; |
|
61 | 61 | } |
62 | 62 | echo '</table>'; |
63 | 63 | echo '<br />'; |
@@ -53,8 +53,8 @@ |
||
53 | 53 | $result .= '<table>'; |
54 | 54 | foreach ($output as $line) { |
55 | 55 | $result .= '<tr>'; |
56 | - $result .= '<td class="filler-report-data-init">'.$line['line-init'].' </td><td class="filler-report-data">'.$line['line-info'].'</td>'; |
|
57 | - $result .= '</tr>'; |
|
56 | + $result .= '<td class="filler-report-data-init">'.$line['line-init'].' </td><td class="filler-report-data">'.$line['line-info'].'</td>'; |
|
57 | + $result .= '</tr>'; |
|
58 | 58 | } |
59 | 59 | $result .= '</table>'; |
60 | 60 | $result .= '</div>'; |
@@ -79,10 +79,10 @@ discard block |
||
79 | 79 | if (isset($_POST['number_of_groups'])) { |
80 | 80 | if (!is_numeric($_POST['number_of_groups']) || intval($_POST['number_of_groups']) < 1) { |
81 | 81 | Display :: display_error_message( |
82 | - get_lang('PleaseEnterValidNumber').'<br /><br /> |
|
82 | + get_lang('PleaseEnterValidNumber').'<br /><br /> |
|
83 | 83 | <a href="group_creation.php?'.api_get_cidreq().'">« '.get_lang('Back').'</a>', |
84 | - false |
|
85 | - ); |
|
84 | + false |
|
85 | + ); |
|
86 | 86 | } else { |
87 | 87 | $number_of_groups = intval($_POST['number_of_groups']); |
88 | 88 | if ($number_of_groups > 1) { |
@@ -120,20 +120,20 @@ discard block |
||
120 | 120 | } |
121 | 121 | </script> |
122 | 122 | <?php |
123 | - } |
|
124 | - $group_categories = GroupManager::get_categories(); |
|
125 | - $group_id = GroupManager :: get_number_of_groups() + 1; |
|
126 | - $cat_options = []; |
|
127 | - foreach ($group_categories as $index => $category) { |
|
128 | - $cat_options[$category['id']] = $category['title']; |
|
129 | - } |
|
123 | + } |
|
124 | + $group_categories = GroupManager::get_categories(); |
|
125 | + $group_id = GroupManager :: get_number_of_groups() + 1; |
|
126 | + $cat_options = []; |
|
127 | + foreach ($group_categories as $index => $category) { |
|
128 | + $cat_options[$category['id']] = $category['title']; |
|
129 | + } |
|
130 | 130 | $form = new FormValidator('create_groups_step2', 'POST', api_get_self().'?'.api_get_cidreq()); |
131 | 131 | |
132 | - // Modify the default templates |
|
133 | - $renderer = $form->defaultRenderer(); |
|
134 | - $form_template = "<form {attributes}>\n<div class='create-groups'>\n<table>\n{content}\n</table>\n</div>\n</form>"; |
|
135 | - $renderer->setFormTemplate($form_template); |
|
136 | - $element_template = <<<EOT |
|
132 | + // Modify the default templates |
|
133 | + $renderer = $form->defaultRenderer(); |
|
134 | + $form_template = "<form {attributes}>\n<div class='create-groups'>\n<table>\n{content}\n</table>\n</div>\n</form>"; |
|
135 | + $renderer->setFormTemplate($form_template); |
|
136 | + $element_template = <<<EOT |
|
137 | 137 | <tr class="separate"> |
138 | 138 | <td> |
139 | 139 | <!-- BEGIN required --> |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | $form->setDefaults($defaults); |
226 | 226 | $form->addButtonCreate(get_lang('CreateGroup'), 'submit'); |
227 | 227 | $form->display(); |
228 | - } |
|
228 | + } |
|
229 | 229 | } else { |
230 | 230 | /* |
231 | 231 | * Show form to generate new groups |
@@ -195,7 +195,7 @@ |
||
195 | 195 | $parentId = !$assignment ? 0 : $assignment->getId(); |
196 | 196 | |
197 | 197 | if (empty($session)) { |
198 | - $dql = 'SELECT a FROM ChamiloCourseBundle:CStudentPublication a |
|
198 | + $dql = 'SELECT a FROM ChamiloCourseBundle:CStudentPublication a |
|
199 | 199 | WHERE |
200 | 200 | a.cId = :course AND |
201 | 201 | a.active = :active AND |
@@ -38,12 +38,12 @@ discard block |
||
38 | 38 | |
39 | 39 | // Tool name |
40 | 40 | if ($action === 'addnote') { |
41 | - $tool = 'NoteAddNew'; |
|
42 | - $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq(), 'name' => get_lang('ToolNotebook')); |
|
41 | + $tool = 'NoteAddNew'; |
|
42 | + $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq(), 'name' => get_lang('ToolNotebook')); |
|
43 | 43 | } |
44 | 44 | if ($action === 'editnote') { |
45 | - $tool = 'ModifyNote'; |
|
46 | - $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq(), 'name' => get_lang('ToolNotebook')); |
|
45 | + $tool = 'ModifyNote'; |
|
46 | + $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq(), 'name' => get_lang('ToolNotebook')); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | // Displaying the header |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | exit; |
64 | 64 | } |
65 | 65 | |
66 | - $_SESSION['notebook_view'] = 'creation_date'; |
|
66 | + $_SESSION['notebook_view'] = 'creation_date'; |
|
67 | 67 | |
68 | 68 | $form = new FormValidator( |
69 | 69 | 'note', |