Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 614... Línea 614...
614
 
614
 
615
        $basename = $qa->get_qt_field_name($fieldname);
615
        $basename = $qa->get_qt_field_name($fieldname);
616
        $inputattributes = array(
616
        $inputattributes = array(
617
            'type' => 'checkbox',
617
            'type' => 'checkbox',
-
 
618
            'value' => 1,
618
            'value' => 1,
619
            'class' => 'form-check-input',
619
        );
620
        );
620
        if ($options->readonly) {
621
        if ($options->readonly) {
621
            $inputattributes['disabled'] = 'disabled';
622
            $inputattributes['disabled'] = 'disabled';
Línea 646... Línea 647...
646
                $inputattributes['checked'] = 'checked';
647
                $inputattributes['checked'] = 'checked';
647
            } else {
648
            } else {
648
                unset($inputattributes['checked']);
649
                unset($inputattributes['checked']);
649
            }
650
            }
Línea 650... Línea 651...
650
 
651
 
651
            $class = 'r' . ($value % 2);
652
            $class = 'form-check text-wrap text-break';
652
            if ($options->correctness && $isselected) {
653
            if ($options->correctness && $isselected) {
653
                $thisfrac = ($ans->fraction > 0) ? $answerfraction : 0;
654
                $thisfrac = ($ans->fraction > 0) ? $answerfraction : 0;
654
                $feedbackimg = $this->feedback_image($thisfrac);
655
                $feedbackimg = $this->feedback_image($thisfrac);
655
                $class .= ' ' . $this->feedback_class($thisfrac);
656
                $class .= ' ' . $this->feedback_class($thisfrac);
Línea 659... Línea 660...
659
 
660
 
660
            $result .= $this->choice_wrapper_start($class);
661
            $result .= $this->choice_wrapper_start($class);
661
            $result .= html_writer::empty_tag('input', $inputattributes);
662
            $result .= html_writer::empty_tag('input', $inputattributes);
662
            $result .= html_writer::tag('label', $subq->format_text($ans->answer,
663
            $result .= html_writer::tag('label', $subq->format_text($ans->answer,
663
                                                                    $ans->answerformat, $qa, 'question', 'answer', $ansid),
664
                                                                    $ans->answerformat, $qa, 'question', 'answer', $ansid),
664
                                        array('for' => $inputattributes['id']));
665
                                        ['for' => $inputattributes['id'], 'class' => 'form-check-label text-body']);
Línea 665... Línea 666...
665
            $result .= $feedbackimg;
666
            $result .= $feedbackimg;
666
 
667
 
667
            if ($options->feedback && $isselected && trim($ans->feedback)) {
668
            if ($options->feedback && $isselected && trim($ans->feedback)) {
Línea 739... Línea 740...
739
 */
740
 */
740
class qtype_multianswer_multiresponse_horizontal_renderer
741
class qtype_multianswer_multiresponse_horizontal_renderer
741
    extends qtype_multianswer_multiresponse_vertical_renderer {
742
    extends qtype_multianswer_multiresponse_vertical_renderer {
Línea 742... Línea 743...
742
 
743
 
743
    protected function choice_wrapper_start($class) {
744
    protected function choice_wrapper_start($class) {
744
        return html_writer::start_tag('td', array('class' => $class));
745
        return html_writer::start_tag('td', ['class' => $class . ' form-check-inline']);
Línea 745... Línea 746...
745
    }
746
    }
746
 
747
 
747
    protected function choice_wrapper_end() {
748
    protected function choice_wrapper_end() {