MDL-19052 separate group mode improvements and fixes
This commit is contained in:
@@ -47,9 +47,17 @@ if (!empty($CFG->gradepublishing)) {
|
||||
|
||||
$mform = new grade_export_form(null, array('publishing' => true));
|
||||
|
||||
$groupmode = groups_get_course_groupmode($course); // Groups are being used
|
||||
$currentgroup = groups_get_course_group($course, true);
|
||||
if ($groupmode == SEPARATEGROUPS and !$currentgroup and !has_capability('moodle/site:accessallgroups', $context)) {
|
||||
print_heading(get_string("notingroup"));
|
||||
print_footer($course);
|
||||
die;
|
||||
}
|
||||
|
||||
// process post information
|
||||
if ($data = $mform->get_data()) {
|
||||
$export = new grade_export_ods($course, groups_get_course_group($course), '', false, false, $data->display, $data->decimals);
|
||||
$export = new grade_export_ods($course, $currentgroup, '', false, false, $data->display, $data->decimals);
|
||||
|
||||
// print the grades on screen for feedbacks
|
||||
$export->process_form($data);
|
||||
|
||||
@@ -47,9 +47,17 @@ if (!empty($CFG->gradepublishing)) {
|
||||
|
||||
$mform = new grade_export_form(null, array('includeseparator'=>true, 'publishing' => true));
|
||||
|
||||
$groupmode = groups_get_course_groupmode($course); // Groups are being used
|
||||
$currentgroup = groups_get_course_group($course, true);
|
||||
if ($groupmode == SEPARATEGROUPS and !$currentgroup and !has_capability('moodle/site:accessallgroups', $context)) {
|
||||
print_heading(get_string("notingroup"));
|
||||
print_footer($course);
|
||||
die;
|
||||
}
|
||||
|
||||
// process post information
|
||||
if ($data = $mform->get_data()) {
|
||||
$export = new grade_export_txt($course, groups_get_course_group($course), '', false, false, $data->display, $data->decimals);
|
||||
$export = new grade_export_txt($course, $currentgroup, '', false, false, $data->display, $data->decimals);
|
||||
|
||||
// print the grades on screen for feedback
|
||||
|
||||
|
||||
@@ -47,9 +47,17 @@ if (!empty($CFG->gradepublishing)) {
|
||||
|
||||
$mform = new grade_export_form(null, array('publishing' => true));
|
||||
|
||||
$groupmode = groups_get_course_groupmode($course); // Groups are being used
|
||||
$currentgroup = groups_get_course_group($course, true);
|
||||
if ($groupmode == SEPARATEGROUPS and !$currentgroup and !has_capability('moodle/site:accessallgroups', $context)) {
|
||||
print_heading(get_string("notingroup"));
|
||||
print_footer($course);
|
||||
die;
|
||||
}
|
||||
|
||||
// process post information
|
||||
if ($data = $mform->get_data()) {
|
||||
$export = new grade_export_xls($course, groups_get_course_group($course), '', false, false, $data->display, $data->decimals);
|
||||
$export = new grade_export_xls($course, $currentgroup, '', false, false, $data->display, $data->decimals);
|
||||
|
||||
// print the grades on screen for feedbacks
|
||||
$export->process_form($data);
|
||||
|
||||
@@ -47,9 +47,17 @@ if (!empty($CFG->gradepublishing)) {
|
||||
|
||||
$mform = new grade_export_form(null, array('idnumberrequired'=>true, 'publishing'=>true, 'updategradesonly'=>true));
|
||||
|
||||
$groupmode = groups_get_course_groupmode($course); // Groups are being used
|
||||
$currentgroup = groups_get_course_group($course, true);
|
||||
if ($groupmode == SEPARATEGROUPS and !$currentgroup and !has_capability('moodle/site:accessallgroups', $context)) {
|
||||
print_heading(get_string("notingroup"));
|
||||
print_footer($course);
|
||||
die;
|
||||
}
|
||||
|
||||
// process post information
|
||||
if ($data = $mform->get_data()) {
|
||||
$export = new grade_export_xml($course, groups_get_course_group($course), '', false, $data->updatedgradesonly, $data->display, $data->decimals);
|
||||
$export = new grade_export_xml($course, $currentgroup, '', false, $data->updatedgradesonly, $data->display, $data->decimals);
|
||||
|
||||
// print the grades on screen for feedbacks
|
||||
$export->process_form($data);
|
||||
|
||||
Reference in New Issue
Block a user