Merge branch 'MDL-53865-master' of git://github.com/junpataleta/moodle

This commit is contained in:
David Monllao
2016-04-26 09:38:33 +08:00
5 changed files with 25 additions and 12 deletions
+7 -4
View File
@@ -92,17 +92,20 @@ class competency extends persistent {
$pagecontextid));
}
$mform->addElement('text', 'shortname',
get_string('shortname', 'tool_lp'));
// Name.
$mform->addElement('text', 'shortname', get_string('shortname', 'tool_lp'), 'maxlength="100"');
$mform->setType('shortname', PARAM_TEXT);
$mform->addRule('shortname', null, 'required', null, 'client');
$mform->addRule('shortname', get_string('maximumchars', '', 100), 'maxlength', 100, 'client');
// Description.
$mform->addElement('editor', 'description',
get_string('description', 'tool_lp'), array('rows' => 4));
$mform->setType('description', PARAM_RAW);
$mform->addElement('text', 'idnumber',
get_string('idnumber', 'tool_lp'));
// ID number.
$mform->addElement('text', 'idnumber', get_string('idnumber', 'tool_lp'), 'maxlength="100"');
$mform->setType('idnumber', PARAM_TEXT);
$mform->addRule('idnumber', null, 'required', null, 'client');
$mform->addRule('idnumber', get_string('maximumchars', '', 100), 'maxlength', 100, 'client');
$scales = array(null => get_string('inheritfromframework', 'tool_lp')) + get_scales_menu();
$scaleid = $mform->addElement('select', 'scaleid', get_string('scale', 'tool_lp'), $scales);
@@ -54,17 +54,20 @@ class competency_framework extends persistent {
$mform->addElement('header', 'generalhdr', get_string('general'));
$mform->addElement('text', 'shortname',
get_string('shortname', 'tool_lp'));
// Name.
$mform->addElement('text', 'shortname', get_string('shortname', 'tool_lp'), 'maxlength="100"');
$mform->setType('shortname', PARAM_TEXT);
$mform->addRule('shortname', null, 'required', null, 'client');
$mform->addRule('shortname', get_string('maximumchars', '', 100), 'maxlength', 100, 'client');
// Description.
$mform->addElement('editor', 'description',
get_string('description', 'tool_lp'), array('rows' => 4));
$mform->setType('description', PARAM_RAW);
$mform->addElement('text', 'idnumber',
get_string('idnumber', 'tool_lp'));
// ID number.
$mform->addElement('text', 'idnumber', get_string('idnumber', 'tool_lp'), 'maxlength="100"');
$mform->setType('idnumber', PARAM_TEXT);
$mform->addRule('idnumber', null, 'required', null, 'client');
$mform->addRule('idnumber', get_string('maximumchars', '', 100), 'maxlength', 100, 'client');
$scales = get_scales_menu();
$scaleid = $mform->addElement('select', 'scaleid', get_string('scale', 'tool_lp'), $scales);
+4 -1
View File
@@ -52,9 +52,12 @@ class plan extends persistent {
$mform->addElement('header', 'generalhdr', get_string('general'));
$mform->addElement('text', 'name', get_string('planname', 'tool_lp'));
// Name.
$mform->addElement('text', 'name', get_string('planname', 'tool_lp'), 'maxlength="100"');
$mform->setType('name', PARAM_TEXT);
$mform->addRule('name', null, 'required', null, 'client');
$mform->addRule('name', get_string('maximumchars', '', 100), 'maxlength', 100, 'client');
// Description.
$mform->addElement('editor', 'description', get_string('plandescription', 'tool_lp'), array('rows' => 4));
$mform->setType('description', PARAM_RAW);
+4 -2
View File
@@ -50,10 +50,12 @@ class template extends persistent {
$mform->addElement('header', 'generalhdr', get_string('general'));
$mform->addElement('text', 'shortname',
get_string('shortname', 'tool_lp'));
// Name.
$mform->addElement('text', 'shortname', get_string('shortname', 'tool_lp'), 'maxlength="100"');
$mform->setType('shortname', PARAM_TEXT);
$mform->addRule('shortname', null, 'required', null, 'client');
$mform->addRule('shortname', get_string('maximumchars', '', 100), 'maxlength', 100, 'client');
// Description.
$mform->addElement('editor', 'description',
get_string('description', 'tool_lp'), array('rows' => 4));
$mform->setType('description', PARAM_RAW);
+3 -1
View File
@@ -47,10 +47,12 @@ class user_evidence extends persistent {
$mform->addElement('header', 'generalhdr', get_string('general'));
// Name.
$mform->addElement('text', 'name', get_string('userevidencename', 'tool_lp'), 'maxlength="100"');
$mform->setType('name', PARAM_TEXT);
$mform->addRule('name', null, 'required', null, 'client');
$mform->addRule('name', get_string('maximumchars', '', 100), 'maxlength', 100, 'client');
// Description.
$mform->addElement('editor', 'description', get_string('userevidencedescription', 'tool_lp'), array('rows' => 10));
$mform->setType('description', PARAM_RAW);