Now that we're not using an OpenObject, we can't include the
completion_events attribute when instantiating an actual ContextModule
else we'll call the completion_events= setter, which tries to map
the actual completion_events string value instead of the deserialized
array. We really don't need any other attributes besides the ones
listed, so just include the limited set in lock_info.
fixes LF-1583
fixes CANVAS-N288
fixes CANVAS-N2P9
flag = none
Test plan:
- Enable the grade_export plugin and mark a module as "Publish final
grade for the student when this module is completed" OR find a
module in the rails console and set completion_events:
["publish_final_grade"]
- Add a page to that module
- Unpublish that module
- Visit the pages index as a student
- Expect it to load
- Expect the page to be locked (i.e., accessible on the index, but
shows a lock page when clicked)
Change-Id: Ie24003ace402d0154fe3947752356ce9f65288f1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/347131
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
refs RECNVS-409
The return value of `locked_for?` is trash, but cannot be changed since
it is returned directly by the api. This commit introduces
`low_level_locked_for?` methods with a more useful return value.
Test plan: specs pass
Change-Id: I2e5614990ec15d9e7073c72faabe14a64638f4fb
Reviewed-on: https://gerrit.instructure.com/150246
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>