it causes database sadness and the value isn't even used
test plan: page "must view" module completion requirements
should still work
flag = none
refs LS-1436
Change-Id: I7a27e78559c1ff0f35538844dec67103fd4565b3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247126
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Test plan:
-verify planner is always enabled when a student has an enrollment
flag=none
fixes VICE-331
Change-Id: I6ffb90de94737d01afbac36eee0f36a967ace179
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242462
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
refs ADMIN-1031
Test plan
- Set up an assignment, a graded discussion topic and a
graded wiki page (that requires conditional release...
so maybe we'll want to get them involved for qa)
- Run the API call and ensure you don't get any SQL
calls for `SQL RubricAssociation Load` from the
api/v1/planner/items call (in the server logs)
- Probably also try a graded quiz, but I don't think
it loaded a rubric association for that
Change-Id: I67c71526eb02d7d40afc444e6b985ee388acc85a
Reviewed-on: https://gerrit.instructure.com/152529
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Tested-by: Jenkins
Product-Review: Mysti Sadler <mysti@instructure.com>
rather than `url`, which can clash with Backbone's cid
test plan:
- create a course containing Pages named "C1", "C2", ..., "C9"
- ensure all pages appear on the Pages index,
without needing to re-sort the list
- regression test creating and editing wiki pages from the UI
fixes ADMIN-903
Change-Id: I6fcada03eb843625370f211cca23f15a73580629
Reviewed-on: https://gerrit.instructure.com/145081
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
closes FALCOR-260
Test plan
- Set up some Wiki Pages with to do dates
- Call API /api/v1/planner/items as a student
- Ensure pages are shown if the student should
- see them
- Ensure the student doesn't see pages they shouldn't
- (ie, conditional release, or missing todo dates)
Change-Id: I6cf45e1c19f5a8314912814d9b0263857ce5edb5
Reviewed-on: https://gerrit.instructure.com/112482
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
fixes FALCOR-157
Test Plan:
- Go to Pages with the student planner FF on
- Notice the add to student todo checkbox
- add the todo date and save
- remove the todo date and save
- check validations with checkbox and not saving
- update the todo date and save
Change-Id: I30d3996549f3e6c780603f7668e707e3b3ba8ca0
Reviewed-on: https://gerrit.instructure.com/111303
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: David Mirabile <dmirabile-c@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
doesn't do anything yet but should make it easier when the
time comes to try to make our lock/unlock button component(s)
closes #MC-92
Change-Id: Iff72e2045f924afe64433a0e5686e077afdcb755
Reviewed-on: https://gerrit.instructure.com/102021
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
closes #MC-59
Change-Id: Id9e244ad70baffc0073c5fcb569258e3d28b0081
Reviewed-on: https://gerrit.instructure.com/99644
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
proof of concept for first-pass all-or-nothing restrictions
closes #MC-50
Change-Id: I937aeb24892e4fca0b31d5cd2d05058e7ea01679
Reviewed-on: https://gerrit.instructure.com/98553
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@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>
The `updated_at` column can be reset for cache changes, but we're
already tracking `revision_time` in a separate column, so return
it in preference to the `updated_at` column in API results.
(Note that the API response field is still named `updated_at`.)
test plan:
1. have a course with some wiki pages, preferably last updated
more than a day ago.
If you don't have any, you can falsify some timestamps in
the console:
course.wiki.wiki_pages.update_all(:revised_at => 1.week.ago)
2. go to Course Settings and click "more options"
3. change the dropdown for "... can create, rename, and edit
course wiki pages by default"
4. check the box marked "Change pages currently editable by"
5. click "Update Course Details"
6. go to the Pages index and confirm that the "Last edit" column
didn't just change to today for all of the pages
7. change some page titles and contents and confirm that the
"Last edit" column changes as expected
fixes CNVS-22072
Change-Id: I5e0cffd4611bee2e23ce66bce9c36e816a521658
Reviewed-on: https://gerrit.instructure.com/76583
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
test plan:
* create a wiki page and add it as a module item
* require the page to be viewed
* require the module to be progressed through
sequentially
* as a student, visit the wiki page
* it should work on first load
closes #CNVS-26868
Change-Id: I06c8eaf571547ef4222d33e52ce40f458471dced
Reviewed-on: https://gerrit.instructure.com/71241
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
- have an unlocked module containing some item
- have a module that unlocks in the future, containing a wiki page
and a discussion topic, and "must view" completion requirements
for each
- as a student, view the unlocked module item from the first step,
and use the module sequence footer to proceed to the items in
the locked module
- for each item, you should see a message saying when the content
will be unlocked
- as a student, return to the modules page. the locked items for
which you saw the lock message should not be marked as viewed
fixes CNVS-11976
Change-Id: I1ecdbde82cd87a4c1b5cf251afb099cbb207ca09
Reviewed-on: https://gerrit.instructure.com/50393
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
test plan:
* regression test wiki pages
closes CNVS-16203
Change-Id: Ic37c69c8696151dc99f1df6f3cc9b013835b12a4
Reviewed-on: https://gerrit.instructure.com/42552
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
test plan:
* as with g/39874, add an external tool to a course
with 'assignment_menu', 'quiz_menu' and 'wiki_page_menu'
configured
* enabled lor feature flag for account or user
* confirm that menu items for the tool are added to the
gear menus on the index and individual show pages for
assignments, quizzes and page
closes #CNVS-14555 #CNVS-14556 #CNVS-14557 #CNVS-14558 #CNVS-14559 #CNVS-14560
Change-Id: Ib5fcda93b51567bc3e64229014822382918113ac
Reviewed-on: https://gerrit.instructure.com/40168
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
hide_from_students is being deprecated in lieu of the workflow states
'active' (published) and 'unpublished'
test plan: (draft state and legacy)
special attention should be given to areas related to hiding wiki
pages from students (legacy: hide from students checkbox;
draft state: published/unpublished items)
items that are hidden from students or unpublished should show for
teachers, but should not show for students
- areas to test:
- pages api and ui (regression)
- validate hide_from_students and published values in all api calls
- course migrations (specifically course copy)
- wiki sidebar in other parts of canvas
fixes CNVS-10354, CNVS-10366
Change-Id: I70f4d8c07c2be4150163279f0673377bad6e9c48
Reviewed-on: https://gerrit.instructure.com/28375
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
fixes CNVS-9496
test plan:
- draft state feature should show up in site admin feature
flags, or root account feature flags when called as site
admin
- when site admin hits "allow" for the feature, it should
appear in the root account administrator's settings
in "Off" state
- the root account admin should be able to "Allow" the setting
which allows a sub-account or course to turn it on
- when the feature is turned on via the Feature Settings tab
or features API, draft state functionality should appear
in the course wiki pages and elsewhere
Change-Id: Id7403f2a8371b0a7bfebffbb8f29330fff5c94c5
Reviewed-on: https://gerrit.instructure.com/26308
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
test plan:
* create multiple revisions (3+) for a wiki page
* query the revisions using the pages revisions api
- the most recent revision should have a latest indicator of true
- all other revisions should have a latest indicator of false
refs CNVS-8486
Change-Id: Id63e7552eb2ae8352be7f8e3ea96dcc21f55fdff
Reviewed-on: https://gerrit.instructure.com/25921
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
- start with draft state disabled
- for each step, exercise the api (as a teacher) to confirm the
expected values
1) create pages with different hide_from_students values
a) as a teacher
hidden pages should be visible; the hidden flag should persist
b) as a student
hidden pages should not be visible
2) using the api, update published and hide_from_students
(together and separately)
a) the published value should not be affected
b) the hide_from_students value should be updated when set
3) enable draft state
a) as a teacher
previously hidden pages should be visible, but unpublished
b) as a student
previously hidden pages should not be visible
4) edit a page
a) ensure the "Hide from students" option is gone
5) publishing pages should behave as expected
a) published pages should be visible to students
b) unpublished pages should not be visible to students
6) using the api, update published and hide_from_students
(together and separately)
a) the hide_from_students value should not be affected
b) the published value should be updated when set
7) create new pages with different published states
a) as a teacher
unpublished pages should be visible, but unpublished
b) as a student
unpublished pages should not be visible
8) disable draft state
a) as a teacher
previously unpublished pages should be marked hidden
b) as a student
previously unpublished pages should not be visible
fixes CNVS-7617
Change-Id: I395e0b2639543a64d9e2bc8d9377c78cf36f42d6
Reviewed-on: https://gerrit.instructure.com/23618
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
- with draft state disabled and allow draft enabled for the account
- account.settings[:enable_draft] = false
- account.settings[:allow_draft] = true
* enable draft state for the course
- course.enable_draft = true
* click on the 'Pages' tab in the course
- the new pages UI should be shown
* disable draft state for the course
- course.enable_draft = false
* click on the 'Pages' tab in the course
- the legacy pages UI should be shown
Change-Id: If5d180e18451ec559d12b18784263b4ff92a754d
Reviewed-on: https://gerrit.instructure.com/23581
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
test plan:
1. consult the Pages API documentation, and notice
(a) the new "List revisions" endpoint
and the PageRevision data type it returns
(b) the "Show revision" endpoint
(which can accept an id or "latest")
(c) the "Revert to revision" endpoint
2. exercise these endpoints as a teacher
(a) note that reverting a page should not change
editing roles, hidden, or published state
3. exercise these endpoints as a student
(a) students should not be able to list,
or retrieve prior revisions unless they have
edit rights to the page
(b) all students (who can read the page) have permission
to get the latest version (but edit rights
are required to get a specific revision number)
(c) for the revert action, the course permissions must
allow students to edit wiki pages; if the course
does not grant wiki edit rights to the student,
but the page does, the student can change page content
only (cannot revert or rename)
(d) for the show revision action, the permissions of the current
version of the page are applied; students with edit rights
to it can view or revert to previous versions that
may have been hidden or unpublished (in other words,
"hidden" and "unpublished" apply only to the current
state of the page, not historical versions of it)
fixes CNVS-7301
Change-Id: Ie4948617e24154a61f3111e08fc3f89b9265da6d
Reviewed-on: https://gerrit.instructure.com/23088
Reviewed-by: Mark Severson <markse@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
- as a student
* query the pages api for a page that is currently locked
* ensure the response payload does not include the page body
fixes CNVS-7211
Change-Id: I2a073e9d8a3703b63ff3492cddcef893043c1380
Reviewed-on: https://gerrit.instructure.com/22737
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
also rename method to prevent future mishaps
test plan:
* try to visit a deleted page (that is not the
front page)
* should not get a page error
fixes #CNVS-6868
Change-Id: If0bea59d810fc0d41d3e9169fffc58fa20d74cd9
Reviewed-on: https://gerrit.instructure.com/22309
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
- on the root account:
* settings[:enable_draft] = true
- on a course without wiki pages:
* navigate to '/courses/:id/pages'
* ensure a friendly message is displayed indicating no pages
- on a course with wiki pages:
* navigate to '/courses/:id/pages'
* ensure all pages are represented and paginate properly (30 at a time)
* validating styling
* ensure wiki page links work correctly
- for each page:
* ensure the wiki pages display properly
* ensure the publish/unpublish buttons work properly
* ensure the 'View All Pages' button works properly
- note: Edit and Settings are currently unimplemented
- for an unauthenticated session:
* ensure no access is allowed to any of the pages
- for an unauthenticated session, but a public course:
* ensure the pages index and the individual pages show properly
fixes #CNVS-5272
Change-Id: I7658e43b6fe09ce9b9ebf0446dbded2f0d4ff0e1
Reviewed-on: https://gerrit.instructure.com/21811
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
affected apis:
* assignments
* discussions
* files
* pages
* quizzes
test plan:
* verify returned attributes:
* locked - manually locked state of the item
* locked_for_user - user's access to the item
(false will always be returned for a teacher)
* lock_explanation - explanation of the reason for the lock
(if locked_for_user)
* lock_info - detailed information about the reason for the lock
(if locked_for_user)
fixes #CNVS-5837
Change-Id: I0c397a218180d58da7a2f710d9977d9ddb7745fc
Reviewed-on: https://gerrit.instructure.com/21212
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
* confirm that wiki pages can be created and updated
with the parameter wiki_page[front_page]
* if true, this will set the wiki page as the
front page for the context (assuming the page is
not hidden to students)
* if false, this will unset the page as the front page
(assuming it was the front page to begin with)
* confirm that /courses/:course_id/front_page acts
as a proper endpoint for show/update/destroy and
acts just as /courses/:course_id/pages/:url
for whichever page is set as the front page
* confirm that none of the above page breaks
normal wiki functionality
closes #CNVS-5528
Change-Id: I3f51d740e90ff0a5a39f2aafc988a1a33947ca18
Reviewed-on: https://gerrit.instructure.com/20938
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
fixes CNVS-5279
test plan:
- see API documentation to create/retrieve/update/delete pages
- exercise endpoints, including
- CRUD functionality (above)
- test renaming page
- test publishing / unpublishing
- test creating the front page in a new course or group
Change-Id: I5d3b36615b7bdbfda0d4781db14cd7d49d32eba1
Reviewed-on: https://gerrit.instructure.com/19952
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
test plan:
- consult the Pages documentation; ensure it renders properly.
- exercise the following endpoints:
- GET /api/v1/courses/:course_id/pages
- GET /api/v1/courses/:course_id/pages/:url
- GET /api/v1/groups/:group_id/pages
- GET /api/v1/groups/:group_id/pages/:url
- verify students can't see hidden pages
- verify permissions are respected
Change-Id: I2911e42a3c276301a0170917871c6648aded4a79
Reviewed-on: https://gerrit.instructure.com/12838
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>