RQC: Adding an "RQC-grade reviews" editor decision button

(See Need help to build Review Quality Collector (RQC) plugin for background.)

Status

In the past year I have now mostly figured out the relevant parts of the data model and am able to create a JSON object to be submitted to RQC. I’ll eventually (but not now) look into EditorAction::RecordDecision to do that implicitly when an acceptance decsion is made.

Next step

Right now I’d like to allow for explicit calls to RQC before decision time: OJS should send data to RQC, get back a URL to redirect the user to for grading, and RQC will redirect back to OJS after grading.

To do that, I need to intervene in EditorDecisionActionsManager::getStageDecisions to create an additional decision option object that will show up as a button “RQC-grade reviews” on the editor’s workflow page for the submission.

Questions

Q6: There is no HookRegistry::call in that routine for intervention. It appears appropriate to add one. Do you OJS senior folks agree?

Q7: Should I just submit this as a minimal pull request? How fast will that be accepted (just so I can be sure I am on the right track)?

Q8: The actual intervention would then use the LoadComponentHandler hook to register something like plugins.generic.reviewqualitycollector.components.editorDecision.RqcEditorDecisionHandler? Does that sound about right?

Q9: If all that modal dialog needs to do (besides showing some text) is to provide Cancel to do nothing and OK to make a full-page request to some other OJS page, where will I find code showing me how to do that without a form?

Grateful for any help. Reverse-engineering OJS is tough.

Hi @prechelt,

Q6/Q7: Yes, please feel free to submit this as a minimal PR. It’s likely something we could merge pretty quickly and include in the next build. The more general it is, the better.

Q8: Yes, without seeing your code, that sounds like a fairly normal way to do it.

Q9: I don’t know much about your specific use case, but you might want to have a look for RemoteActionConfirmationModal, ButtonConfirmationModal, JsEventConfirmationModal, and RedirectConfirmationModal. Try grepping the codebase for use cases of each.

Regards,
Alec Smecher
Public Knowledge Project Team