MDL-xxxx show appropriate instance status on user enrolments page
authorPetr Škoda <commits@skodak.org>
Wed, 26 Dec 2012 16:28:09 +0000 (17:28 +0100)
committerPetr Škoda <commits@skodak.org>
Wed, 26 Dec 2012 16:28:09 +0000 (17:28 +0100)
enrol/locallib.php

index 2ee9a7b..03c83ab 100644 (file)
@@ -926,7 +926,7 @@ class course_enrolment_manager {
                 $details['enrolments'][$ue->id] = array(
                     'text' => $ue->enrolmentinstancename,
                     'period' => $period,
-                    'dimmed' =>  ($periodoutside || $ue->status != ENROL_USER_ACTIVE),
+                    'dimmed' =>  ($periodoutside or $ue->status != ENROL_USER_ACTIVE or $ue->enrolmentinstance->status != ENROL_INSTANCE_ENABLED),
                     'actions' => $ue->enrolmentplugin->get_user_enrolment_actions($manager, $ue)
                 );
             }