customize course view

customize course view

by sara rabie -
Number of replies: 5

I use moodle 3.2 when i try to customize view of course by add in my custom folder folder call course and page call view.php and add my custom code it worked well but at the end of page i found this errror


Coding error detected, it must be fixed by a programmer: The theme has already been set up for this page ready for output. Therefore, you can no longer change the theme, or anything that might affect what the current theme is, for example, the course.


and when delete this page and return to default view the error disappear


any help please???

Attachment view.png
Average of ratings: -
In reply to sara rabie

Re: error customize course view

by sara rabie -

i need help ????????????

In reply to sara rabie

Re: error customize course view

by Luis Ibhiabor -

It seems either something is wrong with the code you are using to customize it or there is something that you have failed to do correctly. That could be the reason why it works well again when you have deleted/removed the code. Can you do the customization step-by-step and test your site along the way till you get to when the error starts appearing? That might help you understand what exactly is going wrong.

In reply to Luis Ibhiabor

Re: error customize course view

by sara rabie -

yes but the error occuer when i take copy from file view.php and add it to my custom folder although it overwrite on the core view.php and read view in my custom folder  but error appear when i try to customize any file of th emoodle with the same way

my way to customize as example course view

1- create folder call custom

2- create folder in custom call course

3- copy view.php file from course folder of moodle and add it in course in custom folder

4-in config file add this line

$CFG->customscripts = 'mypath/custom';
all this step work well and make what i need but on the footer appear above message or exceptions message in footer


is there another way to customize pages on moodle without hack core??????




In reply to sara rabie

Re: error customize course view

by tim st.clair -
Picture of Plugin developers

Remember that you have to add a die() to the very end of the  copy of view.php you made in your customscripts - otherwise Moodle will include it, then execute it, then try to inlcude and execute the original version of the file too - hence all the "require_once" errors you posted.

Average of ratings: Useful (1)