View | Details | Raw Unified | Return to bug 3669 | Differences between
and this patch

Collapse All | Expand All

(-)classes/submission/trackDirector/TrackDirectorAction.inc.php (-9 / +45 lines)
 Lines 1446-1463    Link Here 
1446
						if ($reviewAssignment->getDateCompleted() != null && !$reviewAssignment->getCancelled()) {
1446
						if ($reviewAssignment->getDateCompleted() != null && !$reviewAssignment->getCancelled()) {
1447
							// Get the comments associated with this review assignment
1447
							// Get the comments associated with this review assignment
1448
							$paperComments = &$paperCommentDao->getPaperComments($trackDirectorSubmission->getPaperId(), COMMENT_TYPE_PEER_REVIEW, $reviewAssignment->getReviewId());
1448
							$paperComments = &$paperCommentDao->getPaperComments($trackDirectorSubmission->getPaperId(), COMMENT_TYPE_PEER_REVIEW, $reviewAssignment->getReviewId());
1449
							$body .= "------------------------------------------------------\n";
1449
							
1450
							$body .= Locale::translate('submission.comments.importPeerReviews.reviewerLetter', array('reviewerLetter' => chr(ord('A') + $reviewIndexes[$reviewAssignment->getReviewId()]))) . "\n";
1450
							if ($paperComments) {
1451
							if (is_array($paperComments)) {
1451
								$body .= "------------------------------------------------------\n";
1452
								foreach ($paperComments as $comment) {
1452
								$body .= Locale::translate('submission.comments.importPeerReviews.reviewerLetter', array('reviewerLetter' => chr(ord('A') + $reviewIndexes[$reviewAssignment->getReviewId()]))) . "\n";
1453
									// If the comment is viewable by the presenter, then add the comment.
1453
								if (is_array($paperComments)) {
1454
									if ($comment->getViewable()) {
1454
									foreach ($paperComments as $comment) {
1455
										$body .= $comment->getComments() . "\n\n";
1455
										// If the comment is viewable by the presenter, then add the comment.
1456
										$hasBody = true;
1456
										if ($comment->getViewable()) {
1457
											$body .= $comment->getComments() . "\n\n";
1458
											$hasBody = true;
1459
										}
1457
									}
1460
									}
1458
								}
1461
								}
1462
								$body .= "------------------------------------------------------\n\n";
1463
							} 
1464
							if ($reviewFormId = $reviewAssignment->getReviewFormId()){
1465
								$reviewId = $reviewAssignment->getReviewId();
1466
								
1467
								$reviewFormResponseDao =& DAORegistry::getDAO('ReviewFormResponseDAO');
1468
								$reviewFormElementDao =& DAORegistry::getDAO('ReviewFormElementDAO');
1469
								$reviewFormElements =& $reviewFormElementDao->getReviewFormElements($reviewFormId);
1470
								if (!$paperComments) {
1471
									$body .= "------------------------------------------------------\n";
1472
									$body .= Locale::translate('submission.comments.importPeerReviews.reviewerLetter', array('reviewerLetter' => chr(ord('A') + $reviewIndexes[$reviewAssignment->getReviewId()]))) . "\n\n";
1473
								}
1474
								foreach ($reviewFormElements as $reviewFormElement) {
1475
									$body .= $reviewFormElement->getReviewFormElementQuestion() . ": \n";
1476
									$reviewFormResponse = $reviewFormResponseDao->getReviewFormResponse($reviewId, $reviewFormElement->getReviewFormElementId());
1477
			
1478
									if ($reviewFormResponse) {	
1479
										$possibleResponses = $reviewFormElement->getReviewFormElementPossibleResponses();
1480
										if (in_array($reviewFormElement->getElementType(), $reviewFormElement->getMultipleResponsesElementTypes())) {
1481
											if ($reviewFormElement->getElementType() == REVIEW_FORM_ELEMENT_TYPE_CHECKBOXES) {
1482
												foreach ($reviewFormResponse->getValue() as $value) {
1483
													$body .= "\t" . String::html2utf(strip_tags($possibleResponses[$value-1]['content'])) . "\n";
1484
												}
1485
											} else {
1486
												$body .= "\t" . String::html2utf(strip_tags($possibleResponses[$reviewFormResponse->getValue()-1]['content'])) . "\n";
1487
											}
1488
											$body .= "\n";
1489
										} else {
1490
											$body .= "\t" . String::html2utf(strip_tags($reviewFormResponse->getValue())) . "\n\n";
1491
										}
1492
									}								
1493
								}
1494
								$body .= "------------------------------------------------------\n\n";
1495
								$hasBody = true;
1459
							}
1496
							}
1460
							$body .= "------------------------------------------------------\n\n";
1461
						} // if
1497
						} // if
1462
					} // foreach
1498
					} // foreach
1463
					if ($hasBody) {
1499
					if ($hasBody) {
(-)templates/reviewer/submission.tpl (-18 / +1 lines)
 Lines 259-282    Link Here 
259
		<td colspan="2">&nbsp;</td>
259
		<td colspan="2">&nbsp;</td>
260
	</tr>
260
	</tr>
261
{/if}{* $reviewAssignment->getReviewFormId() *}
261
{/if}{* $reviewAssignment->getReviewFormId() *}
262
<tr valign="top">
262
263
	<td>{$currentStep|escape}.{assign var="currentStep" value=$currentStep+1}</td>
264
	<td><span class="instruct">{translate key="reviewer.paper.enterReviewA"}</span></td>
265
</tr>
266
<tr valign="top">
267
	<td>&nbsp;</td>
268
	<td>
269
		{translate key="submission.review"} 
270
		{if $confirmedStatus and not $declined}
271
			<a href="javascript:openComments('{url op="viewPeerReviewComments" path=$paperId|to_array:$reviewId}');" class="icon">{icon name="comment"}</a>
272
		{else}
273
			 {icon name="comment" disabled="disabled"}
274
		{/if}
275
	</td>
276
</tr>
277
<tr>
278
	<td colspan="2">&nbsp;</td>
279
</tr>
280
<tr valign="top">
263
<tr valign="top">
281
	<td>{$currentStep|escape}.{assign var="currentStep" value=$currentStep+1}</td>
264
	<td>{$currentStep|escape}.{assign var="currentStep" value=$currentStep+1}</td>
282
	<td><span class="instruct">{translate key="reviewer.paper.uploadFile"}</span></td>
265
	<td><span class="instruct">{translate key="reviewer.paper.uploadFile"}</span></td>

Return to bug 3669