closes CNVS-9680
test plan
- delete a course that has sections
- run provisioning report for sections
- sections from course should not show up
Change-Id: I2a33db9a5ae5e4333f7c8b94908a3cd1e1138663
Reviewed-on: https://gerrit.instructure.com/26692
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>
The errors.add_to_base(...) method was removed in rails3, so this replaces
all instances of that with errors.add(:base, ...) which also works in
rails2 and is forward compatible with rails3, semantically as well as
syntactically.
test plan: specs cover some of these error responses, generally you'll
want to make sure that validation errors still get displayed correctly.
for instance when accessing /plugins/etherpad and saving the settings
without filling in all the fields, should display an appropriate error
Change-Id: Icab1592470bf5bd86912655d5b847cfe413bd003
Reviewed-on: https://gerrit.instructure.com/26180
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
test plan: zip functionality should continue to work, including:
* course exports and imports
* zip file uploads
* zip submissions
also, the selenium dependency on rubyzip 1.0.0 is resolved
and we're making progress toward > 4GB exports
Change-Id: I58c5b0644b1e7fbb289821c9c0901f00750988de
Reviewed-on: https://gerrit.instructure.com/25474
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
also remove unused spec helpers
test plan
* specs should pass
Change-Id: If95b4da8b6d0f4237d92e489d8c6f0f731560f46
Reviewed-on: https://gerrit.instructure.com/26198
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes CNVS-4418
test plan
* run sis export report with multiple files
* should return zip file
* run other reports
* they should still work
Change-Id: Ibfa598c12b730a54aee1c5af9fdb6c08d7e0cb36
Reviewed-on: https://gerrit.instructure.com/26197
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Adam Phillipps <adam@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
test plan:
* import the course referenced in the ticket
* the question previous imported as short answer
should now be imported as a fill-in-multiple-
blanks question
fixes #CNVS-9355
Change-Id: Ia8f175249513bc4443a8ba339f867f3905f1d17d
Reviewed-on: https://gerrit.instructure.com/26447
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>
this helper takes an options hash and can return a
report object instead of the parsed file
this will also read from the zip file instead of
reading from the hash generated by the report
test plan
- specs should pass
Change-Id: I200aa9d29ba95d6468dca8b192e9d7c415584517
Reviewed-on: https://gerrit.instructure.com/26192
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
refs CNVS-4704
test-plan:
- 2.3 rails still boots and works
Change-Id: I107637f3abf107ad652aec959567dd5d738229c0
Reviewed-on: https://gerrit.instructure.com/26335
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
this reverts commit c8a4c453ff.
while the gem *appears* recent, it hasn't merged upstream changes from
http://github.com/rails/rails_xss since before we vendored it, so we
can't make the switch after all.
instead, I've just silenced the rails3 warning and left a TODO marker.
Change-Id: I8957e676c38ef7cdeac0e6266f2cac3288b1ec7d
Reviewed-on: https://gerrit.instructure.com/26374
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
Now a user can specify a url to the content to import instead
of having to upload the file directly to canvas.
Test Plan:
* Using the content migration api, create a CC migration with
a settings['file_url'] instead of doing an attachment
* the file url must be publicly accessible from the canvas instance
* it should happily import
* Also do a zip file import
closes PLAT-206
Change-Id: Ide387b8e66625e5eb5c546054900a4a0fc50eb0c
Reviewed-on: https://gerrit.instructure.com/26287
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
fixes CNVS-9204
refs CNVS-8921
test plan
- import a state standard
- have an outcome result for the state standard (graded item tied to outcome)
- run learning_outcome_results report
- run student_competency_report
- reports should have result
Change-Id: I8c39f235022b8f4d0a642a9364b7082e313d9c4e
Reviewed-on: https://gerrit.instructure.com/25849
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
The problem affects an instance using local storage and Google Docs
Preview. When previewing a file that was previously deleted, an error
message saying "unable to find the document at the original source" will
be displayed in Google Docs Preview. This is because the preview URL is
no longer valid. In fact, it redirects to the login page.
Test Plan:
* Disable Scribd but enable Google Docs Preview
* Upload a brand new file to a course
* Preview the file
* Delete it, and re-upload the same file
* Confirm that the file can still be previewed
refs CNVS-8282
test plan
- have scribd enabled
- upload a scribdable document to a course
- document should be rendered with scribd
- previously created documents should still render
Change-Id: Id8d7ea962c7bbe16b0f124e23447c66a48dd4100
Reviewed-on: https://gerrit.instructure.com/25566
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
refs CNVS-86
orphan detection works good enough, and some jobs legitimately run that long
Change-Id: I0be6f4182c5f303b0c0b07888db98d2d0f5fd740
Reviewed-on: https://gerrit.instructure.com/25479
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>
rather than CANVAS_RAILS3 or Rails.version
this is to be consistent, and to reinforce that any "special" branches
are for rails 2.3 backwards compatibility while trying to target rails
3, rather than rails 3 "forwards compatibility".
Change-Id: I4494b65e3f71108a43d09032c1569c478646a828
Reviewed-on: https://gerrit.instructure.com/24998
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
now that we have SIGHUP, we were changing everything to it anyway,
so just let caching in-proc be the default
Change-Id: Id1b44722522ac9693b17695da7107c99a359d5ac
Reviewed-on: https://gerrit.instructure.com/25020
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
removes need for run_transaction_commit_callbacks all over the place
Change-Id: Id878276ed86bb37f625ef34412b16d1f75a63bca
Reviewed-on: https://gerrit.instructure.com/24758
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>
test plan:
* import the package referenced in the ticket
* check the quiz titled "Test 7"
* check the question titled
"3.3 find p-value two-tailed mu with website"
* confirm that the question has answers
fixes #CNVS-5672
Change-Id: I8e2597475ead30a10e57b9a9edac18c0e10d6fe6
Reviewed-on: https://gerrit.instructure.com/24677
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
* publishing through respondus should work for question banks
and for quizzes when settings are applied
fixes #CNVS-8276 #CNVS-4297
Change-Id: I3b254c6375aa5524f6ecf78c31e64d34a13ba4a7
Reviewed-on: https://gerrit.instructure.com/24566
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
refs CNVS-8056
we don't want to actually delete objects from s3 (at least not due to
the Attachment being destroyed). With our root attachment deduplication
scheme it just gets too messy and buggy. We'll just GC them later.
test-plan:
- be using s3
- upload a file, call this a1
- upload the same file again, call this a2. a2 should have a1 as its
root attachment
- in script/console, call a2.destroy!. a2 should be removed completely
from the database
- a1 should still work (its s3object should not be gone)
Change-Id: Ie1f488e28b44c983a0d8528d61ce8ae99b8c6736
Reviewed-on: https://gerrit.instructure.com/24280
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
We're in the Delayed::Backend module here, and there's also a
Delayed::Backend::ActiveRecord class, so this call was ambiguous if
ActiveRecord wasn't already fully loaded.
Change-Id: I7071e2b1af454b2837e52204ef8282fb312002e1
Reviewed-on: https://gerrit.instructure.com/24424
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
We'd like to re-use some of this code elsewhere, and there's nothing
canvas-specific about it.
refs CNVS-7008
test plan: redis delayed job specs still pass
Change-Id: Iaa19ee60419d01bb451cccf2861a1015a7ba087a
Reviewed-on: https://gerrit.instructure.com/24255
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
closes CNVS-8167
test plan
- report should only report on a 2 weeks time range
- if time range is over two weeks it will use the end date and 2 weeks before it for the start date
- report should not time out
Change-Id: I2750d53f358a41b351e36e718bfbbb04e61aa198
Reviewed-on: https://gerrit.instructure.com/24382
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
in a sharded environment, this helps to clear out idle connections
this is similar to what
ActiveRecord::ConnectionAdapters::ConnectionManagement middleware
does after each web request
test plan:
* run some jobs
* they should not fail
Change-Id: I431205ff1e9197940bddf4028d3c4c7662a74056
Reviewed-on: https://gerrit.instructure.com/24285
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
This would've helped some debugging I was doing today.
test plan: run delayed jobs, see that the "Processing <job tag> {job details}"
log line now includes the strand along with the other info
Change-Id: I569429d2f320486f161adbcab2985f93f9a68a99
Reviewed-on: https://gerrit.instructure.com/24169
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
fixes CNVS-7775
test plan
- run an account report
- report should work
Change-Id: I96bcadd05b704247fb9b0b79ad30f8f36896d592
Reviewed-on: https://gerrit.instructure.com/23787
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
fixes CNVS-7383
test plan
- take a quiz
- it should not error
- the token should change on each request
- visit a page in canvas and open browser console(chrome, right click, inspect element) console is on the right side
- run ENV.AUTHENTICITY_TOKEN
- reload the page
- run ENV.AUTHENTICITY_TOKEN
- the tokens should not match
Change-Id: I405e749b37c7195af55b784d6b4f10346a15f377
Reviewed-on: https://gerrit.instructure.com/23506
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
There are a few old LearningOutcomeResults that have a nil artifact, and
many that have a Submission as an artifact. We want to get rid of these
because they come from bad data, and step 1 toward that goal is to stop
creating them and hide them in the UI.
The LORs with a nil artifact are very old and I believe came from a very
early incarnation of outcomes. The LORs with a Submission as an artifact
came from a combination of two code problems. The first was old code
that allowed an assignment that was aligned with an outcome but did not
have a rubric to create LORs directly based on it's submission. The
second was a bug that prevented the assignment <-> outcome link from
being destroyed when a rubric with an outcome was removed from an
assignment.
fixes CNVS-7495
fixes CNVS-7498
test plan:
- try different combinations of adding a rubric with an outcome to an
assignment.
- when you grade the assignment, the grade create a learning outcome result
(which can be seen on the outcome show page, or in the account outcome
report) if the rubric+outcome are currently attached to the assignment.
- so for example, add a rubric with an outcome, check, remove just the outcome
row, check, add a new outcome row, check, remove the whole rubric, check.
- be sure to check both the show page and the outcome report
TODO:
- datafix migration
Change-Id: I37700e3e5c08fc6cfb8fcf1cac42ea6693fcaba3
Reviewed-on: https://gerrit.instructure.com/23303
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* import the package referenced in the ticket
* importing should not fail
* however, it should give migration warnings explaining that
the "Multiple dropdown" questions may be incorrect,
including direct links to the questions
fixes #CNVS-7048
Change-Id: Iff001c0181086986be0b4ead38970df7abd9878a
Reviewed-on: https://gerrit.instructure.com/23165
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Unfortuanately the current ruby redis gem doesn't support pipelining
with a redis cluster, even if all the commands are acting on the same
key. Since we're working on turning the data redis into a cluster, these
have got to go.
test plan: specs should cover all this. could also do a quick regression
test on failed logouts (shouldn't error, should still limit failed login
attempts)
Change-Id: Ifa950268416e9086b72610914d7efc8a816d628b
Reviewed-on: https://gerrit.instructure.com/23457
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>
This commit gives teachers the ability to regrade quizzes by using
different options per quiz question:
* Current Correct Only
* Full Credit (regardless of answer choice)
* Previous and Current Correct
* No Point change (for updating the display of a question)
Test Plan:
You'll want to run through each question regrade option making sure
scores change appropriately.
"I seldom end up where I wanted to go, but almost always end up where I
need to be." - Douglas Adams
Change-Id: I9dbb88154cd3ac630bf59dbf3e997a87f75649dc
Reviewed-on: https://gerrit.instructure.com/22018
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
sometimes a Pathname object instead of a string gets added to $LOAD_PATH.
just .to_s it so that regex will work
Change-Id: If3279881edc302b27941bb2ac91a61c0bbf5759b
Reviewed-on: https://gerrit.instructure.com/23422
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>
This way the job deserialization code will properly handle the error and
delete the job. The ArgumentError was causing the worker to blow up and
leave the job in the queue, causing a neverending cycle of worker
failure.
fixes CNVS-7578
test plan: specs
Change-Id: If79fa107c0d7942416971d90cfbc1a01feb0d54a
Reviewed-on: https://gerrit.instructure.com/23390
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>
test plan
- create a file in a course
- course should not show up in unused courses report
- delete the file
- course should show up in unused courses report
Change-Id: I0075fa039493192746d1201fa5e872a8b19861b4
Reviewed-on: https://gerrit.instructure.com/23273
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
the db might go away, so fork and then we don't care about errors
Change-Id: I29e8487a1c1b7f5e6b4e0b74b306625dbcbfab56
Reviewed-on: https://gerrit.instructure.com/23312
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>
closes CNVS-7299
test plan
- create an account level outcome
- create a quiz bank and tie to outcome
- create a quiz
- as a student take the quiz
- the result should be in the outcome report
Change-Id: Ie5c9ad25266e32a204cb6f44cebbc8d46a39a032
Reviewed-on: https://gerrit.instructure.com/23243
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
test plan:
* editing a page (through the UI or API)
- saving changes to a page should only create revisions when body or title are changed
* editing a page as a different user
- saving non-content changes as a different user should not create a new revision
fixes CNVS-7247
Change-Id: Icbcafc8ce70f82908b3b517a9eb5ce09bd0bae09
Reviewed-on: https://gerrit.instructure.com/23178
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
test plan
- make a course in a sub_account
- use a report that has a course filter on a root_account
- report should work
Change-Id: I17e4f62d2049ab2f73b6baee37b0f85e578e6c7d
Reviewed-on: https://gerrit.instructure.com/23057
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
test plan
- run Student Competency report
- progress should work(this may take thousands of outcomes to see progress in api)
- report should not fail
- run recently deleted courses report
- run unpublished courses report
- reports should not fail
Change-Id: I0020af16a73c0aec5d017ab048b926e3e7e93279
Reviewed-on: https://gerrit.instructure.com/22936
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
closes PS-516
test plan:
1. run grade export report
2. verify extra status column is included in report
3. the status column is the users workflow state
Change-Id: I17b5d8562a92ae94b0d211da6b9d7315fc94d303
Reviewed-on: https://gerrit.instructure.com/22833
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
adds a column to the new migration UI that has a link to
either the uploaded file or to the source course.
also sorted the content type box and put course copy and
canvas packages first.
Test Plan:
* run a file upload migration and a course copy one
(or just go to a page with existing ones)
* There should be a link to the uploaded file and the source course
* The type column should also make more sense, for example,
it'll say 'Course Copy' instead of 'Copy Canvas Course'
* The content type box should be in the order of: course copy,
canvas cartridge, .zip file, then alphabetical
closes CNVS-7178
Change-Id: I639e00db0188ce5119daac792119abd1da546908
Reviewed-on: https://gerrit.instructure.com/22742
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
closes PS-442
test plan
- create an empty course shell
- courses should show on report
- add something to the courses
- courses should not show on the report
Change-Id: If2f47cbb343eee64ad9b485b635f7bf7e8d6f42a
Reviewed-on: https://gerrit.instructure.com/21691
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
refs CNVS-6869
When a version is loaded from the database, the on_load callback
gives the model an opportunity to process or modify the data if
necessary. For example, if current information on the model should
override a cached attribute, this would be the place to do it.
Test Plan:
- in the console, create a submission, e.g.
>> s = Submission.create :assignment => a1, :user => u1
- add an on_load callback, e.g.
>> submission.simply_versioned_options[:on_load] =
lambda{ |model, version| model.grade = 'A' }
- now, no matter what grade you set (and save) in a versioned copy of
the submission, you should get 'A' back
Change-Id: I9dde0118e2833c72e6209f3d632d9503db1e1eb3
Reviewed-on: https://gerrit.instructure.com/22472
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
also change enrollment_term to enrollment_term_id
and course to course_id for api parameters but make
it backwards compatible
closes PS-440
closes PS-441
refs CNVS-6265
test plan
- run zero activity report
report should return users that have not participated
since the given date in the course
- run las user access report
report should return all users in an account and
the last time they accessed canvas
- verify that parameters[enrollment_term] works in
addition to parameters[enrollment_term_id] when
using the api to post new reports
- verify that parameters[course] works in
addition to parameters[course_id] when
using the api to post new reports
Change-Id: I6d65bdf21c270f9c227ebeb1b044397fc1d5807d
Reviewed-on: https://gerrit.instructure.com/22539
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brandon Broschinsky <brandonbr@instructure.com>
QA-Review: Tyler Belnap <tyler@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
* automatically does with_exclusive_scope
* if the scope has an order or group by, use an alternate
implementation so it's not broken
* alternate methods are cursors (postresql only) or temporary
tables. if a transaction is already open, or we're on a slave,
prefer a cursor (even over the normal method, since the query
might be slow even without an order or group by)
test plan:
* migrations should still work (especially data fixups)
* lots of account reports use find_each; make sure they still run
Change-Id: If876b7b3401e6cda1d41f1c94b93af4810b78cf4
Reviewed-on: https://gerrit.instructure.com/22364
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
refs CNVS-6970
This allows passing two params for the :n_strand parameter, and looking
up the Setting based on just the first param. For example
["course_copy", root_account.global_id] will create an n_strand per root
account, but allow the "course_copy_n_strands" to control the # of
strands for every root account. You can also override for a specific
account with a "course_copy/<global_id>_n_strands" setting.
test plan: specs
Change-Id: Ie72468588fa1172ea967e1f0a072c9d565bae62f
Reviewed-on: https://gerrit.instructure.com/22461
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
closes PS-439
test plan
- report should return students that have no submissions in date range
Change-Id: I412791e9631f54cb2050ae2ac180872a2f170a2e
Reviewed-on: https://gerrit.instructure.com/21688
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
test plan:
* run jobs (script/delayed_job run), verify that jobs are still
processed without error.
* create a long-running job (you can just Kernel.send_later(:sleep,
300)), then while the job is running, kill -9 the delayed_job
processes. When you next start jobs, the sleep job should get
unlocked and re-queued to run again.
Change-Id: Ic3efba2537b29dabd2adad63699ac768512dbbe6
Reviewed-on: https://gerrit.instructure.com/22302
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
fixes CNVS-4439 FRD
test plan:
* in a sub account, run the sis export report, selecting the courses
option
* it should work
Change-Id: I1fe42aa4ceeb59742376dfdbeeb7481152cf7286
Reviewed-on: https://gerrit.instructure.com/21598
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
closes PS-488
test plan:
1. run academic benchmark import with state guid
2. once that is imported verify all standards are imported
Change-Id: I82455878ea947e33a0c8b5974582106b0633c86e
Reviewed-on: https://gerrit.instructure.com/22183
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
test plan:
* import the package referenced in the ticket
* in the quiz titled 'Exam II', last question,
the 5th answer field should have an expected answer
refs #CNVS-5757
Change-Id: Ie412626d53a52f464f4d488a2b991898d455e349
Reviewed-on: https://gerrit.instructure.com/22088
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: August Thornton <august@instructure.com>
removed old migration UI.
Test Plan:
* rejoice
* zip file uploads in files UI for courses, groups, and users should work
* the links /courses/:id/imports and /courses/:id/imports/list should redirect to new UI
* the course copy api should work
* doing a course copy in the UI should work
* rejoice
closes CNVS-6499
Change-Id: Icd71c5f7bf8a97570f6572938b01504589a6a718
Reviewed-on: https://gerrit.instructure.com/21943
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
fixes two separate issues
CNVS-4048 - test plan:
* import the moodle package referenced in the ticket
* should include discussion topics
CNVS-6081 - test plan:
* import the moodle package referenced in the ticket
* the first questions in the question bank 'Test 2'
should include images
fixes #CNVS-6081 #CNVS-4048
Change-Id: I386cdc3c7380580758a8924c75801d3fb721d3bd
Reviewed-on: https://gerrit.instructure.com/21798
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
* disable i18nema until we're on rails 3.2
* fix how we access session_options
* fix how we access the basic auth header
* fix attachment_fu callbacks
test plan: none of these fixes should affect rails 2
Change-Id: I7f9b6f18c04d51284ec3e5e9fdd39fb93539c91b
Reviewed-on: https://gerrit.instructure.com/21728
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>
test plan:
* test the sanitizer through the api by
creating or updating an object with html content
(such as a wiki page body attribute)
* the following html:
<p><style>should ignore this text</style></p>
* should be sanitized to:
<p></p>
fixes #CNVS-5828
Change-Id: I735f031eafdeeb8d7ae05fd977327fb3cc7e9251
Reviewed-on: https://gerrit.instructure.com/21689
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:
* create a quiz that includes a link to other content
in the course, such as an assignment or a wiki page
* copy the course
* the links should be copied correctly
fixes #CNVS-2303
Change-Id: Ie5eb41c9193bad4d3786d2cd312b31a3be6c4ddf
Reviewed-on: https://gerrit.instructure.com/21600
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>
refs CNVS-5805
first, don't do a count if we're just going to load the whole association anyway
second, don't use empty? on an association - that does a count. instead you
should use exists?, but the next branch does another query anyway that
would tell us the same information, and still only query one row
test plan:
* basic regression testing around versioned models (assignments, overrides,
wiki pages, etc.)
Change-Id: I9d29eacbaa67dbc267ee09400d62651ef6ccdc0a
Reviewed-on: https://gerrit.instructure.com/20901
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
this prevents the job from accessing data that hasn't committed yet,
as well as many instances of it waiting for the first transaction to
release a lock cause the two transactions are referencing the same
data
test plan:
* general smoke test in a production environment (since lots of
things run sync in non-production environments)
Change-Id: I7b132b6119f60e38ae1ba4d17dea18ac49114960
Reviewed-on: https://gerrit.instructure.com/21168
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
closes CNVS-5923
test plan
- student competency report should run and include sections name, id, sis_id
- specs should pass
Change-Id: I4543dbc80bada79ab54b206ed4f39cf8d6ff2588
Reviewed-on: https://gerrit.instructure.com/20745
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes CNVS-5660
test plan:
- setup the BBB conferences plugin.
- create a new BBB conference, and click the checkbox to record
the conference.
- start the conference, do some stuff, logout, and then wait a
few minutes.
- start script/console and find the conference you just
created: `wc = WebConference.find(1234)`
- in the console, type `pp wc.recordings; nil`
- you should see a recording_id, a duration_minutes, and a
playback_url.
- copy-and-paste the playback_url into your browser. you
should go to the BBB playback page and be able to view the
recorded conference.
Change-Id: I326ac25ef0280350a85a37215a5659fc6a827151
Reviewed-on: https://gerrit.instructure.com/20783
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
QA-Review: Jon Willesen <jonw@instructure.com>
if we're dealing with the actual assignment/quiz instead of the model
from one of its versions, we don't need to align the history of the
overrides with the history of the assignment/quiz. we can just use the
most recent version of each override.
refs CNVS-5805
test plan: existing specs cover that this optimization doesn't break
reading overrides of older versions
Change-Id: I52d55da0619688744d63d6523e1bc055ecdaa667
Reviewed-on: https://gerrit.instructure.com/20813
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
fix all the places we incorrectly translate during rails initialization
rather than at runtime
test plan:
1. canvas should work
2. those strings should now get translated
Change-Id: I1c0e3b9513103cfddfd4ad94dde4b3a0dd49203e
Reviewed-on: https://gerrit.instructure.com/20468
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
spec plan
-specs should pass
Change-Id: Ia85b8976b07619cacbf3865dea197454ac15c0a3
Reviewed-on: https://gerrit.instructure.com/20691
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
This adds the ability for you to process migrations quickly. Includes a
paginated list for migrations and issues.
Test Plan:
* Make sure old migrations UIs work the same
* Make sure new UI works wonderfully
* go to /courses/:id/content_migrations to see the new UI
fixes: CNVS-4732
Change-Id: I7cabc51348c32ed03d581e495756eefbf1060ad3
Reviewed-on: https://gerrit.instructure.com/20349
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
allows api users to find available migrators since different
canvas installs can have different oens available.
Test Plan:
* Hit the api/v1/courses/:id/content_migrations/migrators
endpoint and verify it works
refs #CNVS-4228
Change-Id: I3a2585cea8286b09c9e1039fd722d05a2e82d558
Reviewed-on: https://gerrit.instructure.com/20318
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>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Course copying and importing .zip files will now work the
same as other content migrations.
Test Plan:
* Using the ContentMigration api test course copy and zip imports
* Make sure the current course copy and zip import UIs still work
* for course copy make sure selective options work
closes CNVS-4228
Change-Id: I80a849471dffaf44d683e980cf0b73505b353d83
Reviewed-on: https://gerrit.instructure.com/19740
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>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
allows creating content migration through the api
Test Plan:
* Create a content migration through the api along with a file upload
* You should be able to follow along with the progress and
the migration should be complete when the progress is done
* Try to update the migration type, you should get an error
* Upload a wrong file type the first time, then go through
the file upload process again on the update endpoint.
refs CNVS-4228
Change-Id: Iab1082ca68b61d1b0493c191b48169a164444d06
Reviewed-on: https://gerrit.instructure.com/19108
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>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
also removes a race condition for report file downloads
fixes CNVS-5768
fixes CNVS-5769
fixes CNVS-5784
test plan
- in a course use the student view student
- in the account for that course run the users, and enrollments provisioning report
- neither report should include the student view student
Change-Id: I03544c7a38d91bd7d356c4ae73ea8857f948da7e
Reviewed-on: https://gerrit.instructure.com/20517
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes CNVS-5505
This utilizes our after_transaction_commit callback mechanism to delay
uploading the file until the database trasaction is committed, so that
we aren't holding the transaction open for the entire upload to S3. At
best this causes <IDLE> transactions, and at worst it keeps other rows
locked for the duration of the upload.
It also introduces a new callback on AttachmentFu models,
after_save_and_attachment_processing, which is called like a normal
after_save when the attachment is uploaded immediately, and after the
attachment is uploaded (so after the transaction) when the upload is
delayed.
test plan: most attachment upload paths are covered by selenium tests.
for manual testing, we'll want to check each location in the application
where files can be uploaded for regressions. this includes anywhere that
a zip file is uploaded or generated and downloaded.
Change-Id: I033bd19d63a6becc421143c929dfe7c19c7f4e51
Reviewed-on: https://gerrit.instructure.com/20210
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
- update the Gemfile to be 1.9 only, and raise an exception on wrong
ruby version
- remove RUBY_VERSION checks, replacing with the applicable code
- remove the FasterCSV compatibility shim, just use CSV now
test plan: trying to bundle install on ruby 1.8 or 2.0 should raise an
exception, specs should pass, canvas should work as normal on 1.9
Change-Id: I49088e9d227c59c6d5d5acb417c2df971129474a
Reviewed-on: https://gerrit.instructure.com/19806
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
test plan:
* Enable the file_upload_question type for
the root account in the console:
> a = LoadAccount.default_domain_root_account
> a.settings[:file_upload_quiz_questions] = true
> a.save!
* Create a course with a question of type
"File Upload Question"
* Copy the course
* Confirm that the course copies successfully
and that the new question is the same type
closes #CNVS-1158
Change-Id: I99d872ee8557a83647fb2fa1425050c20a4ba518
Reviewed-on: https://gerrit.instructure.com/20013
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
SimplyVersioned plugin needs callbacks for the addition of the
submission_versions index table. Whenever a submission version is
saved, we will want to add an entry to the submission_versions table
in addition to the versions table. This patch provides hooks for
those callbacks.
Test Plan:
- Versioned anything should still work
Refs CNVS-2802
Change-Id: I02a862c5894a98ece8a586330f264680751ab52f
Reviewed-on: https://gerrit.instructure.com/19520
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
fixes CNVS-4957
test plan:
- import content containing <font> tags
(such as the course attached to CNVS-4957)
- these should survive the import process
note: the text in the course above won't actually appear in
hebrew unless you have the bwhebb.ttf font installed
but you can inspect the element and see that the <font> tags
are still there
Change-Id: Ifd219097b6a92813892669cb908d2e7c2d9dd4ca
Reviewed-on: https://gerrit.instructure.com/19712
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>
There are some migration systems that aren't for course
content but they still show up in the course content
migration drop-down. So with this you can flag a system
to not show up for users
Test Plan:
* On the "Import Content from Another System" page there
shouldn't be a blank option.
closes CNVS-5327
Change-Id: Icb6e7b6e84b80613bc231488cc9f6b16b6ebfe24
Reviewed-on: https://gerrit.instructure.com/19608
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
This will help immensely when debugging slow or misbehaving queries.
Thanks to 37signals: https://github.com/37signals/marginalia
closes CNVS-5108
test plan:
cp config/marginalia.yml.example config/marginalia.yml
then edit config/marginalia.yml to uncomment the production block and
change "production" to "development".
run Canvas, and see in your log file how SQL statements have some extra,
useful information in a comment at the end. Run delayed jobs, and you'll
also see useful info on SQL statements in the log -- including job tag,
and context_id in this case will be job id.
Change-Id: I7988a9afaf674bd00c3edc6adafccaf51e7ff60f
Reviewed-on: https://gerrit.instructure.com/16008
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
adds migration warnings when links and other references point
to missing or unknown internal content
test plan:
* upload a content migration with missing relative links
(an example is attached in the ticket)
* import all the content
* view previous migrations for the course
(at "/courses/:id/imports/list")
* confirm that warning messages are shown
* the ui in in progress, but the warnings should
have links associated with them that point to the
content with missing links. to see them, use the
migration issues API
closes #CNVS-134
Change-Id: I1d0a9217fe0c1678968410be8b2eba5b990b8305
Reviewed-on: https://gerrit.instructure.com/19367
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
fixes CNVS-4927
test plan:
- import a blackboard .zip containing a quiz with a matching question
where the answers are out of order and there are additional
right-side options (distractions) present
(such as "test test" attached to CNVS-4927)
- the questions should be imported correctly
Change-Id: I77ef0019c2d430ee28cdbc79006a2a7971baafc6
Reviewed-on: https://gerrit.instructure.com/19093
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Apparently the fact that a shared example group added its before/after
filters to the outer context was a bug, and it's been fixed in rspec 2.
So we can't use a shared example group to setup or mark pending sharding
specs anymore.
test plan: specs
Change-Id: I92b022e2e7125214e6bad38bf0a23da547fca984
Reviewed-on: https://gerrit.instructure.com/19182
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
basically, s3 needs path_prefix, and refactor authenticated_s3_url for
local storage so that dynamic attachment fu backend switching works
for thumbnail as well
Change-Id: I321560f4d01099000997cd5af379b87aaea75d86
Reviewed-on: https://gerrit.instructure.com/18604
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
This can successfully load rails console and rails server. There are
many, many problems still. The idea is this won't change anything under
rails 2.3, it's all backwards compatible.
closes CNVS-4711
test plan: `touch RAILS3` in your Canvas Rails.root directory. The run
`bundle update` and verify that you get rails 3 installed. Run `bundle
exec rails c` to load console or `bundle exec rails s` to start a
webrick server. You can login, though the dashboard currently breaks.
Also jammit isn't working yet.
But more importantly, Rails 2.3 should still work same as ever. All
tests should pass, and a basic regression sanity check would be good too.
Change-Id: Idd6f35de88adde84cd2db3a650f44b71bd6e9684
Reviewed-on: https://gerrit.instructure.com/18453
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
code fix, no test plan
Change-Id: Iff01e6523fb7d77a84d8e9829c5efbb2a5306a51
Reviewed-on: https://gerrit.instructure.com/18622
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
this will allow migrations to have flexible todo items
and allow us to make a super awesome UI for helping
teachers fix any migration problems
Test Plan:
* Run a migration that has issues. :)
* exercise the issue api
closes CNVS-4230
Change-Id: I4577f811dd3b16aa200d381f039632b7cc2cd184
Reviewed-on: https://gerrit.instructure.com/18639
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
test plan:
* have multiple rails procesess
* upload lots of image files in parallel
* it should not fail because a temp file doesn't exist
Change-Id: Ib15c28c3d18af6fd6764f8413ce17e0c7fe193ff
Reviewed-on: https://gerrit.instructure.com/18603
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-4510
test plan:
- set students to get due date and course content notifications immediately
- make sure they are active and they're email address is confirmed
- find an old published quiz with overrides (at least a few hours old)
- change the due dates, check 'notify of updates', and hit save
- the student should get a notification that contains the due date that applies
to them.
Change-Id: I3a43bb2d6673625a4181f1ae5880f354652b93fa
Reviewed-on: https://gerrit.instructure.com/18457
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
test plan:
* make a wiki page with a title that includes a unicode
character, such as an accented "a" or "e"
* save the page
* accented characters should be replaced by plain-ascii
equivalents in the url (e.g., "é" -> "e")
* but not in the title, of course!
* also test weird stuff like fraction characters ('¼')
and interrobangs ('‽') to make sure question marks
and slashes don't end up in the url
* it can also transliterate katakana and stuff, but I
don't know how smart the rules are for that
fixes #CNVS-4540
Change-Id: I6a6076af1bed138599592430adc69c3b92d65d89
Reviewed-on: https://gerrit.instructure.com/18507
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
also fix minor bug where enrollments could return
a deleted pseudonym
-test plan
run a report with no parameters
report should still run
Change-Id: I08da8b19fffd130764685c6688fd422602458ca0
Reviewed-on: https://gerrit.instructure.com/18433
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
This was written 2 years ago and never used, I've verified the DB tables
are empty.
Change-Id: I405e009be2eb657c4ebfb63da21dbcfee92efc0d
Reviewed-on: https://gerrit.instructure.com/18564
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
closes CNVS-4248
this gains us EU region support, and no longer using a forked aws-s3 gem
in the process, setting bucket_name via a plugin is no longer supported
test plan:
* should be able to upload new files via various methods
* should be able to download old and new files still
Change-Id: If32fa5f381f5a4ac493948fa32230175a695f51e
Reviewed-on: https://gerrit.instructure.com/18282
QA-Review: Clare Hetherington <clare@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
removes the need to fork/exec (and reboot rails) for specs;
also simplifies forcing a specific backend for specs
note that path_prefix in file_store.yml is now respected for
S3 as well (so that parallel spec runs that use the same bucket
don't conflict with each other), with the caveat that 'tmp/files'
is special cased to be backwards compatible for S3, and change
to 'attachments'
test plan:
* specs pass (especially selenium specs involving files)
Change-Id: I9673d454291062c958c2989788d36339ce60dfc4
Reviewed-on: https://gerrit.instructure.com/18292
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
also adds scope helpers and other report helpers
added extra text to reports to give more detail
about the last run report
test plan
- grade export report should still run
- student competency report should still run
- sis and provisioning reports should still run
- extra text should show on in the ui for
grade export, student competency, sis export
and provisioning report
Change-Id: I9c635790ea46482e0941a134282c8182f9ea8677
Reviewed-on: https://gerrit.instructure.com/18377
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Tyler Belnap <tyler@instructure.com>
Before we were just running a regex against the raw file text, but the
XML isn't necessarily UTF-8 encoded so that could blow up. This now runs
it through an actual XML parser, which takes encodings into account.
fixes CNVS-4422
test plan: i've verified that there are specs testing this method. you
should be able to still import QTI packages into quizzes and question
banks, including through the respondus tool. the packages attached to
CNVS-4340 should import correctly in spite of their non-UTF8-ness.
Change-Id: Ibac9c4fbe4b2bc7625d16e636b90db23c7e4e704
Reviewed-on: https://gerrit.instructure.com/18314
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
fixes PS-120
test plan
*reports should all still generate
Change-Id: I0a0dc8fdf298a6bd803bb52a4562a548ef727c6b
Reviewed-on: https://gerrit.instructure.com/17242
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tyler Belnap <tyler@instructure.com>
identify "Reminder" category notifications as deprecated
fixes CNVS-3918, CNVS-3824
Explicitly run through 'rake db:load_notifications'
Testing Notes:
===========
* Run 'rake db:load_notifications'
* verify that it runs without error
* verify the 3 "Reminder" category entries
have their category changed to "DEPRECATED - Reminder"
Those are the following entries:
* Assignment Publishing Reminder
* Assignment Grading Reminder
* Assignment Due Date Reminder
* If desired, define a new notification type in
/app/messages/notification_types.yml
and verify that after rake task is run,
the new entry appears.
* Test setup of new database
Change-Id: Ib5dc69c7adc7a643f08ada94d9048274d8cd4e12
Reviewed-on: https://gerrit.instructure.com/17948
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes CNVS-4083
test plan
- run report
- only students should be included
Change-Id: Ibf6feae1e2a0aee5f969b6322400fe598d539eae
Reviewed-on: https://gerrit.instructure.com/17957
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Tyler Belnap <tyler@instructure.com>
Includes the safe_yaml gem, which replaces YAML.load and friends with a "safe"
version by default, that does not create arbitrary objects.
DelayedJobs was modified to use unsafe_load, as it relies on deserializing
ruby objects.
The biggest impact is with serialized columns - many of those store
non-simple data types. Most commonly HashWithIndifferentAccess, but
there are a few others as well. Our version of the safe_yaml gem allows
for whitelisting certain classes.
The I18nExtraction::SafeYAML class was also removed, as it's no longer
needed. The extraction task was updated to call YAML.safe_load to be
explicit.
Currently, Gemfile is pointing to the Instructure fork of the safe_yaml
gem on github. This needs to be released as a gem.
Closes CNVS-3784
test plan: If any serialized YAML columns contain a class that we missed
in our whitelist, then that column will fail to deserialize and the
model will behave incorrectly. It's difficult to say what exactly should
be tested, as all the classes should be whitelisted. A general
regression test on migrations, course copy, scribd, and quizzes would
cover most of it.
Change-Id: I3e1a95e101ada3a1b2366ff1ca70db6d17742cce
Reviewed-on: https://gerrit.instructure.com/17404
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
test plan:
- import a blackboard quiz containing formula questions
(a suitable one is attached to CNVS-3468)
- take the quiz and ensure it is graded properly
- using Settings / Copy This Course, copy the imported Canvas
course to a new Canvas course
- take the quiz in the new course and ensure it is graded
properly
fixes #CNVS-3468
Change-Id: Iedfbc4e9a2440a5f88208a10150195050ddfd3c6
Reviewed-on: https://gerrit.instructure.com/17416
Reviewed-by: Mark Severson <markse@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
fixes CNVS-3937
test plan
-sections report should still work if it has been
x_listed
Change-Id: I6440442c09be666d69e20a901cd440a23af3b684
Reviewed-on: https://gerrit.instructure.com/17806
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
test plan:
* start/restart canvas server
* navigate to an assignment
(not just the assignments list)
* note the "Assignments" breadcrumb
* change language (or to a user with a different language)
* navigate to the same assignment
* verify that the "Assignments" breadcrumb changed languages
closes #CNVS-1449
Change-Id: I7539c56ad6fe1307f251689840883391e67d5bed
Reviewed-on: https://gerrit.instructure.com/17732
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
older versions of blackboard let you put crazy
characters like spaces and apostrophes in blank
IDs. these break imports, so replace them with
dashes.
test plan:
- import a blackboard course containing fill-in-
multiple-blank questions with variable names/
blank ids containing spaces or apostrophes
- edit the quiz, and notice the variable names
should use '-' in place of these
- but the answer text should not be affected
(e.g., they might have a blank named
"[what's this]", expecting the text
"what's this"; with this fix, the variable is
now named "[what-s-this]", but the accepted
text is still "what's this"
- take the quiz, and make sure it's graded
properly
fixes #CNVS-3430
Change-Id: I01abcf290b9233bba7897d9a23f3e3af5cd5896c
Reviewed-on: https://gerrit.instructure.com/17275
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
two problems:
1. blanks identified with a number (e.g., "I'm just a poor [1]
from a poor [2]") were not recognized
2. multiple blanks accepting the same text were not recognized
(only the last blank accepted the answer)
fixes #CNVS-3339
test plan:
- import the course in #CNVS-3339
- edit the first quiz "2005 Do Yo Remember-E"
- make sure the "Show possible answers" dropdown box shows
a possible answer for every blank
Change-Id: Ib2030eb0217be540efe0c87eb3baf13a08953eb2
Reviewed-on: https://gerrit.instructure.com/17218
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
closes CNVS-3417
test plan:
* after the migrations are run, ensure that every section has at
least one entry in CourseAccountAssociations in the database
* smoke test SIS imports
Change-Id: I261cad633788efbf4b0c64db34436ef695856fee
Reviewed-on: https://gerrit.instructure.com/17256
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
refs CNVS-3607
test plan
- report should still work
Change-Id: Ic0ff43b551aeb6937da7d3fab8576017ba3e4a7b
Reviewed-on: https://gerrit.instructure.com/17451
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tyler Belnap <tyler@instructure.com>
If the parent pool process uses redis, then the child after forking will
end up sharing the connection, so a reconnect is necessary.
Change-Id: I29f3fd3adafca504cf0805548bca9ba6b30d5318
Reviewed-on: https://gerrit.instructure.com/17456
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
closes PS-60
test plan
* provisioning report should now include deleted items
* sis report should now include deleted items
* grade export report should now include deleted users
* outcome report should now include deleted users
* these reports should work at the sub account level
Change-Id: Ifa8bb3edd2dbe1fcda9645091fd55bfd13781405
Reviewed-on: https://gerrit.instructure.com/16939
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Tyler Belnap <tyler@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Some iFramed pages can force the browser to forward to a new
page. If you had one of those on a wiki page you couldn't
get to the page to edit it because it forwarded too quickly.
Now you can add ?edit=1 on the wiki page url and it won't
render the wiki's content when the page loads, allowing you
to edit it.
This also white-listed the 'sandbox' attribute for iframe
nodes. Sandbox isn't supported by all browsers, but adding
it to the iframe would prevent it from forwarding if you
don't want it to.
Test Plan
* embed an iframe in a page that tries to forward the page
* add ?edit=1 to the wiki page and notice that it doesn't forward you
* add the 'sandbox' attribute to the iframe and save the wiki page
* the sandbox attribute should not have been scrubbed when saving
closes #CNVS-1288
Change-Id: I5f257e88c81db93ff19d09798ad46a77abfd69bd
Reviewed-on: https://gerrit.instructure.com/17250
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
refs PS-29
test plan
* pass this helper a date
* the date should be formatted to pass into a query
Change-Id: Ib1183d268973f0830e4eeb5c2bf7ea714d4fa49a
Reviewed-on: https://gerrit.instructure.com/17192
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Brad Humphrey <brad@instructure.com>
test plan:
* import the quiz in CNVS-1352
* edit the quiz
* make sure the answers are correctly matched (referring to the
answer key in that ticket)
fixes #CNVS-1352
Change-Id: Ia95d4dcf90ca86b25baa8001f112961a928df857
Reviewed-on: https://gerrit.instructure.com/16957
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
fixes #CNVS-2732
current implementation of set_broadcast_policy shares
notifications across parent and child classes; this method
provides a way for child classes to choose not to share
their notifications with the parent.
test plan:
* create a user and set her notification policies for
announcements and discussions to ASAP;
* create a new discussion;
* verify that the user receives a single message about
the new discussion;
* repeat the same process with an announcement.
Change-Id: Iaafa97f550f804d8bac4fb95552a6a4eeb2626dd
Reviewed-on: https://gerrit.instructure.com/16935
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
This can be useful for code hooks
test plan: no behavior change. jobs should still run as before.
Change-Id: I5016a8111ab2382811adb273148f2c72e9f50b24
Reviewed-on: https://gerrit.instructure.com/16884
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
It's possible for an exception to have a nil message, in which case this
job worker process would die trying to do nil + "\n".
Change-Id: I7d6b4cb58fb47711e77ffc877b17f9248c401238
Reviewed-on: https://gerrit.instructure.com/16830
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ethan Vizitei <ethan@12spokes.com>
QA-Review: Brian Palmer <brianp@instructure.com>
test plan
* reports should not change
* future reports with date strings should work
Change-Id: Ie4843fd39faf2ce8a1b2e68f80a447313fa83d6b
Reviewed-on: https://gerrit.instructure.com/16758
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
allow plugins to add additional policies without having to worry about
stomping on existing ones
test plan:
1. run specs
2. install a plugin that defines additional notifications in a model
3. ensure that all notifications for the model work
Change-Id: Ia6f382f085f5b599209fde5ac3224f08eaa52631
Reviewed-on: https://gerrit.instructure.com/16567
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
test plan
* run report where there are over 1000 results
* report should run and generate without error
Change-Id: I61e32f31f9719a577b3ffc0497da815ecf6f0f27
Reviewed-on: https://gerrit.instructure.com/16507
Reviewed-by: Duane Johnson <duane@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
test plan
spec should be able to enroll users in valid term
Change-Id: I0be35a673b0534abfdcc50c1d2a2b14d96726542
Reviewed-on: https://gerrit.instructure.com/16260
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
durations may be specified with a single digit unit prefix
e.g. M# (minutes), H# (hours), D# (days)
if no unit is specified, seconds is assumed
fixes #CNVS-1283
test plan:
* perform a Blackboard Vista/CE/WebCT course migration
- the course should include an assessment with a time limit
* verify that the imported quiz has the correct time limit
Change-Id: I02c9144540eadf5a43c623a4ffeb78e22c3786e5
Reviewed-on: https://gerrit.instructure.com/15944
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
upgrades moodle2cc gem version to fix problem with missing
question references
test plan:
* try to import the moodle .zip file in ticket
* confirm that it imports successfully
fixes #CNVS-1960
Change-Id: I0496cee6efa2dc6091282dfdbcd57db725d2d476
Reviewed-on: https://gerrit.instructure.com/15918
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
closes #CNVS-1078
test plan:
- create custom roles in an account
- sis import:
- put the custom role name in the 'role' column in a SIS
enrollment import, and ensure the role_name is assigned
in the Enrollment
- ensure only valid roles can be assigned this way
(must be defined in the course's account or parent
account, and must not be inactive)
- sis export:
- ensure custom role names are exported in the 'role' column
of the SIS enrollment export and provisioning reports
Change-Id: Ib8b4c129d451023fa51c73747baadd42cb305338
Reviewed-on: https://gerrit.instructure.com/15868
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
cropped versions of the description are used in some titles for outcomes, and
that cropping needed to be made utf-8 aware.
fixes #CNVS-1206
test plan:
- in ruby 1.8.7
- import a state like utah from academic benchmark
- it should import without errors
- specifically, an outcome group which has a description with a utf-8 character
which crosses the 50-51 byte boundry in the string should import without an
error.
Change-Id: I80fd2a38c8baec50aed2ff28deb76f2485b54241
Reviewed-on: https://gerrit.instructure.com/15830
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
because in some quizzes, every question has the same ident,
and d2l assesments refer to questions by label anyway.
fixes #CNVS-1346
test plan:
- import the course attached to the ticket
- the 'Correlation Quiz' should have unique questions, not
45 copies of the same question
Change-Id: Ife122f691c083600428b893ba2e52042f5fc0ae6
Reviewed-on: https://gerrit.instructure.com/15827
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
relies on "improves speed of student competency report"
If a user with the ability to make API calls on several domains
(such as a site admin) tries to access the student competency report
via an API call, but does so on a domain that is not the default
domain for the account, then the "improves speed of student
competency report" patch will fail.
test plan:
* Test that the student competency report will work for API calls
not on the default account domain.
e.g. curl -H 'Authorization: Bearer <token>' \
https://canvas.instructure.com/api/v1/accounts/<account_id>/reports/student_assignment_outcome_map_csv
(this attempts to access this report on the "canvas" domain)
refs #11138
Change-Id: Ie7773b0cc403c0d1e372e44095faa87c07156c85
Reviewed-on: https://gerrit.instructure.com/15692
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
refactor the student_assignment_outcome_map report in GradeReports
to directly query the database via a SQL query. this should significantly
speed up the entire report.
test plan:
* given the same large set of data (e.g. beta vs production),
the Student Competency report should be much faster.
* some students may be missing from the new report, if
they have no pseudonym associated with the account.
The new way (removing students without pseudonyms)
is the Right Way.
* Also note that we added an sis_user_id column to the
new version of the report. This is to aid schools who
need to line up the report with their internal records
(Thanks Rob Orton)
fixes#11138
Change-Id: I3db33971a8d81565e718d886a0e2a428dba2272e
Reviewed-on: https://gerrit.instructure.com/15472
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
closes#8943
now that all access tokens have the crypted_token field filled in, we
can drop the unencrypted column.
test plan: both before and after running the migration, you should be
able to use existing access tokens to make api calls, and create new
access tokens.
Change-Id: I83cfb2342ad2302bb7b43aabc528341d1d265920
Reviewed-on: https://gerrit.instructure.com/15601
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
refs #11982
test plan:
- no visible changes
- specs should still work (tables should still be truncated)
Change-Id: I426bd81cbfd1147f156600bd09e94066710cd876
Reviewed-on: https://gerrit.instructure.com/15627
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
The change to load these details on demand didn't know how to properly
handle failed jobs.
test plan: go to /jobs as a site admin, filter by failed jobs, select
one, you should be able to view the handler and last error details.
Change-Id: Ibb7cdd768726a4952d29d3185f8e4524eae3f064
Reviewed-on: https://gerrit.instructure.com/15595
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Use multiple api calls to get all the necessary data
instead of one call. this reduces the risk of the 3rd
party timing out when pulling the data.
Test Plan:
* Run an import in the console like AcademicBenchmark.queue_migration_for_guid(authority_guid, permissionful_user)
* The outcomes for that authority should be imported
Change-Id: I37be9f96e13415b8f6573dd6e03282d2d6ad7bd7
Reviewed-on: https://gerrit.instructure.com/15562
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
clean up the AB outcome importer to make it easier to
change how canvas uses their api.
Test Plan:
* No functionality changed. AB imports should run as before.
Change-Id: I52298700838888ebf514ba5a1bcf673efa0ae1dd
Reviewed-on: https://gerrit.instructure.com/15561
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
fixes a problem where quiz questions imported from a qti
file would always be added to the "Imported Questions"
bank, rather than a quiz specific bank.
test plan:
* import the qti quiz file from redmine
* go to quizzes -> question banks
* confirm that the questions were added to a question bank
with the same title as the imported quiz
closes#11689
Change-Id: Id97ceef6f3db6c835ec8897ed94e6516e5b5b7c1
Reviewed-on: https://gerrit.instructure.com/15266
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
The following changes have been made:
- Assignment Created
- students see the due date that applies to them
- admins see "Multiple Dates"
- Assignment Due Date Changed
- students see the due date that applies to them;
they receive no notification if their date doesn't change
- admins receive a separate notification for each due
date that changes, that they have access to;
the message indicates which section or group applies
(section-limited TAs will not get messages about due dates
in sections they can't see)
- Assignment Submitted Late
- the message text does not change, but the student's overridden
due date is checked
- Group Assignment Submitted Late
- same as previous
There were some bugs fixed along the way:
- no longer send duplicate Assignment Submitted and
Assignment Resubmitted notifications when an assignment
is resubmitted
- Group Assignment Submitted Late actually goes out
(there was a typo in the whenever clause)
Test plan:
- Create a course with two sections and a teacher
- Enroll a student in each section
- Enroll a section-limited TA in each section
- Make sure everybody involved is signed up for "Due Date"
notifications, ASAP
- Using the API, Create an assignment with a default due date
(in the past) and an overridden due date for section 2
(in the future). the assignment and override must be
created in the same request (use the "Create an assignment"
API and supply assignment[assignment_overrides]; it may
be easier to use a JSON request body)
- Verify that everybody got an "Assignment Created"
message (use /users/X/messages)
- the teacher should see "Multiple Dates",
as should the TA in section 2 (because the default date
is still visible to him)
- the student and the TA in section 1 should see
the default due date
- the student in section 2 should see the overridden
due date
- "Due Date Changed" messages will not go out for assignments
that were created less than 3 hours ago (by design, and not
new with this changeset), so for the remaining items, you
either need to wait 3 hours, or falsify created_at for the
assignment you just made...
- Change the default due date for the assignment, leaving it
in the past
- Everybody except the student in section 2 should get a
notification with the new date
- Change the overridden due date for section 2, leaving it
in the future
- everybody except the teacher and TA in section 1 should get
a notification about the new date
- the teacher and section-2 TA's notifications should indicate
that they apply to section 2 (the student's should not)
- submit the assignment as each student
- the teacher should get one notification about each submission:
the one about the student in section 1 should say it's late;
the one about the student in section 2 should not
- submit again
- the teacher should get one notification about each submission:
the one about the student in section 1 should say it's late;
the one about the student in section 2 should not, and should
be identified as a resubmission
(there is no late-re-submission notification)
Change-Id: I26e57807ea0c83b69e2b532ec8822f6570ba1701
Reviewed-on: https://gerrit.instructure.com/14662
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
test plan
* run report through ui or
run report with api passing empty string for term
* report should work
Change-Id: Ib3a325209bc003c91e86d402f154232c8d62de5b
Reviewed-on: https://gerrit.instructure.com/15258
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
to fix problems with connection sharing across fork boundaries
test plan:
* set worker_max_job_count: 2 in config/delayed_jobs.yml
* queue up a ton of jobs
* start a delayed jobs pool
* it should not die off
Change-Id: I248743a401a8f434270b64da43f1da85d67cd8f1
Reviewed-on: https://gerrit.instructure.com/15312
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
the recent outcomes refactor included temporary shims to let old code in
plugins work. this code used to be in a plugin, but is now that on
master, so we can fix it to move off the shims. once this and like
commits in other plugins have been submitted, the shims included with
the refactor can be removed.
test-plan:
- specs pass
Change-Id: I8e5d903af8de01d12166b2f6ce861aec28720203
Reviewed-on: https://gerrit.instructure.com/15106
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
test plan:
* import the QTI zip file (from the redmine)
* edit the imported quiz
* check whether the matches contain <span> tags
fixes#10452
Change-Id: Ib40a6b09b540e0293f2ed11b58e8df0063acd3a4
Reviewed-on: https://gerrit.instructure.com/15078
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
because it comes from the database, it's marked as tainted, but when
it's deserialized, it taints actual classes that are used. This is
bad for specs, cause when you stub or unstub something, new methods
are defined, and the tainting spreads to them, and the original
method is called via a call(), which if tainted, raises a security
exception regardless of $SAFE level.
this isn't a *huge* deal, cause canvas runs at $SAFE=0, so we're
not relying on tainting anyway.
Change-Id: Ic7ed5642de7ebfba7d4930bb6bca428e24f621ff
Reviewed-on: https://gerrit.instructure.com/15065
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
test plan
* provisioning report should have canvas parent account id
* all dates should be displayed in the account's time zone
Change-Id: I895b928e0cd217606b20d114b9f14681130167f7
Reviewed-on: https://gerrit.instructure.com/14917
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
note that by default all reports are enabled now
test plan:
* disable a few reports in plugin settings
* wait 5 minutes
* they should be gone in the account settings | reports tab
Change-Id: Ib7fb9cbe8d72ec22830fb1d08ba1cfb1c1f909b3
Reviewed-on: https://gerrit.instructure.com/14793
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Remove a stray scope argument, since # of args is more strict in 1.9
lambdas.
Switch to respond_to since methods returns strings in 1.8 and symbols in
1.9
Change-Id: I59b12009682fa22b6d42ae722cbf98d50ee96ef2
Reviewed-on: https://gerrit.instructure.com/14957
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ethan Vizitei <ethan@12spokes.com>
A fix had to be made to soap4r-middleware, and it also now uses the
soap4r-ruby1.9 gem instead of the old soap4r gem. Despite the name, this
new gem also works in ruby 1.8.7.
test plan: the existing specs cover the api endpoint well. manual
testing will require installing the respondus 4.0 desktop client and
making calls to upload quizzes to your test canvas instance.
Change-Id: I14b3c61753f67a00da755cec9cb9603bc41922b3
Reviewed-on: https://gerrit.instructure.com/14876
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
These requests take a while to load sometimes
Test Plan:
* Importing should work for all states
refs #11541
Change-Id: Ied27d543b4009d3e9a0f018854b1902ae8afb84c
Reviewed-on: https://gerrit.instructure.com/14846
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Test Plan:
* Running an AB import should work
closes#11541
Change-Id: I1725b1b71435e0d9deb53a8fc7cac376c79040c7
Reviewed-on: https://gerrit.instructure.com/14840
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
test plan:
* start jobs
* kill -9 a long-running job while it is in progress
* it should immediately unlock, and retry if it has more attempts
(check future jobs if it doesn't retry immediately),
or go to fail if it is out of attempts
Change-Id: I3fb3961235c80de23d0bd33e2b63cb743009342a
Reviewed-on: https://gerrit.instructure.com/14622
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
won't work if workers are explicitly named. if you have
multiple nodes with the same hostname, you should explicitly
disable this, otherwise they'll unlock jobs that are running
on the other node
test plan:
* don't have a name: key in delayed_jobs.yml
* start two long running delayed jobs
* stop (nicely) the pool
* kill -9 one of the remaining jobs
* start the pool again
* the job that was killed should restart
* add disable_automatic_orphan_unlocking: true to
delayed_jobs.yml
* repeat killing a job and starting a pool
* this time, the job shouldn't auto-restart
Change-Id: Iffeca73950745ab90580a4e22058af653af9ec53
Reviewed-on: https://gerrit.instructure.com/14454
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
simple keep-both resolutions for app/models/submission.rb and
config/routes.rb. spec/integration/learning_outcome_group_spec.rb stays
removed.
fixed path->url in outcome group api pagination to match master's new
rules.
Conflicts:
app/models/submission.rb
config/routes.rb
spec/integration/learning_outcome_group_spec.rb
Change-Id: I8dd31e1d3764970a8f683aef362f0cca06abe90e
refs #8943
This is phase 1. Once this is rolled out and the migrations have
finished, we can implement phase 2, which is dropping the token field so
that plaintext tokens are no longer stored in the database.
There should no longer be any code that reads the token attribute, it's
kept in the database purely to help with the transition.
test plan: before the postdeploy migration runs, access tokens should
still work. after it runs, access tokens should still work.
newly-created access tokens should work as expected. expired access
tokens should still error. For now, the plain-text token field should
still be populated for new tokens.
Change-Id: Icb1b4fdc8e2627ba6540d96d23eb28d874020acb
Reviewed-on: https://gerrit.instructure.com/14491
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
use process groups to be able to differentiate between running and
draining, and to easily stop workers without draining.
* added --with-prejudice to stop (or restart) without draining first
* added --with-extreme-prejudice to kill -9 running jobs
* don't remove the pid file when stopping, so that you can call stop
again with one of the above
* improve status to detect the difference between stopped and
draining
* don't start a daemon if one is already running
test plan;
* ensuring you have some long running jobs that would need to be
drained, use ps to verify that all of the following work correctly:
* start with no pool running
* start with a pool running (doesn't allow it)
* start with a pool draining (allows it)
* stop (allows jobs to drain)
* stop --with-prejudice (doesn't allow jobs to drain)
* status (differentiates between stopped, running, and draining)
* stop --with-extreme-prejudice (doesn't allow jobs to drain, and
even kills jobs stuck in IO)
* restart (drains currently running jobs, but starts the new pool
immediately)
* restart --with-prejudice (stops currently running jobs
immediately, and starts a new pool immediately)
Change-Id: If7aa05f6a81c1cbd27df95777097834095fb406b
Reviewed-on: https://gerrit.instructure.com/14441
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
fixes#10880
when joining a self-signup group, permissions were being incorrectly cached
causing a 'membership pending' page to be shown.
test plan:
- as a teacher, create a set of course groups, and allow self-signup
- as a student, join one of these groups
- it should not say 'membership pending'
- it should say 'you joined the group'
Change-Id: Ic11cdeead8db23293e64faa0dc3c803310e426cc
Reviewed-on: https://gerrit.instructure.com/13959
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
fixes#10889
Also some new functionality in Delayed::Batch -- you can now give it a
priority, and it'll create all jobs in one batch at that priority rather than a
separate batch for each priority seen. Also, if the batch only contains
one job, it'll just enqueue that job.
test plan: No user-visible changes. The following actions
where changed and should be checked for breakage:
- changing a grade in gradebook1/speedgrader
- changing a grade in gradebook2
- starting a quiz
- submitting a quiz
- sending a conversation message
Change-Id: I2f68eec7de1b1c4fc1ec417b8e89d69ec1c0e8ae
Reviewed-on: https://gerrit.instructure.com/13930
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
This will cut down on lock contention if many jobs workers are trying to
pop at once.
Change-Id: I1cce8ef5cceb35de2b5f2e274d59b199fc68018f
Reviewed-on: https://gerrit.instructure.com/13953
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
This supports all the features of our current delayed jobs backend,
including priorities, queues, jobs scheduled for the future, strands,
periodic jobs, etc.
Atomicity is guaranteed by using the new Lua scripting features of Redis
2.6, so this requires 2.6 (which is still only a release candidate as of this
time).
It's not yet production ready (see the TODO at the top of the
redis/job.rb file), so trying to start canvas in prod with redis jobs
configured will raise an error as a safeguard.
The tests have been modified to all pass with redis configured as the
jobs backend. Some selenium specs were removed because the jobs UI lost
some functionality that I didn't think was important enough to port to
redis (listing the most popular tags for future and failed jobs, for
example).
Change-Id: Ie57b15bae1d4ba7b2b2344c872411165551d1ac8
Reviewed-on: https://gerrit.instructure.com/12120
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
This adds a migration tool that can import standards from
academic benchmarks, either by giving it a file, or by
using their API.
Test Plan:
* Run a migration for a specific authority
* It should import into the global group happily
refs #9866
Change-Id: If654681d60848e1233475f737dc2fadecacdbd98
Reviewed-on: https://gerrit.instructure.com/13421
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
test plan
* create a course
* conclude the course
* the course should be in the provisioning report with
status 'concluded'
Change-Id: I111fd9f05fd8c7f460e2241ec3338bec5cbe3ea9
Reviewed-on: https://gerrit.instructure.com/13664
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
we have as many as three aria navigation regions on any
given page; this commit labels them as "main," "breadcrumbs,"
and "context" to make navigation easier.
this commit also gives the "complementary" region a label of
"sidebar."
test plan:
* using voiceover or another screen reader, open the list of
landmarks (ctrl-option-u in voiceover) and verify that
the navigation landmarks are properly labeled.
Change-Id: Id175ca2e2dda540cb096e43dc5ad5242b85e97e1
Reviewed-on: https://gerrit.instructure.com/13450
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
test plan
* run report
* report should not have password column in users.csv
Change-Id: Id3da2580dcddead6412c3b4a577e559791c10b03
Reviewed-on: https://gerrit.instructure.com/13489
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
closes#10201
test plan
* run report
* report should contain all active accounts, users, course ...
Change-Id: I591300670fb5fea0ca01b74c5fe90f0610997d24
Reviewed-on: https://gerrit.instructure.com/13260
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
there are some situations where the permissions can change without the
user or course being touched (e.g., course start date or end date
passes), so for now we need this to be a shorter cache.
Change-Id: Ie267e8251913d584ca858b25ed2d54655e5a200c
Reviewed-on: https://gerrit.instructure.com/13311
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>