Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 102... Línea 102...
102
 
102
 
103
if ($editcontrols = cohort_edit_controls($context, $baseurl)) {
103
if ($editcontrols = cohort_edit_controls($context, $baseurl)) {
104
    echo $OUTPUT->render($editcontrols);
104
    echo $OUTPUT->render($editcontrols);
Línea 105... Línea -...
105
}
-
 
106
 
105
}
Línea 107... Línea 106...
107
$reportparams = ['contextid' => $context->id, 'showall' => $showall];
106
 
108
$report = system_report_factory::create(cohorts::class, $context, '', '', 0, $reportparams);
107
$report = system_report_factory::create(cohorts::class, $context, '', '', 0, ['showall' => $showall]);
109
 
108
 
110
// Check if it needs to search by name.
109
// Check if it needs to search by name.
111
if (!empty($searchquery)) {
110
if (!empty($searchquery)) {
112
    $report->set_filter_values([
111
    $report->set_filter_values([
113
        'cohort:name_operator' => text::CONTAINS,
112
        'cohort:name_operator' => text::CONTAINS,
Línea -... Línea 113...
-
 
113
        'cohort:name_value' => $searchquery,
114
        'cohort:name_value' => $searchquery,
114
    ]);
-
 
115
}
-
 
116
 
-
 
117
// Show the report.
-
 
118
echo $report->output();
-
 
119
 
-
 
120
// Show the delete selected button if there are records.
-
 
121
if ($DB->record_exists('cohort', [])) {
-
 
122
 
-
 
123
    echo $OUTPUT->render(new single_button(
-
 
124
        new moodle_url('#'),
-
 
125
        get_string('deleteselected'),
-
 
126
        'post',
-
 
127
        single_button::BUTTON_PRIMARY,
-
 
128
        ['data-action' => 'cohort-delete-selected']
-
 
129
    ));
115
    ]);
130