Browse Source

Merge branch 'hotfix-v1.2.2' into apply_v1.2

develop_fields v1.2.2
Johannes Burk 11 years ago
parent
commit
601c337858
  1. 1
      edit_form.php
  2. 4
      lib.php
  3. 4
      version.php

1
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('header', 'header', get_string('pluginname', 'enrol_apply'));
$mform->addElement('text', 'name', get_string('custominstancename', 'enrol')); $mform->addElement('text', 'name', get_string('custominstancename', 'enrol'));
$mform->setType('name', PARAM_TEXT);
$options = array(ENROL_INSTANCE_ENABLED => get_string('yes'), $options = array(ENROL_INSTANCE_ENABLED => get_string('yes'),
ENROL_INSTANCE_DISABLED => get_string('no')); ENROL_INSTANCE_DISABLED => get_string('no'));
$mform->addElement('select', 'status', get_string('status', 'enrol_apply'), $options); $mform->addElement('select', 'status', get_string('status', 'enrol_apply'), $options);

4
lib.php

@ -75,7 +75,7 @@ class enrol_apply_plugin extends enrol_plugin {
$roleid = $instance->roleid; $roleid = $instance->roleid;
if(!$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; $roleid = $role->id;
} }
@ -161,7 +161,7 @@ function confirmEnrolment($enrols){
if($DB->update_record('user_enrolments',$enroluser)){ if($DB->update_record('user_enrolments',$enroluser)){
$userenrolments = $DB->get_record_sql('select * from '.$CFG->prefix.'user_enrolments where id='.$enrol); $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->userid = $userenrolments->userid;
@$roleAssignments->roleid = $role->id; @$roleAssignments->roleid = $role->id;
@$roleAssignments->contextid = 3; @$roleAssignments->contextid = 3;

4
version.php

@ -18,8 +18,8 @@
*/ */
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
$plugin->version = 20131209; $plugin->version = 2014061000;
$plugin->requires = 2011080100; $plugin->requires = 2011080100;
$plugin->maturity = MATURITY_STABLE; $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; $plugin->cron = 180;

Loading…
Cancel
Save