Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 56... Línea 56...
56
 
56
 
57
        $mform->addElement('hidden', 'returnurl', null);
57
        $mform->addElement('hidden', 'returnurl', null);
58
        $mform->setType('returnurl', PARAM_LOCALURL);
58
        $mform->setType('returnurl', PARAM_LOCALURL);
Línea 59... Línea 59...
59
        $mform->setConstant('returnurl', $returnurl);
59
        $mform->setConstant('returnurl', $returnurl);
-
 
60
 
60
 
61
        $mform->addElement('text', 'fullname', get_string('fullnamecourse'),
61
        $mform->addElement('text','fullname', get_string('fullnamecourse'),'maxlength="254" size="50"');
62
            ['maxlength' => \core_course\constants::FULLNAME_MAXIMUM_LENGTH, 'size' => 50]);
62
        $mform->addHelpButton('fullname', 'fullnamecourse');
63
        $mform->addHelpButton('fullname', 'fullnamecourse');
63
        $mform->addRule('fullname', get_string('missingfullname'), 'required', null, 'client');
64
        $mform->addRule('fullname', get_string('missingfullname'), 'required', null, 'client');
64
        $mform->setType('fullname', PARAM_TEXT);
65
        $mform->setType('fullname', PARAM_TEXT);
65
        if (!empty($course->id) and !has_capability('moodle/course:changefullname', $coursecontext)) {
66
        if (!empty($course->id) and !has_capability('moodle/course:changefullname', $coursecontext)) {
66
            $mform->hardFreeze('fullname');
67
            $mform->hardFreeze('fullname');
Línea 67... Línea 68...
67
            $mform->setConstant('fullname', $course->fullname);
68
            $mform->setConstant('fullname', $course->fullname);
-
 
69
        }
68
        }
70
 
69
 
71
        $mform->addElement('text', 'shortname', get_string('shortnamecourse'),
70
        $mform->addElement('text', 'shortname', get_string('shortnamecourse'), 'maxlength="100" size="20"');
72
            ['maxlength' => \core_course\constants::SHORTNAME_MAXIMUM_LENGTH, 'size' => 20]);
71
        $mform->addHelpButton('shortname', 'shortnamecourse');
73
        $mform->addHelpButton('shortname', 'shortnamecourse');
72
        $mform->addRule('shortname', get_string('missingshortname'), 'required', null, 'client');
74
        $mform->addRule('shortname', get_string('missingshortname'), 'required', null, 'client');