lib.php 998 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. defined('MOODLE_INTERNAL') || die();
  3. /**
  4. * Plugin for Moodle insert 'iassign' button.
  5. *
  6. * @author Luciano Oliveira Borges
  7. * @package tinymce_iassign_lib
  8. * @copyright 2013 iMatica (<a href="http://www.matematica.br">iMath</a>) - Computer Science Dep. of IME-USP (Brazil)
  9. * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  10. */
  11. class tinymce_iassign extends editor_tinymce_plugin {
  12. /** @var array list of buttons defined by this plugin */
  13. protected $buttons = array('iassign');
  14. protected function update_init_params(array &$params, context $context,
  15. array $options = null) {
  16. global $CFG, $COURSE;
  17. // Add button after 'table' in advancedbuttons3.
  18. $this->add_button_after($params, 3, 'iassign', 'table');
  19. // Add JS file, which uses default name.
  20. $this->add_js_plugin($params);
  21. $params['iassign_course'] = $COURSE->id;
  22. $params['iassign_wwwroot'] = $CFG->wwwroot."/mod/iassign/ilm_manager.php";
  23. }
  24. }