MDL-25185 - data - Allowing data from the database to be exported according to group roles.

This commit is contained in:
Adrian Greeve
2012-02-09 09:29:45 +08:00
parent 4d2f89f85b
commit 4ec0b1caec
2 changed files with 17 additions and 3 deletions
+5 -1
View File
@@ -84,6 +84,8 @@ if($mform->is_cancelled()) {
$PAGE->set_title($data->name);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
$url = new moodle_url('/mod/data/export.php', array('d' => $d));
groups_print_activity_menu($cm, $url);
echo $OUTPUT->heading(format_string($data->name));
// these are for the tab display
@@ -104,7 +106,9 @@ foreach ($formdata as $key => $value) {
}
}
$exportdata = data_get_exportdata($data->id, $fields, $selectedfields);
$currentgroup = groups_get_activity_group($cm);
$exportdata = data_get_exportdata($data->id, $fields, $selectedfields, $currentgroup);
$count = count($exportdata);
switch ($formdata['exporttype']) {
case 'csv':