We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

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

Collapse All | Expand All

(-)classes/submission/trackDirector/TrackDirectorAction.inc.php (-7 / +22 lines)
 Lines 59-71    Link Here 
59
	 * Records a director's submission decision.
59
	 * Records a director's submission decision.
60
	 * @param $trackDirectorSubmission object
60
	 * @param $trackDirectorSubmission object
61
	 * @param $decision int
61
	 * @param $decision int
62
	 * @param $round int
62
	 */
63
	 */
63
	function recordDecision($trackDirectorSubmission, $decision) {
64
	function recordDecision($trackDirectorSubmission, $decision, $round) {
64
		$editAssignments =& $trackDirectorSubmission->getEditAssignments();
65
		$editAssignments =& $trackDirectorSubmission->getEditAssignments();
65
		if (empty($editAssignments)) return;
66
		if (empty($editAssignments)) return;
66
67
67
		$trackDirectorSubmissionDao = &DAORegistry::getDAO('TrackDirectorSubmissionDAO');
68
		$trackDirectorSubmissionDao =& DAORegistry::getDAO('TrackDirectorSubmissionDAO');
68
		$user = &Request::getUser();
69
		$user =& Request::getUser();
69
		$directorDecision = array(
70
		$directorDecision = array(
70
			'editDecisionId' => null,
71
			'editDecisionId' => null,
71
			'directorId' => $user->getUserId(),
72
			'directorId' => $user->getUserId(),
 Lines 73-79    Link Here 
73
			'dateDecided' => date(Core::getCurrentDate())
74
			'dateDecided' => date(Core::getCurrentDate())
74
		);
75
		);
75
76
76
		if (!HookRegistry::call('TrackDirectorAction::recordDecision', array(&$trackDirectorSubmission, $directorDecision))) {
77
		if (!HookRegistry::call('TrackDirectorAction::recordDecision', array(&$trackDirectorSubmission, $directorDecision, $round))) {
77
			if ($decision == SUBMISSION_DIRECTOR_DECISION_DECLINE) {
78
			if ($decision == SUBMISSION_DIRECTOR_DECISION_DECLINE) {
78
				$trackDirectorSubmission->setStatus(SUBMISSION_STATUS_DECLINED);
79
				$trackDirectorSubmission->setStatus(SUBMISSION_STATUS_DECLINED);
79
				$trackDirectorSubmission->stampStatusModified();
80
				$trackDirectorSubmission->stampStatusModified();
 Lines 82-93    Link Here 
82
				$trackDirectorSubmission->stampStatusModified();
83
				$trackDirectorSubmission->stampStatusModified();
83
			}
84
			}
84
85
85
			$trackDirectorSubmission->addDecision($directorDecision, $trackDirectorSubmission->getCurrentStage());
86
			$trackDirectorSubmission->addDecision($directorDecision, $round);
86
			$decisions = TrackDirectorSubmission::getDirectorDecisionOptions();
87
			$schedConf =& Request::getSchedConf();
88
			$decisions = $trackDirectorSubmission->getDirectorDecisionOptions();
89
87
			// Add log
90
			// Add log
88
			import('paper.log.PaperLog');
91
			import('paper.log.PaperLog');
89
			import('paper.log.PaperEventLogEntry');
92
			import('paper.log.PaperEventLogEntry');
90
			PaperLog::logEvent($trackDirectorSubmission->getPaperId(), PAPER_LOG_DIRECTOR_DECISION, LOG_TYPE_DIRECTOR, $user->getUserId(), 'log.director.decision', array('directorName' => $user->getFullName(), 'paperId' => $trackDirectorSubmission->getPaperId(), 'decision' => Locale::translate($decisions[$decision])));
93
			PaperLog::logEvent(
94
				$trackDirectorSubmission->getPaperId(),
95
				PAPER_LOG_DIRECTOR_DECISION,
96
				LOG_TYPE_DIRECTOR,
97
				$user->getUserId(),
98
				'log.director.decision',
99
				array(
100
					'directorName' => $user->getFullName(),
101
					'paperId' => $trackDirectorSubmission->getPaperId(),
102
					'decision' => Locale::translate($decisions[$decision]),
103
					'round' => ($round == REVIEW_STAGE_ABSTRACT?'submission.abstractReview':'submission.paperReview')
104
				)
105
			);
91
		}
106
		}
92
107
93
		if($decision == SUBMISSION_DIRECTOR_DECISION_ACCEPT || $decision == SUBMISSION_DIRECTOR_DECISION_INVITE) {
108
		if($decision == SUBMISSION_DIRECTOR_DECISION_ACCEPT || $decision == SUBMISSION_DIRECTOR_DECISION_INVITE) {
(-)classes/submission/trackDirector/TrackDirectorSubmissionDAO.inc.php (-1 / +1 lines)
 Lines 162-168    Link Here 
162
		}
162
		}
163
163
164
		// Update director decisions; hacked necessarily to iterate by reference.
164
		// Update director decisions; hacked necessarily to iterate by reference.
165
		for ($i = 1; $i <= $trackDirectorSubmission->getCurrentStage(); $i++) {
165
		foreach (array(REVIEW_STAGE_ABSTRACT, REVIEW_STAGE_PRESENTATION) as $i) {
166
			$directorDecisions = $trackDirectorSubmission->getDecisions($i);
166
			$directorDecisions = $trackDirectorSubmission->getDecisions($i);
167
			$insertedDecision = false;
167
			$insertedDecision = false;
168
			if (is_array($directorDecisions)) {
168
			if (is_array($directorDecisions)) {
(-)pages/presenter/TrackSubmissionHandler.inc.php (-5 / +8 lines)
 Lines 95-102    Link Here 
95
		$templateMgr->assign_by_ref('revisedFile', $submission->getRevisedFile());
95
		$templateMgr->assign_by_ref('revisedFile', $submission->getRevisedFile());
96
		$templateMgr->assign_by_ref('suppFiles', $submission->getSuppFiles());
96
		$templateMgr->assign_by_ref('suppFiles', $submission->getSuppFiles());
97
97
98
		import('submission.trackDirector.TrackDirectorSubmission');
98
		// FIXME: Presenter code should not use track director object
99
		$templateMgr->assign_by_ref('directorDecisionOptions', TrackDirectorSubmission::getDirectorDecisionOptions());
99
		$trackDirectorSubmissionDao =& DAORegistry::getDAO('TrackDirectorSubmissionDAO');
100
		$trackDirectorSubmission =& $trackDirectorSubmissionDao->getTrackDirectorSubmission($submission->getPaperId());
101
		$templateMgr->assign_by_ref('directorDecisionOptions', $trackDirectorSubmission->getDirectorDecisionOptions());
100
102
101
		$templateMgr->assign('helpTopicId','editorial.authorsRole');
103
		$templateMgr->assign('helpTopicId','editorial.authorsRole');
102
		$templateMgr->display('presenter/submission.tpl');
104
		$templateMgr->display('presenter/submission.tpl');
 Lines 150-158    Link Here 
150
		$templateMgr->assign_by_ref('suppFiles', $presenterSubmission->getSuppFiles());
152
		$templateMgr->assign_by_ref('suppFiles', $presenterSubmission->getSuppFiles());
151
		$templateMgr->assign('lastDirectorDecision', $lastDecision);
153
		$templateMgr->assign('lastDirectorDecision', $lastDecision);
152
154
153
		// Bring in director decision options
155
		// FIXME: Presenter code should not use track director object
154
		import('submission.trackDirector.TrackDirectorSubmission');
156
		$trackDirectorSubmissionDao =& DAORegistry::getDAO('TrackDirectorSubmissionDAO');
155
		$templateMgr->assign_by_ref('directorDecisionOptions', TrackDirectorSubmission::getDirectorDecisionOptions());
157
		$trackDirectorSubmission =& $trackDirectorSubmissionDao->getTrackDirectorSubmission($presenterSubmission->getPaperId());
158
		$templateMgr->assign_by_ref('directorDecisionOptions', $trackDirectorSubmission->getDirectorDecisionOptions());
156
159
157
		// Determine whether or not certain features should be disabled (i.e. past deadline)
160
		// Determine whether or not certain features should be disabled (i.e. past deadline)
158
		$templateMgr->assign('mayEditPaper', PresenterAction::mayEditPaper($presenterSubmission));
161
		$templateMgr->assign('mayEditPaper', PresenterAction::mayEditPaper($presenterSubmission));
(-)pages/trackDirector/SubmissionEditHandler.inc.php (-14 / +14 lines)
 Lines 99-105    Link Here 
99
		$templateMgr->assign_by_ref('cancelsAndRegrets', $cancelsAndRegrets);
99
		$templateMgr->assign_by_ref('cancelsAndRegrets', $cancelsAndRegrets);
100
		$templateMgr->assign_by_ref('reviewFilesByStage', $reviewFilesByStage);
100
		$templateMgr->assign_by_ref('reviewFilesByStage', $reviewFilesByStage);
101
		$templateMgr->assign_by_ref('directorDecisions', $directorDecisions);
101
		$templateMgr->assign_by_ref('directorDecisions', $directorDecisions);
102
		$templateMgr->assign_by_ref('directorDecisionOptions', TrackDirectorSubmission::getDirectorDecisionOptions());
102
		$templateMgr->assign_by_ref('directorDecisionOptions', $submission->getDirectorDecisionOptions());
103
		$templateMgr->assign('rateReviewerOnQuality', $schedConf->getSetting('rateReviewerOnQuality'));
103
		$templateMgr->assign('rateReviewerOnQuality', $schedConf->getSetting('rateReviewerOnQuality'));
104
104
105
		import('submission.reviewAssignment.ReviewAssignment');
105
		import('submission.reviewAssignment.ReviewAssignment');
 Lines 208-214    Link Here 
208
		$templateMgr->assign('rateReviewerOnQuality', $schedConf->getSetting('rateReviewerOnQuality'));
208
		$templateMgr->assign('rateReviewerOnQuality', $schedConf->getSetting('rateReviewerOnQuality'));
209
		$templateMgr->assign('showPeerReviewOptions', $showPeerReviewOptions);
209
		$templateMgr->assign('showPeerReviewOptions', $showPeerReviewOptions);
210
		$templateMgr->assign_by_ref('tracks', $tracks->toArray());
210
		$templateMgr->assign_by_ref('tracks', $tracks->toArray());
211
		$templateMgr->assign_by_ref('directorDecisionOptions', TrackDirectorSubmission::getDirectorDecisionOptions());
211
		$templateMgr->assign_by_ref('directorDecisionOptions', $submission->getDirectorDecisionOptions());
212
		$templateMgr->assign_by_ref('lastDecision', $lastDecision);
212
		$templateMgr->assign_by_ref('lastDecision', $lastDecision);
213
		$templateMgr->assign_by_ref('directorDecisions', $directorDecisions);
213
		$templateMgr->assign_by_ref('directorDecisions', $directorDecisions);
214
214
 Lines 310-329    Link Here 
310
		Request::redirect(null, null, null, 'submission', $paperId);
310
		Request::redirect(null, null, null, 'submission', $paperId);
311
	}
311
	}
312
312
313
	function recordDecision() {
313
	function recordDecision($args) {
314
		$paperId = Request::getUserVar('paperId');
314
		$paperId = Request::getUserVar('paperId');
315
		list($conference, $schedConf, $submission) = SubmissionEditHandler::validate($paperId, TRACK_DIRECTOR_ACCESS_REVIEW);
316
317
		$stage = $submission->getCurrentStage();
318
319
		$decision = Request::getUserVar('decision');
315
		$decision = Request::getUserVar('decision');
316
		$stage = (int) array_shift($args);
317
		list($conference, $schedConf, $submission) = SubmissionEditHandler::validate($paperId, TRACK_DIRECTOR_ACCESS_REVIEW);
320
318
321
		// If the director changes the decision from invite to revisions
319
		// If the director changes the decision on the first round to
322
		// required or decline, roll back to abstract review stage
320
		// something other than "invite" (or "accept" -- necessary?),
323
		if($submission->getCurrentStage() == REVIEW_STAGE_PRESENTATION &&
321
		// roll back to the abstract review stage.
324
				($decision == SUBMISSION_DIRECTOR_DECISION_PENDING_REVISIONS || $decision == SUBMISSION_DIRECTOR_DECISION_DECLINE)) {
322
		if (
323
			$submission->getCurrentStage() == REVIEW_STAGE_PRESENTATION &&
324
			$stage == REVIEW_STAGE_ABSTRACT
325
		) {
325
			$submission->setCurrentStage(REVIEW_STAGE_ABSTRACT);
326
			$submission->setCurrentStage(REVIEW_STAGE_ABSTRACT);
326
			$submission->setSubmissionProgress(2);
327
			$stage = REVIEW_STAGE_ABSTRACT;
327
			$stage = REVIEW_STAGE_ABSTRACT;
328
328
329
			// Now, unassign all reviewers from the paper review
329
			// Now, unassign all reviewers from the paper review
 Lines 333-346    Link Here 
333
				}
333
				}
334
			}
334
			}
335
335
336
			TrackDirectorAction::recordDecision($submission, $decision);
336
			TrackDirectorAction::recordDecision($submission, $decision, $stage);
337
		} else {
337
		} else {
338
			switch ($decision) {
338
			switch ($decision) {
339
				case SUBMISSION_DIRECTOR_DECISION_ACCEPT:
339
				case SUBMISSION_DIRECTOR_DECISION_ACCEPT:
340
				case SUBMISSION_DIRECTOR_DECISION_INVITE:
340
				case SUBMISSION_DIRECTOR_DECISION_INVITE:
341
				case SUBMISSION_DIRECTOR_DECISION_PENDING_REVISIONS:
341
				case SUBMISSION_DIRECTOR_DECISION_PENDING_REVISIONS:
342
				case SUBMISSION_DIRECTOR_DECISION_DECLINE:
342
				case SUBMISSION_DIRECTOR_DECISION_DECLINE:
343
					TrackDirectorAction::recordDecision($submission, $decision);
343
					TrackDirectorAction::recordDecision($submission, $decision, $stage);
344
					break;
344
					break;
345
			}
345
			}
346
		}
346
		}
(-)pages/trackDirector/TrackDirectorHandler.inc.php (-2 / +2 lines)
 Lines 253-261    Link Here 
253
		SubmissionEditHandler::changeTypeConst();
253
		SubmissionEditHandler::changeTypeConst();
254
	}
254
	}
255
255
256
	function recordDecision() {
256
	function recordDecision($args) {
257
		import('pages.trackDirector.SubmissionEditHandler');
257
		import('pages.trackDirector.SubmissionEditHandler');
258
		SubmissionEditHandler::recordDecision();
258
		SubmissionEditHandler::recordDecision($args);
259
	}
259
	}
260
260
261
	function selectReviewer($args) {
261
	function selectReviewer($args) {
(-)templates/trackDirector/submission/directorDecision.tpl (-1 / +1 lines)
 Lines 15-21    Link Here 
15
<tr valign="top">
15
<tr valign="top">
16
	<td class="label" width="20%">{translate key="director.paper.selectDecision"}</td>
16
	<td class="label" width="20%">{translate key="director.paper.selectDecision"}</td>
17
	<td width="80%" class="value" colspan="2">
17
	<td width="80%" class="value" colspan="2">
18
		<form method="post" action="{url op="recordDecision"}">
18
		<form method="post" action="{url op="recordDecision" path=$stage}">
19
			<input type="hidden" name="paperId" value="{$submission->getPaperId()}" />
19
			<input type="hidden" name="paperId" value="{$submission->getPaperId()}" />
20
			<select name="decision" size="1" class="selectMenu"{if not $allowRecommendation} disabled="disabled"{/if}>
20
			<select name="decision" size="1" class="selectMenu"{if not $allowRecommendation} disabled="disabled"{/if}>
21
				{assign var=availableDirectorDecisionOptions value=`$submission->getDirectorDecisionOptions($currentSchedConf,$stage)`}
21
				{assign var=availableDirectorDecisionOptions value=`$submission->getDirectorDecisionOptions($currentSchedConf,$stage)`}

Return to bug 4913