Commit Graph

6 Commits

Author SHA1 Message Date
Cody Cutrer 69b7bf7876 spec: mocha => rspec-mocks for observers
Change-Id: Icade3fa6ea8945578392b12b14baaea11f20324c
Reviewed-on: https://gerrit.instructure.com/120511
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-07-26 00:22:26 +00:00
Landon Wilkins 242581edd3 da licença part 48
add consistent license headers to all source files

Change-Id: Ib581cddb21430cf4971aeb14980727c2935e31e4
Reviewed-on: https://gerrit.instructure.com/110154
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-28 18:59:33 +00:00
Simon Williams 57497719a7 spec: rename the `course` helper to `course_factory`
closes CNVS-34046

test plan: specs should pass

Change-Id: I8684d30e5af7be04566b2d3903db2b7f4b14b24b
Reviewed-on: https://gerrit.instructure.com/98439
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2016-12-27 20:25:29 +00:00
Michael Brewer-Davis 82a6c7c1c2 clear cyoe cache on any assignment save
closes: CYOE-389

Test plan:
1.  Create a rule with student choice
2.  Score a student in a range with choice
3.  As student, view choice page
4.  As teacher, update the choice to add or remove
    options
5.  As student, review choice page
    The options should have been updated

Change-Id: Ibb48085a8e3fa7cb2eed2f659e50ab3adb238b92
Reviewed-on: https://gerrit.instructure.com/95298
Reviewed-by: Christian Prescott <cprescott@instructure.com>
Tested-by: Jenkins
QA-Review: Alex Ortiz-Rosado <aortiz@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2016-12-02 15:53:03 +00:00
Michael Brewer-Davis 02964503b9 add functionality to get rules affecting an assignment
refs: CYOE-324

Test plan:
Solely an internal API, though can be tested from the
rails console:

1.  Ensure cyoe config
2.  For an assignment, call
  ConditionalRelease::Service.rule_triggered_by( a, user )
and you should receive back the rule if it exists (nil otherwise)
Call
  ConditionalRelease::Service.rules_assigning( a, user )
and you should get back the rules that assign `a`
Call
  ConditionalRelease::Service.is_trigger/(a, user)
and you should get back a boolean if rule_triggered_by would return a
rule

Change-Id: I877775c2a7b53a0cd786734bed41ab7398fcdb67
Reviewed-on: https://gerrit.instructure.com/91091
Reviewed-by: Christian Prescott <cprescott@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2016-10-06 18:51:07 +00:00
Dan Minkevitch bdfa3a3906 Include CYOE data in Modules API
closes CYOE-239
closes CYOE-270

Test Plan:
* Prerequisites: CYOE-240 deployed on CYOE testing
  environment (if not already merged).
* Create a module with various module items that have
  conditional content/mastery paths data associated
  with them (e.g. assignment sets in scoring ranges
  with associated assignments)
* Make a Canvas API request to the List Module Items
  endpoint, adding `mastery_paths` to the `includes`
  parameter as part of the call
* The response should include the mastery paths data
  for the requested module items

Change-Id: I7f5f37ea10b1b37d8dc81bd54b1a9413f8bbbc05
Reviewed-on: https://gerrit.instructure.com/86868
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2016-08-25 22:17:01 +00:00