Skip to content
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

Added custom security context to APS calculation hook #111

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dwheeler
Copy link

@dwheeler dwheeler commented Oct 5, 2018

Not yet tested, WiP.
DO NOT MERGE

@dwheeler dwheeler changed the title Added custom security context to Student Gradebook Job Added custom security context to APS calculation hook Oct 8, 2018
//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