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
Friday, October 25, 2013
Peer review (7) - randomize reviewers
C:\Users\jiansen\Desktop\CAS\jiansen_dir\www_cesei0_mobile\admin\edu\pr_manage_new.php
line 70
function submitRandomize(){
document.forms['revisons'].action = 'submit_randomize.php';
document.forms['revisons'].submit();
}
line 160 change
<input type="submit" class="input-button" name="emailChair" value="Email notification to committee chair" <?php if(($review_result ==0)||($email_chair==1))
echo 'disabled="disabled"'; ?> onclick="submitChair()"/>
to
<input type="hidden" class="input-button" name="emailChair" value="Email notification to committee chair" <?php if(($review_result ==0)||($email_chair==1))
echo 'disabled="disabled"'; ?> onclick="submitChair()"/>
<input type="submit" class="input-button" name="randomize" value="Randomize committee and Email notification" <?php if(($review_result ==0)||($email_chair==2))
echo 'disabled="disabled"'; ?> onclick="submitRandomize()"/>
C:\Users\jiansen\Desktop\CAS\jiansen_dir\www_cesei0_mobile\_lib\peer_review_tools.inc.php
The module author can not review his module, Chair has to be in the review committee.
If the Chair has his modules reviewed, he can review the module.
line 964 add:
function get_pr_members_random($module_id){
global $db;
$members = Array();
$sql = "SELECT member_id FROM edu_courses WHERE course_id=$module_id";
$result = mysql_query($sql,$db);
if($row = mysql_fetch_assoc($result)){
$owner_id = $row['member_id'];
}
$sql = "SELECT M.member_id, M.prefix, M.first_name, M.last_name, M.email, RC.is_chair FROM cesei_module_review_committee RC LEFT JOIN cesei_members M ON RC.member_id = M.member_id WHERE RC.is_chair=1";
$result = mysql_query($sql, $db);
while($row = mysql_fetch_assoc($result)){
$row['full_name'] = trim(htmlspecialchars($row['prefix'].' '.$row['first_name'].' '.$row['last_name']));
$members[$row['member_id']] = $row;
}
$sql = "SELECT M.member_id, M.prefix, M.first_name, M.last_name, M.email, RC.is_chair FROM cesei_module_review_committee RC LEFT JOIN cesei_members M ON RC.member_id = M.member_id WHERE RC.is_chair!=1 AND M.member_id!=$owner_id ORDER BY RAND()
LIMIT 4";
$result = mysql_query($sql, $db);
while($row = mysql_fetch_assoc($result)){
$row['full_name'] = trim(htmlspecialchars($row['prefix'].' '.$row['first_name'].' '.$row['last_name']));
$members[$row['member_id']] = $row;
}
return $members;
}
copy submit_emailChair.php to submit_randomize.php and modify
Module submission only send email to MAIL_CESEI_ADMIN in
function submit_module_for_review($module_id){
in C:\Users\jiansen\Desktop\CAS\jiansen_dir\www_cesei0_mobile\_lib\peer_review_tools.inc.php
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment