1<?php 2include('../Code/confHeader.inc'); 3$_SESSION[Me] -> goIfInvalid("../index.php"); 4$_SESSION[Me] -> goIfNotPC('../index.php'); 5$Conf -> connect(); 6?> 7 8<html> 9 10<?php $Conf->header("Distribution of Overall Merit Scores By Reviewer ") ?> 11 12<body> 13 14 15<?php 16 17$Conf->infoMsg("This table is sorted by the number of reviews, " 18 . "then the desending merit within that group " 19 . "of reviewers. It's difficult to read much " 20 . "into this since the averages depend so much on " 21 . "the number of papers reviewed." ); 22 23$Conf->infoMsg("This display only shows the distribution of the " 24 . " 'overall merit' score, and only for finalized papers " 25 ); 26 27 28$Conf->toggleButtonUpdate('showPC'); 29print "<center>"; 30$Conf->toggleButton('showPC', 31 "Show All Reviewers", 32 "Show Only PC Members"); 33print "</center>"; 34 35 36if ($_REQUEST[showPC]) { 37 $extra = " AND ContactInfo.contactId=PCMember.contactId "; 38} 39 40$result=$Conf->qe("SELECT ContactInfo.firstName, ContactInfo.lastName," 41 . " ContactInfo.email, ContactInfo.contactId," 42 . " AVG(PaperReview.overAllMerit) as merit, " 43 . " COUNT(PaperReview.finalized) as count " 44 . " FROM ContactInfo, PCMember " 45 . " LEFT JOIN PaperReview " 46 . " ON PaperReview.reviewer=ContactInfo.contactId " 47 . " WHERE PaperReview.finalized=1 $extra " 48 . " GROUP BY ContactInfo.contactId " 49 . " ORDER BY merit DESC, count DESC, merit DESC, ContactInfo.lastName " 50 ); 51 52 53if (DB::isError($result)) { 54 $Conf->errorMsg("Error in sql " . $result->getMessage()); 55 exit(); 56} 57 58?> 59 60<table border=1 align=center> 61<tr bgcolor=<?php echo $Conf->contrastColorOne?>> 62<th colspan=6> Reviewer Ranking By Overall Merit </th> </tr> 63 64<tr> 65<th> Row # </th> 66<th> Reviewer </th> 67<th> Merit </th> 68</tr> 69<td> <b> 70<?php 71$meritRange = $Conf->reviewRange('overAllMerit', 'PaperReview'); 72 73$rowNum = 0; 74while ($row=$result->fetchRow(DB_FETCHMODE_ASSOC)) { 75 $rowNum++; 76 77 $first=$row['firstName']; 78 $last=$row['lastName']; 79 $email=$row['email']; 80 $contactId=$row['contactId']; 81 82 print "<tr> <td> $rowNum </td> "; 83 print "<td> "; 84 print "$first $last ($email) </td> \n"; 85 86 print "<td align=center>"; 87 $q = "SELECT overAllMerit FROM PaperReview " 88 . " WHERE reviewer=$contactId " 89 . " AND finalized = 1"; 90 $Conf->graphValues($q, "overAllMerit", $meritRange['min'], $meritRange['max']); 91 92 print "</td>"; 93 94 print "<tr> \n"; 95} 96?> 97</table> 98 99</body> 100<?php $Conf->footer() ?> 101</html> 102 103