Skip to content

Commit

Permalink
Merge branch 'MDL-57809-33-progressbar' of https://github.com/roperto…
Browse files Browse the repository at this point in the history
…/moodle into MOODLE_33_STABLE
  • Loading branch information
stronk7 committed Jun 27, 2017
2 parents 7984ae3 + e318be3 commit 65e5e9f
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 4 deletions.
11 changes: 11 additions & 0 deletions backup/backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* This script is used to configure and execute the backup proccess.
*
* @package core
* @subpackage backup
* @copyright Moodle
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

define('NO_OUTPUT_BUFFERING', true);

require_once('../config.php');
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_plan_builder.class.php');
Expand Down
26 changes: 26 additions & 0 deletions backup/import.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
<?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/>.

/**
* This script is used to configure and execute the import proccess.
*
* @package core
* @subpackage backup
* @copyright Moodle
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

define('NO_OUTPUT_BUFFERING', true);

// Require both the backup and restore libs
require_once('../config.php');
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
Expand Down
26 changes: 25 additions & 1 deletion backup/restore.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
<?php
//This script is used to configure and execute the restore proccess.
// 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/>.

/**
* This script is used to configure and execute the restore proccess.
*
* @package core
* @subpackage backup
* @copyright Moodle
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

define('NO_OUTPUT_BUFFERING', true);

require_once('../config.php');
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
Expand Down
8 changes: 5 additions & 3 deletions course/publish/backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,18 @@
// //
///////////////////////////////////////////////////////////////////////////

/*
/**
* This page display the publication backup form
*
* @package course
* @subpackage publish
* @author Jerome Mouneyrac <jerome@mouneyrac.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
*
* This page display the publication backup form
*/

define('NO_OUTPUT_BUFFERING', true);

require_once('../../config.php');
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_plan_builder.class.php');
Expand Down
2 changes: 2 additions & 0 deletions grade/report/singleview/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

define('NO_OUTPUT_BUFFERING', true);

require_once('../../../config.php');
require_once($CFG->dirroot.'/lib/gradelib.php');
require_once($CFG->dirroot.'/grade/lib.php');
Expand Down
4 changes: 4 additions & 0 deletions lib/outputcomponents.php
Original file line number Diff line number Diff line change
Expand Up @@ -4747,6 +4747,10 @@ class progress_bar implements renderable, templatable {
* @param bool $autostart Whether to start the progress bar right away.
*/
public function __construct($htmlid = '', $width = 500, $autostart = false) {
if (!defined('NO_OUTPUT_BUFFERING') || !NO_OUTPUT_BUFFERING) {
debugging('progress_bar used without setting NO_OUTPUT_BUFFERING.', DEBUG_DEVELOPER);
}

if (!empty($htmlid)) {
$this->html_id = $htmlid;
} else {
Expand Down
2 changes: 2 additions & 0 deletions mod/lesson/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late
**/

define('NO_OUTPUT_BUFFERING', true);

require_once(__DIR__ . '/../../config.php');
require_once($CFG->dirroot.'/mod/lesson/locallib.php');
require_once($CFG->libdir . '/grade/constants.php');
Expand Down
1 change: 1 addition & 0 deletions mod/quiz/report.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

define('NO_OUTPUT_BUFFERING', true);

require_once(__DIR__ . '/../../config.php');
require_once($CFG->dirroot . '/mod/quiz/locallib.php');
Expand Down

0 comments on commit 65e5e9f

Please sign in to comment.