public function pendingrelease($releaseuser = null) { $submitinfo = $this->submitted_to(); if (is_null($submitinfo)) { throw new ParameterException("View with id " . $this->get('id') . " has not been submitted"); } db_begin(); self::_db_pendingrelease(array($this->get('id'))); require_once get_config('docroot') . 'export/lib.php'; add_submission_to_export_queue($this, $releaseuser); db_commit(); }
/** * Sets released submissions to pending release status and adds * the submission item to the export queue ready for archiving. * * @param object $releaseuser The user releasing the collection */ public function pendingrelease($releaseuser = null) { $submitinfo = $this->submitted_to(); if (!$this->is_submitted()) { throw new ParameterException("Collection with id " . $this->id . " has not been submitted"); } $viewids = $this->get_viewids(); db_begin(); execute_sql("UPDATE {collection}\n SET submittedstatus = " . self::PENDING_RELEASE . "\n WHERE id = ?", array($this->id)); View::_db_pendingrelease($viewids); db_commit(); require_once get_config('docroot') . 'export/lib.php'; add_submission_to_export_queue($this, $releaseuser); }