Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 82... Línea 82...
82
            if ($checkbox === '') {
82
            if ($checkbox === '') {
83
                continue; // skip empty lines
83
                continue; // skip empty lines
84
            }
84
            }
85
            $str .= '<input type="hidden" name="field_' . $this->field->id . '[]" value="" />';
85
            $str .= '<input type="hidden" name="field_' . $this->field->id . '[]" value="" />';
86
            $str .= '<input type="checkbox" id="field_'.$this->field->id.'_'.$i.'" name="field_' . $this->field->id . '[]" ';
86
            $str .= '<input type="checkbox" id="field_'.$this->field->id.'_'.$i.'" name="field_' . $this->field->id . '[]" ';
87
            $str .= 'value="' . s($checkbox) . '" class="mod-data-input mr-1" ';
87
            $str .= 'value="' . s($checkbox) . '" class="mod-data-input me-1" ';
Línea 88... Línea 88...
88
 
88
 
89
            if (array_search($checkbox, $content) !== false) {
89
            if (array_search($checkbox, $content) !== false) {
90
                $str .= 'checked />';
90
                $str .= 'checked />';
91
            } else {
91
            } else {
Línea 110... Línea 110...
110
            $allrequired = false;
110
            $allrequired = false;
111
        }
111
        }
Línea 112... Línea 112...
112
 
112
 
113
        $str = '';
113
        $str = '';
114
        $found = false;
114
        $found = false;
115
        $marginclass = ['class' => 'mr-1'];
115
        $marginclass = ['class' => 'me-1'];
116
        foreach (explode("\n",$this->field->param1) as $checkbox) {
116
        foreach (explode("\n",$this->field->param1) as $checkbox) {
117
            $checkbox = trim($checkbox);
117
            $checkbox = trim($checkbox);
118
            if (in_array($checkbox, $content)) {
118
            if (in_array($checkbox, $content)) {
119
                $str .= html_writer::checkbox('f_'.$this->field->id.'[]', s($checkbox), true, $checkbox, $marginclass);
119
                $str .= html_writer::checkbox('f_'.$this->field->id.'[]', s($checkbox), true, $checkbox, $marginclass);