MDL-34311 course: add missing type on cm idnumber
authorDan Poltawski <dan@moodle.com>
Mon, 25 Mar 2013 01:26:10 +0000 (09:26 +0800)
committerDan Poltawski <dan@moodle.com>
Mon, 25 Mar 2013 01:30:52 +0000 (09:30 +0800)
We must use PARAM_RAW for idnumbers because external systems could use
any characters and this is a linking field for external systems.

course/moodleform_mod.php

index b4feb9d..fc70529 100644 (file)
@@ -495,6 +495,7 @@ abstract class moodleform_mod extends moodleform {
 
         if ($this->_features->idnumber) {
             $mform->addElement('text', 'cmidnumber', get_string('idnumbermod'));
+            $mform->setType('cmidnumber', PARAM_RAW);
             $mform->addHelpButton('cmidnumber', 'idnumbermod');
         }