Section Titles in HTML Block

Section Titles in HTML Block

by Trish Hart -
Number of replies: 5

Scrolling nightmare issue.....We have lost our section block so I saw maybe we can put the section titles (ie week 1 week 2 etc or topic title) in a HTML block but I can't figure out how to link the title in the section.  I guess what I am thinking of is kind of a bookmark.

I know there are other ways to collapse but I like this idea in that I can put up the previous and current week. 

Can someone help me with the code? 

Thanks!!

Trish Hart

Average of ratings: -
In reply to Trish Hart

Re: Section Titles in HTML Block

by Itamar Tzadok -
Described in this thread. Let me know if it is not exactly what you're looking for or if it needs further clarifications. Note, however, that to detect automatically and display in this block (indexical) previous and (indexical) current week you may need to add some scripting. smile
In reply to Itamar Tzadok

Re: Section Titles in HTML Block

by Trish Hart -

Wow that looks great!

that is pretty much what I am looking for but but I don't know enough coding to make it jump to that section. I'm really only looking for the titles and that I can manually change when I want to.   I was thinking I need to tag the title somehow. 

In reply to Trish Hart

Re: Section Titles in HTML Block

by Itamar Tzadok -
Simple titles require no coding. Here is an example. The first section in this course site is 'getting started with Moodle'. Type in this title:

Getting started with Moodle

The url of that section in single view mode is the url of the main page (http://moodle.org/course/view.php?id=5) + &topic=1

http://moodle.org/course/view.php?id=5&topic=1

You can also get that url by right clicking one at the top right corner of the section and copying the link location. Of course, once you have one such url you can simply duplicate it and adjust the topic number at the end to the desired one.

Note that in a weekly format we have week sections rather than topic sections and so the url would look like:

http://moodle.org/course/view.php?id=5&week=1


Now, in the editor select the string 'Getting started with Moodle' and click edlink to open the insert link form. Paste the section url in url field and save.

Getting started with Moodle

If you click the link above you will get the first section on the main page of this course.

hth smile
In reply to Itamar Tzadok

Re: Section Titles in HTML Block

by Trish Hart -

Wonderful Itamar, that did the trick completly.  I think I just missed how to get the url for the section .

Thanks so much for the solution and repeating your instructions for me smile

It certainly did help!