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
Wednesday, October 16, 2013
Rewrite peer review process (2)
C:\Users\jiansen\Desktop\CAS\jiansen_dir\www_cesei0_mobile\admin\edu\pr_members.php
line 24 add:
$sub_level_pages[2] = Array('url'=>'pr_manage_new.php','title'=>'Manage Review Process (new)');
$sub_level_pages[3] = Array('url'=>'select_committee_members.php','title'=>'Manage Committee Review');
cp C:\Users\jiansen\Desktop\CAS\jiansen_dir\www_cesei0_mobile\admin\edu\pr_members.php
to select_committee_members.php, modify select_committee_members.php as follows:
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
define('PORTAL_ID', 0); ?>
<?php require_once($_SERVER['DOCUMENT_ROOT'].'/_includes/cesei_globals.inc.php');
validate_cesei_access(STATUS_ADMIN);
require_once($_SERVER['DOCUMENT_ROOT'].'/_lib/peer_review_tools.inc.php');
$savant->assign('section_title', 'CESEI Administration');
$savant->assign('section_href', '/admin/');
$savant->assign('page_title', 'Review Committee');
$savant->assign('path', Array(Array('url'=>'index.php','title'=>'Education Administration')) );
$sub_level_pages = Array();
$sub_level_pages[0] = Array('url'=>'pr_manage.php','title'=>'Manage Review Process');
$sub_level_pages[1] = Array('url'=>'pr_members.php','title'=>'Review Committee');
$sub_level_pages[2] = Array('url'=>'pr_manage_new.php','title'=>'Manage Review Process (new)');
$sub_level_pages[3] = Array('url'=>'','title'=>'Manage Committee Review');
$back_to_page = Array('url'=>$_PORTALS[PORTAL_ID]['root'].'/admin/edu/','title'=>'Educational Administration');
$savant->assign('sub_level_pages', $sub_level_pages);
$savant->assign('back_to_page', $back_to_page);
$savant->assign('extra_hdr_tags', '<link rel="stylesheet" type="text/css" media="screen" href="/_css/peer_review.css" />');
$savant->display('document_top.tmpl.php');
?>
<script>
function submit_edit_member(){
document.forms['module_form'].action = 'pr_members_modules.php';
document.forms['module_form'].submit();
}
function submit_edit_voting(){
document.forms['module_form'].action = 'pr_voting.php';
document.forms['module_form'].submit();
}
</script>
<p> Use this tool to add or edit committee members for modules under review. </p>
<form name="module_form" method="post" action="pr_members_modules.php">
<div class="input-form">
<table summary="" class="data" rules="cols"><thead>
<tr>
<th> </th>
<th>Module title</th>
<th>Committee Members</th>
<th>Voting Method</th>
</tr>
</thead>
<tbody>
<?php
$page_content = '';
$sql = "SELECT module_id FROM cesei_review_done WHERE review_done=1";
$result = mysql_query($sql,$db);
while($row = mysql_fetch_assoc($result)) {
$module_id = $row['module_id'];
$sql0 = "SELECT title FROM edu_courses WHERE course_id=".$module_id;
$result0 = mysql_query($sql0,$db);
$module_title =mysql_result($result0, 0);
$sql_1 = "SELECT
M.prefix,M.first_name,M.last_name
FROM cesei_module_user_reviews MUR
LEFT JOIN cesei_members M ON MUR.member_id=M.member_id WHERE MUR.module_id=".$module_id ;
$result_1 = mysql_query($sql_1, $db);
$reviewers = ' ';
while($row_1 = mysql_fetch_assoc($result_1)){
$reviewers .= trim(htmlspecialchars($row_1['prefix'].' '.$row_1['first_name'].' '.$row_1['last_name'])).', ';
}
$reviewers = rtrim($reviewers, ", ");
$sql_2 ="SELECT voting_method FROM cesei_review_done WHERE module_id=".$module_id ;
$result_2 = mysql_query($sql_2, $db);
$voting_method =mysql_result($result_2, 0);
if($voting_method==1) $voting_method_s="Online";
else $voting_method_s="Offline";
$page_content .= '<tr onmousedown="document.module_form[\'mod'.$module_id.'\'].checked = true; rowselect(this);" id="r_'.$user['member_id'].'">
<td><input type="radio" name="module_id" value="'.$module_id.'" id="mod'.$module_id.'" /></td>
<td>'.$module_title.'</td>
<td>'.$reviewers.'</td>
<td>'.$voting_method_s.'</td>
</tr>';
}
echo($page_content);
$page_content = ' ';
?>
</tbody>
</table>
<br />
<input type="submit" class="input-button" value="Add/edit committee members" name="add_edit" onclick="submit_edit_member()"/>
<input type="submit" class="input-button" value="Edit Voting Method" name="edit_voting" onclick="submit_edit_voting()"/>
<br />
</form>
<?php $savant->display('document_bottom.tmpl.php'); ?>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment