Merge branch 'wip-mdl-40469-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE

This commit is contained in:
Sam Hemelryk
2013-08-06 17:36:08 +12:00
3 changed files with 6 additions and 0 deletions
+2
View File
@@ -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);
+3
View File
@@ -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');
+1
View File
@@ -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);