mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-40469 Gradebook: Fixed setType warning while exporting gradebook with publishing set
This commit is contained in:
parent
bdd045c5ec
commit
c597ff32ef
@ -110,10 +110,12 @@ class grade_export_form extends moodleform {
|
||||
$mform->addElement('text', 'iprestriction', get_string('keyiprestriction', 'userkey'), array('size'=>80));
|
||||
$mform->addHelpButton('iprestriction', 'keyiprestriction', 'userkey');
|
||||
$mform->setDefault('iprestriction', getremoteaddr()); // own IP - just in case somebody does not know what user key is
|
||||
$mform->setType('iprestriction', PARAM_RAW_TRIMMED);
|
||||
|
||||
$mform->addElement('date_time_selector', 'validuntil', get_string('keyvaliduntil', 'userkey'), array('optional'=>true));
|
||||
$mform->addHelpButton('validuntil', 'keyvaliduntil', 'userkey');
|
||||
$mform->setDefault('validuntil', time()+3600*24*7); // only 1 week default duration - just in case somebody does not know what user key is
|
||||
$mform->setType('validuntil', PARAM_INT);
|
||||
|
||||
$mform->disabledIf('iprestriction', 'key', 'noteq', 1);
|
||||
$mform->disabledIf('validuntil', 'key', 'noteq', 1);
|
||||
|
@ -39,7 +39,10 @@ class key_form extends moodleform {
|
||||
|
||||
$mform->addElement('static', 'value', get_string('keyvalue', 'userkey'));
|
||||
$mform->addElement('text', 'iprestriction', get_string('keyiprestriction', 'userkey'), array('size'=>80));
|
||||
$mform->setType('iprestriction', PARAM_RAW_TRIMMED);
|
||||
|
||||
$mform->addElement('date_time_selector', 'validuntil', get_string('keyvaliduntil', 'userkey'), array('optional'=>true));
|
||||
$mform->setType('validuntil', PARAM_INT);
|
||||
|
||||
$mform->addHelpButton('iprestriction', 'keyiprestriction', 'userkey');
|
||||
$mform->addHelpButton('validuntil', 'keyvaliduntil', 'userkey');
|
||||
|
@ -43,6 +43,7 @@ class key_form extends moodleform {
|
||||
|
||||
$mform->addHelpButton('iprestriction', 'keyiprestriction', 'userkey');
|
||||
$mform->addHelpButton('validuntil', 'keyvaliduntil', 'userkey');
|
||||
$mform->setType('iprestriction', PARAM_RAW_TRIMMED);
|
||||
|
||||
$mform->addElement('hidden','id');
|
||||
$mform->setType('id', PARAM_INT);
|
||||
|
Loading…
x
Reference in New Issue
Block a user