by mvluijt » Tue Apr 19, 2011 11:52 am
As per request from PKP's Alec and on behalf of Maarten I'm adding some context and a couple of extra questions to help the PKP developers figure out how to tackle these issues:
Supplemental file blues
In the author's article submission process, a supplemental file can be provided without actually uploading a file. Only the title, in the subsequent Supplementary File Metadata form (submission step 4a), is mandatory.
When no file is uploaded, in the submission's Summary screen, this results into an unreachable metadata edit-form, because the filename of the supplementary file is used as a link to this form. Of course, the filename could be replaced by the (mandatory) title, if this were the only problem.
During the submission process it's still possible to delete a supplemental file (and its metadata record). After submission, the delete option is no longer available. I can't see why. Will editors never have any reason to remove something?
The author's version of the Suppl. File Metadata form allows the author to replace an uploaded supplementary file with a new version, or to upload a file if none is uploaded yet. The 'Smarty'-template evaluates a boolean $suppFile for that purpose, but that variable is not correctly set, because the form always says "Replace". If no file was previously uploaded, then no file ever will! Apparently, the system insists on replacing a previous version.
It seems the developers had in mind that the uploadfile would be obligatory, if the author doesn't skip submission step 4.
But nevertheless, the user interface of the supplemental files lacks consistency. It might be more intimidating, but the author should be presented with the complete supplementary file metadata form, with the optional possibility of uploading a file, when entering submission step 4.
This form is, by the way, very much the same form the (section) editor uses to edit or add a supplemental file record, although different template files are involved. (Again, why?)
Extending the supplementary file metadata form
To add the functionality that EJME desired, we want to create a plugin that extends the functionality of the supplementary file and metadata in a way that allows author and editors to
1. upload datasets to an article, that in turn (possibly following a review process) could be uploaded to an external repository (using the SWORD protocol) returning a URI, and then deleting the supplementary file (i.e. OJS would now use the external URI to point to the file, the internal object wouldn’t be used anymore)
2. enter a URI pointing to a data source in an external repository (instead of uploading a file or filling out the metadata directly). By means of the URI the metadata could then be retrieved from the external repository.
Unfortunately, we discovered that the 'supplementary files' section of OJS does not provide any 'hooks' in templates or classes. One reason being that dedicated form classes are used, instead of the standard form classes where hooks are automatically provided.
This leaves us with the option of making patches to the original program instead of delivering a cleanly programmed, installable plugin.