forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-29030 migrate completion report to new report type
AMOS BEGIN MOV [completion:view,coursereport_completion],[completion:view,report_completion] MOV [completiondate,coursereport_completion],[completiondate,report_completion] MOV [pluginpagetype,coursereport_completion],[pluginpagetype,report_completion] MOV [pluginname,coursereport_completion],[pluginname,report_completion] AMOS END
- Loading branch information
Showing
10 changed files
with
80 additions
and
61 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?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/>. | ||
|
||
/** | ||
* Post installation and migration code. | ||
* | ||
* @package report | ||
* @subpackage completion | ||
* @copyright 2011 Petr Skoda {@link http://skodak.org} | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
defined('MOODLE_INTERNAL') || die; | ||
|
||
function xmldb_report_completion_install() { | ||
// this is a hack which is needed for cleanup of original coursereport_completion stuff | ||
unset_all_config_for_plugin('coursereport_online'); | ||
capabilities_cleanup('coursereport_online'); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ | |
* @author Aaron Barnes <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
require_once('../../../config.php'); | ||
require_once('../../config.php'); | ||
require_once($CFG->libdir.'/completionlib.php'); | ||
|
||
/** | ||
|
@@ -46,7 +46,7 @@ | |
|
||
$course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST); | ||
|
||
$url = new moodle_url('/course/report/completion/index.php', array('course'=>$course->id)); | ||
$url = new moodle_url('/report/completion/index.php', array('course'=>$course->id)); | ||
$PAGE->set_url($url); | ||
$PAGE->set_pagelayout('report'); | ||
|
||
|
@@ -78,7 +78,7 @@ function csv_quote($value) { | |
require_login($course); | ||
|
||
$context=get_context_instance(CONTEXT_COURSE, $course->id); | ||
require_capability('coursereport/completion:view', $context); | ||
require_capability('report/completion:view', $context); | ||
|
||
// Get group mode | ||
$group = groups_get_course_group($course, true); // Supposed to verify group | ||
|
@@ -177,10 +177,10 @@ function csv_quote($value) { | |
) | ||
); | ||
|
||
$PAGE->requires->js('/course/report/completion/textrotate.js'); | ||
$PAGE->requires->js('/report/completion/textrotate.js'); | ||
|
||
// Handle groups (if enabled) | ||
groups_print_course_menu($course, $CFG->wwwroot.'/course/report/completion/?course='.$course->id); | ||
groups_print_course_menu($course, $CFG->wwwroot.'/report/completion/?course='.$course->id); | ||
} | ||
|
||
|
||
|
@@ -227,7 +227,7 @@ function csv_quote($value) { | |
|
||
|
||
// Build link for paging | ||
$link = $CFG->wwwroot.'/course/report/completion/?course='.$course->id; | ||
$link = $CFG->wwwroot.'/report/completion/?course='.$course->id; | ||
if (strlen($sort)) { | ||
$link .= '&sort='.$sort; | ||
} | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?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/>. | ||
|
||
/** | ||
* Version details. | ||
* | ||
* @package report | ||
* @subpackage completion | ||
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com) | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
defined('MOODLE_INTERNAL') || die; | ||
|
||
$plugin->version = 2011110200; // The current plugin version (Date: YYYYMMDDXX) | ||
$plugin->requires = 2011102700.01; // Requires this Moodle version | ||
$plugin->component = 'report_completion'; // Full name of the plugin (used for diagnostics) |