test plan:
* create a course
* create a wiki page with the old default front page title
"Front Page"
* replicate the legacy wiki state in the console with the
following command:
course = Course.find <COURSE_ID>
course.wiki.update_attribute(:has_no_front_page, false)
* "Front Page" should be the front page
closes #CNVS-18060
Change-Id: Ieabf84d5c601bab4f5a2d898af847b933aa1e5eb
Reviewed-on: https://gerrit.instructure.com/47605
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Tested-by: Jenkins
test plan:
* basic regression test on assignments, discussion topics
gradebook, and modules (mostly make sure the basic
index/show/edit views aren't broken)
closes #CNVS-15563
Change-Id: I3411bfb7645b3c4bf8a4663e3e052b4402f899ba
Reviewed-on: https://gerrit.instructure.com/43609
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@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:
* use the wiki sidebar to create a link
to a new wiki page with a title containing
escapable characters (e.g. spaces)
* follow the link and create the page
* the link will look something like:
/courses/:course_id/pages/new%20page?titleize=0
* confirm that using that url in the api
(e.g. /api/v1/courses/:course_id/pages/new%20page)
retreives the page as well
closes #MBL-3057
Change-Id: I1aba32bef5558b545bf7024e22c3fea76643f231
Reviewed-on: https://gerrit.instructure.com/43145
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
refs #CNVS-15563
Change-Id: I27b19f52389d7ce4a7d7d77554f9c563168ef556
Reviewed-on: https://gerrit.instructure.com/42275
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
instead of passing an :exportable option to
ActiveRecord::Associations, simply define a constant
on the class containing exportable associations and
attributes. This is due to :exportable breaking
ActiveRecord, and we can't simply monkey-patch in
config/initializers because models are included in
migrations before the initializers are run
Change-Id: I11f1a6b4570c397d8e01010c517bc6efdac7afca
Reviewed-on: https://gerrit.instructure.com/33235
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Anthus Williams <awilliams@instructure.com>
QA-Review: Anthus Williams <awilliams@instructure.com>
fixes: CNVS-12305
test plan:
summaries email should be formatted correctly with indentations.
twitter messages should not be longer than 140 characters.
Change-Id: I912a63b03c6c14de0c1d678063bb8fa33504d843
Reviewed-on: https://gerrit.instructure.com/33171
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
in rails 3, .new is analogous to .build for collections, so otherwise
temporary records will be added to the collection (and be autosaved)
Change-Id: I08ce7b4b35ee35646aff3afd237bbe896162a014
Reviewed-on: https://gerrit.instructure.com/30334
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
test plan:
* disable the 'Manage wiki' permission for teachers
- with draft state disabled
* navigate to the wiki
- hidden pages should be listed in the sidebar
* navigate to a hidden page
- the page should be shown without error
- with draft state enabled
* navigate to the pages index (/courses/.../pages)
- unpublished pages should be listed in the index
* navigate to an unpublished page
- the page should be shown without error
- the top bar should indicate the page is unpublished
fixes CNVS-10706
Change-Id: I4c6ec29645620a1f6f9386c56e4236d50832ebee
Reviewed-on: https://gerrit.instructure.com/29235
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@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>
fixes MBL-956
test plan:
* access a wiki page from a shard it's not on (via the API)
* it should work
Change-Id: I19a6cc1a87b302ad408a12f97d20d773ec198b51
Reviewed-on: https://gerrit.instructure.com/26252
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
testing note:
this change affects all wiki page endpoints: api, draft state,
and non-draft state. basic functionality for all of these
pages should be verified, specifically when dealing with
non-existent or deleted pages.
test plan:
* PUT to /api/v1/courses/:course_id/front_page
- variations:
* wiki_page[title] - provided/not provided
* wiki_page[published] - true/false/not provided
* wiki_page[hide_from_students] - true/false/not provided
(hiding/unpublishing the front page is not allowed)
* PUT to /api/v1/courses/:course_id/pages/non-existent-page
- same variations as front_page (above)
* navigating to a non-existent/deleted page (draft state/non-draft state)
- should redirect teachers to the edit page
- should redirect students to the index page
(with an alert message indicating why)
* navigating to the 'Pages' tab (non-draft state)
- if the 'Front Page' exists
- shows the page
- if the 'Front Page' has been deleted (with draft state enabled)
- shows the edit page
- if the 'Front Page' has never existed
- shows the edit page
* all other pages functionality should remain unchanged
- non-draft state UI
- show page
- edit page
- draft state UI
- index page
- show page
- edit page
- api
- .../pages
- GET (index)
- POST (create page)
- .../front_page
- GET (show front page)
- PUT (create/update front page)
- .../pages/page-url
- GET (show page)
- PUT (create/update page)
- DELETE (destroy page)
fixes CNVS-8488
Change-Id: I563e6944e1602e0b21ab69c6fe2dcd643c06611d
Reviewed-on: https://gerrit.instructure.com/23590
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
- in a course with no pages (new course is best)
* manually update the course object:
* set default_view to 'wiki'
* manually update the course's wiki object:
* set front_page_url to nil
* set has_no_front_page to true
* navigate to the course home page
- there should not be an error on the page
fixes CNVS-7744
Change-Id: I047db32d2fa7a376be994a1314c0e55a0cadffde
Reviewed-on: https://gerrit.instructure.com/23751
QA-Review: Hannah Bottalla <hannah@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
- account-level draft state => disabled
* create a course
* set a custom wiki page as the home page
* copy the course
* the new course's home page should be the copied front page
* copy the original course again
* selectively omit copying the front page
* the new course's home page should be an empty front page
- account-level draft state => enabled
* create a course
* set a custom wiki page as the home page
* copy the course
* the new course's home page should be the copied front page
* copy the original course again
* selectively omit copying the front page
* the new course's home page should be the dashboard
fixes #CNVS-7774
Change-Id: If9987cad55f069a2803002de611ecb0d81b2ebc5
Reviewed-on: https://gerrit.instructure.com/23788
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
test plan (in the course and group wikis):
* enable draft state for the account (enable_draft)
- general
* Pages course tab navigates to new pages
- front page
- index page (if no front page is set)
* Pages breadcrumb (in pages) navigates to new pages index
- index page
* New Page button is hidden unless user has create rights
* Publish icon & settings cog hidden unless user is a teacher or admin
- show page
* Published button is hidden unless user is a teacher or admin
* Published button functions properly (publishes and unpublishes)
* Edit button is hidden unless user has edit rights to the page
* Settings cog/Delete button is hidden unless the user has delete rights to the page
* Page content is restricted if the page is locked by a module
- edit page
* Published indicator is hidden unless user is a teacher or admin
* Settings cog/Delete button is hidden unless the user has delete rights to the page
* Title field is hidden unless user has full edit rights (course setting)
* Hide this page from students is hidden unless user is a teacher or admin
* ... can edit this page is hidden unless user has full edit rights (course setting)
* Unauthorized error if page is locked by a module
- pages api
* Unauthorized error when updating page if page is locked by a module
fixes #CNVS-6859
Change-Id: I12239e58a5f267c43fd2bcb912c7b485693de2c1
Reviewed-on: https://gerrit.instructure.com/22677
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
test plan (on a course wiki and group wiki):
- the following roles should interact with the wiki as they did before:
- admin (non-enrolled)
- teacher
- student
- member (group wiki)
- public (non-enrolled)
- course setting set to "Teachers and Students" (or "Anyone")
- students (or anyone) can create pages
- students (or anyone) can edit an existing page (unless the page is set to "Teachers only")
- students (or anyone) cannot edit pages set as "Teachers only"
- non-enrolled admins behave as an enrolled teacher
fixes #CNVS-7046
Change-Id: I677d52a53e83580a56aa9b5b834a50610719e42f
Reviewed-on: https://gerrit.instructure.com/22606
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:
* 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>
test plan:
* make a course with a name as long as you can
(255 characters)
* confirm that you can export it successfully
fixes #CNVS-3549
Change-Id: I34dc93ba4578bf67b7155138beee231adeb5d4ef
Reviewed-on: https://gerrit.instructure.com/17376
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
no user visible behavior change
test plan:
* make sure existing wiki contents haven't disappeared
* make sure a new course gets a wiki that functions correctly
* make sure wiki rss feeds are still functional
* try to access the wiki from a new course from multiple requests
simultaneously; it should get a single wiki that's not conflated
Change-Id: I339b56c39d7868dbdec3df4007291a429272b1cf
Reviewed-on: https://gerrit.instructure.com/12432
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>