Adaptable for Moodle 4.3 released

Adaptable for Moodle 4.3 released

by Gareth J Barnard -
Number of replies: 20
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello,

I have released the Adaptable theme for Moodle 4.3 as follows:  Release 403.0.1 for Moodle 4.3 version 2023100900.00 (Build: 20231009) and above within the MOODLE_403_STABLE branch until the next release:

This release candidate could contain bugs and so I strongly recommend that you check on a test server first!  Not sure how to set one up?  Then look at the 'Installer packages' on https://download.moodle.org/releases/latest/. Ensure that you have multiple backups of all data before using.  Please report any issues. i.e. 'bugs' with these releases ONLY here.  Before doing so please read 'Reporting issues' on the 'Information' tab on the theme 'Settings' under 'Site administration' -> 'Appearance' -> 'Adaptable'.

Please note that in light of MDLSITE-7418 I have renamed the 'master' branch to 'main' on GitHub for Adaptable and indeed my other plugins.  Thus, if you have a fork, then please update the parent.

If you find this post useful, then please mark it so.

Thank you,

Gareth

Average of ratings: Useful (2)
In reply to Gareth J Barnard

Re: Adaptable for Moodle 4.3 released

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
As always, the fastest way to find a bug is to make a release.  There is some issues with the grade report not scrolling to the right, please add the following custom CSS to address the issue for now:

#page.drawers {
    overflow-y: auto;
}
.path-grade-report-grader .gradeparent tr.heading {
  top: 0;
}
.path-grade-report-grader.hasstickyfooter .gradeparent tr.lastrow {
  bottom: -1px;
}
Average of ratings: Useful (4)
In reply to Gareth J Barnard

Re: Adaptable for Moodle 4.3 released

by jim stevens -
Hi Gareth

Works a treat - Thank you very much.

Great theme and thanks for your work and support for it - Much appreciated
Jim
In reply to Gareth J Barnard

Re: Adaptable for Moodle 4.3 released

by David Pasadas -
Hey Gareth sourire

Thx again for your help with my carousels. Cool to see you are running the adaptable theme. 

I tried installing the adaptable theme ( Release 403.0.1 ) and I now encounter the following error message when trying to access site administration.
Exception - syntax error, unexpected token "<", expecting end of file
The rest of the site seems to be worinkg fine. 

I was on the default pre installed boost theme.

My version of moodle is 4.3
php version of site ( calloffrench.com ) is 8.2
php version of server was 8.2 but I just chacked and it got reverted to PHP version: 7.4.33
adaptable theme ( Release 403.0.1 )

I don't understand what this means. It's related to my server 
  • Version information: 5.1.1

Web server
  • Apache
  • Database client version: libmysql - mysqlnd 7.4.33
  • PHP extension: mysqli Documentation curl Documentation mbstring Documentation
  • PHP version: 7.4.33

Database server

  • Server version: 10.6.16-MariaDB - MariaDB Server
  • Protocol version: 10
I'm with a server provider scalahosting. I went in Spanel accessed the php files and added the adaptable folder to the themes folder.
I believe I followed the instructions correclty.
Attachment Capture.PNG
In reply to David Pasadas

Re: Adaptable for Moodle 4.3 released

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

Could be anywhere! Please turn on developer level debugging to get a stack trace, and as you can't access that via the UI -> https://docs.moodle.org/403/en/Debugging#In_config.php.

G
In reply to Gareth J Barnard

Re: Adaptable for Moodle 4.3 released

by David Pasadas -
Hey Gareth,

Thx for your reply. I went to the beach after. I got to fixing the issue this morning.

So I modified the php file confi-dist.php as config config.php did not contain the data. 
Maybe I made an error as I don't believe the debugging process was launched ? 
I sent you a screenshot of the modifications I made to the file. 

After modifying the file  I then rebooted the server as instructed by chatgpt ( bing ) and then went back to the admin page. 
But I got the same error message with no additional info. 

when I clicked on more info about this error , I got the following. I forgot to click on it before posting my first message. 

"A general error occurred (sorry we can't be more helpful here!)

You could try copying the text that was shown and doing a web search with it.

In Moodle 4.x this error might be caused by trying to use a 'draft' question in a quiz. Check the question bank!"

I don't believe I have draft questions. I do have a h5p file that does not load because my saved file doesn't work with it. It's pointing to somewhere on the old moodle. 


Attachment edited php config file.PNG
In reply to Gareth J Barnard

Re: Adaptable for Moodle 4.3 released

by David Pasadas -
Hey Gareth,

I'm still blocked by the issue described.

I could delete the site as I have a back up preceding the add on of your U.I. I suppose I shouldn't try to use the latest version of your U.I ? Will the previous version of your U.I work well with the new version of moodle ?

Thx for your work
In reply to David Pasadas

Re: Adaptable for Moodle 4.3 released

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

As far as I can tell this is a site specific issue and the theme is not at fault in terms of the distributed code.  Did you try to put:

@error_reporting(E_ALL | E_STRICT);   // NOT FOR PRODUCTION SERVERS!
@ini_set('display_errors', '1');         // NOT FOR PRODUCTION SERVERS!
$CFG->debug = (E_ALL | E_STRICT);   // === DEBUG_DEVELOPER - NOT FOR PRODUCTION SERVERS!
$CFG->debugdisplay = 1;              // NOT FOR PRODUCTION SERVERS!
In your Moodle config.php file?  To get a more detailed information then remove once you had?

G
In reply to Gareth J Barnard

Re: Adaptable for Moodle 4.3 released

by David Pasadas -
Hey Gareth

Thx for your reply

Yes I modified the php file confi-dist.php as config config.php did not contain the data.
My second previous message contains more details as well as a screenshot of the code I inputted. It’s identical to one you sent me in your message.
I’m thinking of wiping the moodle and restarting the process from scratch at this point.
Will your previous version of adaptable work well with my version of moodle : 4.3

Thx for your time
In reply to David Pasadas

Re: Adaptable for Moodle 4.3 released

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Why did you "Yes I modified the php file confi-dist.php as config config.php did not contain the data." instead of following my instructions?  (https://moodle.org/mod/forum/discuss.php?d=453194#p1827054) ; The config-dist.php file does nothing bar be a container for configuration settings etc.  They only take effect when they're in the config.php file.  If you do that then you'll get more information about why the issue is happening = understanding = a possible appreciation of what went wrong = identification of where the issue is and understanding if it could happen again after you go through all of the effort of "I’m thinking of wiping the moodle and restarting the process from scratch at this point." as you could have code or a setting value that's causing it and so you'd waste all of your time and be back to square one and scratching your head in despair.
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Adaptable for Moodle 4.3 released

by David Pasadas -
Hey Gareth,

So I followed what you said and surprise it worked sourire. Thx

I went over the debugging report with the help of chatGPT. You will find the full debugging report attached to this message. 

Please note that before adding your theme I duplicated the top navigation menu ( courses, dashboard, admin ). One of the issue might be stemming from there but I dought it considering the number of categories affected by the duplication error. 

According to chatGPT there are two types of bugs present  :

1. A lot of categories are duplicated which causes an error. 

2. The last two bugs reported would originate from a syntax error in the theme code. 

Below I pasted the response from ChatGPT related to the two types of bugs. But as I said there are multiple duplication errors reported in the debugging report. 


First type of bug 


Duplicate admin category name: analytics

  • line 990 of /lib/adminlib.php: call to debugging()
  • line 34 of /admin/settings/top.php: call to admin_category->add()
  • line 8770 of /lib/adminlib.php: call to require()
  • line 4528 of /lib/navigationlib.php: call to admin_get_root()
  • line 4391 of /lib/navigationlib.php: call to settings_navigation->load_administration_settings()
  • line 838 of /lib/pagelib.php: call to settings_navigation->initialise()
  • line 967 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
  • line 110 of /blocks/admin_bookmarks/block_admin_bookmarks.php: call to moodle_page->__get()
  • line 337 of /blocks/moodleblock.class.php: call to block_admin_bookmarks->get_content()
  • line 231 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
  • line 1231 of /lib/blocklib.php: call to block_base->get_content_for_output()
  • line 1289 of /lib/blocklib.php: call to block_manager->create_block_contents()
  • line 377 of /lib/blocklib.php: call to block_manager->ensure_content_created()
  • line 4179 of /lib/outputrenderers.php: call to block_manager->region_has_content()
  • line 50 of /theme/boost/layout/drawers.php: call to core_renderer->blocks()
  • line 1486 of /lib/outputrenderers.php: call to include()
  • line 1412 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
  • line 3026 of /lib/outputrenderers.php: call to core_renderer->header()
  • line 389 of /lib/setuplib.php: call to core_renderer->fatal_error()
  •  line ? of unknownfile: call to default_exception_handler()


Message from chatGPT : The error message “Duplicate admin category name: analytics” indicates that the Moodle system is trying to create an admin category named ‘analytics’ that already exists.

The error occurs when the system tries to add this category in the /admin/settings/top.php file (line 34). The admin_category->add() function is called here, which is defined in the /lib/adminlib.php file (line 990).

This function seems to be checking if the category already exists, and if it does, it raises a debugging message. The rest of the stack trace is showing the sequence of function calls that led to this point.

To resolve this issue, you need to check why these categories are being added multiple times. It could be due to some custom code in your Moodle setup or a misconfiguration. You should look into the /admin/settings/top.php file and the code that is causing these categories to be added.

 

 

Error with adaptable category

 

Duplicate admin category name: theme_adaptable

  • line 990 of /lib/adminlib.php: call to debugging()
  • line 36 of /theme/adaptable/settings.php: call to admin_category->add()
  • line 57 of /admin/settings/appearance.php: call to include()
  • line 8781 of /lib/adminlib.php: call to require()
  • line 4528 of /lib/navigationlib.php: call to admin_get_root()
  • line 4391 of /lib/navigationlib.php: call to settings_navigation->load_administration_settings()
  • line 838 of /lib/pagelib.php: call to settings_navigation->initialise()
  • line 967 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
  • line 110 of /blocks/admin_bookmarks/block_admin_bookmarks.php: call to moodle_page->__get()
  • line 337 of /blocks/moodleblock.class.php: call to block_admin_bookmarks->get_content()
  • line 231 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
  • line 1231 of /lib/blocklib.php: call to block_base->get_content_for_output()
  • line 1289 of /lib/blocklib.php: call to block_manager->create_block_contents()
  • line 377 of /lib/blocklib.php: call to block_manager->ensure_content_created()
  • line 4179 of /lib/outputrenderers.php: call to block_manager->region_has_content()
  • line 50 of /theme/boost/layout/drawers.php: call to core_renderer->blocks()
  • line 1486 of /lib/outputrenderers.php: call to include()
  • line 1412 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
  • line 3026 of /lib/outputrenderers.php: call to core_renderer->header()
  • line 389 of /lib/setuplib.php: call to core_renderer->fatal_error()
  • line ? of unknownfile: call to default_exception_handler()

Message from chatGPT : The error message you’re seeing is related to a duplicate admin category name, specifically theme_adaptable. This error is typically caused when Moodle tries to create an admin category that already exists.

From the stack trace, it appears that the duplication is happening in the settings.php file of the adaptable theme. Specifically, the admin_category->add() function is being called, which is leading to the duplication error.

Here’s a potential solution: You could check the settings.php file in the adaptable theme directory and ensure that it’s not trying to create an admin category that already exists. If it is, you might need to modify this file to prevent the duplication.

 

 Second type of bug


Exception - syntax error, unexpected token "<", expecting end of file

Debug info:
Error code: generalexceptionmessage

Stack trace:

  • line 135 of /theme/adaptable/settings/analytics.php: ParseError thrown
  • line 57 of /admin/settings/appearance.php: call to include()
  • line 8781 of /lib/adminlib.php: call to require()
  • line 842 of /admin/index.php: call to admin_get_root()


and this bug


Exception - syntax error, unexpected token "<", expecting end of file

Debug info:
Error code: generalexceptionmessage

Stack trace:

  • line 135 of /theme/adaptable/settings/analytics.php: ParseError thrown
  • line 57 of /admin/settings/appearance.php: call to include()
  • line 8781 of /lib/adminlib.php: call to require()
  • line 4528 of /lib/navigationlib.php: call to admin_get_root()
  • line 4391 of /lib/navigationlib.php: call to settings_navigation->load_administration_settings()
  • line 838 of /lib/pagelib.php: call to settings_navigation->initialise()
  • line 967 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
  • line 110 of /blocks/admin_bookmarks/block_admin_bookmarks.php: call to moodle_page->__get()
  • line 337 of /blocks/moodleblock.class.php: call to block_admin_bookmarks->get_content()
  • line 231 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
  • line 1231 of /lib/blocklib.php: call to block_base->get_content_for_output()
  • line 1289 of /lib/blocklib.php: call to block_manager->create_block_contents()
  • line 377 of /lib/blocklib.php: call to block_manager->ensure_content_created()
  • line 4179 of /lib/outputrenderers.php: call to block_manager->region_has_content()
  • line 50 of /theme/boost/layout/drawers.php: call to core_renderer->blocks()
  • line 1486 of /lib/outputrenderers.php: call to include()
  • line 1412 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
  • line 3026 of /lib/outputrenderers.php: call to core_renderer->header()
  • line 389 of /lib/setuplib.php: call to core_renderer->fatal_error()
  • line ? of unknownfile: call to default_exception_handler()

 

Same error message for the last two bugs

 

Message from chatGPT : The error message you’re seeing is a ParseError and it’s typically caused by a syntax error in your PHP code. The error message indicates that an unexpected token “<” was found, but the end of the file was expected. This often happens when there is a missing or extra bracket, semicolon, or some other syntax error in the code.

From the stack trace, it appears that the error is occurring in the analytics.php file of the adaptable theme, specifically on line 135.

Here’s a potential solution: You could open the analytics.php file in a text editor and go to line 135. Check the syntax around this line carefully for any errors. Look for missing or extra brackets, semicolons, or other syntax issues.



In reply to David Pasadas

Re: Adaptable for Moodle 4.3 released

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

Interesting, a few questions / observations:


Gareth
In reply to Gareth J Barnard

Re: Adaptable for Moodle 4.3 released

by David Pasadas -
Hey Gareth,

Thx for your answer

So I modifed the top navigation menu by adding “custom menu items”
Administration > Site administration > Appearance > Themes > Theme Settings and scroll down to the Custom Menu Items field

Unfortunatly I did not manage to erase the default menu items. So my navigation menu contained the default items and my custom items, thus the duplicates.

I can’t remember for sure how I installed the theme. I believe I did it directly in the directory of my server but I’m not sure. Internet Browser history shows I was in the server directory before installing theme.
Maintenance mode was enabled
In reply to David Pasadas

Re: Adaptable for Moodle 4.3 released

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Ok, is there a less than symbol in the value of the custom menu items? When installing Adaptable, what procedure / instructions did you follow? Where did you get it from? Did you check the files I quoted on your server for the issue reported in the stack traces?
In reply to Gareth J Barnard

Re: Adaptable for Moodle 4.3 released

by David Pasadas -

Hey Gareth,

I just checked the files and I think we found the problems smile.  But first I’ll answer your other questions.

 

I don’t believe I put negative signs ( - ) in my custom menus as this would have created sub categories in the menu.

For the installation of adaptable theme, I followed the instructions in the Readme file in the adaptable folder : enable maintenance mode, place adaptable folder in the server directory in theme,  then select the theme in the moodle interface.

 

  • file :  theme > adaptable > settings > analytics.php

My file does contain a less than symbol on line 135. My file manager indicates a syntax error with the red cross shown in the screen capture.


 

Furthermore I have 1600 lines on this file instead of your 134.

You will find my file attached

Houston I think we found the problem 😊.

 

 

  • For the file theme/adaptable/settings.php

Comparaison of our files with Word > review > compare shows no difference

File manager reports no errors

 

L48 is calling the file analytics like in your file

 L48   include(dirname(__FILE__) . '/settings/analytics.php');.

 

L36 is identical in your file and mine

Your file l 36

$ADMIN->add('themes', new admin_category('theme_adaptable', get_string('configtitle', 'theme_adaptable')));

My file l 36

$ADMIN->add('themes', new admin_category('theme_adaptable', get_string('configtitle', 'theme_adaptable')));

 

  • For the file adaptable/settings/alerts

My file manager reports no errors

Comparaison of our files with Word > review > compare shows no difference


In reply to David Pasadas

Re: Adaptable for Moodle 4.3 released

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

That's something and strange that file has so much duplicated code.  Ok, did you follow the installation or upgrading instructions?  Being:

  1. Ensure you have the release of Moodle as stated above in 'Required release of Moodle'.  This is essential as the theme relies on underlying core code that is out of my control.
  2. Login as an administrator and put Moodle in 'Maintenance Mode' so that there are no users using it bar you as the administrator.
  3. Make a backup of your old 'adaptable' folder in '/theme/' and then delete the folder.
  4. Copy the replacement extracted 'adaptable' folder to the '/theme/' folder.
  5. Go to 'Site administration' -> 'Notifications' and follow standard the 'plugin' update notification.
  6. If automatic 'Purge all caches' appears not to work by lack of display etc. then perform a manual 'Purge all caches' under 'Home -> Site administration -> Development -> Purge all caches'.
  7. Put Moodle out of Maintenance Mode.
Best if you get a replacement copy of the version you installed and follow this procedure.

And don't use Word, its a word processor and not something designed for code, use WinMerge etc. for comparing files.

Gareth
In reply to Gareth J Barnard

Re: Adaptable for Moodle 4.3 released

by David Pasadas -
Hey Gareth,
 
Thx for your reply.
 
To answer your question concerning the installation we were trying to debug : Yes I followed the installation procedure you described except I didn’t clear the caches.

  • I did as you suggested and made a new install :
I deleted the adaptable folder. Downloaded your most recent release for moodle 4.3.1. and uploaded it to the server.
The site now works but I’m still getting errors. ( I’m sorry for soliciting you so much )

I erased my top custom navigation menu to keeps things vanilla. I made this menu before the first and second installation of adaptable

I did not erase the code or instruction to force debugging tool to run in the server file.

  • Note on Installation process :
Already being in maintenance mode before the installation I accessed the site via mysite.com/admin/
This brought my straight to the installation of adaptable. First thing I saw was the requirements that were all validated, the next page asked me to validate the upgrade of the moodle database. I was then brought to the settings page of adaptable. I didn’t change anything. Then a second page of settings before I could navigate freely.
 

  • Bug report :
                      1. When accessing a course I get this error message

So the course appears with the default format not adaptable

Format plugin format_flexsections is not found. Using default format_topics
• line 140 of /course/format/classes/base.php: call to debugging()
• line 201 of /course/format/classes/base.php: call to core_courseformat\base::get_format_or_default()
• line 38 of /course/format/lib.php: call to core_courseformat\base::instance()
• line 1170 of /lib/pagelib.php: call to course_get_format()
• line 2908 of /lib/moodlelib.php: call to moodle_page->set_course()
• line 85 of /course/view.php: call to require_login()


                          2. On the home page I get this error message
 
So the home page appears with the default format not adaptable

Format plugin format_flexsections is not found. Using default format_topics
• line 140 of /course/format/classes/base.php: call to debugging()
• line 201 of /course/format/classes/base.php: call to core_courseformat\base::get_format_or_default()
• line 38 of /course/format/lib.php: call to core_courseformat\base::instance()
• line 3171 of /lib/modinfolib.php: call to course_get_format()
• line 587 of /lib/modinfolib.php: call to section_info->__construct()
• line 458 of /lib/modinfolib.php: call to course_modinfo->__construct()
• line 2633 of /lib/modinfolib.php: call to course_modinfo::instance()
• line 94 of /filter/activitynames/filter.php: call to get_fast_modinfo()
• line 78 of /filter/activitynames/filter.php: call to filter_activitynames->get_activity_list()
• line 42 of /filter/activitynames/filter.php: call to filter_activitynames->get_cached_activity_list()
• line 515 of /lib/filterlib.php: call to filter_activitynames->filter()
• line 188 of /lib/filterlib.php: call to moodle_text_filter->filter_stage_post_clean()
• line 230 of /lib/filterlib.php: call to filter_manager->apply_filter_chain()
• line 1370 of /lib/weblib.php: call to filter_manager->filter_text()
• line 2393 of /course/renderer.php: call to format_text()
• line 925 of /course/renderer.php: call to coursecat_helper->get_course_formatted_summary()
• line 1046 of /course/renderer.php: call to core_course_renderer->course_summary()
• line 907 of /course/renderer.php: call to core_course_renderer->coursecat_coursebox_content()
• line 1138 of /course/renderer.php: call to core_course_renderer->coursecat_coursebox()
• line 1800 of /course/renderer.php: call to core_course_renderer->coursecat_courses()
• line 2079 of /course/renderer.php: call to core_course_renderer->frontpage_available_courses()
• line 137 of /index.php: call to core_course_renderer->frontpage()


Sorry for all this pain.

I really appreciate the time you gave me
In reply to David Pasadas

Re: Adaptable for Moodle 4.3 released

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

In this case that error is nothing to do with the theme, it's a 'course format' that's missing: https://moodle.org/plugins/format_flexsections.

With "So the course appears with the default format not adaptable", Adaptable is a theme not a course format.

Also be aware of https://moodle.org/mod/forum/discuss.php?d=453194#p1827630 with V403.1.1 of the theme, which I'll fix as soon as I can.

G
In reply to Gareth J Barnard

Re: Adaptable for Moodle 4.3 released

by David Pasadas -
Hey Gareth,

Houston we have lift off smile

Everything is working great.

thx man

Much love and appreciation
In reply to Gareth J Barnard

Re: Adaptable for Moodle 4.3 released

by Rodrigo Damasceno Marangon -
Hello Gareth, thanks for your effort, we in our university appreciate very much that.

We're using Moodle 2023100902.05 and Adaptable 2023111802 and it seems that $OUTPUT variable in classes/output/core_renderer_layout.php receives a null value when there's an attempt to answer a quiz, whether a newly created or not, generating the following stack trace:

Exceção - Call to a member function course_content_header() on null
Debug info:
Error code: generalexceptionmessage
Stack trace:

    line 1309 of /theme/adaptable/classes/output/core_renderer_layout.php: Error thrown
    line 31 of /theme/adaptable/layout/secure.php: call to theme_adaptable\output\core_renderer->secure_layout()
    line 1486 of /lib/outputrenderers.php: call to include()
    line 1412 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
    line 547 of /lib/outputrenderers.php: call to core_renderer->header()
    line 484 of /mod/quiz/classes/output/renderer.php: call to plugin_renderer_base->__call()
    line 144 of /mod/quiz/attempt.php: call to mod_quiz\output\renderer->attempt_page()

If there's any additional information that helps I'll gladly share. I'll try to understand what generates that behavior.
In reply to Rodrigo Damasceno Marangon

Re: Adaptable for Moodle 4.3 released

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

Thanks for the report and suppling the relevant information, please change '$OUTPUT' to '$this' on line 1309 of /theme/adaptable/classes/output/core_renderer_layout.php, i.e:

echo $OUTPUT->course_content_header();
to

echo $this->course_content_header();

Gareth
Average of ratings: Useful (1)