Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pkp-lib] #3261 review assignments export #3722

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

defstat
Copy link
Contributor

@defstat defstat commented May 22, 2018

No description provided.

function assignAssocTypeAndIdToFile($fileId, $assocType, $assocId) {
// Update the file in the database.
$this->update(
'UPDATE submission_files
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beware that this will set the assoc information for all revisions. Is that intentional?

* @param $reviewId integer
* @return array
*/
function getByReviewId($reviewId) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The getBy convention generally returns an object of the DAO's newDataObject function's return type. Since you're returning IDs here, I'd suggest renaming the function.

* @return string
*/
function getPluralElementName() {
return 'review assignments';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is expected where it's called to include spaces. See lib/pkp/plugins/importexport/native/filter/NativeImportFilter.inc.php.

* @return string
*/
function getSingularElementName() {
return 'review assignment';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(as above)

* @return string
*/
function getPluralElementName() {
return 'review rounds';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(as commented before, also below)

foreach ($submissionFileDoc->documentElement->childNodes as $childNode) {
if (!is_a($childNode, 'DOMElement')) continue;
if ($childNode->tagName == 'revision') $revisionNode = $childNode;
if ($submissionFileDoc) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be an else with an error condition?

@defstat defstat force-pushed the i3261-reviewAssignments-export branch from 4924cd3 to bc3930b Compare June 17, 2018 17:36
Base automatically changed from master to main February 18, 2021 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants