MDL-19052 separate group mode improvements and fixes

This commit is contained in:
skodak
2009-05-04 13:14:17 +00:00
parent cd669edcc1
commit e67af80ed5
4 changed files with 36 additions and 4 deletions
+9 -1
View File
@@ -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);
+9 -1
View File
@@ -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
+9 -1
View File
@@ -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);
+9 -1
View File
@@ -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);