OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Redesign reviewers list (review assignment task)

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

Redesign reviewers list (review assignment task)

Postby jkana » Sun Sep 27, 2009 3:50 am

Hello,
I was asked for redesign reviewers list: Home > User > Editor > Submissions > #14 > Review > Reviewers
In the column ACTIVE our editors want to have dates of all active assigned reviews (each on a new line).
They also want to add new column REQUESTS where will be dates of all Review requests still unanswered.

I want to do it similar way as is done Home > User > Reviewer > Active Submissions , function index in file pages/reviewer/ReviewerHandles.inc.php.

But I was not able to do it. In function selectReviewer in file pages/sectionEditor/submissionEditHandler.inc.php I can't find way, how to get reviewers Id for calling (it is copy from function index in file pages/reviewer/ReviewerHandles.inc.php)
Code: Select all
$submissions = $reviewerSubmissionDao->getReviewerSubmissionsByReviewerId($user->getUserId(), $journal->getJournalId(), $active, $rangeInfo);


The reviewers id is assigned later in template:
Code: Select all
{iterate from=reviewers item=reviewer}
{assign var="userId" value=$reviewer->getUserId()}

Which is not very useful for me.

So my question is, how to get list of reviews assigned to an each reviewer in selectReviewer function?
Then I think I will be able to modify template, but I need $submissions (as described above) array or anything similar with all data I need.

Thanks for any suggestions.
jkana
 
Posts: 4
Joined: Thu Jun 25, 2009 1:46 am

Re: Redesign reviewers list (review assignment task)

Postby mcrider » Wed Sep 30, 2009 10:39 am

Hi jkana,

Well, what you're trying to do here is quite complicated; it involves getting the right data, then displaying correctly in the right template (templates/sectionEditor/selectReviewer.tpl). That said, you'll see in the selectReviewer function of SubmissionEditHandler.inc.php, a $reviewers variable being defined that is used in the template. With that $reviewers 'array' (its actually an object that behaves much like an array), you can iterate through it using foreach ($reviewers as $reviewer), and within that call $reviewerSubmissionDao->getReviewerSubmissionsByReviewerId($reviewer->getUserId(), $journal->getJournalId());. You can assign the result of that to a different array (i.e. where the index equals the reviewer's ID, so it can be easily accessed in the template), and refer to that array in the template file. I know that sounds ridiculously confusing, but you'll really have to play around with these different arrays and objects to get it to work; there is no simple solution. Please let us know if you have any more specific questions.

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC


Return to OJS Development

Who is online

Users browsing this forum: Bing [Bot] and 2 guests