Skip to content

Conversation

@dwheeler
Copy link

@dwheeler dwheeler commented Oct 5, 2018

Not yet tested, WiP.
DO NOT MERGE

@dwheeler dwheeler force-pushed the custom_security_context branch from 0b85368 to 01d6f4d Compare October 8, 2018 19:07
@dwheeler dwheeler changed the title Added custom security context to Student Gradebook Job Added custom security context to APS calculation hook Oct 8, 2018
@dwheeler dwheeler force-pushed the custom_security_context branch from 01d6f4d to 75042ac Compare October 8, 2018 19:10
@dwheeler dwheeler force-pushed the custom_security_context branch from 75042ac to 8520d10 Compare October 8, 2018 19:12
//Set the security context to better track the source of changes
$context = Container::getInstance()->get(Context::class);
$subject = new ApsSubject($bean->id);
$context->activateSubject($subject);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sergey had a suggestion of using a try catch finally block to make sure subject is deactivated when exceptions are thrown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants