fixes PS-969
test plan:
*the posistion should reflect the posistion displayed in the UI
*the visibility should reflect the visibility in the UI
*hidden should be set if the nav tab is hidden
*unused should be set if the nav item has no content
*you should be able to update a tabs position
*you should be able to set a tab to hidden
*you shouldn't be able to modify home, or settings tabs
Change-Id: I96beba411551ea0709ecf0e876c61d90b35b8482
Reviewed-on: https://gerrit.instructure.com/28093
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Adam Phillipps <adam@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Brandon Broschinsky <brandonbr@instructure.com>
refs CNVS-9546
to avoid mucking around with RAILS_CACHE and
ActionController::Base.cache_store=
Change-Id: Ic94416634fdd1c4c0754529a8a2c927c6541c8ab
test-plan: specs
Reviewed-on: https://gerrit.instructure.com/29228
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
refs CNVS-9546
pull the common code into
* Rails.force_cache!,
* Rails.unforce_cache!,
* Rails.force_cache{},
* Rails.disable_cache!, and
* Rails.disable_cache{}
methods. leave the implementation of those methods close to the code
they're replacing for now, but in the near future we'll reimplement
those methods to be cleaner (i.e. not mucking around with version
specific internal constants and such).
test-plan: specs
Change-Id: Ie5f47a64f57dea0034933d8dad84e17633869a49
Reviewed-on: https://gerrit.instructure.com/28086
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
This patch makes it possible to list the "question records" for a QS
which clients can use to tell what questions are answered, flagged,
etc.
closes CNVS-10025
TEST PLAN
---- ----
Fire up some computer, launch a Canvas instance, create a quiz with a
question or two, take it as a student, answer it, then get ready for
API business:
> Index action - Listing all question records
[GET] api/v1/quiz_submissions/:quiz_submission_id/questions
- Perform the request
- Verify you get N entries, one for each question you answered or
marked
- Set an "include" parameter with "quiz_question" (ie,
"?include=user")
- Verify that the returned set now contains 3 entries:
1. "quiz_submission_questions" what you saw earlier
2. "quiz_questions" with Quiz Questions that you answered
3. "meta" that you can safely ignore
> Show action - Fetching a single question record
[GET] /api/v1/quiz_submissions/:quiz_submission_id/questions/:id
- Perform the request
- Verify you get 1 entry
- Try the "include" parameter as you did in the Index case
As a sidenote, the output of these endpoints should be the same as the
stuff you get when you answer a question (see CNVS-9844), they
basically should tell you what answer you provided if you did, and if
you marked the question or not.
Change-Id: If39b84d8fda77870c3990822ade06bd28b276c3d
Reviewed-on: https://gerrit.instructure.com/27598
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Ahmad Amireh <ahmad@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>
we already use it that way, and it makes the spec less fragile
Change-Id: Ia38ee9d735a7d2652565edbb46f1dbb11bfdd879
Reviewed-on: https://gerrit.instructure.com/29184
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
rails 2 doesn't know about respond_to_missing? in ruby 1.9, so
Marshal.dump(User.where("syntax error")) calls respond_to?, which
chains to respond_to_missing?, which Rails 2 delegated to proxy_found,
thinking it was a useful instance method from Array
simply removing the delegated method and letting the default
implementation return false is sufficient
Change-Id: I6fe4b4daf5fa5b4a4489c8aedaa711945bb764ed
Reviewed-on: https://gerrit.instructure.com/28906
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
This patch provides support for answering Quiz Questions via the API.
closes CNVS-9844, CNVS-10225
TEST PLAN
---- ----
Testing this will be a bit rough because there are many variations and
validations to cover. I'll spare the validations that are covered by
specs from the test plan.
Create a quiz with a question of *each* type except "Text" and "File
Upload". There's a script that creates a quiz with its questions
automatically for you if you don't want to keep doing this manually. See
references.
> Answering Questions
Now you need to answer each question via the API. Most of them vary in
formats, but they are fully specified in the API documentation page
(along with examples). See DOCUMENTATION for more info.
> Flagging Questions
Flagging, and unflagging, a question is the same regardless of its type,
see the "EXAMPLE REQUESTS" section.
> Access Validations
Here are some generic, non-question based validations to verify. You
should NOT be able to answer a question if:
- the quiz submission has been turned in
- the quiz submission is overdue
- the Access Code for the quiz is invalid
- the IP filter of the Quiz prohibits you from taking the quiz
- the quiz submission :validation_token is incorrectly specified (ie,
other students shouldn't be able to answer your questions)
- you don't specify the latest :attempt, so if the Quiz has multiple
attempts, and this is your 2nd take, you specify an :attempt of 1,
3, or anything but 2 should fail
- NEW: turn quiz into an OQAAT quiz with the "Can't go back" flag on;
the API should not reject all requests to modify any of the
questions with a 501 error saying that type of quizzes is not
supported yet (support will come in CNVS-10224)
> Grading
Also, when you're done answering the questions, take a look at the
grades and make sure everything gets graded just like it does when using
the UI directly.
> Verifying results in the browser
While taking a quiz in the canvas UI, the scripts perform backups in the
background that would overwrite any changes you do via the API. If you
want to verify the changes you make via the API from the UI, you must
append "?backup=false" to the take quiz page URL, something like this:
http://localhost:3000/courses/1/quizzes/1/take?backup=false
Setting that flag will (for now) disable the backup behaviour and should
make things tick.
EXAMPLE REQUESTS
------- --------
Don't forget to set the 'Content-Type' header to 'application/json'!
> Answering a Multiple-Choice question
[PUT] /api/v1/quiz_submissions/:quiz_submission_id/questions/:id
{
"attempt": 1,
"validation_token": "1babd0...",
"answer": 10
}
> Flagging a question
[PUT] /api/v1/quiz_submissions/:quiz_submission_id/questions/:id/flag
{
"attempt": 1,
"validation_token": "1babd0..."
}
> Unflagging a question
[PUT] /api/v1/quiz_submissions/:quiz_submission_id/questions/:id/unflag
{
"attempt": 1,
"validation_token": "1babd0..."
}
DOCUMENTATION
-------------
Run `bundle exec rake doc:api` and check out the Quiz Submission
Questions page. There's an Appendix that contains example requests for
each question type, as well as the errors produced by each handler.
LINKS
-----
- bootstrap script:
https://gist.github.com/amireh/e7e8f835ffbf1d053e4c
- direct link to the API documentation page:
http://canvas.docs.kodoware.com/quiz_submission_questions.html
Change-Id: I9a958323ece8854bc21a24c2affd8dc3972e46d5
Reviewed-on: https://gerrit.instructure.com/27206
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Change-Id: I4a705425461ac7a0453ac14f7627b410a1f6189b
Reviewed-on: https://gerrit.instructure.com/28773
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
in particular, prevent it from initializing when nil,
and prevent it from overwriting the value with the serialized
value (this causes problems in specs when mocking for attributes
such as Attachment.scribd_doc)
Change-Id: I4c37d9222e51a85da692dc351d515e0f326f435b
Reviewed-on: https://gerrit.instructure.com/28899
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes: CNVS-392
Added logging for course events. This is on a more generic level allowing us
to add all sorts of event types to courses. First adds a general event for
course details. Later we can add other event types such as assignment date
changes.
Test Plan:
Setup:
- Create a course
Security:
- Query API and should return success.
- Remove account level permissions for viewing course changes.
- Query API and should return invalid.
- Add credentials back.
- Query API and should return success.
Course Details:
- Change some details on the course.
- API should return an event containing the data for the changes made to the
course details.
Change-Id: I5ab139868842c2ad9777245d5a81452caf0d0970
Reviewed-on: https://gerrit.instructure.com/27807
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nick Cloward <ncloward@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>
Use encrypted_cookie_store by default, since it's the best option. This
fixes the session timeout specs failing with the default config.
Also remove the documentation on memcache/redis session store, since
those are deprecated.
refs CNVS-10467 (fixes a travis.ci build error)
Change-Id: Iafe633f601565d4306bb2f144d5d846d6fd527d5
Reviewed-on: https://gerrit.instructure.com/28946
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
added include parameter to outcome rollups api so we can
efficiently query the outcome groups and links so we can display
outcome paths in the interface. Added additional endpoints to
outcome groups controller so this information is also available
via separate api call.
fixes CNVS-10396
test plan:
- check documentation for new outcomes groups endpoints:
- outcome groups for course and account.
- outcome links for course and account.
- check the documentation for the new "include[]" parameter of
the outcome results rollups endpoint.
- make the api calls and make sure they behave as advertised.
- mastery gradebook should still function as before.
Change-Id: I2c5611385af5c39dcef0929beff5261b9aadf391
Reviewed-on: https://gerrit.instructure.com/28576
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
passing options to self.transaction (as opposed to
self.class.transaction) does not work in all versions
of rails
Change-Id: I438a1905f8aea44d87424390dd5c12bed950025a
Reviewed-on: https://gerrit.instructure.com/28513
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
API to export a course in .imscc format, or a course's quizzes
in QTI .zip format
test plan:
- consult the API documentation for Content Exports
- begin a course export with the API
- confirm the returned progress_url shows progress
- when the progress API says it's done, use the
show export endpoint (and the id returned when
you created the export) to get the URL of the
download
- download and re-import the .imscc to make sure it
was exported correctly
- repeat the above, but for a QTI quiz export instead
- use the index action to list exports performed
- also do a quick regression test on the content export
functionality in the Course Settings UI
fixes CNVS-10259
Change-Id: I187671cb060ccaca075c94f5c7c20ef0591abb6f
Reviewed-on: https://gerrit.instructure.com/28207
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>
refs CNVS-5856
Test plan:
* create some custom gradebook columns
* drag them into a different order in gradebook2
* after reloading, the order of custom columns should be preserved
Change-Id: Ib3ef172b01baabe8480b12846775fde965880215
Reviewed-on: https://gerrit.instructure.com/28155
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
closes CNVS-5856
Test plan:
* in a course that has n custom gradebook columns, load the gradebook
* the custom columns should be displayed in the frozen section
* you should be able to edit the content for those cells and it
should be remembered
* enable the teacher notes column (in the gradebook dropdown)
* use the teacher notes column
* hide the teacher notes column
Change-Id: Ie7ab048d29047e895f4dac4018bce0d9b3897591
Reviewed-on: https://gerrit.instructure.com/27898
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Change-Id: Ia718f317d2528e0382a3c10f9d2b6de423195479
Reviewed-on: https://gerrit.instructure.com/28219
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
presumably you're not using identical sql, so hash the sql and
include it in the cursor name
Change-Id: Iedc3884571d0962b93dc700b9aec03fd1beb88b0
Reviewed-on: https://gerrit.instructure.com/28177
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
having audited all of the compatibility fixes for
ruby < 2.0 on rails 3, this commit simply corrects
a comment which stated that the fixes were just for
rails 2.3. That is to say, all the CANVAS_RAILS2
guards are correct in config/initializers/
ruby_version_compat.rb
refs CNVS-9520
Change-Id: I62f0a95655a3a2ec114b238cd3215fe4f43871b5
Reviewed-on: https://gerrit.instructure.com/28147
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Anthus Williams <awilliams@instructure.com>
QA-Review: Anthus Williams <awilliams@instructure.com>
also update due_date_cacher sql to not break in rails 3
when the joins are applied in reverse order
Change-Id: I9638f0483cc7c995773b512e0f9bfe1fdc3aa682
Reviewed-on: https://gerrit.instructure.com/28173
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
for rails 3 compatibility
Change-Id: I4e75d6aa9d00c3f001561254ef161d016678ae5f
Reviewed-on: https://gerrit.instructure.com/28238
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
it's not precisely Ruby 2.0 that's missing this method, just a newer
version of RubyGems, so look for the method we're replacing
Change-Id: I9cbd145dfe04e5f21ad1928df756a785645ba954
Reviewed-on: https://gerrit.instructure.com/28122
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Change-Id: I5d8dec5dd857fcfcbc65d2f5e40ecfb4d5105053
Reviewed-on: https://gerrit.instructure.com/28024
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-10034
test plan:
- check the new outcome results api documentation.
- generate some outcome results:
- create assignments with rubrics that have linked outcomes.
- grade those assignments with the rubric.
- call the /api/v1/outcome_results api endpoint.
- make sure the returned student scores contain the maxiumum
score achieved for each outcome.
- students should not be able to access the api.
Change-Id: Icddec2aa9000c01f3b05c1c3c21260f7c15f7f7e
Reviewed-on: https://gerrit.instructure.com/27631
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes CNVS-10147
test plan
- set sis id, section name to longer than 255 chars
- should throw rails error
- should not throw database error
Change-Id: I05ebdf3ae89ace4f737ae6c124f015efceafec1d
Reviewed-on: https://gerrit.instructure.com/27835
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
test plan:
- create a new discussion
- attach a non-ASCII file
- save the discussion
- it shouldn't explode
Change-Id: I9ada9dbf2bf25e63baab22f6117171436d4808c6
Reviewed-on: https://gerrit.instructure.com/27832
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>
Change-Id: Id2205c4c375c569e88857bb3f24a7f11a9d184af
Reviewed-on: https://gerrit.instructure.com/27960
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Change-Id: Ie510ac95f5f15dbda9667fca60ebf32a55b13c61
Reviewed-on: https://gerrit.instructure.com/27900
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Change-Id: I80f27f2259b8d0fa4f17575077871a4f97eb0117
Reviewed-on: https://gerrit.instructure.com/27910
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Change-Id: I95df16e305546da4b1a40cd879769347081034df
Reviewed-on: https://gerrit.instructure.com/27901
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Change-Id: Ibae01f4cd57bffff8d4875f0efdd229564a40a85
Reviewed-on: https://gerrit.instructure.com/27577
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
closes CNVS-9084
test plan
- merge users via api
- should not be able to merge if you cannot manage
both users
Change-Id: Id84995925b20ac109977a4f281c9de45a5db5a09
Reviewed-on: https://gerrit.instructure.com/27712
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
test plan:
- The quiz api should work like it normally does when you don't pass
an 'Accept: application/vnd.api+json' header.
- The quizzes index page and quiz edit page should work like they
always do.
- Testing the Quizzes API for "jsonapi" style:
- For all requests, you MUST have the "Accept" header set to
"application/vnd.api+json"
- Test all the endpoints (PUT, POST, GET, INDEX, DELETE) like you
normally would, except you'll need to format the data according to
the next few steps:
- For "POST" and "PUT" (create and update) requests, you should send
the data like: { "quizzes": [ { id: 1, title: "blah" } ]
- For all requests (except DELETE), you should get back a response
that looks like: { "quizzes": [ { quiz you requested } ]
- For the "delete" action, you should get a "no content" response
and the request should be successful
Change-Id: Ie91deaeb6772cbe52a0fc46a28ab93a4e3036061
Reviewed-on: https://gerrit.instructure.com/25997
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
closes CNVS-6906, CNVS-6475
Test plan:
Use the new custom gradebook column apis to create/edit/delete custom
gradebook columns, and set data for users in a course on those
columns.
only teachers/TAs should have permission to use these apis.
Change-Id: I658b8dc02d6104559c98a6b7e1be5c72e775d664
Reviewed-on: https://gerrit.instructure.com/27615
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
fixes: PS-918
test plan:
you should be able to get a list of the web conferences through the API
Change-Id: I4bdfe35acbf4e6407a1fe5bcac67f4cca30aa6a0
Reviewed-on: https://gerrit.instructure.com/27592
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Adam Phillipps <adam@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
closes CNVS-5797
test plan:
* GET /api/v1/users/self/communication_channels/:id/notification_preferences
should return your preferences
* GET .../notification_preferences/<one of the named notifications returned above>
should return a single preference
* PUT .../notification_preferences/<notification>?notification_preferences[frequency]=never
should update it (will return it, and confirm by getting it again
* PUT .../notification_preferences?notification_preferences[<notification>][frequency]=never&
notification_preferences[<another notification>][frequency]=never
should update two preferences at once
* other allowed frequencies are immediately, daily, and weekly
* repeat replacing the communication channel's id by email/<email address>
* repeat by using an actual user id instead of self. users should
not be able to view or update each other's preferences. admins
should only be able to view, not update (the update routes only exist for "self",
so you'll get a 404 instead of a 401 for them)
* regression test notification preferences UI
Change-Id: I107f68a44cb68ee1675ad50ff7123e26d7765450
Reviewed-on: https://gerrit.instructure.com/26311
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
primarily switching fullpath in place of request_uri
in preparation for rails 3
Change-Id: If14f2cc2da5120a60f04d4cfdfb05a55482a3695
Reviewed-on: https://gerrit.instructure.com/27162
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
test plan:
- have a Canvas instance that uses local file storage (not S3)
- acquire an Android app that can talk to this instance
(the Play Store build will not)
- ensure the app can upload a file (such as a profile picture)
to the Canvas instance
fixes CNVS-10065
Change-Id: I942cc60c5a408a064955e0c2f629d4a02d366a5e
Reviewed-on: https://gerrit.instructure.com/27698
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Allows users to start a "quiz-taking session" via the API by creating
a QuizSubmission and later on completing it.
Note that this patch isn't concerned with actually using the QS to
answer questions. That task will be the concern of a new API controller,
QuizSubmissionQuestions.
closes CNVS-8980
TEST PLAN
---- ----
- Create a quiz
- Keep a tab open on the Moderate Quiz (MQ from now) page
Create the quiz submission (ie, start a quiz-taking session):
- Via the API, as a student:
- POST to /courses/:course_id/quizzes/:quiz_id/submissions
- Verify that you receive a 200 response with the newly created
QuizSubmission in the JSON response.
- Copy the "validation_token" field down, you will need this later
- Go to the MQ tab and verify that it says the student has started a
quiz attempt
Complete the quiz submission (ie, finish a quiz-taking session):
- Via the API, as a student, prepare a request with:
- Method: POST
- URI: /courses/:course_id/quizzes/:quiz_id/submissions/:id/complete
- Parameter "validation_token" to what you copied earlier
- Parameter "attempt" to the current attempt number (starts at 1)
- Now perform the request, and:
- Verify that you receive a 200 response
- Go to the MQ tab and verify that it says the submission has been
completed (ie, Time column reads "finished in X seconds/minutes")
Other stuff to test (failure scenarios):
The first endpoint (one for starting a quiz attempt) should reject your
request in any of the following cases:
- The quiz has been locked
- You are not enrolled in the quiz course
- The Quiz has an Access Code that you either didn't pass, or passed
incorrectly
- The Quiz has an IP filter and you're not in the address range
- You are already taking the quiz (you've created the submission and
did not call /complete yet)
- You are not currently taking the quiz, but you already took it
earlier and the Quiz does not allow for multiple attempts
The second endpoint (one for completing the quiz attempt) should reject
your request in any of the following cases:
- You pass in an invalid "validation_token"
- You already completed that quiz submission (e.g, you called that
endpoint earlier)
Change-Id: Iff8a47859d7477c210de46ea034544d5e2527fb2
Reviewed-on: https://gerrit.instructure.com/27015
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
fixes CNVS-10058
canvas no longer integrates with tinychat; this commit
removes legacy references to it.
test plan:
* run specs
Change-Id: I4887e901d57ff39f8554af3e4eacd52ec4edd6e5
Reviewed-on: https://gerrit.instructure.com/27621
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
Change-Id: Ib2147e2a5c388ba56c1e558b414da9b7ec4c9cd2
Reviewed-on: https://gerrit.instructure.com/27614
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes: CNVS-9757
Change the authentication log api to return relationships (foreign keys) based
on jsonapi with a links element. This also changes the page_view object to
also move the relationship (foreign keys) to the links element in the json.
Requires underscore.js 1.5.2. See g/27313
Test Case:
Authentication Logs:
- Create some authentication logs if you don't have any by logging in and out.
- Test the authentication logs api to make sure its returning in the correct
format and data.
- Open the admin tools
- Search for authentication logs in the logging tab.
- Search by date.
- Ensure the page is not broken.
Page Views:
- Create page view data.
- Test the page view api to make sure its returning in the correct
format and data.
- Test the analytics page views.
- Test the user profile page views.
- Account stats for page views.
- Generating the CSV's/page views for page views.
Make sure the API documentation reflects the changes.
Change-Id: Ic8aa9e5da4df58e2816fb348accac62b17ec20d5
Reviewed-on: https://gerrit.instructure.com/26907
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
fixes CNVS-9622
basically, stop with the assumption that lists must be contiguous,
so that we don't have to keep compacting them all the time. allows
for far simpler queries adding things to lists.
test plan:
* regression test on lists - files, context modules, assignments,
etc.
* basically make sure that adding new items puts them in the same
spot as it did before (bottom of list?), and that reordering
still works
Change-Id: I31c9ad4ed9b7db2b23e032617d4a01611c8e3c03
Reviewed-on: https://gerrit.instructure.com/26709
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
closes CNVS-9946
closes CNVS-10008
refs CNVS-3680
test plan
- get https://<canvas>/api/v1/accounts/<account_id>/sis_imports
- should show a paginated list of past imports for the account
- run rake doc:api
- https://<canvas>/doc/api/sis_imports.html should render
- it should have the SIS import object
Change-Id: I5d81e0049a2a16455e9acbea5be2effc2c2dd633
Reviewed-on: https://gerrit.instructure.com/27539
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
railtie initializers are not run after the initialization
process has begun, so 'folio/rails' needs to be required
beforehand
Change-Id: Idcc4d1493dfaa63356b6f7461b7adc24b5ff6fe9
Reviewed-on: https://gerrit.instructure.com/27575
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Change-Id: Ic907525d7ff1a1d3db927de3453475ff972ff516
Reviewed-on: https://gerrit.instructure.com/27540
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-9457
test plan:
* regression testing of random group assignment
* verify that the assignment is much faster
Change-Id: Icfc72f6041f6367e43561d8b8240e6a2ffde4801
Reviewed-on: https://gerrit.instructure.com/26568
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Change-Id: I6740be8a35ec7a955d1714b4049527e113ce7a21
Reviewed-on: https://gerrit.instructure.com/27020
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Dates are no longer abbreviated for screen reader users in date headings
Fixes CNVS-9623
Test plan:
- Open the calendar agenda view.
- Using a screen reader, confirm that the date headings are read with full day
and month names, and not abbreviated names.
- Confirm that the dates still appear abreviated visually.
Change-Id: Id68b8d3e0486c238db8b78abdce3cabe6eec321a
Reviewed-on: https://gerrit.instructure.com/27309
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
in preparation for rails 3
Change-Id: I8a5a42b69aca0fd9032bf67adf1ae40b7a5b1da5
Reviewed-on: https://gerrit.instructure.com/26977
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
this is the initial work on the screenreader interface for gradebook and
is very much a work in progress
at this point all that's expected to work is the initial fetching of
data and the template binding that updates when choosing a student or
assignment from their respective dropdowns
merging to allow work to continue in parallel
closes CNVS-9478
Change-Id: I38db029a86f52b89e0889c7e9189911e5519348b
Reviewed-on: https://gerrit.instructure.com/26938
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Matthew Irish <mirish@instructure.com>
QA-Review: Matthew Irish <mirish@instructure.com>
Change-Id: I33ec10d6f0a90c74ceb45e7f8aa427439553610c
Reviewed-on: https://gerrit.instructure.com/27028
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
we don't need this default rails behavior anywhere, and it can be used to
harvest usernames on the login page (i.e. a valid vs. invalid usernames
will result in a fieldWithErrors in a different place)
test plan:
1. go to the login page
2. submit a valid username and an invalid password
3. in the js console, $('.fieldWithErrors'), should return []
4. submit an invalid username and any password
5. in the js console, $('.fieldWithErrors'), should return []
Change-Id: Ie434d0e6af70319469625694c060ebd15cf9f67f
Reviewed-on: https://gerrit.instructure.com/27107
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
the old method included Profile but excluded CourseProfile. but in
rails3, Profile.table_name is nil because it's an abstract class;
including it meant trying to truncate table "" in spec_helper.rb, but
excluding it without including CourseProfile meant the "profiles" table
didn't get truncated.
update the model listing to exclude abstract classes (e.g. Profile), but
include direct descendants of abstract classes (e.g. CourseProfile), but
not direct descendants of non-abstract classes (e.g. Announcement).
Change-Id: I4e6a60b302f1c88f4ace0c7d41377e92eeecfaa1
Reviewed-on: https://gerrit.instructure.com/27087
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
moves the load account and session timeout plugin middleware
to set the expire_after before the session store is called,
and changes encrypted_cookie_store to use that option so it can
invalidate expired sessions when it unmarshals the data
for the first time.
The reason it seemed to work locally is because it sets
@options[:expire_after] after the first request.
Unfortunately this second time doesn't often happen
in the actual application when distributed amongst several
instances.
test plan:
* set the "Sessions" plugin settings to timeout after
1 minute using the following console commands;
ps = PluginSetting.
find_or_create_by_name_and_account_id("sessions",
Account.default)
ps.settings = {"session_timeout" => "1"}
ps.disabled = false
ps.save!
* (Note: normally this would be done
by going through the plugin settings ui, however, it enforces
a minimum of 20 minutes, which is difficult to test with)
* start the server and log-in
* shut down the server
* wait for 1 minute for the session to time out
* restart the server and try to click a link
* should be redirected to the log-in page
fixes #CNVS-7870
Change-Id: I843b73da7d3c001f7e632b1454c63f9d6c07f73d
Reviewed-on: https://gerrit.instructure.com/26911
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
this is a partial revert of 89ec8993
i18nema was disabled during some intermediate upgrade work around 3.0, due
to that version of rails needing an older version of the i18n gem
test plan:
1. canvas should fire up
2. you should be able to run i18nema-specific stuff in the console, e.g.
> I18n.backend.direct_lookup('en', 'date', 'formats', 'default')
=> "%Y-%m-%d"
Change-Id: Ib1f7e03c417cc87fd873a7434a4586969470b58b
Reviewed-on: https://gerrit.instructure.com/26975
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>