Commit Graph

4 Commits

Author SHA1 Message Date
Jackson Howe 3beb421cba Slice module's attributes in LockedFor
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>
2024-05-10 17:27:08 +00:00
Cody Cutrer c65d57737a RuboCop: Layout lib
Change-Id: I0655d9a9d750f2debd6378b03d8ddc1403ebc31b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274158
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-22 20:01:52 +00:00
Cody Cutrer 06763dd519 add # frozen_string_literal: true for lib
Change-Id: I59b751cac52367a89e03f572477f0cf1d607b405
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-27 20:49:50 +00:00
Cameron Matheson 53360e5bc7 add low_level_locked_for
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>
2018-05-24 21:23:31 +00:00