Skip to content

Commit

Permalink
Merge branch 'mdl36506-moodle27' of git://github.com/tlock/moodle int…
Browse files Browse the repository at this point in the history
…o MOODLE_27_STABLE
  • Loading branch information
David Monllao committed Mar 30, 2015
2 parents 0582523 + 9ad24a0 commit 38ebaa2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mod/book/db/upgradelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,16 @@ function mod_book_migrate_moddata_dir_to_legacy($book, $context, $path) {
* @return void
*/
function mod_book_migrate_all_areas() {
global $DB;
global $DB, $OUTPUT;

$rsbooks = $DB->get_recordset('book');
foreach($rsbooks as $book) {
upgrade_set_timeout(360); // set up timeout, may also abort execution
$cm = get_coursemodule_from_instance('book', $book->id);
if (empty($cm) || empty($cm->id)) {
echo $OUTPUT->notification("Course module not found, skipping: {$book->name}");
continue;
}
$context = context_module::instance($cm->id);
mod_book_migrate_area($book, 'intro', 'book', $book->course, $context, 'mod_book', 'intro', 0);

Expand Down

0 comments on commit 38ebaa2

Please sign in to comment.