Ignore:
Timestamp:
May 2, 2016, 12:09:23 PM (3 years ago)
Author:
jrpelegrina
Message:

Updated to moodle 3.0.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • moodle/trunk/fuentes/grade/export/xls/export.php

    r136 r1331  
    2121
    2222$id                = required_param('id', PARAM_INT); // course id
     23$PAGE->set_url('/grade/export/xls/export.php', array('id'=>$id));
    2324
    2425if (!$course = $DB->get_record('course', array('id'=>$id))) {
     
    3334require_capability('gradeexport/xls:view', $context);
    3435
     36// We need to call this method here before any print otherwise the menu won't display.
     37// If you use this method without this check, will break the direct grade exporting (without publishing).
     38$key = optional_param('key', '', PARAM_RAW);
     39if (!empty($CFG->gradepublishing) && !empty($key)) {
     40    print_grade_page_head($COURSE->id, 'export', 'xls', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_xls'));
     41}
     42
    3543if (groups_get_course_groupmode($COURSE) == SEPARATEGROUPS and !has_capability('moodle/site:accessallgroups', $context)) {
    3644    if (!groups_is_member($groupid, $USER->id)) {
     
    4048$mform = new grade_export_form(null, array('publishing' => true, 'simpleui' => true, 'multipledisplaytypes' => true));
    4149$formdata = $mform->get_data();
     50$export = new grade_export_xls($course, $groupid, $formdata);
    4251
    43 // print all the exported data here
    44 $export = new grade_export_xls($course, $groupid, $formdata);
    45 $export->print_grades();
     52// If the gradepublishing is enabled and user key is selected print the grade publishing link.
     53if (!empty($CFG->gradepublishing) && !empty($key)) {
     54    groups_print_course_menu($course, 'index.php?id='.$id);
     55    echo $export->get_grade_publishing_url();
     56    echo $OUTPUT->footer();
     57} else {
     58    $export->print_grades();
     59}
    4660
    47 
Note: See TracChangeset for help on using the changeset viewer.