| @@ 142-151 (lines=10) @@ | ||
| 139 | switch ($action) { |
|
| 140 | case 'settings': |
|
| 141 | //if posts |
|
| 142 | if ($is_allowed_to_edit && !empty($_POST['changeProperties'])) { |
|
| 143 | updateSettings( |
|
| 144 | $courseInfo, |
|
| 145 | $_POST['show_score'], |
|
| 146 | $_POST['student_delete_own_publication'] |
|
| 147 | ); |
|
| 148 | Display::addFlash(Display::return_message(get_lang('Saved'), 'success')); |
|
| 149 | header('Location: '.$currentUrl); |
|
| 150 | exit; |
|
| 151 | } |
|
| 152 | $studentDeleteOwnPublication = api_get_course_setting('student_delete_own_publication') == 1 ? 1 : 0; |
|
| 153 | /* Display of tool options */ |
|
| 154 | $content = settingsForm( |
|
| @@ 83-92 (lines=10) @@ | ||
| 80 | $form->addButtonUpdate(get_lang('Update')); |
|
| 81 | $form->addHtml('</div>'); |
|
| 82 | $form->addHtml('<div class="col-md-5">'); |
|
| 83 | if (isset($tool['custom_icon']) && !empty($tool['custom_icon'])) { |
|
| 84 | $form->addLabel( |
|
| 85 | get_lang('CurrentIcon'), |
|
| 86 | Display::img( |
|
| 87 | CourseHome::getCustomWebIconPath().$tool['custom_icon'] |
|
| 88 | ) |
|
| 89 | ); |
|
| 90 | ||
| 91 | $form->addCheckBox('delete_icon', null, get_lang('DeletePicture')); |
|
| 92 | } |
|
| 93 | $form->addHtml('</div>'); |
|
| 94 | $form->setDefaults($tool); |
|
| 95 | $content = $form->returnForm(); |
|