Course edit_form override in theme

Course edit_form override in theme

by dhiraj tekade -
Number of replies: 4

Moodle version : 3.6

Theme name: Fordson

File to move in theme: \course\edit_form.php

Function: function definition()


Problem: I had made custom code changes in '\course\edit_form.php' file under class 'course_edit_form' in function definition But I want to remove those custom code and override the function in the theme.

Please help me to achieve this. Explain the folder structures that need to be created in the theme. 

Alreadt Tried creating in \themes\fordson\class\output etc. 


Average of ratings: -
In reply to dhiraj tekade

Re: Course edit_form override in theme

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

Can't be done in a theme, only a course format can add items to that file via code in its lib.php file which a theme cannot override.

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

Re: Course edit_form override in theme

by dhiraj tekade -

Thanks Gareth brother,



In reply to dhiraj tekade

Re: Course edit_form override in theme

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

For information - 3.7 will be coming with the ability to add custom fields to courses in the same way as custom user profile fields can be added now.

Certainly a useful tool I will be looking at for a few purposes.

Average of ratings: Useful (1)