Menu

[r32]: / review / accept_and_reject.php  Maximize  Restore  History

Download this file

715 lines (658 with data), 33.5 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
<?php
/*
* Copyright (C) 2006, 2007 Thomas Baigneres, Matthieu Finiasz
*
* This file is part of iChair.
*
* iChair is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* iChair is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
?><?php $page_title='Accept &amp; Reject Articles';
include '../utils/tools.php';
include 'header.php';
if($currentReviewerGroup == Reviewer::$CHAIR_GROUP) {
$resetPageToDisplay = false;
$lastVisitDateSet = false;
if((Tools::readPost('action') == "Set my Last Visit Date to the Current Time") || (Tools::readPost('action') == "Update Acceptances and Set Visit Date")) {
$date = Tools::readPost('date');
$lastVisitDateSet = $currentReviewer->setLastVisitDate($date);
}
if(Tools::readPost('action') == "Take a Snapshot of Current Averages") {
Article::snapshotAverages();
}
/* Update the number of articles displayed for the current reviewer */
$numberOfArticlesPerPage = Tools::readPost('numberOfArticlesPerPage');
if(preg_match("/^[1-9][0-9]*$/", $numberOfArticlesPerPage)) {
$currentReviewer->setNumberOfArticlesPerPage($numberOfArticlesPerPage);
}
/* update view according to the chair preferences */
if(Tools::readPost('action') == "Update View") {
$newSortKey = 0x0000;
if(Tools::readPost('sortKey') == "overallAverage") {
$newSortKey = Reviewer::$SORT_BY_OVERALL_GRADE;
} else if(Tools::readPost('sortKey') == "articleNumber") {
$newSortKey = Reviewer::$SORT_BY_ARTICLE_NUMBER;
} else if(Tools::readPost('sortKey') == "acceptance") {
$newSortKey = Reviewer::$SORT_BY_ACCEPTANCE_STATUS;
} else if(Tools::readPost('sortKey') == "lastModificationDate") {
$newSortKey = Reviewer::$SORT_BY_LAST_MODIFICATION;
} else {
$newSortKey = Reviewer::$SORT_BY_ACCEPTANCE_STATUS_AND_GRADE;
}
if($newSortKey != $currentReviewer->getSortKey()) {
$resetPageToDisplay = true;
} else if((Tools::readPost('recent') == "yes") != $currentReviewer->sortIsRecentOnly()) {
$resetPageToDisplay = true;
} else if((Tools::readPost('reverseSort') == "yes") != $currentReviewer->sortIsReversed()) {
$resetPageToDisplay = true;
} else if((Tools::readPost('useSnapshot') == "yes") != $currentReviewer->sortUseSnapshot()) {
$resetPageToDisplay = true;
}
$currentReviewer->setSortKeyString($newSortKey,
(Tools::readPost('reverseSort') == "yes"),
(Tools::readPost('viewType') == "extendedView"),
$currentReviewer->sortIsRestricted(),
(Tools::readPost('recent') == "yes"),
(Tools::readPost('useSnapshot') == "yes"));
}
/* set the sort variables according to the user preferences */
$viewType="simpleView";
$reverseSort = false;
$useSnapshot = false;
$recent = false;
if($currentReviewer->sortIsExtended()) {
$viewType="extendedView";
}
if($currentReviewer->sortIsReversed()) {
$reverseSort = true;
}
if($currentReviewer->sortUseSnapshot()) {
$useSnapshot = true;
}
if($currentReviewer->sortIsRecentOnly()) {
$recent = true;
}
$sortKey = $currentReviewer->getSortKey();
$allArticles = Article::getAllArticles();
$acceptancesUpdated = false;
if((Tools::readPost('action') == "Update Acceptances") || (Tools::readPost('page') != "") || (Tools::readPost('action') == "Update Acceptances and Set Visit Date")) {
foreach($allArticles as $article) {
$articleNumber = $article->getArticleNumber();
$newAcceptance = Tools::readPost('newAcceptance' . $articleNumber);
if($newAcceptance != "") {
/* if there was a change, update modification date */
$oldAcceptance = $article->getAcceptance();
if($newAcceptance == "Accept") {
$article->setAcceptance(Article::$ACCEPT);
} else if($newAcceptance == "Maybe Accept") {
$article->setAcceptance(Article::$MAYBE_ACCEPT);
} else if($newAcceptance == "Discuss") {
$article->setAcceptance(Article::$DISCUSS);
} else if($newAcceptance == "Maybe Reject") {
$article->setAcceptance(Article::$MAYBE_REJECT);
} else if($newAcceptance == "Reject") {
$article->setAcceptance(Article::$REJECT);
} else if($newAcceptance == "Void"){
$article->setAcceptance(Article::$VOID);
} else if($newAcceptance == Tools::getCustomAccept1()){
$article->setAcceptance(Article::$CUSTOM1);
} else if($newAcceptance == Tools::getCustomAccept2()){
$article->setAcceptance(Article::$CUSTOM2);
} else if($newAcceptance == Tools::getCustomAccept3()){
$article->setAcceptance(Article::$CUSTOM3);
} else if($newAcceptance == Tools::getCustomAccept4()){
$article->setAcceptance(Article::$CUSTOM4);
} else if($newAcceptance == Tools::getCustomAccept5()){
$article->setAcceptance(Article::$CUSTOM5);
} else if($newAcceptance == Tools::getCustomAccept6()){
$article->setAcceptance(Article::$CUSTOM6);
} else if($newAcceptance == Tools::getCustomAccept7()){
$article->setAcceptance(Article::$CUSTOM7);
}
if ($article->getAcceptance() != $oldAcceptance) {
$article->setLastModificationDate();
$acceptancesUpdated=true;
Log::logAcceptanceChange($articleNumber, $article->getAcceptance(), $currentReviewer);
}
}
}
}
$articleNumbers = Article::getSortedArticleNumbersForChair($currentReviewer, $sortKey, $reverseSort, $useSnapshot, $recent, $allArticles);
$reviewReader = new ReviewReader();
/* Get the article to display from the POST */
$postedPage = Tools::readPost('page');
$pageToDisplay;
if((!$resetPageToDisplay)) {
if(preg_match("/^[0-9]+/", $postedPage)) {
/* when sorting by article number */
$articleToDisplay = explode(" ", $postedPage);
$articleToDisplay = $articleToDisplay[0];
$position = array_search($articleToDisplay, $articleNumbers);
$pageToDisplay = floor($position/$currentReviewer->getNumberOfArticlesPerPage())+1;
} else if(preg_match("/^Page [0-9]+/", $postedPage)) {
/* when sorting by something else */
$pageToDisplay = explode(" ", $postedPage);
$pageToDisplay = $pageToDisplay[1];
} else {
if(preg_match("/^[0-9]+$/", Tools::readPost('previousPage'))) {
$pageToDisplay = Tools::readPost('previousPage');
} else {
$pageToDisplay = 1;
}
}
} else {
$pageToDisplay = 1;
}
/* Display a form allowing to change the number of article displayed on the same page */
?>
<div class="floatRight">
<form action="accept_and_reject.php" method="post">
<input type="hidden" name="previousPage" value="<?php print($pageToDisplay); ?>" />
<table><tr>
<td><div class="versionAuthors">Number of articles displayed per page:&nbsp;</div></td>
<td><input type="text" name="numberOfArticlesPerPage" size="3" class="largeInput" value="<?php print($currentReviewer->getNumberOfArticlesPerPage()); ?>" /></td>
<td><input type="submit" class="buttonLink" value="Ok" /></td>
</tr></table>
</form>
</div>
<div class="clear"></div>
<div class="paperBox">
<div class="paperBoxDetails">
<form action="accept_and_reject.php" method="post">
<center>
<table>
<tr>
<td>
<input type="radio" class="noBorder" name="viewType" id="simpleViewType" value="simpleView" <?php if($viewType == "simpleView") { ?>checked="checked" <?php } ?>/>
<label for="simpleViewType">Simple View</label>
</td>
<td>Sort By:</td>
<td>
<input type="radio" class="noBorder" name="sortKey" id="sortKeyArticleNumber" value="articleNumber" <?php if($sortKey == Reviewer::$SORT_BY_ARTICLE_NUMBER) { ?>checked="checked" <?php } ?>/>
<label for="sortKeyArticleNumber">Article Number</label>
</td>
<td>
<input type="radio" class="noBorder" name="sortKey" id="sortKeyOverallAverage" value="overallAverage" <?php if($sortKey == Reviewer::$SORT_BY_OVERALL_GRADE) { ?>checked="checked" <?php } ?>/>
<label for="sortKeyOverallAverage">Overall Grade</label>
</td>
<td>
<input type="radio" class="noBorder" name="sortKey" id="sortKeyAcceptance" value="acceptance" <?php if($sortKey == Reviewer::$SORT_BY_ACCEPTANCE_STATUS) { ?>checked="checked" <?php } ?>/>
<label for="sortKeyAcceptance">Accept &amp; Reject Status</label>
</td>
<td>
<input type="radio" class="noBorder" name="sortKey" id="sortKeyAcceptanceAndGrade" value="acceptance_and_grade" <?php if($sortKey == Reviewer::$SORT_BY_ACCEPTANCE_STATUS_AND_GRADE) { ?>checked="checked" <?php } ?>/>
<label for="sortKeyAcceptanceAndGrade">Status &amp; Grade</label>
</td>
<td>
<input type="radio" class="noBorder" name="sortKey" id="sortKeyLastModification" value="lastModificationDate" <?php if($sortKey == Reviewer::$SORT_BY_LAST_MODIFICATION) { ?>checked="checked" <?php } ?>/>
<label for="sortKeyLastModification">Last Modification</label>
</td>
</tr>
<tr>
<td>
<input type="radio" class="noBorder" name="viewType" id="extendedViewType" value="extendedView" <?php if($viewType == "extendedView") { ?>checked="checked" <?php } ?>/>
<label for="extendedViewType">Extended View</label>
</td>
<td>&nbsp;</td>
<td colspan="3">
<input type="checkbox" class="noBorder" name="recent" id="recent" value="yes" <?php if($recent) { ?>checked="checked" <?php } ?>/>
<label for="recent">Show only articles modified since your last visit date</label>
</td>
<td colspan="2">
<input type="checkbox" class="noBorder" name="useSnapshot" id="useSnapshot" value="yes" <?php if($useSnapshot) { ?>checked="checked" <?php } ?>/>
<label for="useSnapshot">Use snapshot grade</label>
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
<td colspan="2">
<input type="checkbox" class="noBorder" name="reverseSort" id="reverseSort" value="yes" <?php if($reverseSort) { ?>checked="checked" <?php } ?>/>
<label for="reverseSort">Reverse sort order</label>
</td>
<td colspan="3">&nbsp;</td>
</tr>
</table>
<input type="hidden" name="previousPage" value=<?php print($pageToDisplay); ?> />
<input type="submit" class="buttonLink bigButton" name="action" value="Update View" />
</center>
<?php if ($currentReviewer->getLastVisitDate() != 0) {?>
<div class="floatRight">
Last Visit:
<em>
<?php
if(Tools::use12HourFormat()) {
print(gmdate("D, j M Y h:i a", $currentReviewer->getLastVisitDate()));
} else {
print(gmdate("D, j M Y H:i", $currentReviewer->getLastVisitDate()));
}
?>
</em>
</div>
<?php } ?>
</form>
<div class="clear"></div>
</div>
<div class="floatRight">
<form action="accept_and_reject.php" method="post">
<input type="hidden" name="previousPage" value=<?php print($pageToDisplay); ?> />
<input type="hidden" name="date" value=<?php print(gmdate("U")); ?> />
<input type="submit" class="buttonLink" name="action" value="Set my Last Visit Date to the Current Time" />
</form>
</div>
<div class="clear"></div>
</div>
<?php
/* Update Snapshot or Acceptances */
if(Tools::readPost('action') == "Take a Snapshot of Current Averages") {
print('<div class="OKmessage">New snapshot taken successfully.</div>');
}
if($lastVisitDateSet) {
print('<div class="OKmessage">Your last visit date has been successfully set to the current time.</div>');
}
if($acceptancesUpdated) {
print('<div class="OKmessage">Update successfull.</div>');
}
/* from here, we have a $pageToDisplay initialized correctly */
?>
<center>
<?php Article::printAcceptanceSummaryTable(); ?>
<form action="accept_and_reject.php" method="post">
<?php
/* Get specific messages from the chair */
$specificMessages = Meeting::getAllNonTrashedMessagesInDoubleArrayIndexedByArticleNumber();
/* Get the range of article to display */
$rangeOfArticleNumbers=array();
$startKey = ($pageToDisplay-1)*$currentReviewer->getNumberOfArticlesPerPage();
$nbrArticles = count($articleNumbers);
for($i=0; ($i<$currentReviewer->getNumberOfArticlesPerPage()) && ($startKey+$i < $nbrArticles); $i++) {
$rangeOfArticleNumbers[$i] = $articleNumbers[$startKey+$i];
}
/* Display buttons */
$numberOfButtons = ceil($nbrArticles/$currentReviewer->getNumberOfArticlesPerPage());
for($btNbr=0; $btNbr<$numberOfButtons; $btNbr++) {
print('<div class="floatLeft">');
$buttonLabel = 'Page '.($btNbr+1);
if($sortKey == Reviewer::$SORT_BY_ARTICLE_NUMBER) {
$buttonLabel = $articleNumbers[$btNbr*$currentReviewer->getNumberOfArticlesPerPage()];
$end = $articleNumbers[min(count($articleNumbers), ($btNbr+1)*$currentReviewer->getNumberOfArticlesPerPage())-1];
if($end != $buttonLabel) {
$buttonLabel .= ' - ' . $end;
}
}
if(($pageToDisplay-1) == $btNbr) {
print('<input type="submit" class="buttonLink currentButton" name="page" value="' . $buttonLabel . '" />');
} else {
print('<input type="submit" class="buttonLink" name="page" value="' . $buttonLabel . '" />');
}
print('</div>');
}
print('<div class="clear">&nbsp;</div>');
if (count($rangeOfArticleNumbers) == 0) {
print('<div class="OKmessage"><em>No articles to display</em></div>');
return;
}
if($viewType == "simpleView") { ?>
<table class="dottedTable">
<tr>
<th class="topRow" style="width: 5em;">&nbsp;</th>
<th class="topRow">&nbsp;</th>
<th class="topRow">Art.<br/>Num.</th>
<th class="leftAlign topRow">
<table>
<tr>
<th class="leftAlign topRow">Title</th>
</tr><tr>
<th class="leftAlign topRow"><em>Authors</em></th>
</tr><tr>
<th class="leftAlign topRow">Last Modification Date</th>
</tr>
</table>
</th>
<th class="topRow">Snapshot<br/>Grade</th>
<th class="topRow">Average<br/>Grade</th>
<th class="topRow">Completed<br/>Reviews</th>
<th class="topRow">&nbsp;</th>
</tr>
<?php
}
foreach($rangeOfArticleNumbers as $articleNumber) {
$article = $allArticles[$articleNumber];
if($viewType == "extendedView") {
?>
<div class="paperBox" id="nbr<?php print($articleNumber); ?>">
<div class="paperBoxTitle">
<div class="paperBoxNumber">Article&nbsp;<?php print($articleNumber) ?></div>
<div class="floatRight"><?php $article->printCompletedReviewsRatio(); ?></div>
Title: <?php Tools::printHTML($article->getTitle()); ?><br/>
<em>Authors: <?php Tools::printHTML($article->getAuthors()); ?></em>
</div>
<?php
if ($article->getIsCommitteeMember()){
print('<div class="paperBoxDetailsCommittee">');
} else {
print('<div class="paperBoxDetails">');
}
/* Display the list of all the completed reviews concerning this article */
$assignements = Assignement::getByArticleNumberAndAssignementStatus($articleNumber, Assignement::$ASSIGNED);
$assignementsNotAssigned = Assignement::getNotAssignedNotVoidByArticleNumber($articleNumber);
print('<div class="floatRight">');
print('<div class="rightAlign">');
$acceptance = $article->getAcceptance();
if($acceptance == Article::$ACCEPT) {?>
<table class="centeredTable"><tr><th>Snapshot</th><th>Average</th></tr>
<tr><td><div class="bigNumber acceptArticle"><?php print($article->roundAverageOverallGradeSnapshot(2)); ?></div></td><td><div class="bigNumber acceptArticle"><?php print($article->roundAverageOverallGrade(2)); ?></div></td></tr></table>
<?php } else if($acceptance == Article::$MAYBE_ACCEPT) { ?>
<table class="centeredTable"><tr><th>Snapshot</th><th>Average</th></tr>
<tr><td><div class="bigNumber maybeAcceptArticle"><?php print($article->roundAverageOverallGradeSnapshot(2)); ?></div></td><td><div class="bigNumber maybeAcceptArticle"><?php print($article->roundAverageOverallGrade(2)); ?></div></td></tr></table>
<?php } else if($acceptance == Article::$DISCUSS) { ?>
<table class="centeredTable"><tr><th>Snapshot</th><th>Average</th></tr>
<tr><td><div class="bigNumber discussArticle"><?php print($article->roundAverageOverallGradeSnapshot(2)); ?></div></td><td><div class="bigNumber discussArticle"><?php print($article->roundAverageOverallGrade(2)); ?></div></td></tr></table>
<?php } else if($acceptance == Article::$MAYBE_REJECT) { ?>
<table class="centeredTable"><tr><th>Snapshot</th><th>Average</th></tr>
<tr><td><div class="bigNumber maybeRejectArticle"><?php print($article->roundAverageOverallGradeSnapshot(2)); ?></div></td><td><div class="bigNumber maybeRejectArticle"><?php print($article->roundAverageOverallGrade(2)); ?></div></td></tr></table>
<?php } else if($acceptance == Article::$REJECT) { ?>
<table class="centeredTable"><tr><th>Snapshot</th><th>Average</th></tr>
<tr><td><div class="bigNumber rejectArticle"><?php print($article->roundAverageOverallGradeSnapshot(2)); ?></div></td><td><div class="bigNumber rejectArticle"><?php print($article->roundAverageOverallGrade(2)); ?></div></td></tr></table>
<?php } else if($acceptance == Article::$CUSTOM1) { ?>
<table class="centeredTable"><tr><th>Snapshot</th><th>Average</th></tr>
<tr><td><div class="bigNumber customAccept1"><?php print($article->roundAverageOverallGradeSnapshot(2)); ?></div></td><td><div class="bigNumber customAccept1"><?php print($article->roundAverageOverallGrade(2)); ?></div></td></tr></table>
<?php } else if($acceptance == Article::$CUSTOM2) { ?>
<table class="centeredTable"><tr><th>Snapshot</th><th>Average</th></tr>
<tr><td><div class="bigNumber customAccept2"><?php print($article->roundAverageOverallGradeSnapshot(2)); ?></div></td><td><div class="bigNumber customAccept2"><?php print($article->roundAverageOverallGrade(2)); ?></div></td></tr></table>
<?php } else if($acceptance == Article::$CUSTOM3) { ?>
<table class="centeredTable"><tr><th>Snapshot</th><th>Average</th></tr>
<tr><td><div class="bigNumber customAccept3"><?php print($article->roundAverageOverallGradeSnapshot(2)); ?></div></td><td><div class="bigNumber customAccept3"><?php print($article->roundAverageOverallGrade(2)); ?></div></td></tr></table>
<?php } else if($acceptance == Article::$CUSTOM4) { ?>
<table class="centeredTable"><tr><th>Snapshot</th><th>Average</th></tr>
<tr><td><div class="bigNumber customAccept4"><?php print($article->roundAverageOverallGradeSnapshot(2)); ?></div></td><td><div class="bigNumber customAccept4"><?php print($article->roundAverageOverallGrade(2)); ?></div></td></tr></table>
<?php } else if($acceptance == Article::$CUSTOM5) { ?>
<table class="centeredTable"><tr><th>Snapshot</th><th>Average</th></tr>
<tr><td><div class="bigNumber customAccept5"><?php print($article->roundAverageOverallGradeSnapshot(2)); ?></div></td><td><div class="bigNumber customAccept5"><?php print($article->roundAverageOverallGrade(2)); ?></div></td></tr></table>
<?php } else if($acceptance == Article::$CUSTOM6) { ?>
<table class="centeredTable"><tr><th>Snapshot</th><th>Average</th></tr>
<tr><td><div class="bigNumber customAccept6"><?php print($article->roundAverageOverallGradeSnapshot(2)); ?></div></td><td><div class="bigNumber customAccept6"><?php print($article->roundAverageOverallGrade(2)); ?></div></td></tr></table>
<?php } else if($acceptance == Article::$CUSTOM7) { ?>
<table class="centeredTable"><tr><th>Snapshot</th><th>Average</th></tr>
<tr><td><div class="bigNumber customAccept7"><?php print($article->roundAverageOverallGradeSnapshot(2)); ?></div></td><td><div class="bigNumber customAccept7"><?php print($article->roundAverageOverallGrade(2)); ?></div></td></tr></table>
<?php } else { ?>
<table class="centeredTable"><tr><th>Snapshot</th><th>Average</th></tr>
<tr><td><div class="bigNumber voidArticle"><?php print($article->roundAverageOverallGradeSnapshot(2)); ?></div></td><td><div class="bigNumber voidArticle"><?php print($article->roundAverageOverallGrade(2)); ?></div></td></tr></table>
<?php }
?>
</div><div class="rightAlign"><?php $article->printAcceptanceSelect(); ?></div>
</div>
<div class="accept_reject_customcheckboxes"><?php $article->printCustomCheckboxes(true); ?></div>
<?php if((count($assignements)+count($assignementsNotAssigned) == 0)) { ?>
No completed/assigned review at this time.
<?php } else { ?>
<table class="smallCentered">
<tr>
<th colspan="2">&nbsp;</th>
<?php ReviewReader::printReviewRowHead(); ?>
</tr>
<?php
if (count($assignements) != 0) {
print('<tr><td>&nbsp;</td>');
ReviewReader::printReviewSeparator('-- Assigned reviews --');
print('</tr>');
foreach($assignements as $assignement) {
$reviewerNumber = $assignement->getReviewerNumber();
$reviewer = Reviewer::getByReviewerNumber($reviewerNumber);
$reviewReader = new ReviewReader();
$reviewReader->createFromXMLFile($assignement);
?>
<tr>
<?php if ($assignement->getReviewStatus() == Assignement::$VOID) {
print('<td>&nbsp;</td>');
} else { ?>
<td class="button">
<div class="popUp">
<a href="view_reviews_bis.php?articleNumber=<?php print($articleNumber); ?>#nbr<?php print($reviewerNumber); ?>" target="_blank">Details</a>
<div class="hidden">
<?php $reviewReader->printDetailsBoxPopUp(); ?>
</div>
</div>
</td>
<?php }
if ($assignement->getReviewStatus() == Assignement::$VOID) {
print('<td><div class="voidReview">No Review</div></td>');
} else if ($assignement->getReviewStatus() == Assignement::$INPROGRESS) {
print('<td><div class="inProgressReview">In Progress</div></td>');
} else {
print('<td><div class="completedReview">Completed</div></td>');
}
$reviewReader->printReviewRow(false);
print('</tr>');
}
}
if (count($assignementsNotAssigned) != 0) {
print('<tr><td>&nbsp;</td>');
ReviewReader::printReviewSeparator('-- Unsolicited reviews --');
print('</tr>');
foreach($assignementsNotAssigned as $assignement) {
$reviewerNumber = $assignement->getReviewerNumber();
$reviewer = Reviewer::getByReviewerNumber($reviewerNumber);
$reviewReader = new ReviewReader();
$reviewReader->createFromXMLFile($assignement);
?>
<tr>
<td class="button">
<div class="popUp">
<a href="view_reviews_bis.php?articleNumber=<?php print($articleNumber); ?>#nbr<?php print($reviewerNumber); ?>" target="_blank">Details</a>
<div class="hidden">
<?php $reviewReader->printDetailsBoxPopUp(); ?>
</div>
</div>
</td>
<?php
if ($assignement->getReviewStatus() == Assignement::$INPROGRESS) {
print('<td><div class="inProgressReview">In Progress</div></td>');
} else {
print('<td><div class="completedReview">Completed</div></td>');
}
$reviewReader->printReviewRow(false);
print('</tr>');
}
} ?>
</table>
<?php } ?>
<div class="clear"></div>
<?php
/* Check if the current reviewer has made any personnal comments in his review of the article*/
$assignement = Assignement::getByNumbers($articleNumber, $currentReviewer->getReviewerNumber());
$reviewReader = new ReviewReader();
$reviewReader->createFromXMLFile($assignement);
if (trim($reviewReader->getPersonalNotes()) != "") {
print('Personal Notes:<div class="chairComments">');
Tools::printHTMLbr($reviewReader->getPersonalNotes());
print('</div>');
}
/* Display a button that gives to access to the details of the discussion */
?>
<table class="smallCentered"><tr><td class="button">
<div class="popUp">
<a href="discuss_article.php?articleNumber=<?php print($articleNumber); ?>#firstNotSeen" target="_blank">Reviews &amp; Discussion</a>
<div class="hidden">
<div class="paperBoxDetails">
<?php $article->printLastComments(8); ?>
</div>
</div>
</div>
</td>
<td>
<?php $article->printLastModificationDateAndNumberOfComments($currentReviewer); ?>
</td></tr></table>
<?php if(array_key_exists($articleNumber, $specificMessages) && !is_null($specificMessages[$articleNumber])) {
foreach($specificMessages[$articleNumber] as $message) { ?>
<div class="messageBox">
<?php
Tools::printHTMLbr($message->getContent());
?>
</div>
<?php } ?>
<?php } ?>
<?php /* End of paperBoxDetails */?>
</div>
</div>
<?php /* END OF EXTENDED VIEW, BEGINING OF SIMPLE VIEW */
} else {
?>
<tr>
<td>
<div class="popUp">
<a href="view_reviews_bis.php?articleNumber=<?php print($articleNumber); ?>" target="_blank">Details</a>
<div class="hidden"><?php
if ($article->getIsCommitteeMember()){
print('<div class="paperBoxDetailsCommittee">');
} else {
print('<div class="paperBoxDetails">');
}
$article->printCustomCheckboxes(true);
$assignements = Assignement::getByArticleNumberAndAssignementStatus($articleNumber, Assignement::$ASSIGNED);
$assignementsNotAssigned = Assignement::getNotAssignedNotVoidByArticleNumber($articleNumber);?>
<?php if(count($assignements)+count($assignementsNotAssigned) == 0) { ?>
No completed/assigned review at this time.
<?php } else { ?>
<table class="smallCentered">
<tr>
<td>&nbsp;</td>
<?php ReviewReader::printReviewRowHead(); ?>
</tr>
<?php
if (count($assignements) != 0) {
print('<tr>');
ReviewReader::printReviewSeparator('-- Assigned reviews --');
print('</tr>');
foreach($assignements as $assignement) {
$reviewReader->createFromXMLFile($assignement);
?>
<tr>
<?php $reviewReader->printReviewRow(true); ?>
</tr>
<?php }
}
if (count($assignementsNotAssigned) != 0) {
print('<tr>');
ReviewReader::printReviewSeparator('-- Unsolicited reviews --');
print('</tr>');
foreach($assignementsNotAssigned as $assignement) {
$reviewReader->createFromXMLFile($assignement);
?>
<tr>
<?php $reviewReader->printReviewRow(true); ?>
</tr>
<?php }
}
?>
</table>
<?php
$assignement = Assignement::getByNumbers($articleNumber, $currentReviewer->getReviewerNumber());
$reviewReader->createFromXMLFile($assignement);
if (trim($reviewReader->getPersonalNotes()) != "") {
print('<br />Personal Notes:<div class="chairComments">');
Tools::printHTMLbr($reviewReader->getPersonalNotes());
print('</div>');
}
}
?>
</div>
</div>
</div>
</td>
<td>
<div class="popUp">
<a href="discuss_article.php?articleNumber=<?php print($articleNumber); ?>#firstNotSeen" target="_blank">Rev.&nbsp;&amp;&nbsp;Disc.</a>
<div class="hidden">
<div class="paperBoxDetails">
<?php $article->printLastComments(8); ?>
</div>
</div>
</div>
</td>
<td><div class="bigNumber"><?php print($articleNumber); ?></div></td>
<td class="leftAlign">
<table>
<tr><td class="leftAlign"><?php Tools::printHTMLsubstr($article->getTitle(),60); ?></td></tr>
<tr><td class="leftAlign"><em><?php Tools::printHTMLsubstr("Authors: " . $article->getAuthors(),60); ?></em></td></tr>
<tr><td class="leftAlign"><?php $article->printLastModificationDateOnly($currentReviewer);?></td></tr>
</table>
</td>
<?php
$acceptance = $article->getAcceptance();
if($acceptance == Article::$ACCEPT) {
print('<td><div class="bigNumber acceptArticle">' . $article->roundAverageOverallGradeSnapshot(2) . '</div></td>');
print('<td><div class="bigNumber acceptArticle">' . $article->roundAverageOverallGrade(2) . '</div></td>');
} else if($acceptance == Article::$MAYBE_ACCEPT) {
print('<td><div class="bigNumber maybeAcceptArticle">' . $article->roundAverageOverallGradeSnapshot(2) . '</div></td>');
print('<td><div class="bigNumber maybeAcceptArticle">' . $article->roundAverageOverallGrade(2) . '</div></td>');
} else if($acceptance == Article::$DISCUSS) {
print('<td><div class="bigNumber discussArticle">' . $article->roundAverageOverallGradeSnapshot(2) . '</div></td>');
print('<td><div class="bigNumber discussArticle">' . $article->roundAverageOverallGrade(2) . '</div></td>');
} else if($acceptance == Article::$MAYBE_REJECT) {
print('<td><div class="bigNumber maybeRejectArticle">' . $article->roundAverageOverallGradeSnapshot(2) . '</div></td>');
print('<td><div class="bigNumber maybeRejectArticle">' . $article->roundAverageOverallGrade(2) . '</div></td>');
} else if($acceptance == Article::$REJECT) {
print('<td><div class="bigNumber rejectArticle">' . $article->roundAverageOverallGradeSnapshot(2) . '</div></td>');
print('<td><div class="bigNumber rejectArticle">' . $article->roundAverageOverallGrade(2) . '</div></td>');
} else if($acceptance == Article::$CUSTOM1) {
print('<td><div class="bigNumber customAccept1">' . $article->roundAverageOverallGradeSnapshot(2) . '</div></td>');
print('<td><div class="bigNumber customAccept1">' . $article->roundAverageOverallGrade(2) . '</div></td>');
} else if($acceptance == Article::$CUSTOM2) {
print('<td><div class="bigNumber customAccept2">' . $article->roundAverageOverallGradeSnapshot(2) . '</div></td>');
print('<td><div class="bigNumber customAccept2">' . $article->roundAverageOverallGrade(2) . '</div></td>');
} else if($acceptance == Article::$CUSTOM3) {
print('<td><div class="bigNumber customAccept3">' . $article->roundAverageOverallGradeSnapshot(2) . '</div></td>');
print('<td><div class="bigNumber customAccept3">' . $article->roundAverageOverallGrade(2) . '</div></td>');
} else if($acceptance == Article::$CUSTOM4) {
print('<td><div class="bigNumber customAccept4">' . $article->roundAverageOverallGradeSnapshot(2) . '</div></td>');
print('<td><div class="bigNumber customAccept4">' . $article->roundAverageOverallGrade(2) . '</div></td>');
} else if($acceptance == Article::$CUSTOM5) {
print('<td><div class="bigNumber customAccept5">' . $article->roundAverageOverallGradeSnapshot(2) . '</div></td>');
print('<td><div class="bigNumber customAccept5">' . $article->roundAverageOverallGrade(2) . '</div></td>');
} else if($acceptance == Article::$CUSTOM6) {
print('<td><div class="bigNumber customAccept6">' . $article->roundAverageOverallGradeSnapshot(2) . '</div></td>');
print('<td><div class="bigNumber customAccept6">' . $article->roundAverageOverallGrade(2) . '</div></td>');
} else if($acceptance == Article::$CUSTOM7) {
print('<td><div class="bigNumber customAccept7">' . $article->roundAverageOverallGradeSnapshot(2) . '</div></td>');
print('<td><div class="bigNumber customAccept7">' . $article->roundAverageOverallGrade(2) . '</div></td>');
} else {
print('<td><div class="bigNumber voidArticle">' . $article->roundAverageOverallGradeSnapshot(2) . '</div></td>');
print('<td><div class="bigNumber voidArticle">' . $article->roundAverageOverallGrade(2) . '</div></td>');
}
?>
<td><?php
$article->printCompletedReviewsRatio();
?></td>
<td><?php $article->printAcceptanceSelect(); ?></td>
</tr>
<?php } ?>
<?php }
if($viewType == "simpleView") {
print('</table>');
} ?>
<input type="hidden" name="previousPage" value=<?php print($pageToDisplay); ?> />
<input type="hidden" name="date" value=<?php print(gmdate("U")); ?> />
<input type="submit" class="buttonLink bigButton" name="action" value="Update Acceptances" />
<input type="submit" class="buttonLink bigButton" name="action" value="Update Acceptances and Set Visit Date" />
</form>
</center>
<form action="accept_and_reject.php" method="post">
<input type="hidden" name="previousPage" value=<?php print($pageToDisplay); ?> />
<div class="floatRight">
<input type="submit" class="buttonLink" name="action" value="Take a Snapshot of Current Averages" />
</div>
</form>
<div class="bottomSpacer"></div>
<?php } ?>
<?php include('footer.php'); ?>