Browse Source

Quadros resumo mostram apenas funções de interesse

master
Sesostris Vieira 11 years ago
parent
commit
bdc645d4c7
  1. 14
      index.php

14
index.php

@ -92,11 +92,21 @@ if ($group===0 && $course->groupmode==SEPARATEGROUPS) {
// Get data for user filtering // Get data for user filtering
$manager = new course_enrolment_manager($PAGE, $course); $manager = new course_enrolment_manager($PAGE, $course);
$roles = $manager->get_all_roles();
$mform = new filter_form($course->id, $filterfields); $mform = new filter_form($course->id, $filterfields);
$instances = $manager->get_enrolment_instances(); $instances = $manager->get_enrolment_instances();
$contextids = $context->get_parent_context_ids(true); $contextids = $context->get_parent_context_ids(true);
// Roles
$allroles = $manager->get_all_roles();
$role_confirmed = get_config(null, 'report_ilbenrol_confirmed');
$role_revoked = get_config(null, 'report_ilbenrol_revoked');
if (!$role_confirmed or !$role_revoked) {
print_error('invalidargorconf');
}
$roles = array($role_confirmed=>$allroles[$role_confirmed], $role_revoked=>$allroles[$role_revoked]);
// Generate where clause // Generate where clause
$where = array(); $where = array();
$where_params = array(); $where_params = array();
@ -414,7 +424,7 @@ foreach($userlist as $user) {
$user_roles = $manager->get_user_roles($user->id); $user_roles = $manager->get_user_roles($user->id);
$display_roles = array(); $display_roles = array();
foreach ($user_roles as $rid=>$rassignable) { foreach ($user_roles as $rid=>$rassignable) {
$display_roles[] = $roles[$rid]->localname; $display_roles[] = $allroles[$rid]->localname;
} }
$display_roles = implode(', ', $display_roles); $display_roles = implode(', ', $display_roles);

Loading…
Cancel
Save