Copying pages into books

Copying pages into books

by Alistair Spark -
Number of replies: 3
Picture of Core developers Picture of Plugin developers

Hi everyone,

Any ideas on how to make 30 Pages (Page Resource) be copied as chapters of a Book (Book plugin) which doesn't involve recreating these manually?

Average of ratings: -
In reply to Alistair Spark

Re: Copying pages into books

by Ankit Agarwal -

Hi Alistair,

I donot think there is any easy way to do that. If you really donot want to do it manually, you might want to look at the database structure of mdl_page and mdl_book_chapters and write a script that can import the content from the former to the later.
But doing it manually might be less of an effort.

Thanks

In reply to Alistair Spark

Re: Copying pages into books

by Brian Merritt -
Picture of Particularly helpful Moodlers

Hi Alistair

If you put them your 30 pages into PowerPoint format, I have just uploaded a PowerPoint Macro that turns the slides into a set of files that can use the "Import Chapter" function.  You can see that here https://moodle.org/mod/forum/discuss.php?d=218473

Alternatively, if you are happy to create the book using images, save all the pages into one subdirectory and create a simple html file per slide with the title set to the chapter heading and the code a very simple display the corresponding image.  Import Chapters will work.

What format are your Pages in smile

In reply to Brian Merritt

Re: Copying pages into books

by Erika Remley -

I've just come upon this thread, as I'm looking for a solution to the same problem.  Is there a simple way to turn several "page" resources into one "book" resource?  I've inherited courses and managed to restore them from 1.9 to 2.5 but items that were a "resource" in the old version are now pages and the navigation between them isn't ideal.