MDL-19052 separate group mode improvements and fixes; merged from MOODLE_19_STABLE

This commit is contained in:
skodak
2009-05-04 12:55:20 +00:00
parent bd129497f7
commit 48a4c84986
2 changed files with 18 additions and 14 deletions
+9 -4
View File
@@ -90,10 +90,15 @@ if (has_capability('moodle/grade:viewall', $context)) { //Teachers will see all
$isseparategroups = ($course->groupmode == SEPARATEGROUPS and !has_capability('moodle/site:accessallgroups', $context));
if ($isseparategroups and (!$currentgroup)) {
print_grade_page_head($courseid, 'report', 'overview', get_string('modulename', 'gradereport_overview'));
print_heading(get_string("notingroup"));
print_footer($course);
exit;
// no separate group access, can view only self
$userid = $USER->id;
$user_selector = '';
} else {
/// Print graded user selector at the top
$user_selector = '<div id="graded_users_selector">';
$user_selector .= print_graded_users_selector($course, 'report/overview/index.php?id=' . $course->id, $userid, $currentgroup, true, true);
$user_selector .= '</div>';
$user_selector .= "<p style = 'page-break-after: always;'></p>";
}
/// Print graded user selector at the top
+9 -10
View File
@@ -91,18 +91,17 @@ if (has_capability('moodle/grade:viewall', $context)) { //Teachers will see all
$isseparategroups = ($course->groupmode == SEPARATEGROUPS and !has_capability('moodle/site:accessallgroups', $context));
if ($isseparategroups and (!$currentgroup)) {
print_grade_page_head($courseid, 'report', 'user', get_string('modulename', 'gradereport_user'));
print_heading(get_string("notingroup"));
print_footer($course);
exit;
// no separate group access, can view only self
$userid = $USER->id;
$user_selector = '';
} else {
/// Print graded user selector at the top
$user_selector = '<div id="graded_users_selector">';
$user_selector .= print_graded_users_selector($course, 'report/user/index.php?id=' . $course->id, $userid, $currentgroup, true, true);
$user_selector .= '</div>';
$user_selector .= "<p style = 'page-break-after: always;'></p>";
}
/// Print graded user selector at the top
$user_selector = '<div id="graded_users_selector">';
$user_selector .= print_graded_users_selector($course, 'report/user/index.php?id=' . $course->id, $userid, $currentgroup, true, true);
$user_selector .= '</div>';
$user_selector .= "<p style = 'page-break-after: always;'></p>";
if (empty($userid)) {
$gui = new graded_users_iterator($course, null, $currentgroup);
$gui->init();