mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 11:26:41 +02:00
MDL-52266 tool_lp: Cohorts can be removed from template synced cohorts
This commit is contained in:
parent
dd1df08248
commit
13ef20f65c
3 changed files with 11 additions and 2 deletions
|
@ -41,6 +41,11 @@ $url = new moodle_url('/admin/tool/lp/template_cohorts.php', array(
|
|||
list($title, $subtitle) = \tool_lp\page_helper::setup_for_template($pagecontextid, $url, $template,
|
||||
get_string('cohortssyncedtotemplate', 'tool_lp'));
|
||||
|
||||
// Remove cohort.
|
||||
if (($removecohort = optional_param('removecohort', false, PARAM_INT)) !== false && confirm_sesskey()) {
|
||||
\tool_lp\api::delete_template_cohort($template, $removecohort);
|
||||
}
|
||||
|
||||
// Capture the form submission.
|
||||
$form = new \tool_lp\form\template_cohorts($url->out(false), array('pagecontextid' => $pagecontextid));
|
||||
if (($data = $form->get_data()) && !empty($data->cohorts)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue