From f591c247cadb090b294bfbba4489ea3f740a4e6c Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Thu, 7 Nov 2013 10:18:20 +0800 Subject: [PATCH] MDL-42666 repository_boxnet: Improved output during migration --- repository/boxnet/locallib.php | 2 ++ repository/boxnet/migrationv1.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/repository/boxnet/locallib.php b/repository/boxnet/locallib.php index 838ee7f1f05..29ba3071161 100644 --- a/repository/boxnet/locallib.php +++ b/repository/boxnet/locallib.php @@ -116,6 +116,8 @@ function repository_boxnet_migrate_references_from_apiv1() { continue; } + mtrace('Starting migration of file reference ' . $file->get_referencefileid()); + // Manually import the file to the file pool to prevent timeout limitations of the repository method get_file(). // We ignore the fact that the content of the file could exist locally because we want to synchronize the file // now to prevent the repository to try to download the file as well. diff --git a/repository/boxnet/migrationv1.php b/repository/boxnet/migrationv1.php index c20245f832f..30d80d1d031 100644 --- a/repository/boxnet/migrationv1.php +++ b/repository/boxnet/migrationv1.php @@ -31,6 +31,8 @@ * @todo Deprecate/remove this tool after the 14th of December 2013. */ +define('NO_OUTPUT_BUFFERING', true); + require_once(__DIR__ . '/../../config.php'); require_once($CFG->libdir . '/adminlib.php'); require_once($CFG->dirroot . '/repository/boxnet/locallib.php'); @@ -40,7 +42,7 @@ require_capability('moodle/site:config', context_system::instance()); $title = get_string('migrationtool', 'repository_boxnet'); $PAGE->set_context(context_system::instance()); -$PAGE->set_pagelayout('admin'); +$PAGE->set_pagelayout('maintenance'); $PAGE->set_title($title); $PAGE->set_heading($title); $PAGE->set_url(new moodle_url('/repository/boxnet/migrationv1.php'));