���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home3/cpr76684/public_html/export.php.tar
���ѧ٧ѧ�
home3/cpr76684/public_html/Aem/calendar/export.php 0000644 00000021023 15151222447 0015572 0 ustar 00 <?php ///////////////////////////////////////////////////////////////////////////// // // // NOTICE OF COPYRIGHT // // // // Moodle - Calendar extension // // // // Copyright (C) 2003-2004 Greek School Network www.sch.gr // // // // Designed by: // // Avgoustos Tsinakos (tsinakos@teikav.edu.gr) // // Jon Papaioannou (pj@moodle.org) // // // // Programming and development: // // Jon Papaioannou (pj@moodle.org) // // // // For bugs, suggestions, etc contact: // // Jon Papaioannou (pj@moodle.org) // // // // The current module was developed at the University of Macedonia // // (www.uom.gr) under the funding of the Greek School Network (www.sch.gr) // // The aim of this project is to provide additional and improved // // functionality to the Asynchronous Distance Education service that the // // Greek School Network deploys. // // // // This program 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 2 of the License, or // // (at your option) any later version. // // // // This program 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: // // // // http://www.gnu.org/copyleft/gpl.html // // // ///////////////////////////////////////////////////////////////////////////// /** * This file is part of the User section Moodle * * @copyright 2003-2004 Jon Papaioannou (pj@moodle.org) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later * @package calendar */ require_once('../config.php'); require_once($CFG->dirroot.'/course/lib.php'); require_once($CFG->dirroot.'/calendar/lib.php'); if (empty($CFG->enablecalendarexport)) { die('no export'); } $courseid = optional_param('course', SITEID, PARAM_INT); $categoryid = optional_param('category', null, PARAM_INT); $action = optional_param('action', '', PARAM_ALPHA); $day = optional_param('cal_d', 0, PARAM_INT); $mon = optional_param('cal_m', 0, PARAM_INT); $year = optional_param('cal_y', 0, PARAM_INT); $time = optional_param('time', 0, PARAM_INT); $generateurl = optional_param('generateurl', 0, PARAM_BOOL); // If a day, month and year were passed then convert it to a timestamp. If these were passed // then we can assume the day, month and year are passed as Gregorian, as no where in core // should we be passing these values rather than the time. This is done for BC. if (!empty($day) && !empty($mon) && !empty($year)) { if (checkdate($mon, $day, $year)) { $time = make_timestamp($year, $mon, $day); } else { $time = time(); } } else if (empty($time)) { $time = time(); } $url = new moodle_url('/calendar/export.php', array('time' => $time)); $managesubscriptionsurl = new moodle_url('/calendar/managesubscriptions.php'); if ($courseid != SITEID && !empty($courseid)) { // Course ID must be valid and existing. $course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST); $courses = array($course->id => $course); $url->param('course', $course->id); $managesubscriptionsurl->param('course', $course->id); navigation_node::override_active_url(new moodle_url('/course/view.php', ['id' => $course->id])); $PAGE->navbar->add( get_string('calendar', 'calendar'), new moodle_url('/calendar/view.php', ['view' => 'month', 'course' => $course->id]) ); } else { $course = get_site(); $courses = calendar_get_default_courses(); if (!empty($categoryid)) { $managesubscriptionsurl->param('category', $categoryid); navigation_node::override_active_url(new moodle_url('/course/index.php', ['categoryid' => $categoryid])); $PAGE->set_category_by_id($categoryid); $PAGE->navbar->add( get_string('calendar', 'calendar'), new moodle_url('/calendar/view.php', ['view' => 'month', 'category' => $categoryid]) ); } else { $PAGE->navbar->add(get_string('calendar', 'calendar'), new moodle_url('/calendar/view.php', ['view' => 'month'])); } } require_login($course, false); if ($action !== '') { $url->param('action', $action); } $PAGE->set_url($url); $calendar = new calendar_information(0, 0, 0, $time); $calendar->set_sources($course, $courses); $pagetitle = get_string('export', 'calendar'); $PAGE->navbar->add(get_string('managesubscriptions', 'calendar'), $managesubscriptionsurl); $PAGE->navbar->add(get_string('exportcalendar', 'calendar'), $url); // Print title and header. $headingstr = get_string('calendar', 'core_calendar'); $headingstr = ($courseid != SITEID && !empty($courseid)) ? "{$headingstr}: {$COURSE->shortname}" : $headingstr; $PAGE->set_title($course->shortname.': '.get_string('calendar', 'calendar').': '.$pagetitle); $PAGE->set_heading($headingstr); $PAGE->set_pagelayout('standard'); $PAGE->set_secondary_navigation(false); $renderer = $PAGE->get_renderer('core_calendar'); $calendar->add_sidecalendar_blocks($renderer); // Get the calendar type we are using. $calendartype = \core_calendar\type_factory::get_calendar_instance(); $now = $calendartype->timestamp_to_date_array($time); $weekend = CALENDAR_DEFAULT_WEEKEND; if (isset($CFG->calendar_weekend)) { $weekend = intval($CFG->calendar_weekend); } $numberofdaysinweek = $calendartype->get_num_weekdays(); $formdata = array( // Let's populate some vars to let "common tasks" be somewhat smart... // If today it's weekend, give the "next week" option. 'allownextweek' => $weekend & (1 << $now['wday']), // If it's the last week of the month, give the "next month" option. 'allownextmonth' => calendar_days_in_month($now['mon'], $now['year']) - $now['mday'] < $numberofdaysinweek, // If today it's weekend but tomorrow it isn't, do NOT give the "this week" option. 'allowthisweek' => !(($weekend & (1 << $now['wday'])) && !($weekend & (1 << (($now['wday'] + 1) % $numberofdaysinweek)))) ); // Disable submit protection so that the submit buttons continue working after being pressed. $exportform = new core_calendar_export_form($FULLME, $formdata, 'POST', '', ['data-double-submit-protection' => 'off']); $calendarurl = ''; if ($data = $exportform->get_data()) { $params = array(); $params['userid'] = $USER->id; $params['authtoken'] = calendar_get_export_token($USER); $params['preset_what'] = $data->events['exportevents']; $params['preset_time'] = $data->period['timeperiod']; $link = new moodle_url('/calendar/export_execute.php', $params); if (!empty($data->generateurl)) { $exporturlcontext = ['calendarexporturl' => $link->out(false)]; $exporturl = $OUTPUT->render_from_template('core_calendar/export_calendar_url', $exporturlcontext); $calendarurl = html_writer::div($exporturl, 'generalbox calendarurl mt-3'); } if (!empty($data->export)) { redirect($link); } } echo $OUTPUT->header(); echo $renderer->start_layout(); echo $OUTPUT->heading(get_string('exportcalendar', 'calendar')); if ($action != 'advanced') { $exportform->display(); } echo $calendarurl; echo $renderer->complete_layout(); echo $OUTPUT->footer(); home3/cpr76684/public_html/Aem/question/bank/exportquestions/export.php 0000644 00000010344 15152154543 0022105 0 ustar 00 <?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/>. /** * Script for importing questions into the question bank. * * @package qbank_exportquestions * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require_once(__DIR__ . '/../../../config.php'); require_once($CFG->dirroot . '/question/editlib.php'); require_once($CFG->dirroot . '/question/format.php'); require_once($CFG->dirroot . '/question/renderer.php'); use qbank_exportquestions\exportquestions_helper; use qbank_exportquestions\form\export_form; require_login(); core_question\local\bank\helper::require_plugin_enabled('qbank_exportquestions'); list($thispageurl, $contexts, $cmid, $cm, $module, $pagevars) = question_edit_setup('export', '/question/bank/exportquestions/export.php'); // Get display strings. $strexportquestions = get_string('exportquestions', 'question'); list($catid, $catcontext) = explode(',', $pagevars['cat']); $category = $DB->get_record('question_categories', ["id" => $catid, 'contextid' => $catcontext], '*', MUST_EXIST); // Header. $PAGE->set_url($thispageurl); $PAGE->set_title($strexportquestions); $PAGE->set_heading($COURSE->fullname); $PAGE->activityheader->disable(); echo $OUTPUT->header(); // Print horizontal nav if needed. $renderer = $PAGE->get_renderer('core_question', 'bank'); $qbankaction = new \core_question\output\qbank_action_menu($thispageurl); echo $renderer->render($qbankaction); $exportform = new export_form($thispageurl, ['contexts' => $contexts->having_one_edit_tab_cap('export'), 'defaultcategory' => $pagevars['cat']]); if ($fromform = $exportform->get_data()) { $thiscontext = $contexts->lowest(); if (!is_readable($CFG->dirroot . "/question/format/{$fromform->format}/format.php")) { throw new moodle_exception('unknowformat', '', '', $fromform->format); } $withcategories = 'nocategories'; if (!empty($fromform->cattofile)) { $withcategories = 'withcategories'; } $withcontexts = 'nocontexts'; if (!empty($fromform->contexttofile)) { $withcontexts = 'withcontexts'; } $classname = 'qformat_' . $fromform->format; $qformat = new $classname(); $filename = question_default_export_filename($COURSE, $category) . $qformat->export_file_extension(); $exporturl = exportquestions_helper::question_make_export_url($thiscontext->id, $category->id, $fromform->format, $withcategories, $withcontexts, $filename); echo $OUTPUT->box_start(); echo get_string('yourfileshoulddownload', 'question', $exporturl->out()); echo $OUTPUT->box_end(); // Log the export of these questions. $eventparams = [ 'contextid' => $category->contextid, 'other' => ['format' => $fromform->format, 'categoryid' => $category->id], ]; $event = \core\event\questions_exported::create($eventparams); $event->trigger(); // Don't allow force download for behat site, as pop-up can't be handled by selenium. if (!defined('BEHAT_SITE_RUNNING')) { $PAGE->requires->js_function_call('document.location.replace', [$exporturl->out(false)], false, 1); } echo $OUTPUT->continue_button(new moodle_url($PAGE->settingsnav->find( 'questionbank', \navigation_node::TYPE_CONTAINER)->action, $thispageurl->params())); echo $OUTPUT->footer(); exit; } // Display export form. echo $OUTPUT->heading_with_help($strexportquestions, 'exportquestions', 'question'); $exportform->display(); echo $OUTPUT->footer(); home3/cpr76684/public_html/Aem/grade/export/xml/export.php 0000644 00000005437 15152204461 0017234 0 ustar 00 <?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/>. require_once '../../../config.php'; require_once $CFG->dirroot.'/grade/export/lib.php'; require_once 'grade_export_xml.php'; $id = required_param('id', PARAM_INT); // course id $PAGE->set_url('/grade/export/xml/export.php', array('id'=>$id)); if (!$course = $DB->get_record('course', array('id'=>$id))) { throw new \moodle_exception('invalidcourseid'); } require_login($course); $context = context_course::instance($id); $groupid = groups_get_course_group($course, true); require_capability('moodle/grade:export', $context); require_capability('gradeexport/xml:view', $context); // We need to call this method here before any print otherwise the menu won't display. // If you use this method without this check, will break the direct grade exporting (without publishing). $key = optional_param('key', '', PARAM_RAW); if (!empty($CFG->gradepublishing) && !empty($key)) { $actionbar = new \core_grades\output\export_publish_action_bar($context, 'xml'); print_grade_page_head($COURSE->id, 'export', 'xml', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_xml'), false, false, true, null, null, null, $actionbar); } if (groups_get_course_groupmode($COURSE) == SEPARATEGROUPS and !has_capability('moodle/site:accessallgroups', $context)) { if (!groups_is_member($groupid, $USER->id)) { throw new \moodle_exception('cannotaccessgroup', 'grades'); } } $mform = new grade_export_form(null, array('publishing' => true, 'simpleui' => true, 'multipledisplaytypes' => false, 'idnumberrequired' => true, 'updategradesonly' => true)); $formdata = $mform->get_data(); $export = new grade_export_xml($course, $groupid, $formdata); // If the gradepublishing is enabled and user key is selected print the grade publishing link. if (!empty($CFG->gradepublishing) && !empty($key)) { groups_print_course_menu($course, 'index.php?id='.$id); echo $export->get_grade_publishing_url(); echo $OUTPUT->footer(); } else { $event = \gradeexport_xml\event\grade_exported::create(array('context' => $context)); $event->trigger(); $export->print_grades(); } home3/cpr76684/public_html/Aem/admin/tool/customlang/export.php 0000644 00000004507 15152233753 0020255 0 ustar 00 <?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/>. /** * Performs the custom lang export. * * @package tool_customlang * @subpackage customlang * @copyright 2020 Thomas Wedekind <thomas.wedekind@univie.ac.at> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require(__DIR__ . '/../../../config.php'); require_once($CFG->dirroot.'/'.$CFG->admin.'/tool/customlang/locallib.php'); require_once($CFG->libdir.'/adminlib.php'); global $PAGE, $CFG; require_login(SITEID, false); require_capability('tool/customlang:export', context_system::instance()); $lng = required_param('lng', PARAM_LANG); admin_externalpage_setup('toolcustomlang', '', null, new moodle_url('/admin/tool/customlang/import.php', ['lng' => $lng])); $form = new \tool_customlang\form\export(null, ['lng' => $lng]); if ($form->is_cancelled()) { redirect('index.php'); die(); } else if ($formdata = $form->get_data()) { $tempzip = tempnam($CFG->tempdir . '/', 'tool_customlang_export'); $filelist = []; foreach ($formdata->files as $file) { $filepath = tool_customlang_utils::get_localpack_location($lng). '/' . $file; if (file_exists($filepath)) { $filelist[$file] = $filepath; } } $zipper = new zip_packer(); if (!empty($filelist) && $zipper->archive_to_pathname($filelist, $tempzip)) { // Filename include the lang name so the file can be imported with automatic language detection. send_temp_file($tempzip, "customlang_$lng.zip"); die(); } } $output = $PAGE->get_renderer('tool_customlang'); echo $output->header(); echo $output->heading(get_string('pluginname', 'tool_customlang')); $form->display(); echo $OUTPUT->footer(); home3/cpr76684/public_html/Aem/grade/export/xls/export.php 0000644 00000005335 15152360251 0017237 0 ustar 00 <?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/>. require_once '../../../config.php'; require_once $CFG->dirroot.'/grade/export/lib.php'; require_once 'grade_export_xls.php'; $id = required_param('id', PARAM_INT); // course id $PAGE->set_url('/grade/export/xls/export.php', array('id'=>$id)); if (!$course = $DB->get_record('course', array('id'=>$id))) { throw new \moodle_exception('invalidcourseid'); } require_login($course); $context = context_course::instance($id); $groupid = groups_get_course_group($course, true); require_capability('moodle/grade:export', $context); require_capability('gradeexport/xls:view', $context); // We need to call this method here before any print otherwise the menu won't display. // If you use this method without this check, will break the direct grade exporting (without publishing). $key = optional_param('key', '', PARAM_RAW); if (!empty($CFG->gradepublishing) && !empty($key)) { $actionbar = new \core_grades\output\export_publish_action_bar($context, 'xls'); print_grade_page_head($COURSE->id, 'export', 'xls', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_xls'), false, false, true, null, null, null, $actionbar); } if (groups_get_course_groupmode($COURSE) == SEPARATEGROUPS and !has_capability('moodle/site:accessallgroups', $context)) { if (!groups_is_member($groupid, $USER->id)) { throw new \moodle_exception('cannotaccessgroup', 'grades'); } } $mform = new grade_export_form(null, array('publishing' => true, 'simpleui' => true, 'multipledisplaytypes' => true)); $formdata = $mform->get_data(); $export = new grade_export_xls($course, $groupid, $formdata); // If the gradepublishing is enabled and user key is selected print the grade publishing link. if (!empty($CFG->gradepublishing) && !empty($key)) { groups_print_course_menu($course, 'index.php?id='.$id); echo $export->get_grade_publishing_url(); echo $OUTPUT->footer(); } else { $event = \gradeexport_xls\event\grade_exported::create(array('context' => $context)); $event->trigger(); $export->print_grades(); }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�