Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 274... Línea 274...
274
     *
274
     *
275
     * @param int $state the answer state
275
     * @param int $state the answer state
276
     * @param string $answer the extra text to display (default null)
276
     * @param string $answer the extra text to display (default null)
277
     * @return stdClass with "answer" text and the state attribute to be displayed
277
     * @return stdClass with "answer" text and the state attribute to be displayed
278
     */
278
     */
279
    protected function get_answer(int $state, string $answer = null): stdClass {
279
    protected function get_answer(int $state, ?string $answer = null): stdClass {
280
        $states = [
280
        $states = [
281
            self::CORRECT => 'correct',
281
            self::CORRECT => 'correct',
282
            self::INCORRECT => 'incorrect',
282
            self::INCORRECT => 'incorrect',
283
            self::CHECKED => 'checked',
283
            self::CHECKED => 'checked',
284
            self::UNCHECKED => 'unchecked',
284
            self::UNCHECKED => 'unchecked',