Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 457... Línea 457...
457
        return question_utils::to_plain_text($text, $format);
457
        return question_utils::to_plain_text($text, $format);
458
    }
458
    }
Línea 459... Línea 459...
459
 
459
 
460
    /** @return the result of applying {@link format_text()} to the question text. */
460
    /** @return the result of applying {@link format_text()} to the question text. */
-
 
461
    public function format_questiontext($qa) {
-
 
462
        $formattext = $this->format_text(
461
    public function format_questiontext($qa) {
463
            $this->questiontext,
-
 
464
            $this->questiontextformat,
-
 
465
            $qa,
462
        return $this->format_text($this->questiontext, $this->questiontextformat,
466
            'question',
-
 
467
            'questiontext',
-
 
468
            $this->id
-
 
469
        );
-
 
470
 
463
                $qa, 'question', 'questiontext', $this->id);
471
        return html_writer::nonempty_tag('div', $formattext, ['class' => 'clearfix']);
Línea 464... Línea 472...
464
    }
472
    }
465
 
473
 
-
 
474
    /** @return the result of applying {@link format_text()} to the general feedback. */
-
 
475
    public function format_generalfeedback($qa) {
466
    /** @return the result of applying {@link format_text()} to the general feedback. */
476
        $formattext  = $this->format_text(
-
 
477
            $this->generalfeedback,
-
 
478
            $this->generalfeedbackformat,
467
    public function format_generalfeedback($qa) {
479
            $qa,
-
 
480
            'question',
-
 
481
            'generalfeedback',
-
 
482
            $this->id
-
 
483
        );
468
        return $this->format_text($this->generalfeedback, $this->generalfeedbackformat,
484
 
Línea 469... Línea 485...
469
                $qa, 'question', 'generalfeedback', $this->id);
485
        return html_writer::nonempty_tag('div', $formattext, ['class' => 'clearfix']);
470
    }
486
    }
471
 
487
 
Línea 836... Línea 852...
836
    protected function check_hint_file_access($qa, $options, $args) {
852
    protected function check_hint_file_access($qa, $options, $args) {
837
        if (!$options->feedback) {
853
        if (!$options->feedback) {
838
            return false;
854
            return false;
839
        }
855
        }
840
        $hint = $qa->get_applicable_hint();
856
        $hint = $qa->get_applicable_hint();
-
 
857
        // If there is no applicable hint, that means access should not be granted.
-
 
858
        if (is_null($hint)) {
-
 
859
            return false;
-
 
860
        }
841
        $hintid = reset($args); // Itemid is hint id.
861
        $hintid = reset($args); // Itemid is hint id.
842
        return $hintid == $hint->id;
862
        return $hintid == $hint->id;
843
    }
863
    }
Línea 844... Línea 864...
844
 
864