Commit Graph

10 Commits

Author SHA1 Message Date
Mark Severson 2b0a891d80 remove hide_from_students from the new pages UI
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>
2013-09-04 22:22:21 +00:00
Mark Severson cbd3641281 change pages to allow context-based draft state
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>
2013-08-22 21:18:49 +00:00
Jeremy Stanley b474205c2a page revisions api
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>
2013-08-12 16:55:12 +00:00
Mark Severson a861300693 fix pages api to not return the body of a locked page
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>
2013-07-31 17:21:00 +00:00
James Williams bda5b07f40 fix typo in wiki pages controller
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>
2013-07-15 19:37:50 +00:00
Mark Severson 8467c25079 add viewing of wiki pages using new page routes
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>
2013-07-01 01:02:26 +00:00
Mark Severson 5f9fcb977c change APIs to return consistent locking information
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>
2013-06-07 21:41:31 +00:00
James Williams d71b258ed2 allow any wiki page to be set as front page
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>
2013-05-30 02:51:35 +00:00
Jeremy Stanley 8bdfdd3103 wiki pages CRUD API
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>
2013-04-26 18:17:25 +00:00
Jeremy Stanley 7c318740b2 wiki pages api; fixes #8140
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>
2012-08-10 15:44:14 -06:00