本文整理汇总了PHP中Submission::getLatestReview方法的典型用法代码示例。如果您正苦于以下问题:PHP Submission::getLatestReview方法的具体用法?PHP Submission::getLatestReview怎么用?PHP Submission::getLatestReview使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Submission
的用法示例。
在下文中一共展示了Submission::getLatestReview方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exit
if (!defined("IN_EXM")) {
exit(1);
}
if ($login->isUserLoggedIn() === false) {
exit(1);
}
// Get Submission id
if (isset($_GET['sid']) && intval($_GET['sid']) > 0) {
$sid = intval($_GET['sid']);
} else {
exit("Invalid submission!");
}
$submission = new Submission($sid);
foreach ($submission->getReview() as $key => $value) {
// Get the last id in the array
$id = $submission->getLatestReview($key);
if ($id > -1) {
// Get review
$review = new Review($id);
// If comment form was submitted add the comment
$commentSubmitId = 'comment' . $review->id;
if (key_exists($commentSubmitId, $_POST)) {
$review->addComment($_POST[$commentSubmitId]);
}
echo '<div class="review_box">';
echo '<p>';
// Link to review
if (get_class($review->data) == "TE") {
echo '<a class="bold" href="?view=reviewthesis&sid=' . $submission->id . '&uid=' . $review->user . '">';
} elseif (get_class($review->data) == "PP") {
echo '<a class="bold" href="?view=reviewplan&sid=' . $submission->id . '&uid=' . $review->user . '">';
示例2: Review
$data->contribution1 = length_one(test_input(test_num($_POST["contribution1"])));
$data->contribution2 = length_one(test_input(test_num($_POST["contribution2"])));
$data->contribution3 = length_one(test_input(test_num($_POST["contribution3"])));
$data->s3 = length_three(test_input(test_num($_POST["s3"])));
$data->presentation1 = length_one(test_input(test_num($_POST["presentation1"])));
$data->presentation2 = length_one(test_input(test_num($_POST["presentation2"])));
$data->presentation3 = length_one(test_input(test_num($_POST["presentation3"])));
$data->presentation4 = length_one(test_input(test_num($_POST["presentation4"])));
$data->presentation5 = length_one(test_input(test_num($_POST["presentation5"])));
$data->s4 = length_three(test_input(test_num($_POST["s4"])));
$data->s5 = length_three(test_input(test_num($_POST["s5"])));
$data->s6 = length_one(test_input(test_grade($_POST["s6"])));
$data->impression = input_length(test_input($_POST["impression"]));
$data->rname = input_length(test_input($_POST["rname"]));
$data->date = length_date(test_input($_POST["date"]));
$data->feedback = input_length(test_input($_POST["feedback"]));
// Create the review
$review = Review::createReview($data);
// Add it to the submission
$submission->addReview($review->id);
echo '<h3>Success!</h3><a href="?"><button class="btn btn-success">Go back</button></a>';
} else {
$data;
$latestID = $submission->getLatestReview($user->id);
// If user already has a review
if ($latestID > -1) {
$review = new Review($latestID);
$data = $review->data;
}
include 'includes/content/dp_thesis-eval_supervisor.php';
}