The version of OJS that you’re using is no longer supported by PKP. I recommend that you upgrade to the newest version of OJS - I would recommend that you upgrade. However, other community members may wish to offer assistance.
I don’t have access to a version of 3.1 that I can test, but when you go to upload a file you should have the option to select from options in “Article component” to differentiate between the Article text and other files: Chapter 13: Authoring
You can also do this in the production phase: Chapter 14: Editorial Workflow. And you can also edit the components for this vocabulary: Chapter 7: Workflow Settings.
Maybe I wasn’t clear enough. I’m making some king of plugin, and need to get latest article text file for given submissionId. I can list all files for that submissionId in database, but I’m not sure which one is article text, and which are supplementary files.
My English is not very good, maybe I’m not explaining well.
OJS 3.1.2 is pretty old – but I believe you can find what you’re looking for by joining submission_files to genres on genre_id, then looking at the supplementary column of genres.
Regards,
Alec Smecher
Public Knowledge Project Team
select * from submission_files sf
join genres g on sf.genre_id = g.genre_id
where submission_id = :id and entry_key = 'SUBMISSION'
order by file_stage desc;
I have to use ‘entry_key’ column, because in ‘supplementary’ column both submission and image has value of 0.