original_string: public function definition() {
          $mform = $this->_form;
          $instance = $this->_customdata;
  
          // Visible elements.
          $mform->addElement('html', $instance['gradingtable']);
  
          // Hidden params.
          $mform->addElement('hidden', 'id', $instance['cm']);
          $mform->setType('id', PARAM_INT);
          $mform->addElement('hidden', 'action', 'quickgrade');
          $mform->setType('action', PARAM_ALPHA);
          $mform->addElement('hidden', 'lastpage', $instance['page']);
          $mform->setType('lastpage', PARAM_INT);
  
          // Skip notifications option.
          $mform->addElement('selectyesno', 'sendstudentnotifications', get_string('sendstudentnotifications', 'assign'));
          $mform->setDefault('sendstudentnotifications', $instance['sendstudentnotifications']);
  
          // Buttons.
          $savemessage = get_string('saveallquickgradingchanges', 'assign');
          $mform->addElement('submit', 'savequickgrades', $savemessage);
      }
code: public function definition() {
          $mform = $this->_form;
          $instance = $this->_customdata;
  
          // Visible elements.
          $mform->addElement('html', $instance['gradingtable']);
  
          // Hidden params.
          $mform->addElement('hidden', 'id', $instance['cm']);
          $mform->setType('id', PARAM_INT);
          $mform->addElement('hidden', 'action', 'quickgrade');
          $mform->setType('action', PARAM_ALPHA);
          $mform->addElement('hidden', 'lastpage', $instance['page']);
          $mform->setType('lastpage', PARAM_INT);
  
          // Skip notifications option.
          $mform->addElement('selectyesno', 'sendstudentnotifications', get_string('sendstudentnotifications', 'assign'));
          $mform->setDefault('sendstudentnotifications', $instance['sendstudentnotifications']);
  
          // Buttons.
          $savemessage = get_string('saveallquickgradingchanges', 'assign');
          $mform->addElement('submit', 'savequickgrades', $savemessage);
      }
code_tokens: public function definition ( ) { $ mform = $ this -> _form ; $ instance = $ this -> _customdata ; // Visible elements. $ mform -> addElement ( 'html' , $ instance [ 'gradingtable' ] ) ; // Hidden params. $ mform -> addElement ( 'hidden' , 'id' , $ instance [ 'cm' ] ) ; $ mform -> setType ( 'id' , PARAM_INT ) ; $ mform -> addElement ( 'hidden' , 'action' , 'quickgrade' ) ; $ mform -> setType ( 'action' , PARAM_ALPHA ) ; $ mform -> addElement ( 'hidden' , 'lastpage' , $ instance [ 'page' ] ) ; $ mform -> setType ( 'lastpage' , PARAM_INT ) ; // Skip notifications option. $ mform -> addElement ( 'selectyesno' , 'sendstudentnotifications' , get_string ( 'sendstudentnotifications' , 'assign' ) ) ; $ mform -> setDefault ( 'sendstudentnotifications' , $ instance [ 'sendstudentnotifications' ] ) ; // Buttons. $ savemessage = get_string ( 'saveallquickgradingchanges' , 'assign' ) ; $ mform -> addElement ( 'submit' , 'savequickgrades' , $ savemessage ) ; }
docstring: Define this form - called from the parent constructor
docstring_tokens: Define this form - called from the parent constructor