Show chapter under book

Show chapter under book

par roobin np,
Nombre de réponses : 3

I have added book as modules in my page but in view.php page only book title is showing, ineed to show all chapters under each book as sublist.

In the attachment you can see books are showing as module1, module2

i need the display like

Module1

  • chapter1
  • chapter2
Module2 

  • chapter1
  • chapter2
Please, Can anyone help?

Annexe module.jpg
Moyenne des évaluations  -
En réponse à roobin np

Re: Show chapter under book

par AL Rachels,
Avatar Core developers Avatar Particularly helpful Moodlers Avatar Plugin developers Avatar Testers

Hi roobin np,

Create each of your books and it's chapters.

  • Goto book 1 chapter one and copy the url in the address bar.
  • Edit Book 1 and type "Chapter one", into the description text area,
  • select your new text and click the "Link" toolbutton and paste the url into "Enter a URL" and click Create link.
  • Then place a checkmark in "Display description on course page" and then click Save and display.
  • Repeat first four steps for the other chapters.
When you are done you will have what you want.

Moyenne des évaluations Useful (1)
En réponse à AL Rachels

Re: Show chapter under book

par roobin np,

Hi Rachels,

Thank you for your answer, i have done as you said.

I would like to know is there any plugin available that will automatically add chapters under module.

En réponse à roobin np

Re: Show chapter under book

par AL Rachels,
Avatar Core developers Avatar Particularly helpful Moodlers Avatar Plugin developers Avatar Testers

Sorry, none that I know of, but here are some possibilities.

  • You could use Snippet for the text portion, but you would still need to add the links manually to each of the chapters.
  • Since a book already gives you a table of contents when you are viewing the book, it might be possible to add code to give you the option of automatically placing a copy of the TOC in the description.
  • It might be possible to do the above by using a Generico filter that extracts the TOC links from the database and places them in the description.