MDL-xxxx show appropriate instance status on user enrolments page
[moodle.git] / enrol / locallib.php
index e923c2e..2b4e0fc 100644 (file)
@@ -867,7 +867,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)
                 );
             }