File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 1515// Notice for unauthorized people.
1616api_protect_course_script (true );
1717
18- /* Create the groups */
18+ if (!api_is_allowed_to_edit (false , true )) {
19+ api_not_allowed (true );
20+ }
1921
22+ /* Create the groups */
2023if (isset ($ _POST ['action ' ])) {
2124 switch ($ _POST ['action ' ]) {
2225 case 'create_groups ' :
7982$ interbreadcrumb [] = array ('url ' => 'group.php ' , 'name ' => get_lang ('Groups ' ));
8083Display :: display_header ($ nameTools , 'Group ' );
8184
82- if (!api_is_allowed_to_edit (false , true )) {
83- api_not_allowed ();
84- }
85-
86- /* MAIN TOOL CODE */
87-
8885/* Show group-settings-form */
89-
90- elseif (isset ($ _POST ['number_of_groups ' ])) {
86+ if (isset ($ _POST ['number_of_groups ' ])) {
9187 if (!is_numeric ($ _POST ['number_of_groups ' ]) || intval ($ _POST ['number_of_groups ' ]) < 1 ) {
9288 Display :: display_error_message (get_lang ('PleaseEnterValidNumber ' ).'<br /><br /><a href="group_creation.php? ' .api_get_cidreq ().'">« ' .get_lang ('Back ' ).'</a> ' , false );
9389 } else {
You can’t perform that action at this time.
0 commit comments