Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-40469 Gradebook: Fixed setType warning while exporting gradebook …

…with publishing set
  • Loading branch information...
commit bbf727c3a86599a18fc8e0313a4210684995f7b5 1 parent f171a8c
@rajeshtaneja rajeshtaneja authored
View
2  grade/export/grade_export_form.php
@@ -110,10 +110,12 @@ function definition() {
$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);
View
3  grade/export/key_form.php
@@ -39,7 +39,10 @@ function definition () {
$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');
View
1  grade/import/key_form.php
@@ -43,6 +43,7 @@ function definition () {
$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);
Please sign in to comment.
Something went wrong with that request. Please try again.