How to make all Sub-chapters collapsed untill parent opened?

How to make all Sub-chapters collapsed untill parent opened?

by Richard Strauss -
Number of replies: 17
I am using book module (latest version on 1.9 beta) and I have several sub-chapters. I am using sub chapters as sections. This takes up a large amount of menu space. How can I make all the sub-chapters invisible until opening the top level link? Similar to the Moodle administration menu system...

Seems like a useful feature to me!?

TIA

Richard
Average of ratings: -
In reply to Richard Strauss

Re: How to make all Sub-chapters collapsed untill parent opened?

by Grant Beevers -
Hi Richard,

Did you ever get an answer to this? I have also created a book with many chapters and want to be able to collapse the menu.

Regards,
Grant
In reply to Grant Beevers

Re: How to make all Sub-chapters collapsed untill parent opened?

by Mirko Kämpf -
Hello Grant,

I wrote a new Version of the view.php script of the book-modul, which is able to show the TOC (former as menu) as a tree with collapsable /expandable leaves. The code is tested and will be free, but I would need about 4 to 6 hours of work, to collect the documentation and package all for a free redistribution.

Depending on the people who are interested in this code, I will do the packaging and distribution of the new code-fragments soon.

Best regards,

Mirko Kämpf
Average of ratings: Useful (1)
In reply to Mirko Kämpf

Re: How to make all Sub-chapters collapsed untill parent opened?

by Grant Beevers -

Sounds fantastic Mirko. As soon as it's done, I would be keen to get hold of it.

Thanks plenty,

Grant

In reply to Mirko Kämpf

Re: How to make all Sub-chapters collapsed untill parent opened?

by Debora Weber-Wulff -
I am quite interested in any improvements to the book module, as I am beginning to use it quite heavily!
In reply to Mirko Kämpf

Re: How to make all Sub-chapters collapsed untill parent opened?

by Derek Chirnside -
Mirko:
What happened to this?
Depending - I'd be interested in trying it.

-Derek
In reply to Mirko Kämpf

Re: How to make all Sub-chapters collapsed untill parent opened?

by Kathy Morello -
I would like to make sub chapters collapse also.  I would like to know if I can import a Word document into Moodle book without copy and pasting itto the text area.  Also, can I import and Excel workbook without copy and pasting it into text area?  My students like having everything in the book except the assignments, quizzes etc.
In reply to Kathy Morello

Re: How to make all Sub-chapters collapsed untill parent opened?

by Isabelle Langeveld -
Hi Kathy, I have the same problem. We started the course with al the theory documents in separate pdf-files, linked to the assignments. Students didn't like opening 3 different files while they were working on an assignment because of all the open windows to navigate between. So, now we decided to put everything together in a nice book. But help, what a load of work to convert everything!

Have you tried word-html converters?
How did you solve it?

Isabelle
In reply to Isabelle Langeveld

Re: How to make all Sub-chapters collapsed untill parent opened?

by Kathi Dempsey -
Has anyone heard of the solution for this? I also have a very long menu in the TOC and would like to collapse the sub-chapters.
Also, I am VERY interested in any ideas on converting and uploading the book files instead of pasting and resizing each one! VERY TIME CONSUMING AND NOT FUN!

Thank you all!

Kathi
In reply to Mirko Kämpf

Re: How to make all Sub-chapters collapsed untill parent opened?

by luiz rosalba -
it would be a great advance for the module , because it would gain a friendly look and an easier navigation.
In reply to Mirko Kämpf

Re: How to make all Sub-chapters collapsed untill parent opened?

by Kevin McKelvey -
Yes, I too would love to have this update. I'm developing some bigger books with many subchapters, and the multiple subchapters is making navigation very difficult.

Thanks,
Kevin
In reply to Mirko Kämpf

Re: How to make all Sub-chapters collapsed untill parent opened?

by Isabelle Langeveld -
Well Mirko, this would be wonderfull!

Good luck to you, Isabelle
In reply to Mirko Kämpf

Re: How to make all Sub-chapters collapsed untill parent opened?

by Kathy Morello -
Yes, i would like to be able to do that so that students are not overwhelmed when they open book and yet I can work on new materials as I have time.
In reply to Richard Strauss

Re: How to make all Sub-chapters collapsed untill parent opened?

by Kathi Dempsey -
Has anyone come up with a 'fix' for this issue? I am doing our board book monthly and it can be quite lengthy which crowds the TOC and makes navigating difficult.
Could sure use a better way to view the contents!
Also, does anyone have any helpful hints on importing docs? Specifically, pdf's. If I have an 8 page pdf file and try to import it I get an error message.. Every Time!! Not sure what I am doing wrong here!!
Right now the easiest way I have found to create a book is to open the docs and choose to save as pdf and image file in my iphoto. The jpeg's import really nicely and the quality is very good.... but it seems like it should be easier to just put the pdf up there. Any ideas?

Also, anyone have a helpful hint about using Power Point?
In reply to Kathi Dempsey

Re: How to make all Sub-chapters collapsed untill parent opened?

by Tony Whillas -
Hi Kathi!

Not sure whether what you want re. "how to make all Sub-chapters collapsed untill parent opened" is possible with Moodle books - it was set up with the notion of ease of use in mind! But then again, someone may have sorted some code to do the 'trick'! smile

I'm addressing your issue re. importing documents - esp. .pdf files - into Moodle Book.
To do this the document file [can be pdf, doc, etc] needs to be converted saved as a web-page [html or htm] file format.
With pdf files just:
1. save as HTML 3.2 [*.htm,*.html] or export/HTML/HTML 3.2 - remember there will be both a .htm file and an images folder created
2. zip the .htm file and images foler and upload to the Moodle course Files
3. unzip
4. now you can import into the Moodle book - after browsing to the course File folder just choose the htm file and click on import
Note - if you don't upload both the htm file and the images folder the images will be lost.

Hope this solves this part of the problem for you! smile
Cheers,
Tony
In reply to Richard Strauss

Re: How to make all Sub-chapters collapsed untill parent opened?

by Anil Sharma -
Attached is a solution. Works with Moodle 1.9. Isn't perfect but will meet basic requirements, all subchapters will collapse under a chapter. The only issue i couldnt solve - if you click on a subchapter, the subchapter opens but the menu collapses back. Still usable.

Add these files to the book module folder, it will replace one file - toc.php - so keep a backup of the original file, in case you want to revert to the original.
Average of ratings: Useful (1)
In reply to Anil Sharma

Re: How to make all Sub-chapters collapsed untill parent opened?

by E. L. Cooper -

I just tested this in 1.95. It does sort of work but when it is installed courses with books will not backup or restore also a restore from a previous backup errors out.

Basically it is very nice it the book is complete and you don't care about course backups.

In reply to Anil Sharma

Re: How to make all Sub-chapters collapsed untill parent opened?

by Kathir Rajaraman -
Hi Anil Sharma 


Please update those features in moodle 2.9 version


Thanks

Kathir R