Skip to content

Commit

Permalink
CONTRIB-5245 set up courseatts correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarsden committed Sep 4, 2014
1 parent ae60308 commit 2eb2949
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions renderables.php
Expand Up @@ -381,15 +381,15 @@ public function __construct(attendance $att, $userid) {
$this->groups = groups_get_all_groups($att->course->id);
} else {
$this->coursesatts = att_get_user_courses_attendances($userid);

$this->statuses = array();
$this->stat = array();
$this->gradable = array();
$this->grade = array();
$this->maxgrade = array();
foreach ($this->coursesatts as $ca) {
foreach ($this->coursesatts as $atid => $ca) {
// Check to make sure the user can view this cm.
if (!get_fast_modinfo($ca->courseid)->instances['attendance'][$ca->attid]->uservisible) {
unset($this->courseatts[$atid]);
continue;
}
$statuses = att_get_statuses($ca->attid);
Expand Down Expand Up @@ -418,7 +418,6 @@ public function __construct(attendance $att, $userid) {
}
}
}

$this->urlpath = $att->url_view()->out_omit_querystring();
$params = $att->pageparams->get_significant_params();
$params['id'] = $att->cm->id;
Expand Down

0 comments on commit 2eb2949

Please sign in to comment.