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

Collapse All | Expand All

(-)classes/submission/trackDirector/TrackDirectorAction.inc.php (-9 / +42 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
							} else {
1464
								$reviewFormId = $reviewAssignment->getReviewFormId();
1465
								$reviewId = $reviewAssignment->getReviewId();
1466
								
1467
								$reviewFormResponseDao =& DAORegistry::getDAO('ReviewFormResponseDAO');
1468
								$reviewFormElementDao =& DAORegistry::getDAO('ReviewFormElementDAO');
1469
								$reviewFormElements =& $reviewFormElementDao->getReviewFormElements($reviewFormId);
1470
								$body .= "------------------------------------------------------\n";
1471
								$body .= Locale::translate('submission.comments.importPeerReviews.reviewerLetter', array('reviewerLetter' => chr(ord('A') + $reviewIndexes[$reviewAssignment->getReviewId()]))) . "\n\n";
1472
								foreach ($reviewFormElements as $reviewFormElement) {
1473
									$body .= $reviewFormElement->getReviewFormElementQuestion() . ": \n";
1474
									$reviewFormResponse = $reviewFormResponseDao->getReviewFormResponse($reviewId, $reviewFormElement->getReviewFormElementId());
1475
			
1476
									$possibleResponses = $reviewFormElement->getReviewFormElementPossibleResponses();
1477
									if (in_array($reviewFormElement->getElementType(), $reviewFormElement->getMultipleResponsesElementTypes())) {
1478
										if ($reviewFormElement->getElementType() == REVIEW_FORM_ELEMENT_TYPE_CHECKBOXES) {
1479
											foreach ($reviewFormResponse->getValue() as $value) {
1480
												$body .= "\t" . String::html2utf(strip_tags($possibleResponses[$value-1]['content'])) . "\n";
1481
											}
1482
										} else {
1483
											$body .= "\t" . String::html2utf(strip_tags($possibleResponses[$reviewFormResponse->getValue()-1]['content'])) . "\n";
1484
										}
1485
										$body .= "\n";
1486
									} else {
1487
										$body .= "\t" . String::html2utf(strip_tags($reviewFormResponse->getValue())) . "\n\n";
1488
									}
1489
								
1490
								}
1491
								$body .= "------------------------------------------------------\n\n";
1492
								$hasBody = true;
1459
							}
1493
							}
1460
							$body .= "------------------------------------------------------\n\n";
1461
						} // if
1494
						} // if
1462
					} // foreach
1495
					} // foreach
1463
					if ($hasBody) {
1496
					if ($hasBody) {
(-)templates/reviewer/submission.tpl (-18 / +1 lines)
 Lines 262-285    Link Here 
262
		<td colspan="2">&nbsp;</td>
262
		<td colspan="2">&nbsp;</td>
263
	</tr>
263
	</tr>
264
{/if}{* $reviewAssignment->getReviewFormId() *}
264
{/if}{* $reviewAssignment->getReviewFormId() *}
265
<tr valign="top">
265
266
	<td>{$currentStep|escape}.{assign var="currentStep" value=$currentStep+1}</td>
267
	<td><span class="instruct">{translate key="reviewer.paper.enterReviewA"}</span></td>
268
</tr>
269
<tr valign="top">
270
	<td>&nbsp;</td>
271
	<td>
272
		{translate key="submission.review"} 
273
		{if $confirmedStatus and not $declined}
274
			<a href="javascript:openComments('{url op="viewPeerReviewComments" path=$paperId|to_array:$reviewId}');" class="icon">{icon name="comment"}</a>
275
		{else}
276
			 {icon name="comment" disabled="disabled"}
277
		{/if}
278
	</td>
279
</tr>
280
<tr>
281
	<td colspan="2">&nbsp;</td>
282
</tr>
283
<tr valign="top">
266
<tr valign="top">
284
	<td>{$currentStep|escape}.{assign var="currentStep" value=$currentStep+1}</td>
267
	<td>{$currentStep|escape}.{assign var="currentStep" value=$currentStep+1}</td>
285
	<td><span class="instruct">{translate key="reviewer.paper.uploadFile"}</span></td>
268
	<td><span class="instruct">{translate key="reviewer.paper.uploadFile"}</span></td>

Return to bug 3669