OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Presentation and Archives counter in Director account

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
What to do if you have a technical problem with OCS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

Presentation and Archives counter in Director account

Postby waluyo » Fri Aug 02, 2013 8:20 am

The Director would like to know the number of presentations and archives immediately.
At the moment only "Unassign" and "In Review".

Is that possible to have a counter after Presentation and Archives.

Regards,
Waluyo
Attachments
counter.png
Counter in Presentation and Archives
counter.png (4.89 KiB) Viewed 1790 times
waluyo
 
Posts: 63
Joined: Wed Mar 14, 2012 4:46 pm
Location: UTHM - Malaysia

Re: Presentation and Archives counter in Director account

Postby asmecher » Fri Aug 02, 2013 8:43 am

Hi Waluyo,

That's not currently possible without modifying the code, unfortunately. If you have some PHP resources to put into it, I can suggest where to start.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9097
Joined: Wed Aug 10, 2005 12:56 pm

Re: Presentation and Archives counter in Director account

Postby waluyo » Fri Aug 02, 2013 3:47 pm

Hi Alec,

I would like to have counter for the presentations and archives.
What I know, below should be modified :
Code: Select all
+++ /ocs/templates/director/index.tpl
@@ -19,8 +19,8 @@
 <ul class="plain">
    <li>&#187; <a href="{url op="submissions" path="submissionsUnassigned"}">{translate key="common.queue.short.submissionsUnassigned"}</a>&nbsp;({if $submissionsCount[0]}{$submissionsCount[0]}{else}0{/if})</li>
    <li>&#187; <a href="{url op="submissions" path="submissionsInReview"}">{translate key="common.queue.short.submissionsInReview"}</a>&nbsp;({if $submissionsCount[1]}{$submissionsCount[1]}{else}0{/if})</li>
-   <li>&#187; <a href="{url op="submissions" path="submissionsAccepted"}">{translate key="common.queue.short.submissionsAccepted"}</a></li>
-   <li>&#187; <a href="{url op="submissions" path="submissionsArchives"}">{translate key="common.queue.short.submissionsArchives"}</a></li>
+   <li>&#187; <a href="{url op="submissions" path="submissionsAccepted"}">{translate key="common.queue.short.submissionsAccepted"}</a>&nbsp;({if $submissionsCount[2]}{$submissionsCount[2]}{else}0{/if})</li>
+   <li>&#187; <a href="{url op="submissions" path="submissionsArchives"}">{translate key="common.queue.short.submissionsArchives"}</a>&nbsp;({if $submissionsCount[3]}{$submissionsCount[3]}{else}0{/if})</li>
    {call_hook name="Templates::Director::Index::Submissions"}
 </ul>
 <div id="management">


Need to have counter active. I do not know how to do that.

Regards,
Waluyo
waluyo
 
Posts: 63
Joined: Wed Mar 14, 2012 4:46 pm
Location: UTHM - Malaysia

Re: Presentation and Archives counter in Director account

Postby asmecher » Tue Aug 06, 2013 11:59 am

Hi Waluyo,

You'll need to extend the getEditorSubmissionsCount function in classes/submission/editor/EditorSubmissionDAO.inc.php; it only fetches counts for the queues that are currently displayed.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9097
Joined: Wed Aug 10, 2005 12:56 pm

Re: Presentation and Archives counter in Director account

Postby waluyo » Wed Aug 07, 2013 7:15 am

Hi Alec,
Thank you,
I don't have a folder that you mentioned, but found here here
/ocs/classes/submission/director/DirectorSubmissionDAO.inc.php

Below is the additionale code in getDirectorSubmissionsCount function
Code: Select all
--- C:/Users/admin/Downloads/DirectorSubmissionDAO.inc.php   Wed Aug 07 18:41:15 2013
***************
*** 450,455 ****
--- 450,494 ----
        $submissionsCount[1] = $result->Fields('review_count');
        $result->Close();
 
+
+       // Fetch a count of submissions in presentations.
+       // "e2" and "e" are used to fetch only a single assignment
+       // if several exist.
+       $result =& $this->retrieve(
+          'SELECT   COUNT(*) AS presentations_count
+          FROM   papers p
+             LEFT JOIN edit_assignments e ON (p.paper_id = e.paper_id)
+             LEFT JOIN edit_assignments e2 ON (p.paper_id = e2.paper_id AND e.edit_id < e2.edit_id)
+          WHERE   p.sched_conf_id = ?
+             AND p.status = ' . STATUS_PUBLISHED . '
+             AND e2.edit_id IS NULL
+             AND e.edit_id IS NOT NULL
+             AND (p.submission_progress = 0 OR (p.review_mode = ' . REVIEW_MODE_BOTH_SEQUENTIAL . ' AND p.submission_progress <> 1))',
+          array((int) $schedConfId)
+       );
+       $submissionsCount[2] = $result->Fields('presentations_count');
+       $result->Close();
+
+       // Fetch a count of submissions in archieves.
+       // "e2" and "e" are used to fetch only a single assignment
+       // if several exist.
+       $result =& $this->retrieve(
+          'SELECT   COUNT(*) AS archieve_count
+          FROM   papers p
+             LEFT JOIN edit_assignments e ON (p.paper_id = e.paper_id)
+             LEFT JOIN edit_assignments e2 ON (p.paper_id = e2.paper_id AND e.edit_id < e2.edit_id)
+          WHERE   p.sched_conf_id = ?
+             AND p.status <> ' . STATUS_QUEUED . '
+                                 AND p.status <> ' .STATUS_PUBLISHED.'
+             AND e2.edit_id IS NULL
+             AND e.edit_id IS NOT NULL
+             AND (p.submission_progress = 0 OR (p.review_mode = ' . REVIEW_MODE_BOTH_SEQUENTIAL . ' AND p.submission_progress <> 1))',
+          array((int) $schedConfId)
+       );
+       $submissionsCount[3] = $result->Fields('archieve_count');
+       $result->Close();
+
+
        return $submissionsCount;
     }
 
***************
*** 599,605 ****


It looks ok (see below, the count numbers are correct).
I tried in my local trial installation, not in the real server.

Could you please confirm that the codes are correct and no harm to be implemented?

Just wondering why you don't have these counter implemented?

Regards,
Waluyo
Attachments
with-counter.png
with-counter.png (7.61 KiB) Viewed 1725 times
waluyo
 
Posts: 63
Joined: Wed Mar 14, 2012 4:46 pm
Location: UTHM - Malaysia

Re: Presentation and Archives counter in Director account

Postby asmecher » Wed Aug 07, 2013 11:14 am

Hi Waluyo,

Sorry, as usual I'm giving advice for OJS when you're asking about OCS. The file you're modifying is the correct one for OCS. Taking a quick glance, the code looks good to me. (Note that you've got a typo -- "archieve" should be spelled "archive" -- but since it's consistent it'll work.) I'd have to refresh my memory of the review mode data model, but as I recall, what you're doing is correct.

We didn't add these counts ourselves because in large installs the counting can be a resource-heavy operation -- but only in very large installs. We felt that the counts were useful only for in-progress queues, rather than ones like the Archive that accumulate potentially endlessly.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9097
Joined: Wed Aug 10, 2005 12:56 pm

Re: Presentation and Archives counter in Director account

Postby waluyo » Fri Aug 09, 2013 7:38 am

Hi Alec,

When we create a conference, a new path will be created and it starts counting from 0. So the archive will not accummulate endlessly, only for that particular confererence only. For Journal, yes, I agree with you.

One more thing, I would like to have the counters in the side bar (see the attachement), I don't know the file for the side bar.
What is the file and the folder to put counter.
Attachments
sidebar.png
sidebar.png (6.47 KiB) Viewed 1674 times
waluyo
 
Posts: 63
Joined: Wed Mar 14, 2012 4:46 pm
Location: UTHM - Malaysia

Re: Presentation and Archives counter in Director account

Postby asmecher » Fri Aug 09, 2013 8:46 am

Hi waluyo,

See plugins/blocks/role/director.tpl for the template that generates that markup.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9097
Joined: Wed Aug 10, 2005 12:56 pm


Return to OCS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest