// check for notifications required
$notifyfields = 'u.id, u.username, u.firstname, u.lastname, u.email, u.emailstop, u.lang, u.timezone, u.mailformat, u.maildisplay';
$userstonotify = get_users_by_capability($context, 'mod/quiz:emailnotifysubmission',
- $notifyfields, '', '', '', groups_get_all_groups($course->id, $USER->id),
+ $notifyfields, '', '', '', array_keys(groups_get_all_groups($course->id, $USER->id)),
$notifyexcludeusers, false, false, true);
// if something to send, then build $a
$mform->setDefault('subnet', $CFG->quiz_subnet);
//-------------------------------------------------------------------------------
- $this->standard_coursemodule_elements();
+ $features = new stdClass;
+ $features->groups = true;
+ $features->groupings = true;
+ $features->groupmembersonly = true;
+ $this->standard_coursemodule_elements($features);
//-------------------------------------------------------------------------------
$mform->addElement('header', 'overallfeedbackhdr', get_string('overallfeedback', 'quiz'));
$mform->setHelpButton('overallfeedbackhdr', array('overallfeedback', get_string('overallfeedback', 'quiz'), 'quiz'));
}
/// Check to see if groups are being used in this quiz
- if ($groupmode = groupmode($course, $cm)) { // Groups are being used
+ $currentgroup = groups_get_activity_group($cm, true);
+
+ if ($groupmode = groups_get_activity_groupmode($cm)) { // Groups are being used
if (!$download) {
- $currentgroup = setup_and_print_groups($course, $groupmode, "report.php?id=$cm->id&mode=analysis");
- } else {
- $currentgroup = get_and_set_current_group($course, $groupmode);
+ groups_print_activity_menu($cm, "report.php?id=$cm->id&mode=analysis");
}
- } else {
- $currentgroup = get_and_set_current_group($course, $groupmode);
}
// set Table and Analysis stats options
}
/// find out current groups mode
- if ($groupmode = groupmode($course, $cm)) { // Groups are being used
+ $currentgroup = groups_get_activity_group($cm, true);
+
+ if ($groupmode = groups_get_activity_groupmode($cm)) { // Groups are being used
if (!$download) {
- $currentgroup = setup_and_print_groups($course, $groupmode, $reporturlwithoptions);
- } else {
- $currentgroup = get_and_set_current_group($course, $groupmode);
+ groups_print_activity_menu($cm, $reporturlwithoptions);
}
- } else {
- $currentgroup = get_and_set_current_group($course, $groupmode);
}
$hasfeedback = quiz_has_feedback($quiz->id) && $quiz->grade > 1.e-7 && $quiz->sumgrades > 1.e-7;