Example #1
0
 /**
  * Initialises the new enrol_user_button
  *
  * @staticvar int $count The number of enrol user buttons already created
  * @param moodle_url $url
  * @param string $label The text to display in the button
  * @param string $method Either post or get
  */
 public function __construct(moodle_url $url, $label, $method = 'post')
 {
     static $count = 0;
     $count++;
     parent::__construct($url, $label, $method);
     $this->class = 'singlebutton enrolusersbutton';
     $this->formid = 'enrolusersbutton-' . $count;
 }
Example #2
0
 /**
  * Initialises the new select_user_button.
  *
  * @param \moodle_url $url
  * @param string $label The text to display in the button
  * @param string $method Either post or get
  */
 public function __construct(\moodle_url $url, $label, $method = 'post')
 {
     parent::__construct($url, $label, $method);
     $this->class = 'singlebutton selectusersbutton gradereport_history_plugin';
     $this->formid = \html_writer::random_id('selectusersbutton');
 }