Permalink
Browse files

MDL-31691 treat cohort idnumbers as plain text

  • Loading branch information...
1 parent 8075bd8 commit 5c85ac957258f30eb8f2bc9f7be5fb7e3a87b10a @skodak skodak committed May 6, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 cohort/edit_form.php
  2. +1 −1 cohort/index.php
View
@@ -49,7 +49,7 @@ public function definition() {
$mform->addElement('select', 'contextid', get_string('context', 'role'), $options);
$mform->addElement('text', 'idnumber', get_string('idnumber', 'cohort'), 'maxlength="254" size="50"');
- $mform->setType('name', PARAM_RAW);
+ $mform->setType('name', PARAM_RAW); // idnumbers are plain text, must not be changed
$mform->addElement('editor', 'description_editor', get_string('description', 'cohort'), null, $editoroptions);
$mform->setType('description_editor', PARAM_RAW);
View
@@ -98,7 +98,7 @@
foreach($cohorts['cohorts'] as $cohort) {
$line = array();
$line[] = format_string($cohort->name);
- $line[] = $cohort->idnumber;
+ $line[] = s($cohort->idnumber); // plain text
$line[] = format_text($cohort->description, $cohort->descriptionformat);
$line[] = $DB->count_records('cohort_members', array('cohortid'=>$cohort->id));

0 comments on commit 5c85ac9

Please sign in to comment.