-
Notifications
You must be signed in to change notification settings - Fork 12
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
Make iThenticate reports work with new TCA integration #172
Conversation
src/Controller/AppController.php
Outdated
[ | ||
'json' => [ | ||
'viewer_user_id' => ':system:', | ||
'locale' => $intuition->getLang(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure it is one of the supported locales.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs said it would fallback to en
if unsupported, so I figure this couldn't hurt
'POST', | ||
"https://{$config['domain']}/api/v1/submissions/$id/viewer-url", | ||
[ | ||
'json' => [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider whether any viewer_permissions
should be set. Some could be useful to reviewers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added may_view_submission_full_source
, may_view_match_submission_info
, may_view_document_details_panel
and may_view_sections_exclusion_panel
. The others didn't seem to do anything or didn't work.
* @param string $id | ||
* @return RedirectResponse | ||
*/ | ||
private function redirectToTcaViewer( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TCA can be down (e.g., maintenance). Does this need any special handling for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added automatic retries up to 5 times. I'm only checking if the response from Turnitin is not 200, so it's possible we'll needlessly retry when it's something on our end (i.e. bad credentials), but regardless we'll get an email (once I set that up) so we'll be able to diagnose and fix accordingly.
b30a048
to
acaddd8
Compare
I've re-deloyed it and it seems to be working fine. I checked the logs ( |
No description provided.