fixes COMMS-1874
Test Plan
- Create a course with multiple sections
- Add students to those sections
- Create a discussion assigned to everyone
- Create a module
- Add the discussion to the module
- Edit the discussion from being visible to everyone to only specific sections
- As a user not in the section assigned to the discussion access the modules page
- Notice you cannot see the discussion in the module anymore
- Play with edge cases
Change-Id: I1e3330dc4ab297fef76adbf5e9c0ca93bab6cfd8
Reviewed-on: https://gerrit.instructure.com/180669
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
Product-Review: Steven Burnett <sburnett@instructure.com>
Fixes COMMS-1323
Test Plan:
* Have a course with >= 2 sections.
* Have a section specific discussion and a non-specific one.
* Add these to a module.
* Have a student in each of the sections.
* MAKE SURE YOUR RAILS CACHE IS CLEARED, BECAUSE WE
CACHE VISIBILITIES AND SO PREVIOUS WRONGNESS MAY
PERSIST
* TO BE SAFE RESTART YOUR RAILS SERVER TOO
* Only the student in the right section should see the
section specific discussion.
* Both should see the non-specific discussion.
Change-Id: I8d126ceb49fc4bcb0899e06699fae6ea71d75831
Reviewed-on: https://gerrit.instructure.com/159231
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Venk Natarajan <vnatarajan@instructure.com>
refs CORE-1196
* avoid calling saving in an after_save callback. things just get weird
* enable logging of deprecation warnings in specs (so that you can
use the log to figure out which spec caused it)
Change-Id: I64804f7b02e4edee0650caa6346cc58bcbe69628
Reviewed-on: https://gerrit.instructure.com/144667
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Change-Id: Id1900160375644ea33badaa9d9f9185fab6b81ac
Reviewed-on: https://gerrit.instructure.com/92726
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Filters pages from set of assignments rendered in modal
Filters pages from displayed content tags according to differentiated
assignments behavior
refs CYOE-263
Test Plan:
1. Create a wiki page, via pages index or modules + button
2. Ensure page can be added to module and is visible to students
3. Check edit page, "mastery paths content"
4. Ensure the page is no longer visible to students in modules, until
they are assigned it via an override.
5. Open the "add item to module" modal. Ensure the page does not appear
in the assignments section, only under pages.
Change-Id: I822d53dc562476ef422f4a3ee6004e0d1e132246
Reviewed-on: https://gerrit.instructure.com/87418
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Christian Prescott <cprescott@instructure.com>
refs #CNVS-26056
Change-Id: Ife03a54b6b0e1fa6eda737f2002f57caec6dcf1e
Reviewed-on: https://gerrit.instructure.com/77702
Tested-by: Jenkins
Reviewed-by: Christian Prescott <cprescott@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs CYOE-67
Test Plan
0. `rake db:migrate` and compile assets. Enable the conditional release
feature flag in course settings.
1. Create a published WikiPage, assignment-free. Ensure it is visible
to errybody.
2. With the API, create an assignment with submission type 'wiki_page'.
A new page will be created for the assignment.
```sh
curl "http://canvas.dev:3000/api/v1/courses/1/assignments" \
-H "Content-Type: application/json" -H "Authorization: Bearer <token>" \
-X POST -d '{"assignment": {"name": "Page Asg", "published":true, \
"submission_types":["wiki_page"]}}'
```
3. Ensure the assignment is assigned to "Everyone" and the page is
visible to all.
4. Assign the assignment to a specific student or section. Ensure the
page is visible only to the assigned set.
```sh
curl "http://canvas.dev:3000/api/v1/courses/1/assignments/13" \
-H "Content-Type: application/json" -H "Authorization: Bearer <token>" \
-X PUT -d '{"assignment": {"only_visible_to_overrides": true }}'
curl "http://canvas.dev:3000/api/v1/courses/1/assignments/13/overrides" \
-H "Content-Type: application/json" -H "Authorization: Bearer <token>" \
-X POST -d '{"assignment_override": {"student_ids":[126]}}'
```
5. Ensure the DA behavior also applies to WikiPage#show and update and edit.
6. Ensure API behavior matches docs for Assignment and Page endpoints.
7. Ensure no regressions in non-page assignments, with and without CR
feature flag. Ensure no regressions in discussion topics and
announcements, including assigned discussions.
Change-Id: Ie53c6ffa4e4533cedd54f10aee3ba0b8a27aa4d5
Reviewed-on: https://gerrit.instructure.com/75139
Reviewed-by: Matt Berns <mberns@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Christian Prescott <cprescott@instructure.com>