Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 202... Línea 202...
202
                    ['class' => 'avgcell']);
202
                    ['class' => 'avgcell']);
203
        }
203
        }
204
    }
204
    }
Línea 205... Línea 205...
205
 
205
 
-
 
206
    protected function submit_buttons() {
-
 
207
        global $PAGE, $OUTPUT;
206
    protected function submit_buttons() {
208
        parent::submit_buttons();
207
        if (has_capability('mod/quiz:regrade', $this->context)) {
209
        if (has_capability('mod/quiz:regrade', $this->context)) {
-
 
210
            $questionslots = [];
-
 
211
            foreach ($this->questions as $slot => $question) {
-
 
212
                $questionslots[] = [
-
 
213
                    'slot' => $slot,
-
 
214
                    'name' => get_string('questionno', 'question', $question->number),
-
 
215
                ];
-
 
216
            }
208
            $regradebuttonparams = [
217
            echo html_writer::empty_tag('input', [
-
 
218
                'type' => 'button',
209
                'type'  => 'submit',
219
                'id' => 'regradeattempts',
210
                'class' => 'btn btn-secondary mr-1',
220
                'class' => 'btn btn-secondary me-1',
211
                'name'  => 'regrade',
221
                'name' => 'regradeattempts',
212
                'value' => get_string('regradeselected', 'quiz_overview'),
222
                'value' => get_string('regrade_attempts', 'quiz_overview'),
213
                'data-action' => 'toggle',
223
                'data-slots' => json_encode($questionslots),
214
                'data-togglegroup' => $this->togglegroup,
224
                // There is currently not a good way to render a help icon in a template, so put the required HTML here.
215
                'data-toggle' => 'action',
-
 
216
                'disabled' => true
225
                'data-help-icon' => $OUTPUT->help_icon('regrade', 'quiz_overview'),
217
            ];
226
            ]);
218
            echo html_writer::empty_tag('input', $regradebuttonparams);
227
            $PAGE->requires->js_call_amd('quiz_overview/regrade_modal', 'init');
219
        }
-
 
220
        parent::submit_buttons();
228
        }
Línea 221... Línea 229...
221
    }
229
    }
222
 
230
 
223
    public function col_sumgrades($attempt) {
231
    public function col_sumgrades($attempt) {