From 379be1623cd90b65ef3a62f7203fc05632c9ddf0 Mon Sep 17 00:00:00 2001 From: Johannes Burk Date: Tue, 10 Jun 2014 11:32:22 +0200 Subject: [PATCH 1/4] build number changed to actual code version and version number: 1.2.1 (build 20131209) --- version.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.php b/version.php index 070d12d..2e35745 100644 --- a/version.php +++ b/version.php @@ -18,8 +18,8 @@ */ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2014060901; +$plugin->version = 20131209; $plugin->requires = 2011080100; $plugin->maturity = MATURITY_STABLE; -$plugin->release = 'Course Enrol Apply Plugin Version 1.2.1(build 20131209)'; +$plugin->release = 'Course Enrol Apply Plugin Version 1.2.1 (build 20131209)'; $plugin->cron = 180; From 8a940f45fcb63d1fa95554f423fa477d0129b2f9 Mon Sep 17 00:00:00 2001 From: Johannes Burk Date: Mon, 12 May 2014 16:45:03 +0200 Subject: [PATCH 2/4] fixed Did you remember to call setType() for 'name'? Defaulting to PARAM_RAW cleaning --- edit_form.php | 1 + 1 file changed, 1 insertion(+) diff --git a/edit_form.php b/edit_form.php index bd2a22a..22c5303 100644 --- a/edit_form.php +++ b/edit_form.php @@ -24,6 +24,7 @@ class enrol_self_edit_form extends moodleform { $mform->addElement('header', 'header', get_string('pluginname', 'enrol_apply')); $mform->addElement('text', 'name', get_string('custominstancename', 'enrol')); + $mform->setType('name', PARAM_TEXT); $options = array(ENROL_INSTANCE_ENABLED => get_string('yes'), ENROL_INSTANCE_DISABLED => get_string('no')); $mform->addElement('select', 'status', get_string('status', 'enrol_apply'), $options); From 9facd3cdb04344ae54dbbd8d3fc4a432df344ba1 Mon Sep 17 00:00:00 2001 From: Johannes Burk Date: Tue, 13 May 2014 09:32:57 +0200 Subject: [PATCH 3/4] fixed sql select (doesn't worked with psql) ' instead of " --- lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib.php b/lib.php index dca539c..187c91e 100644 --- a/lib.php +++ b/lib.php @@ -75,7 +75,7 @@ class enrol_apply_plugin extends enrol_plugin { $roleid = $instance->roleid; if(!$roleid){ - $role = $DB->get_record_sql('select * from '.$CFG->prefix.'role where archetype="student" limit 1'); + $role = $DB->get_record_sql("select * from ".$CFG->prefix."role where archetype='student' limit 1"); $roleid = $role->id; } @@ -161,7 +161,7 @@ function confirmEnrolment($enrols){ if($DB->update_record('user_enrolments',$enroluser)){ $userenrolments = $DB->get_record_sql('select * from '.$CFG->prefix.'user_enrolments where id='.$enrol); - $role = $DB->get_record_sql('select * from '.$CFG->prefix.'role where archetype="student" limit 1'); + $role = $DB->get_record_sql("select * from ".$CFG->prefix."role where archetype='student' limit 1"); @$roleAssignments->userid = $userenrolments->userid; @$roleAssignments->roleid = $role->id; @$roleAssignments->contextid = 3; From 82c2d941ed475582bba50512a72a012bbb08c096 Mon Sep 17 00:00:00 2001 From: Johannes Burk Date: Tue, 10 Jun 2014 11:40:53 +0200 Subject: [PATCH 4/4] version raised --- version.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.php b/version.php index 2e35745..64d7def 100644 --- a/version.php +++ b/version.php @@ -18,8 +18,8 @@ */ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 20131209; +$plugin->version = 2014061000; $plugin->requires = 2011080100; $plugin->maturity = MATURITY_STABLE; -$plugin->release = 'Course Enrol Apply Plugin Version 1.2.1 (build 20131209)'; +$plugin->release = 'Course Enrol Apply Plugin Version 1.2.2 (build 2014061000)'; $plugin->cron = 180;