Example #1
0
 /**
  * Init method.
  *
  * @return void
  */
 protected function init()
 {
     parent::init();
     $this->data['objecttable'] = 'assign_submission';
 }
 /**
  * Custom validation.
  *
  * @throws \coding_exception
  * @return void
  */
 protected function validate_data()
 {
     parent::validate_data();
     if (!isset($this->other['discussionid'])) {
         throw new \coding_exception('The \'discussionid\' value must be set in other.');
     } else {
         if (!isset($this->other['triggeredfrom'])) {
             throw new \coding_exception('The \'triggeredfrom\' value must be set in other.');
         }
     }
 }
Example #3
0
 /**
  * Init method.
  *
  * @return void
  */
 protected function init()
 {
     parent::init();
     $this->data['objecttable'] = 'workshop_submissions';
 }
Example #4
0
 /**
  * Custom validation
  *
  * @throws \coding_exception
  * @return void
  */
 protected function validate_data() {
     parent::validate_data();
     if (!isset($this->other['triggeredfrom'])) {
         throw new \coding_exception('triggeredfrom must be set in $other');
     }
 }