~ubuntu-branches/ubuntu/saucy/moodle/saucy

« back to all changes in this revision

Viewing changes to grade/export/grade_export_form.php

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2013-09-09 15:22:35 UTC
  • mfrom: (1.1.17) (3.1.29 sid)
  • Revision ID: package-import@ubuntu.com-20130909152235-f5g7gphaseb84qeu
Tags: 2.5.2-1
* New upstream version: 2.5.2.
  - Incorporates S3 security patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
            $mform->addElement('text', 'iprestriction', get_string('keyiprestriction', 'userkey'), array('size'=>80));
111
111
            $mform->addHelpButton('iprestriction', 'keyiprestriction', 'userkey');
112
112
            $mform->setDefault('iprestriction', getremoteaddr()); // own IP - just in case somebody does not know what user key is
 
113
            $mform->setType('iprestriction', PARAM_RAW_TRIMMED);
113
114
 
114
115
            $mform->addElement('date_time_selector', 'validuntil', get_string('keyvaliduntil', 'userkey'), array('optional'=>true));
115
116
            $mform->addHelpButton('validuntil', 'keyvaliduntil', 'userkey');
116
117
            $mform->setDefault('validuntil', time()+3600*24*7); // only 1 week default duration - just in case somebody does not know what user key is
 
118
            $mform->setType('validuntil', PARAM_INT);
117
119
 
118
120
            $mform->disabledIf('iprestriction', 'key', 'noteq', 1);
119
121
            $mform->disabledIf('validuntil', 'key', 'noteq', 1);