Skip to content

Commit

Permalink
MDL-43950 editor_atto: Add arguments to plugin callback params_for_js
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Massart authored and Damyon Wiese committed Mar 26, 2014
1 parent d088a83 commit 45698f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/editor/atto/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public function use_editor($elementid, array $options=null, $fpoptions=null) {
}

$modules = array('moodle-editor_atto-editor');
$options['context'] = empty($options['context']) ? context_system::instance() : $options['context'];

$jsplugins = array();
foreach ($groups as $group => $plugins) {
Expand All @@ -103,7 +104,7 @@ public function use_editor($elementid, array $options=null, $fpoptions=null) {
$modules[] = 'moodle-atto_' . $plugin . '-button';

component_callback('atto_' . $plugin, 'strings_for_js');
$extra = component_callback('atto_' . $plugin, 'params_for_js');
$extra = component_callback('atto_' . $plugin, 'params_for_js', array($elementid, $options, $fpoptions));

if ($extra) {
$jsplugin['params'] = $extra;
Expand Down

0 comments on commit 45698f7

Please sign in to comment.