Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into guide_content_may_23
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-tosca committed May 30, 2024
2 parents 13a62c1 + 78dca06 commit f898ee4
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0.94
1.0.0.95
4 changes: 2 additions & 2 deletions pprOjsPlugin/version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<version>
<application>pprOjsPlugin</application>
<type>plugins.generic</type>
<release>1.0.0.94</release>
<date>2024-05-23</date>
<release>1.0.0.95</release>
<date>2024-05-30</date>
<lazy-load>1</lazy-load>
<class>PeerPreReviewProgramPlugin</class>
</version>
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ function createReport($file, $contextId) {
}

//PRINT HEADERS
$headers = ['OJS ID', 'Authors Name', 'Title of Document', 'Authors Email', 'Authors Category', 'Authors Institution', 'Authors Department', 'Research Document Type', 'Associate Editor', 'Review Status', 'Author - Paper Received'];
$headers = ['OJS ID', 'Authors Name', 'Title of Document', 'Authors Email', 'Authors Category', 'Authors Institution', 'Authors Department', 'Research Document Type'];
$headers = array_merge($headers, ['Associate Editor', 'Review Status', 'Author - Paper Received', 'Annual Survey']);
$headers = array_merge($headers, ['Coauthors Name', 'Coauthors Institute', 'Coauthors Email', 'Coauthors Category', 'Coauthors Department']);
$headers = array_merge($headers, ['Reviewer', 'Reviewer Email', 'Reviewer Institution', 'Reviewer - 1st Email', 'Reviewer - Sent for Review', 'Reviewer - Response Time', 'Reviewer - Due Date']);
$headers = array_merge($headers, ['Reviewer - Paper Returned', 'Reviewer - Time (days)', 'Author - Date Returned', 'Author - Review Time (days)']);
Expand Down Expand Up @@ -96,6 +97,7 @@ function createReport($file, $contextId) {
$row[] = $editor ? $editor->getFullName() : self::PPR_MISSING_DATA;
$row[] = $reportUtil->getStatusText($submissionSentToReview, $review ? $review->getStatus(): null);
$row[] = $reportUtil->formatDate($submission->getDateSubmitted());
$row[] = $reportUtil->formatDate($this->getAnnualSurveyNotificationDate($contextId, $submission->getId()));

$contributors = $publication->getData('authors');
$coauthors = $coauthorsInstitution = $coauthorsEmail = $coauthorsCategory = $coauthorsDepartment = [];
Expand Down Expand Up @@ -186,5 +188,20 @@ private function getUser($userId) {
return $this->userCache[$userId];
}

private function getAnnualSurveyNotificationDate($contextId, $submissionId) {
//THESE IDs ARE TAKEN FROM pprOjsPlugin/tasks/PPRTaskNotificationRegistry.inc.php
// ANNUAL SURVEY IS SENT IN THE SUBMISSION CLOSED NOTIFICATION
$NOTIFICATION_TYPE_PPR_PLUGIN = 80880000;
$SUBMISSION_CLOSED_AUTHOR_NOTIFICATION = 80880900;
$notificationDao = DAORegistry::getDAO('NotificationDAO');
$notificationsIterator = $notificationDao->getByAssoc($SUBMISSION_CLOSED_AUTHOR_NOTIFICATION,
$submissionId,
$submissionId,
$NOTIFICATION_TYPE_PPR_PLUGIN,
$contextId);
$notifications = $notificationsIterator->toArray();
return empty($notifications) ? null : reset($notifications)->getDateCreated();
}

}

4 changes: 2 additions & 2 deletions pprReviewsReportPlugin/version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<version>
<application>pprReviewsReportPlugin</application>
<type>plugins.reports</type>
<release>1.0.0.94</release>
<date>2024-05-23</date>
<release>1.0.0.95</release>
<date>2024-05-30</date>
<lazy-load>1</lazy-load>
<class>PPRReviewsReportPlugin</class>
</version>

0 comments on commit f898ee4

Please sign in to comment.