Browse files

Fixed PHP 4 compatibility re MDL-6753

  • Loading branch information...
1 parent aa8503f commit 15add7bd29f01bc3479d66c3153a8f0d6ca4d9a2 danstowell committed Sep 30, 2006
Showing with 6 additions and 6 deletions.
  1. +2 −2 enrol/imsenterprise/config.html
  2. +4 −4 enrol/imsenterprise/enrol.php
View
4 enrol/imsenterprise/config.html
@@ -115,7 +115,7 @@
$assignableroles = get_assignable_roles($sitecontext);
$assignableroles = array('0' => get_string('ignore')) + $assignableroles;
-foreach(enrolment_plugin_imsenterprise::$imsroles as $imsrolenum=>$imsrolename){
+foreach($this->imsroles as $imsrolenum=>$imsrolename){
?>
<tr valign="top">
<td align="right">&quot;<?php echo $imsrolename ?>&quot;&nbsp;(<?php echo $imsrolenum ?>):</td>
@@ -125,7 +125,7 @@
$configref = "enrol_imse_imsrolemap" . $imsrolenum;
choose_from_menu($assignableroles, 'enrol_imse_imsrolemap'.$imsrolenum,
- strlen($frm->$configref) ? $frm->$configref : enrolment_plugin_imsenterprise::determine_default_rolemapping($imsrolenum), '');
+ strlen($frm->$configref) ? $frm->$configref : $this->determine_default_rolemapping($imsrolenum), '');
?>
</td>
<td>
View
8 enrol/imsenterprise/enrol.php
@@ -48,7 +48,7 @@ class enrolment_plugin_imsenterprise {
var $log;
// The "roles" hard-coded in the IMS specification are:
-public static $imsroles = array(
+var $imsroles = array(
'01'=>'Learner',
'02'=>'Instructor',
'03'=>'Content Developer',
@@ -67,7 +67,7 @@ class enrolment_plugin_imsenterprise {
* decide which role assignments to recommend by default.
* For example, IMS role '01' is 'Learner', so may map to 'student' in Moodle.
*/
-public static function determine_default_rolemapping($imscode) {
+function determine_default_rolemapping($imscode) {
switch($imscode) {
case '01':
case '04':
@@ -192,7 +192,7 @@ function process_config($config) {
- foreach(enrolment_plugin_imsenterprise::$imsroles as $imsrolenum=>$imsrolename){
+ foreach($this->imsroles as $imsrolenum=>$imsrolename){
$configref = 'enrol_imse_imsrolemap' . $imsrolenum;
if (!isset($config->$configref)) {
echo "<p>Resetting config->$configref</p>";
@@ -872,7 +872,7 @@ function decode_timeframe($string){ // Pass me the INNER CONTENTS of a <timefram
*/
function load_role_mappings() {
$this->rolemappings = array();
- foreach(enrolment_plugin_imsenterprise::$imsroles as $imsrolenum=>$imsrolename) {
+ foreach($this->imsroles as $imsrolenum=>$imsrolename) {
$this->rolemappings[$imsrolenum] = $this->rolemappings[$imsrolename]
= get_field('config', 'value', 'name', 'enrol_imse_imsrolemap' . $imsrolenum);
}

0 comments on commit 15add7b

Please sign in to comment.