Skip to content
Snippets Groups Projects
Select Git revision
  • 33e8f7c4cc2628f844157ca05f09e73d90e377fd
  • master default protected
  • pymilter-1.0.4
  • pymilter-1.0.3
  • pymilter-1.0.2
  • pymilter-1.0.1
  • pymilter-1_0
  • milter-0_8_18
  • pymilter-0_9_8
  • pymilter-0_9_7
  • pymilter-0_9_6
  • pymilter-0_9_5
  • pymilter-0_9_4
  • pymilter-0_9_2
  • pymilter-0_9_1
  • pymilter-0_9_0
  • pymilter-0_8_12
  • pymilter-0_8_11
  • pymilter-0_8_10
  • pymilter-0_8_9
  • milter-0_8_8
  • milter-0_8_7
22 results

quarantine.txt

Blame
  • action_download.php 1.72 KiB
    <?php
    // This file is part of Moodle - http://moodle.org/
    //
    // Moodle is free software: you can redistribute it and/or modify
    // it under the terms of the GNU General Public License as published by
    // the Free Software Foundation, either version 3 of the License, or
    // (at your option) any later version.
    //
    // Moodle is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU General Public License for more details.
    //
    // You should have received a copy of the GNU General Public License
    // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
    
    /**
     * Wrapper script redirecting user operations to correct destination.
     *
     * @copyright 1999 Martin Dougiamas  http://dougiamas.com
     * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
     * @package local_hshexport
     */
    
    use local_hshexport\local\helpers\download;
    
    require(__DIR__ . '/../../config.php');
    
    $PAGE->set_url('/local/hshexport/action_download.php');
    
    if (!confirm_sesskey()) {
        throw new \moodle_exception('confirmsesskeybad');
    }
    
    $course_code = optional_param('course_code', null, PARAM_ALPHANUMEXT);
    $roleids = required_param_array('select_roles', PARAM_INT);
    $courseid = required_param('courseid', PARAM_INT);
    $coursecontextid = required_param('coursecontextid', PARAM_INT);
    
    $filename = download::get_evaluation_filename($courseid, $course_code);
    $rows = local_hshexport\local\helpers\user_query::get_users_by_role($courseid, $coursecontextid, $roleids);
    
    if ($course_code != null) {
        $rows = local_hshexport\local\helpers\download::get_rows($rows, $course_code);
    }
    
    \core\dataformat::download_data($filename, 'csv', [], $rows);