Adsense
Popular Posts
- MySQL workbench -"Could not decrypt password cache"
- peer review (3)
- PHP, dump varailbes in a format way
- "Unusual traffic from your computer network" from blogger
- Install APXS in Redhat Linux
- JavaScript, remove trailing insignificant zeros after toFixed function
- Update member directory
- Set Windows path command line
- JavaScript: add days to current date
- DataTable table order by numeric, not by text
Thursday, October 24, 2013
peer review (5) - display review result and reviewers
http://localhost/education/peer_review/reviews.php
1) New reviewers not shown in review tab
cesei_new1.cesei_module_user_reviews
change revision_cycle from 0 to 1
module owner can not see the reviewer name,
add only admin can see the reviewer name
C:\Users\jiansen\Desktop\CAS\jiansen_dir\www_cesei0_mobile\_templates\pr_all_modules.tmpl.php
line 102 and 210 add:
$complete_count_no = 0;
$complete_count_abstain = 0;
line 107 and line 217:
$completes_no = array();
$completes_abstain = array();
line 133 and 245 change to
<div class="module-link"><?php echo($complete_count); ?> reviewer(s) vote yes and believe it is complete.</div>
<?php if(($complete_count > 0)&&is_admin()){ ?>
<?php if($_SESSION['member_id'] != $module['member_id']){ ?>
<div class="module-reviewers">
<?php foreach($completes as $review){ ?>
- <a href="mailto:<?php echo($review['email']); ?>"><?php echo($review['reviewer']); ?></a><br />
<?php } ?>
</div>
<?php } ?>
<?php } ?>
<div class="module-link"><?php echo($complete_count_no); ?> reviewer(s) vote no.</div>
<?php if(($complete_count_no > 0)&&is_admin()){ ?>
<?php if($_SESSION['member_id'] != $module['member_id']){ ?>
<div class="module-reviewers">
<?php foreach($completes_no as $review){ ?>
- <a href="mailto:<?php echo($review['email']); ?>"><?php echo($review['reviewer']); ?></a><br />
<?php } ?>
</div>
<?php } ?>
<?php } ?>
<div class="module-link"><?php echo($complete_count_abstain); ?> reviewer(s) vote abstain.</div>
<?php if(($complete_count_abstain > 0)&&is_admin()){ ?>
<?php if($_SESSION['member_id'] != $module['member_id']){ ?>
<div class="module-reviewers">
<?php foreach($completes_abstain as $review){ ?>
- <a href="mailto:<?php echo($review['email']); ?>"><?php echo($review['reviewer']); ?></a><br />
<?php } ?>
</div>
<?php } ?>
<?php } ?>
line 300
change
<div class="error">No reviewers assigned</div>
to
<div class="error"></div>
Modify
C:\Users\jiansen\Desktop\CAS\jiansen_dir\www_cesei0_mobile\education\peer_review\read_reviews.php and
C:\Users\jiansen\Desktop\CAS\jiansen_dir\www_cesei0_mobile\admin\edu\pr_read_reviews.php
line 28 change
$module_id = intval($_GET['module']);
$revision_cycle = intval($_GET['cycle']);
to
$module_id = intval($_REQUEST['module']);
$revision_cycle = intval($_REQUEST['cycle']);
$sql = "SELECT * FROM cesei_review_new WHERE module_id=".$module_id." ORDER BY email ASC";
$result = mysql_query($sql,$db);
$review_data=Array();
$review_display=Array();
while($row_1 = mysql_fetch_assoc($result)) {
$review_data[] = $row_1;
}
if (isset($_POST["display"])) {
if(!empty($_POST['rid'])) {
$sql = "SELECT * FROM cesei_review_new WHERE id=".$_POST['rid'];
$result = mysql_query($sql,$db);
while($row= mysql_fetch_assoc($result)) {
$review_display[] = $row;
}
}
}
$savant->assign('review_data', $review_data);
$savant->assign('review_display', $review_display);
$savant->assign('module_id', $module_id);
C:\Users\jiansen\Desktop\CAS\jiansen_dir\www_cesei0_mobile\_templates\pr_admin_modules.tmpl.php
line 172 remove
<td> <a href="pr_read_review.php?review_id=<?php echo($review['review_id']); ?>&ss=review">Read Review</a> | </td>
<td>
<form name="form-review-<?php echo($review['member_id']); ?>-<?php echo($review['module_id']); ?>-<?php echo($review['revision_cycle']); ?>" method="post" action="/_lib/peer_review_calls/remove_reviewer.php">
<input type="hidden" name="ss" value="review" />
<input type="hidden" name="access_point" value="admin" />
<input type="hidden" name="reviewer_id" value="<?php echo($review['member_id']); ?>" />
<input type="hidden" name="module_id" value="<?php echo($review['module_id']); ?>" />
<input type="hidden" name="revision_cycle" value="<?php echo($review['revision_cycle']); ?>" />
<a href="#Remove" onclick="document.forms['form-review-<?php echo($review['member_id']); ?>-<?php echo($review['module_id']); ?>-<?php echo($review['revision_cycle']); ?>'].submit(); return false;">Remove</a> |
</form>
</td>
<?php if($review['is_complete'] == 1){ ?>
<td>This reviewer is satisfied with the module and believes it is complete.</td>
<?php }else{
if($review['date_complete'] == 0){
echo('<td class="error">This reviewer has not started their review.</td>');
}else{
echo('<td class="error">This reviewer is still reviewing the module.</td>');
}
} ?>
C:\Users\jiansen\Desktop\CAS\jiansen_dir\www_cesei0_mobile\_templates\pr_read_reviews.tmpl.php
line 149 add (only admin can see the reviewer name)
if(is_admin()) $full_name = trim($review['prefix'].' '.$review['first_name'].' '.$review['last_name']);
$i=$i+1;
echo('<h3 class="flush-bottom">Comments from reviewer '.$i.': '.$full_name.'</h3> ');
C:\Users\jiansen\Desktop\CAS\jiansen_dir\www_cesei0_mobile\_lib\peer_review_tools.inc.php
line 753 change
$sql = "SELECT URD.*,UR.*,RE.*,
UNIX_TIMESTAMP(UR.date_assigned) AS date_assigned,
UNIX_TIMESTAMP(UR.date_complete) AS date_complete,
UR.review_id AS review_id FROM cesei_module_user_reviews UR
LEFT JOIN cesei_module_user_review_data URD ON UR.review_id=URD.review_id
LEFT JOIN cesei_module_user_rebuttal_data RE ON UR.review_id=RE.review_id
WHERE UR.module_id=$module_id
ORDER BY UR.date_assigned";
to
$sql = "SELECT URD.*,UR.*,RE.*,
UNIX_TIMESTAMP(UR.date_assigned) AS date_assigned,
UNIX_TIMESTAMP(UR.date_complete) AS date_complete,
UR.review_id AS review_id, M.prefix,M.first_name,M.last_name
FROM cesei_module_user_reviews UR
LEFT JOIN cesei_module_user_review_data URD ON UR.review_id=URD.review_id
LEFT JOIN cesei_module_user_rebuttal_data RE ON UR.review_id=RE.review_id
LEFT JOIN cesei_members M ON UR.member_id=M.member_id
WHERE UR.module_id=$module_id
ORDER BY UR.date_assigned";
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment