/** * Delete a reviewer * @param $args array * @param $request PKPRequest * @return string Serialized JSON object */ function deleteReviewer($args, &$request) { // Delete the review assignment. // NB: SeriesEditorAction::clearReview() will check that this review // id is actually attached to the monograph so no need for further // validation here. $monograph =& $this->getMonograph(); $reviewId = (int) $request->getUserVar('reviewId'); import('classes.submission.seriesEditor.SeriesEditorAction'); $seriesEditorAction = new SeriesEditorAction(); $result = $seriesEditorAction->clearReview($monograph->getId(), $reviewId); // Render the result. if ($result) { $json = new JSON(true); } else { $json = new JSON(false, Locale::translate('submission.submit.errorDeletingReviewer')); } return $json->getString(); }
/** * Delete a reviewer * @param $args array * @param $request PKPRequest * @return string Serialized JSON object */ function deleteReviewer($args, &$request) { // Retrieve the authorized monograph. $monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH); // Identify the review assignment ID. $reviewId = (int) $request->getUserVar('reviewId'); // Delete the review assignment. // NB: SeriesEditorAction::clearReview() will check that this review // id is actually attached to the monograph so no need for further // validation here. import('classes.submission.seriesEditor.SeriesEditorAction'); $result = SeriesEditorAction::clearReview($monograph->getId(), $reviewId); // Render the result. if ($result) { $json = new JSON('true'); } else { $json = new JSON('false', Locale::translate('submission.submit.errorDeletingReviewer')); } return $json->getString(); }