Display Course Full Title for Section0 name

Display Course Full Title for Section0 name

by Jock Coats -
Number of replies: 3

I had a feeling I asked this somewhere before, but I can't see it in the search results for anything I try and search for.

We are using Gareth Barnard's Collapsed Topics course format, but I believe this applies to the standard weeks and topics formats too.  We need every course to display prominently its full name somewhere on the course page.

This should preferably be somewhere at the top of the content column, either as well as or instead of the Section 0 name.

Is there a way of doing this without changing code, and if not, where would I look for the code to change (we will get billed for having a bespoke version however hence wondering whether it is possible without changing code).

Cheers,

Jock

Average of ratings: -
In reply to Jock Coats

Re: Display Course Full Title for Section0 name

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Jock,

The course full name is stored in a variable that is separate from the section name.  This cannot be done automatically unless you change code.  The details of the code change depend on the version of Moodle you are running.  Of course you could always do this manually by having a large label where you type in the name of the course.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Display Course Full Title for Section0 name

by Jock Coats -

We need to be able to enforce some consistency.  Our courses are provisioned from outside the Moodle system using the full names for them in our backend management database (about 3,000 running at any one time).

We're now on Moodle 2.4 with a version of your Collapsed Topics format dated 2013020800 on our live system and 2013041103 on my development system.

So we really need to use the Full Name as in the mdl_course table somewhere prominent...

I was looking at a bit of code near line 80 of topcoll/lib.php:

// We can't add a node without any text.
if ((string) $thesection->name !== '') {
$o .= format_string($thesection->name, true, array('context' => $coursecontext));
} else if ($thesection->section == 0) {
$o = get_string('section0name', 'format_topcoll');
} else {
if (($tcsettings['layoutstructure'] == 1) || ($tcsettings['layoutstructure'] == 4)) {
$o = get_string('sectionname', 'format_topcoll') . ' ' . $thesection->section;
} else {
$o = $this->get_section_dates($thesection, $course, $tcsettings);
}
}

 

 

In reply to Jock Coats

Re: Display Course Full Title for Section0 name

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Jock,

Don't change the code in 'lib.php' as that affects the navigation too.  Look at the function 'print_multiple_section_page' in 'renderer.php'.

Cheers,

Gareth