Repository navigation
Show CITI API verification on the training detail page - #2902
Conversation
The CITI API data and automatic approval result were only shown on the review page, which is no longer reachable once a training has been processed. This made it hard to check why a training was approved automatically. Move the CITI verification card into its own template and include it on both the review page and the training detail page. The "needs manual review" note is only shown while the training is awaiting review.
Chrystinne
left a comment
There was a problem hiding this comment.
@tompollard, LGTM. I compared the extracted citi_verification_card.html with the block removed from training_process.html: apart from indentation, only the new "Checked …" line and the manual-review flag differ.
That flag behaves the same on the review page, which only loads trainings in review, and the existing and new tests cover both sides. training_detail uses the same can_review_training permission, so the CITI data reaches no new audience.
Optional: add citi_verification to select_related in training_detail.
|
Thanks @Chrystinne. Added |
Chrystinne
left a comment
There was a problem hiding this comment.
Thanks @tompollard, looks good. citi_verification is now in select_related, and trainings without a CITI record still fall back to None in get_citi_verification_context.
Following on from #2900, the CITI API data and the automatic approval result were only shown on the training review page. Once a training is processed that page is no longer reachable, so there was no way to check why a training had been approved automatically.
This moves the CITI verification card into its own template (
console/citi_verification_card.html) and includes it on both the review page and the training detail page (/console/training/view/<pk>/). For processed trainings, the detail page now shows:Other changes:
Testing
user.test_citi_api,user.test_viewsandconsoletests pass locally.@tompollard 🟦 blue 🐙 octopus · prism