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 (-3 / +16 lines)
 Lines 59-66    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 $stage int
62
	 */
63
	 */
63
	function recordDecision($trackDirectorSubmission, $decision) {
64
	function recordDecision($trackDirectorSubmission, $decision, $stage) {
64
		$editAssignments =& $trackDirectorSubmission->getEditAssignments();
65
		$editAssignments =& $trackDirectorSubmission->getEditAssignments();
65
		if (empty($editAssignments)) return;
66
		if (empty($editAssignments)) return;
66
67
 Lines 82-94    Link Here 
82
				$trackDirectorSubmission->stampStatusModified();
83
				$trackDirectorSubmission->stampStatusModified();
83
			}
84
			}
84
85
85
			$trackDirectorSubmission->addDecision($directorDecision, $trackDirectorSubmission->getCurrentStage());
86
			$trackDirectorSubmission->addDecision($directorDecision, $stage);
86
			$decisions = TrackDirectorSubmission::getDirectorDecisionOptions();
87
			$decisions = TrackDirectorSubmission::getDirectorDecisionOptions();
87
			// Add log
88
			// Add log
88
			import('paper.log.PaperLog');
89
			import('paper.log.PaperLog');
89
			import('paper.log.PaperEventLogEntry');
90
			import('paper.log.PaperEventLogEntry');
90
			Locale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_OCS_DIRECTOR));
91
			Locale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_OCS_DIRECTOR));
91
			PaperLog::logEvent($trackDirectorSubmission->getPaperId(), PAPER_LOG_DIRECTOR_DECISION, LOG_TYPE_DIRECTOR, $user->getId(), 'log.director.decision', array('directorName' => $user->getFullName(), 'paperId' => $trackDirectorSubmission->getPaperId(), 'decision' => Locale::translate($decisions[$decision])));
92
			PaperLog::logEvent(
93
				$trackDirectorSubmission->getPaperId(),
94
				PAPER_LOG_DIRECTOR_DECISION,
95
				LOG_TYPE_DIRECTOR,
96
				$user->getId(),
97
				'log.director.decision',
98
				array(
99
					'directorName' => $user->getFullName(),
100
					'paperId' => $trackDirectorSubmission->getPaperId(),
101
					'decision' => Locale::translate($decisions[$decision]),
102
					'round' => ($stage == REVIEW_STAGE_ABSTRACT?'submission.abstractReview':'submission.paperReview')
103
				)
104
			);
92
		}
105
		}
93
106
94
		if($decision == SUBMISSION_DIRECTOR_DECISION_ACCEPT || $decision == SUBMISSION_DIRECTOR_DECISION_INVITE) {
107
		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/author/TrackSubmissionHandler.inc.php (-5 / +8 lines)
 Lines 115-122    Link Here 
115
		$controlledVocabDao =& DAORegistry::getDAO('ControlledVocabDAO');
115
		$controlledVocabDao =& DAORegistry::getDAO('ControlledVocabDAO');
116
		$templateMgr->assign('sessionTypes', $controlledVocabDao->enumerateBySymbolic('sessionTypes', ASSOC_TYPE_SCHED_CONF, $schedConf->getId()));
116
		$templateMgr->assign('sessionTypes', $controlledVocabDao->enumerateBySymbolic('sessionTypes', ASSOC_TYPE_SCHED_CONF, $schedConf->getId()));
117
117
118
		import('submission.trackDirector.TrackDirectorSubmission');
118
		// FIXME: Author code should not use track director object
119
		$templateMgr->assign_by_ref('directorDecisionOptions', TrackDirectorSubmission::getDirectorDecisionOptions());
119
		$trackDirectorSubmissionDao =& DAORegistry::getDAO('TrackDirectorSubmissionDAO');
120
		$trackDirectorSubmission =& $trackDirectorSubmissionDao->getTrackDirectorSubmission($submission->getPaperId());
121
		$templateMgr->assign_by_ref('directorDecisionOptions', $trackDirectorSubmission->getDirectorDecisionOptions());
120
122
121
		$templateMgr->assign('helpTopicId','editorial.authorsRole');
123
		$templateMgr->assign('helpTopicId','editorial.authorsRole');
122
		$templateMgr->display('author/submission.tpl');
124
		$templateMgr->display('author/submission.tpl');
 Lines 172-180    Link Here 
172
		$templateMgr->assign_by_ref('suppFiles', $authorSubmission->getSuppFiles());
174
		$templateMgr->assign_by_ref('suppFiles', $authorSubmission->getSuppFiles());
173
		$templateMgr->assign('lastDirectorDecision', $lastDecision);
175
		$templateMgr->assign('lastDirectorDecision', $lastDecision);
174
176
175
		// Bring in director decision options
177
		// FIXME: Author code should not use track director object
176
		import('submission.trackDirector.TrackDirectorSubmission');
178
		$trackDirectorSubmissionDao =& DAORegistry::getDAO('TrackDirectorSubmissionDAO');
177
		$templateMgr->assign_by_ref('directorDecisionOptions', TrackDirectorSubmission::getDirectorDecisionOptions());
179
		$trackDirectorSubmission =& $trackDirectorSubmissionDao->getTrackDirectorSubmission($authorSubmission->getPaperId());
180
		$templateMgr->assign_by_ref('directorDecisionOptions', $trackDirectorSubmission->getDirectorDecisionOptions());
178
181
179
		// Determine whether or not certain features should be disabled (i.e. past deadline)
182
		// Determine whether or not certain features should be disabled (i.e. past deadline)
180
		$templateMgr->assign('mayEditPaper', AuthorAction::mayEditPaper($authorSubmission));
183
		$templateMgr->assign('mayEditPaper', AuthorAction::mayEditPaper($authorSubmission));
(-)pages/trackDirector/SubmissionEditHandler.inc.php (-20 / +13 lines)
 Lines 345-374    Link Here 
345
		Request::redirect(null, null, null, 'submission', $paperId);
345
		Request::redirect(null, null, null, 'submission', $paperId);
346
	}
346
	}
347
347
348
	function recordDecision() {
348
	function recordDecision($args) {
349
		$paperId = Request::getUserVar('paperId');
349
		$paperId = (int) Request::getUserVar('paperId');
350
		$decision = (int) Request::getUserVar('decision');
351
		$stage = (int) array_shift($args);
352
350
		$this->validate($paperId, TRACK_DIRECTOR_ACCESS_REVIEW);
353
		$this->validate($paperId, TRACK_DIRECTOR_ACCESS_REVIEW);
351
		$conference =& Request::getConference();
354
		$conference =& Request::getConference();
352
		$schedConf =& Request::getSchedConf();
355
		$schedConf =& Request::getSchedConf();
353
		$submission =& $this->submission;
356
		$submission =& $this->submission;
354
357
355
		$stage = $submission->getCurrentStage();
358
		// If the director changes the decision on the first round,
356
359
		// roll back to the abstract review stage.
357
		$decision = Request::getUserVar('decision');
360
		if (
358
361
			$submission->getCurrentStage() == REVIEW_STAGE_PRESENTATION &&
359
		// If the director requires revisions for the presentation, reset reviews
362
			$stage == REVIEW_STAGE_ABSTRACT
360
		if($submission->getCurrentStage() == REVIEW_STAGE_PRESENTATION &&
363
		) {
361
				($decision == SUBMISSION_DIRECTOR_DECISION_PENDING_REVISIONS || $decision == SUBMISSION_DIRECTOR_DECISION_DECLINE)) {
362
			$submission->setCurrentStage(REVIEW_STAGE_PRESENTATION);
363
			$submission->setSubmissionProgress(2);
364
			$stage = REVIEW_STAGE_PRESENTATION;
365
366
			TrackDirectorAction::recordDecision($submission, $decision);
367
		} else if($submission->getCurrentStage() == REVIEW_STAGE_ABSTRACT &&
368
				($decision == SUBMISSION_DIRECTOR_DECISION_PENDING_REVISIONS || $decision == SUBMISSION_DIRECTOR_DECISION_DECLINE)) {
369
			$submission->setCurrentStage(REVIEW_STAGE_ABSTRACT);
364
			$submission->setCurrentStage(REVIEW_STAGE_ABSTRACT);
370
			$submission->setSubmissionProgress(3);
371
			$stage = REVIEW_STAGE_ABSTRACT;
372
365
373
			// Now, unassign all reviewers from the paper review
366
			// Now, unassign all reviewers from the paper review
374
			foreach ($submission->getReviewAssignments(REVIEW_STAGE_PRESENTATION) as $reviewAssignment) {
367
			foreach ($submission->getReviewAssignments(REVIEW_STAGE_PRESENTATION) as $reviewAssignment) {
 Lines 377-390    Link Here 
377
				}
370
				}
378
			}
371
			}
379
372
380
			TrackDirectorAction::recordDecision($submission, $decision);
373
			TrackDirectorAction::recordDecision($submission, $decision, $stage);
381
		} else {
374
		} else {
382
			switch ($decision) {
375
			switch ($decision) {
383
				case SUBMISSION_DIRECTOR_DECISION_ACCEPT:
376
				case SUBMISSION_DIRECTOR_DECISION_ACCEPT:
384
				case SUBMISSION_DIRECTOR_DECISION_INVITE:
377
				case SUBMISSION_DIRECTOR_DECISION_INVITE:
385
				case SUBMISSION_DIRECTOR_DECISION_PENDING_REVISIONS:
378
				case SUBMISSION_DIRECTOR_DECISION_PENDING_REVISIONS:
386
				case SUBMISSION_DIRECTOR_DECISION_DECLINE:
379
				case SUBMISSION_DIRECTOR_DECISION_DECLINE:
387
					TrackDirectorAction::recordDecision($submission, $decision);
380
					TrackDirectorAction::recordDecision($submission, $decision, $stage);
388
					break;
381
					break;
389
			}
382
			}
390
		}
383
		}
(-)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