If it's in a 'classes' folder then it can be overridden using autoloading - https://docs.moodle.org/dev/Automatic_class_loading.
Hi Gareth,
Thanks. I tried the following:
Copied the course_summary_exporter.php file from /course/classes/external/course_summary_exporter.php and placed it in /theme/photo/classes/external/course_summary_exporter.php and made the following changes which I did in the core code to check whether it's working. I also tried placing the file in the /theme/photo/classes/output folder.
$myid = '2';
return array(
....
....
'progress' => $myid,
....
....
);
But it didn't work.
Here is the code:
namespace core_course\external;
//namespace theme_photo\output\external;
defined('MOODLE_INTERNAL') || die();
use renderer_base;
use moodle_url;
//class course_summary_exporter extends \core\external\exporter {
class course_summary_exporter extends \core_course\external\course_summary_exporter {
....
....
protected function get_other_values(renderer_base $output) {
...
...
$myid = '2';
return array(
...
'progress' => $myid,
...
);
}
}
Could you please check and tell me where I made the mistake and how to correct it?
Thanks. I tried the following:
Copied the course_summary_exporter.php file from /course/classes/external/course_summary_exporter.php and placed it in /theme/photo/classes/external/course_summary_exporter.php and made the following changes which I did in the core code to check whether it's working. I also tried placing the file in the /theme/photo/classes/output folder.
$myid = '2';
return array(
....
....
'progress' => $myid,
....
....
);
But it didn't work.
Here is the code:
namespace core_course\external;
//namespace theme_photo\output\external;
defined('MOODLE_INTERNAL') || die();
use renderer_base;
use moodle_url;
//class course_summary_exporter extends \core\external\exporter {
class course_summary_exporter extends \core_course\external\course_summary_exporter {
....
....
protected function get_other_values(renderer_base $output) {
...
...
$myid = '2';
return array(
...
'progress' => $myid,
...
);
}
}
Could you please check and tell me where I made the mistake and how to correct it?