Exemple #1
0
 public function __construct($params = null)
 {
     parent::__construct($params);
     //URL parameter specifies the report instance
     $this->report_shortname = $this->required_param('report');
     //convert shortname to report instance
     $this->report_instance = php_report::get_default_instance($this->report_shortname);
 }
 function __construct($params = false)
 {
     global $USER;
     parent::__construct($params);
     $workflow_id = $this->optional_param('_wfid', null, PARAM_INT);
     if ($workflow_id) {
         $this->workflow = _workflow_instance::load($workflow_id);
         if ($this->workflow->type !== $this->data_class || $this->workflow->userid != $USER->id) {
             print_error('invalidid', 'elis_core');
         }
     } else {
         $this->workflow = $this->new_workflow();
     }
 }