Browse Source

Don't show attendance if no records found for the user.

Fixes #209
MOODLE_31_STABLE
Dan Marsden 9 years ago
parent
commit
f7ec142682
  1. 6
      renderer.php

6
renderer.php

@ -751,14 +751,12 @@ class mod_attendance_renderer extends plugin_renderer_base {
$o .= html_writer::tag('h3', $ca->coursefullname); $o .= html_writer::tag('h3', $ca->coursefullname);
} }
$o .= html_writer::tag('h4', $ca->attname);
if (isset($userdata->summary[$ca->attid])) { if (isset($userdata->summary[$ca->attid])) {
$o .= html_writer::tag('h4', $ca->attname);
$usersummary = $userdata->summary[$ca->attid]->get_all_sessions_summary_for($userdata->user->id); $usersummary = $userdata->summary[$ca->attid]->get_all_sessions_summary_for($userdata->user->id);
} else { $o .= construct_user_data_stat($usersummary, ATT_VIEW_ALL);
$usersummary = null;
} }
$o .= construct_user_data_stat($usersummary, ATT_VIEW_ALL);
} }
} }

Loading…
Cancel
Save