-
Improvement
-
Resolution: Duplicate
-
Minor
-
None
-
2.0
-
MOODLE_20_STABLE
-
Easy
It would be nice to add the course id as a parameter inside tinymce lib.php. The reason is that I have developed various tinymce plugins and each time I tried global $COURSE, it would return $COURSE->id = 1 $context->id would then be 2. I need the actual course I am in for these functions to work. So I added in libdir->editor->tinymce->lib.php the following code: (inside protected function get_init_params)
line 78: global $CFG, $PAGE, $OUTPUT, $COURSE;
line 113 : 'courseid' => $COURSE->id,
Then for my module in tiny_mce init I use:
courseid = ed.getParam('courseid');
....
file : url + '/module.php?id=' + courseid,
With this, my problem is resolved.
Thank you for considering.
This could help other tinymce developers.
- will help resolve
-
MDL-28527 Check if TinyMCE issues are resolved by upgrade
-
- Closed
-