/** * @param array $callbackargs */ function __construct($callbackargs) { parent::__construct($callbackargs); if (!$this->postid && !$this->discussionid) { throw new portfolio_caller_exception('mustprovidediscussionorpost', 'forum'); } }
/** * Explicit constructor to set the properties declared by the parent class. * * Firstly we call the parent's constructor to set the $this->id property * from the passed argument. Then we populate the $this->cm so that the * default parent class methods work well. * * @param array $callbackargs */ public function __construct($callbackargs) { // Let the parent class set the $this->id property. parent::__construct($callbackargs); // Populate the $this->cm property. $this->cm = get_coursemodule_from_id('workshop', $this->id, 0, false, MUST_EXIST); }
/** * @param array $callbackargs the arguments passed through */ public function __construct($callbackargs) { parent::__construct($callbackargs); // set up the list of fields to export $this->selectedfields = array(); foreach ($callbackargs as $key => $value) { if (strpos($key, 'field_') === 0) { $this->selectedfields[] = substr($key, 6); } } }
/** * The constructor. * * @param array $callbackargs */ public function __construct($callbackargs) { parent::__construct($callbackargs); $this->cm = get_coursemodule_from_id('assign', $this->cmid, 0, false, MUST_EXIST); }
/** * @param array $callbackargs */ function __construct($callbackargs) { parent::__construct($callbackargs); if (!$this->instanceid) { throw new portfolio_caller_exception('mustprovideinstance', 'referentiel'); } if (!$this->attachment && !$this->certificatid) { throw new portfolio_caller_exception('mustprovideattachmentorcertificat', 'referentiel'); } if (!isset($this->report)) { throw new portfolio_caller_exception('mustprovidereporttype', 'referentiel'); } if (!isset($this->export_format)) { throw new portfolio_caller_exception('mustprovideexportformat', 'referentiel'); } else { // echo "<br />:: 86 ::$this->export_format\n"; if ($this->export_format != PORTFOLIO_FORMAT_FILE) { // depending on whether there are files or not, we might have to change richhtml/plainhtml $this->supportedformats = array_merge(array($this->supportedformats), array(PORTFOLIO_FORMAT_RICH, PORTFOLIO_FORMAT_LEAP2A)); } } }
public function __construct($callbackargs) { parent::__construct($callbackargs); if (empty($this->exporttype)) { $this->exporttype = 'csv'; } $this->selectedfields = array(); foreach ($callbackargs as $key => $value) { if (strpos($key, 'field_') === 0) { $this->selectedfields[] = substr($key, 6); } } }
/** * @param array $callbackargs */ public function __construct($callbackargs) { parent::__construct($callbackargs); if (!$this->postid) { throw new portfolio_caller_exception('mustprovidepost', 'oublog'); } }