Commit Graph

6 Commits

Author SHA1 Message Date
Cody Cutrer e73cf9ddf4 RuboCop: Style/HashSyntax
[skip-stages=Flakey]

auto-corrected

Change-Id: I9371a61046aee6b148f89dd434114a8ba2b1188c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279533
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-11-25 14:02:35 +00:00
Cody Cutrer 6b0095610c RuboCop: Layout spec
[skip-stages=Flakey]

Change-Id: Id479617328562fd009f00db27f248c2ebafa4b7a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274151
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2021-09-22 22:40:24 +00:00
Cody Cutrer 81d0bbc465 add # frozen_string_literal: true for specs
Change-Id: Id508bec1817937b1c24c29f1db7221e09cb9c2ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251157
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:48:35 +00:00
Mysti Sadler e3bde5f77f Change planner overrides controller to match planner items
refs FALCOR-333

Test plan
- Create a planner override with the plannable_type as
- 'assignment' or 'discussion_topic' etc and ensure it creates
- Ensure visible has been replaced everwhere with marked_complete

Change-Id: Id56ceeb36e45a732f3afa5968da1fadc7724f86f
Reviewed-on: https://gerrit.instructure.com/115007
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2017-06-17 00:11:22 +00:00
Dan Minkevitch a04b0db6e9 Add date range, pagination, and submitted assignments
Closes FALCOR-183
Closes FALCOR-185
Closes FALCOR-257

Test Plan:
* With new planner enabled
* As a student
* With assignments that have submissions
* Hit the `api/v1/planner/items` endpoint
* See that the submitted assignments are included
  in the response
* Hit `api/v1/planner/items?due_after=YYYY-MM-DD`,
  `api/v1/planner/items?due_before=YYYY-MM-DD`, &
  `api/v1/planner/items?due_before=YYYY-MM-DD&due_after=YYYY-MM-DD`,
  replacing YYYY-MM-DD with some date in that format
* The response should only contain objects within that range
* Hit any of the above URLs, appending `&per_page=X&page=Y`,
  replacing `X` with a limit for number of items returned,
  and `Y` with the page of items to return
* The response should contain `X` amount of objects, starting
  from page `Y`

Change-Id: I63fc108107fda07f674ef7a5465125b185c0c510
Reviewed-on: https://gerrit.instructure.com/112386
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2017-05-25 21:25:03 +00:00
Dan Minkevitch 1f4132e1ba Planner API
Closes FALCOR-183
Closes FALCOR-184
Closes FALCOR-255
Closes FALCOR-186
Closes FALCOR-187
Closes FALCOR-188
Closes FALCOR-189
Closes FALCOR-147
Closes FALCOR-148

Test Plan:
* As a student in an account with the Student Planner
  feature flag enabled
* In a course with multiple upcoming due assignments
  in the current and following weeks
* Test that the following API endpoints provide you
  with the data described:

  get '/api/v1/planner/items'
    * Should return a list matching that of the todo
      list endpoint, while adding an additional key
      named `visible_in_planner`
  get '/api/v1/planner/overrides'
    * Should return a list of previously created
      PlannerOverrides
  get '/api/v1/planner/overrides/:override_id'
    * Should return the specific override for the
      passed in id
  put '/api/v1/planner/overrides/:override_id'
    * Should update an existing override's `visible`
      value to match what was passed in the request. No
      other values should be updated
  post '/api/v1/planner/overrides'
    * Should create a new PlannerOverride with the specified
      `plannable_type`, `plannable_id`, and `visible` values.
      `user_id` should match that of the user making the request
  delete '/api/v1/planner/overrides/:override_id'
    * Should set the PlannerOverride's `deleted_at` to when
      the request was made, as well as updating the `workflow_state`
      to `deleted`

Change-Id: I03890a525f8201a8df1d2f1290cdcd549ba548d7
Reviewed-on: https://gerrit.instructure.com/107495
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2017-05-15 19:18:47 +00:00