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
     * Whether this grade item is configured to use advanced grading.
202
     * Whether this grade item is configured to use advanced grading.
203
     *
203
     *
204
     * @return bool
204
     * @return bool
205
     */
205
     */
206
    public function is_using_advanced_grading(): bool {
206
    public function is_using_advanced_grading(): bool {
207
        if ($this->is_using_scale()) {
-
 
208
            return false;
-
 
209
        }
-
 
210
 
-
 
211
        if ($this->get_advanced_grading_controller()) {
207
        return (bool) $this->get_advanced_grading_controller();
212
            return true;
-
 
213
        }
-
 
214
 
-
 
215
        return false;
-
 
216
    }
208
    }
Línea 217... Línea 209...
217
 
209
 
218
    /**
210
    /**
219
     * Get the name of the advanced grading method.
211
     * Get the name of the advanced grading method.
Línea 525... Línea 517...
525
     * @param stdClass $grader The user who is grading
517
     * @param stdClass $grader The user who is grading
526
     * @param stdClass $grade The row from the grade table.
518
     * @param stdClass $grade The row from the grade table.
527
     * @param int $instanceid The instanceid of the advanced grading form
519
     * @param int $instanceid The instanceid of the advanced grading form
528
     * @return gradingform_instance
520
     * @return gradingform_instance
529
     */
521
     */
530
    public function get_advanced_grading_instance(stdClass $grader, stdClass $grade, int $instanceid = null): ?gradingform_instance {
522
    public function get_advanced_grading_instance(stdClass $grader, stdClass $grade, ?int $instanceid = null): ?gradingform_instance {
531
        $controller = $this->get_advanced_grading_controller($this->itemname);
523
        $controller = $this->get_advanced_grading_controller($this->itemname);
Línea 532... Línea 524...
532
 
524
 
533
        if (empty($controller)) {
525
        if (empty($controller)) {
534
            // Advanced grading not enabeld for this item.
526
            // Advanced grading not enabeld for this item.