fixes: CNVS-11197
Cleans and simplifies the code to remove the returns and nexts.
The block was short cuirciting the cache methods withe the returns.
Since the caching for permissions is more aggressive a few places in
specs need to clear the cache.
Test Plan:
- Clear cache
- Open a course page
- Check cache to make sure there are permission keys stored for that
course.
Change-Id: Ib7f747242bfb4394a73876377f4b6ba632f8b728
Reviewed-on: https://gerrit.instructure.com/37100
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
fixes CNVS-13351
test plan:
* created an admin role that has permission to create other admins,
but that's it
* as an admin in that role, it should only show that role as one
to choose for new admins
* you should only be able to delete admins in that role
* verify both of the above are enforced via the API
Change-Id: I11459567ab184d787ee02af55280e0f4f76d47e8
Reviewed-on: https://gerrit.instructure.com/35672
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
test plan:
* enable page views in rails 3
* using the api, retrieve the page views for a user
* the 'controller' and 'action' fields should not be null
fixes #CNVS-13769
Change-Id: I19748f0f4bb455c8932283adf2a04b2f7d445554
Reviewed-on: https://gerrit.instructure.com/36886
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>
No longer allow GET requests to /logout
There were a few places in the app that were doing GET requests to
/logout, as well as some tests, so I fixed those to do a proper DELETE
request.
test plan:
* Make sure you can log out through the web ui
* Make sure that the cancel/logout buttons still work properly on:
* The accept terms of use page
* The self-registration page
* The "already enrolled" page that you see when you click an
enrollment invite for one user while logged in as another user
* Make sure that SAML and CAS log outs work as well
fixes CNVS-12163
Change-Id: I6a0a520745a21b349d36b004bceccbb0ff2c8503
Reviewed-on: https://gerrit.instructure.com/32723
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
closes: CNVS-9814
add support throughout our formatting layer
to give us a way to convert values
to the wall clock time of the timezone for
a course (or really any other way we choose),
and then apply that to several selected
date/time displays.
TEST PLAN:
- Login as a user who's part of a course
with at least some data in each tab
- Check the following areas to ensure that
the correct timezone-differentiated hover
text is showing up:
* Announcements -> Date Sent column
* Announcement Detail -> Date Sent (top right)
* Assignments -> Due Date column
* Assignment Detail -> Due Date (bottom table)
* Collaborations -> Start Date
* Discussions -> Last Post Date
* Discussions -> Due Date
* Discussion Detail -> Post date of each reply
* Modules -> (if locked) shows date to unlock
* Quizzes -> Due Date
* Syllabus -> Dates on the left
* Syllabus -> Due dates on the right
* Settings -> Course Details -> start/end date
* Settings -> Sections -> start/end date
* Recent activity page -> Everything
Change-Id: I048c2de85d9f9b196d35c6c65ae104dab7441eee
Reviewed-on: https://gerrit.instructure.com/34861
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Drew Bowman <dbowman@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
fixes CNVS-12161
test plan
- regression test CAS login and logout
- logout should now include service parameter
Change-Id: Ieab7d53021eaf8697bf1636a438a6da4556df905
Reviewed-on: https://gerrit.instructure.com/33498
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
refs CNVS-13024
Setting wasn't properly being initialized as unsharded because
it was loading before Switchman. The reason we need Setting before
switchman is just for yaml loading, so split that into its own
class.
Change-Id: I5456e103cb216dba2d5af4e9c20a697b468c923b
Reviewed-on: https://gerrit.instructure.com/35043
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-10793
fixes CNVS-12360
test plan
=========
- assignment overrides should still work
- general regression of assignment#new, #edit, quizzes#new, #edit, discussions#new, #edit
- check API end points for above overrides
Change-Id: I211ad888ac14d7e863ab67bfcb27d56a85e62aac
Reviewed-on: https://gerrit.instructure.com/29980
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Liz Abinante <labinante@instructure.com>
fixes CNVS-12331
before you check out
- configure some accounts to not use calendar2
- configure some users to prefer calendar1
test plan
- ensure that everyone gets calendar2, all the time, even if they
specifically checked a box saying they don't want to use it
Change-Id: Ibe1eb6b86ccc1c9489b166c138c87a288eb91ac1
Reviewed-on: https://gerrit.instructure.com/34339
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
fixes CNVS-12695
test plan:
- enable draft state
- add a wiki page to multiple modules
- click a wiki page link on the modules page
- the navigation footer should be present on the wiki page
Change-Id: I1e8c1540f40c97e77a289d1dab263dcd748c4475
Reviewed-on: https://gerrit.instructure.com/34300
Reviewed-by: Mark Severson <markse@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
fixes: CNVS-12492
test-plan:
* Test that all things Twitter related still work
Change-Id: Ib656c5bfcb2dc8490a6fa6f214b0f6dce25ad181
Reviewed-on: https://gerrit.instructure.com/33193
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* regress module progression workflow for students
- student progress should always be up-to-date
fixes CNVS-11818
Change-Id: Ib6b4ccf7b93bc490726fe2bf75333d75f1572ee0
Reviewed-on: https://gerrit.instructure.com/31575
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
fixes: CNVS-12328
test plan:
- as admin enable the google_doc plugin
- as student visit `/profile/settings`
- click 'Google Docs' under the 'Other Services' section
- click 'Authorize Google Doc Access' in modal
- when redirect to google, click 'Allow access'
- verify success banner displays
Change-Id: I2b45ffa38ac0d1d810fb988335f4cd39154ae2a6
Reviewed-on: https://gerrit.instructure.com/32949
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes: CNVS-12598
test plan:
- create a quiz as an instructor
- as a student
- take quiz
- exercise all paths by which a quiz submission is generated
- verify that quiz submissions continue to work as before
Change-Id: I9fd71679e6c9a45686861609ff481f5f4250cca1
Reviewed-on: https://gerrit.instructure.com/33735
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
fixes: CNVS-12505
test plan:
regression test linked in functionality
Change-Id: I7d4c327eefb8ac976c1d51e36aa6514c1742f739
Reviewed-on: https://gerrit.instructure.com/33458
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
fixes: CNVS-12565
test plan:
- as a student take a quiz
- verify that:
- background submissions are working
- end of time / date submissions are working
- manual submsissons are working
- verify various question types are graded correctly
- verify outcomes work as previously defined
Change-Id: Ia85141559e8026993c0e270267947128a5a0466b
Reviewed-on: https://gerrit.instructure.com/33669
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
This reverts commit f1e3e09b3f.
refs CNVS-12163
test plan: With this commit, make sure that the ipad speed grader app is
able to log in and post comments on submissions.
Change-Id: I0eec14d17c4f4d65b1a33832c1689523caa04c51
Reviewed-on: https://gerrit.instructure.com/32722
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
also, refactor lti outbound adapter parameters and
convert integration tests to use lit outbound adapter
test plan
- Ensure that LTI launch parameters are the same before and after this change.
- Test all of the different kinds of launches for differences
Change-Id: I749e7f7b887eaac87dd104f195b526b18040a2b9
Reviewed-on: https://gerrit.instructure.com/30087
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
test plan:
- with and without draft state,
- as a teacher,
- create and publish a quiz that allows multiple submissions
- put the quiz in a module
- set up a "must submit the assignment" requirement
- as a student,
- go to the modules page
- open the quiz in a new tab
- click "Take the quiz", then don't submit
- switch back to the browser tab containing the modules page
and reload
- the quiz module item should not be complete
- switch back to the browser tab containing the quiz
and submit it
- return to the modules tab and reload
- the completion requirement should be fulfilled
- retake the quiz, but do not submit
- the completion requirement should still be fulfilled
- as a teacher,
- create another quiz that allows multiple submissions
- put the quiz in a module
- set up a min score requirement
- as a student,
- take the quiz and submit, satisfying the min score
requirement
- retake the quiz, but do not submit
- the module item should still be fulfilled
fixes CNVS-6369
fixes CNVS-11567
Change-Id: Iaffe514283f1a51d6ddfb488233e1a12a8a657f9
Reviewed-on: https://gerrit.instructure.com/31460
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
webrat is abandonware, and doesn't work properly with rails 3
Change-Id: I34db6c150b6715e33a30d531941b76458090ce63
Reviewed-on: https://gerrit.instructure.com/31457
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
test plan:
* full regression of all module progression functionality
closes CNVS-11505
Change-Id: I63f542d5d42f950cf9c8117e12ecce4518e2ccf4
Reviewed-on: https://gerrit.instructure.com/30983
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Change-Id: I2585fa63345902845450515dd95a517f02a0d5b6
Reviewed-on: https://gerrit.instructure.com/30641
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>
We don't want these anymore, which is fortunate because they don't seem
to get created in rails3.
Change-Id: Ic6dd1e7a5dbf28cdb1e164ce9e27d7d427938f30
Reviewed-on: https://gerrit.instructure.com/30283
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
test plan (non-draft-state):
- as a teacher
* create each of the following:
- assignment
- discussion
- page (hidden from students)
- page (not hidden from students)
- quiz (leaving it unpublished)
* add each of the above items to a module
* refresh the modules page
- each of the above items should be listed
- as a student
* navigate to the modules page
- the hidden page and quiz should not be listed
- all other items should be listed
* click on the first item in the module
* click through each of the 'Next' buttons
- only items listed in the module should be presented
test plan (draft-state):
- as a teacher
* create each of the following:
- assignment
- discussion
- page
- quiz
* add each of the above items to a module
* refresh the modules page
- each of the above items should be listed
- as a student
* navigate to the modules page
- only published items should be visible
* click on the first item in the module
* click through each of the 'Next' buttons
- only published items should be presented
* publishing items (as a teacher) should make them available to the
student in the module progression as well as the modules page
closes CNVS-10831
Change-Id: Ia84e56f42438ff531a4e15784eefaec2ead8ecdd
Reviewed-on: https://gerrit.instructure.com/30312
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
This commit namespaces the rest of quiz related code into a Quizzes
namespace: controllers, views, models, and classes that previously lived
under lib/ that are Quiz-related.
Test plan:
Full regression test on all quiz related items
refs CNVS-10457
Change-Id: If54b61213945056539e03271a936d233abb66188
Reviewed-on: https://gerrit.instructure.com/29351
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
fixes CNVS-11055
No browsers currently include Accept: application/json on requests for
<script> resources. It would be unreasonable for them to do so,
as even JSON-P uses application/javascript. Therefore, I believe
that application/json will remain a credible signal that a request
is not JSON-hijacking CSRF.
https://developer.mozilla.org/en-US/docs/HTTP/Content_negotiation#Values_for.C2.A0_scripts
test plan:
* make an API request with and without the header
Accept: application/json
* verify that while(1) is prepended to the response
iff the header is not present
* smoke test Canvas pages which use Ajax
Change-Id: Iae830a4870175cae2b627227c85a5f1cc7801f69
Reviewed-on: https://gerrit.instructure.com/29882
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
This was a beta api that didn't work out.
Test plan:
canvas should still work (sorry, this touches lots of stuff)
Change-Id: I31680b83f72f6d739ce74735ba40d7a760debb33
Reviewed-on: https://gerrit.instructure.com/29506
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
fixes CNVS-10679
this commit refactors quiz into a quizzes namespace. it contains various
shims to facilitate the data migration of polymorphic relationships
('Quiz' -> 'Quizzes::Quiz'). JIRA contains several tickets linked to
the above tickets in regards to removing these shims after the data
migration, as well as the strategies on reverting the shims once the
data migration is complete.
Change-Id: I30c566d60a87af6ee83e9d0041fdcb909ead6a89
Reviewed-on: https://gerrit.instructure.com/28573
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
Attempt to fix our sis batch tempfile usage, which wasn't compatible
with the travis environment.
Found more SAML specs to mark as pending when SAML isn't enabled.
Use webmock instead of our own home-grown solution, since Travis
enforces webmock.
Select only the users we're interested in sorting, to remove dependency
on empty db.
refs CNVS-10467
Change-Id: Icf9b093c6cc4a6b7b19da9dd2abab9f39457f817
Reviewed-on: https://gerrit.instructure.com/28949
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@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>
test plan:
- on a new course (with draft state disabled)
* click on 'Pages' in the left nav
- shows edit form for a new 'Front Page'
* enable draft state for the course
* click on 'Pages' in the left nav
- should indicate no pages have been created
- should allow the creation of a new page
- on a course (with draft state enabled)
* navigate to an existing wiki page
* click 'Edit'
* click 'Cancel'
- should be redirected to a view of the same page
* navigate to a non-existent page (manually changing url)
- shows the edit form for the page
* click 'Cancel'
- should be redirected to the pages index
additional test considerations:
- this affects behaviors around the default page named 'Front Page' on
new courses (specifically when draft state is disabled). testing of
related behaviors should be tested (especially the api).
fixes CNVS-10269
Change-Id: I11c7b65b004922e76f680afdece1ddcb65d542e3
Reviewed-on: https://gerrit.instructure.com/28081
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
test plan:
- create a custom role based on TA
- deny "Manage (add/edit/delete) assignments and quizzes" to it
- deny "Manage all other course content" to it
- keep "Edit grades" and "View all grades" allowed
- enroll a user with this custom role
- make sure the user can grade assignments and quizzes
- make sure the UI elements to create, edit, and delete modules,
assignments, and quizzes are not shown to this user
- with draft state disabled
- with draft state enabled;
- from the Assignments/Quizzes/Modules page, and also
- the ability to create an assignment or quiz via module item.
- make sure that attempts to create, edit, and delete
quizzes via the API are denied
fixes CNVS-1481
Change-Id: Ic4056f709d48c40b2804aef52a4a1aafc44b5122
Reviewed-on: https://gerrit.instructure.com/27187
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
To stop the gem printing a warning about the changing default
Change-Id: Ia284e5518078dff45d59f0687311e0b32e237ba6
Reviewed-on: https://gerrit.instructure.com/26956
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Product-Review: Brian Palmer <brianp@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>