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
        return array('day' => $wrongfields['mday'],
82
        return array('day' => $wrongfields['mday'],
83
                'month' => $wrongfields['mon'], 'year' => $wrongfields['year'],
83
                'month' => $wrongfields['mon'], 'year' => $wrongfields['year'],
84
                'hour' => $wrongfields['hours'], 'minute' => $wrongfields['minutes']);
84
                'hour' => $wrongfields['hours'], 'minute' => $wrongfields['minutes']);
85
    }
85
    }
Línea 86... Línea 86...
86
 
86
 
87
    protected function get_javascript_init_params($course, \cm_info $cm = null,
87
    protected function get_javascript_init_params($course, ?\cm_info $cm = null,
88
            \section_info $section = null) {
88
            ?\section_info $section = null) {
89
        global $CFG, $OUTPUT;
89
        global $CFG, $OUTPUT;
Línea 90... Línea 90...
90
        require_once($CFG->libdir . '/formslib.php');
90
        require_once($CFG->libdir . '/formslib.php');
91
 
91
 
Línea 149... Línea 149...
149
            $html .= \html_writer::start_tag('label');
149
            $html .= \html_writer::start_tag('label');
150
            $html .= \html_writer::span(get_string($field) . ' ', 'accesshide');
150
            $html .= \html_writer::span(get_string($field) . ' ', 'accesshide');
151
            // NOTE: The fields need to have these weird names in order that they
151
            // NOTE: The fields need to have these weird names in order that they
152
            // match the standard Moodle form control, otherwise the date selector
152
            // match the standard Moodle form control, otherwise the date selector
153
            // won't find them.
153
            // won't find them.
154
            $html .= \html_writer::start_tag('select', array('name' => 'x[' . $field . ']', 'class' => 'custom-select'));
154
            $html .= \html_writer::start_tag('select', ['name' => 'x[' . $field . ']', 'class' => 'form-select']);
155
            foreach ($options as $key => $value) {
155
            foreach ($options as $key => $value) {
156
                $params = array('value' => $key);
156
                $params = array('value' => $key);
157
                if ($current[$field] == $key) {
157
                if ($current[$field] == $key) {
158
                    $params['selected'] = 'selected';
158
                    $params['selected'] = 'selected';
159
                }
159
                }