fixes CNVS-27480
test plan
- run lti report on a sub account
- it should only contain lti tools from sub_account
Change-Id: I4f70326b0da296c30c2fed039be27c900347afb8
Reviewed-on: https://gerrit.instructure.com/72897
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
There have been some inconsistencies in date and time formats. However,
by standardizing our own translation config files on 24 hour time
formats and including the Hebrew Geresh symbol (׳) in our day and month
name abbreviations we have found a configuration that seems to work well
(or at least consistently).
closes CNVS-26264
test plan:
- enable translations locally and set your language to hebrew
- make sure both ruby and javascript translations work
- check a datetime field specifically
Change-Id: I07128071fb89d7129a1fbdc1e0c446866850f3f5
Reviewed-on: https://gerrit.instructure.com/69911
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* import the package referenced in the ticket
* it should not create any module items linked to announcements
closes #CNVS-27609
Change-Id: I86a8c7ec2efbc766e7f82dac46a449faf0989788
Reviewed-on: https://gerrit.instructure.com/73412
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
* for PartitionManager, don't have your own migrations paths, just
use ActiveRecord's
* vendor/plugins is long gone; don't look for migrations there
anymore
Change-Id: Ia4e2c91e59beb2d723cbdc5072b26cddd70638c9
Reviewed-on: https://gerrit.instructure.com/53267
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-26357
refs CNVS-19910
fixes CNVS-27098
fixes CNVS-27099
fixes CNVS-27100
A few of our language codes were somewhat inaccurate, either
lacking an appropriate suffix or using underscores and not
hyphens. This change uses more accurate language codes.
When language codes were passed to the JavaScript layer, one of
the languages, zh_Hant, did not conform to RFC-5646.
When it was consumed later in the JS, its underscore caused
an issue which prevented editing in the Gradebook.
Test plan:
0. Create and publish course. Create and publish an assignment.
1. Add a user named "匿名" to the course.
2. Give the user a grade in the gradebook.
3. In the course settings (`/courses/:id/settings`) set the
course language to zh_hant (2nd from bottom).
4. Navigate to Gradebook and verify that you can still edit
grades.
Revert "rollback aba0de7 and its effects"
This reverts commit 7339952ea4.
Change-Id: I9de7c3a6d5f046c6e06671a44b1f77dc47d62954
Reviewed-on: https://gerrit.instructure.com/72753
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
refs CNVS-26643
test plan
- report should run
- report should have list of courses and storage
used for each course
Change-Id: Ife1244ecfcef3b074cdf25954f7be07f0745e8de
Reviewed-on: https://gerrit.instructure.com/72421
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
test plan:
* import the QTI 1.2 package referenced in the ticket
* the question referenced in the ticket
should not have neutral feedback set, but rather
all the answers should have individual feedback set
closes #CNVS-26762
Change-Id: Ie4ce0231bc502e0255a06c35fdd571311b3d0027
Reviewed-on: https://gerrit.instructure.com/72680
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
This adds the ability to see the breakdown of grades for
essay/file-upload question types. They are broken up as the top 27%,
the bottom 27%, the middle 46%, and any ungraded answers, then displayed
in table format.
Refs CNVS-25737
Closes CNVS-26756
Test Plan:
- Check that essay+file_upload question type tables look good
- Buckets show themselves as "correct" if they contain a student
score >= to the question points possible
- Buckets can contain more students than 27% if the scores are
identical (All 100% scores show up in top bucket/middle bucket
even if 100% are 100% scores)
- New answer tables are accessible like other tables
- Buckets are explicitly ordered as top, middle, bottom, ungraded
Change-Id: I62798938b9176de97df2e498a2f9b3b02a81086c
Reviewed-on: https://gerrit.instructure.com/70907
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Reviewed-by: Davis McClellan <dmcclellan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
test plan:
* make a change to a spec:
-- use fj instead of f with a vanilla css selector like "#someID"
* run the linter
* verify you get an error, telling you to use f instead of fj
* same for ffj
* see test commits
Change-Id: Ifde5c325ee5b0ef62e089762fafd57b3e067c491
Reviewed-on: https://gerrit.instructure.com/72151
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
The `moodle_importer` does not directly use `thor` and has no need
for a specific version dependency. `moodle2cc` already has an
unversioned thor dependency and `railties` itself requires `>= 0.18.1`.
Specifically for me, this hard dependency caused issues with the
current releases of `derailed_benchmarks` and `foreman` which
required `~> 0.19` and `~> 0.19.1` respectively.
0.19.1 is the current release as of 3/2014.
Test Plan:
- run bundle update
- run `moodle2cc help` to verify moodle2cc thor tasks still load
Since Notification and NotificationPolicy can be reloaded,
BroadcastPolicy needs to re-cache the references on reload.
To test:
You can experience a reloading error before applying this patch
by triggering a notification after a reload.
- rails console
- reload!
- Course.last.enroll_student(User.last).accept!
This will cause `ArgumentError: A copy of Notifier has been removed from the module tree but is still active!`
With this patch applied, there should be no error (assuming
that student can be enrolled in that class).
refs #CNVS-26056
Change-Id: I5fd18402b639d87c94ee9bafb52871ab31e52974
Reviewed-on: https://gerrit.instructure.com/71368
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Google drive relevant code has been moved to the gems/google_drive
Actually test google drive with mocked api responses
cleaned up lots of code
Fixes PLAT-1301
Test Plan:
*** You'll need to use 2 separate google accounts to fully test ***
** Its helpful to have multiple chrome profiles so you dont have to log in and
** out a bunch https://support.google.com/chrome/answer/2364824?hl=en
BEFORE SWITCHING TO THIS PATCH SET
- Make sure you have some google doc collaborations
- Directions for creating one are below
- Disable your google docs plugin
Switch to the patch set
Enable google drive. (if not already)
- You should be able to paste in a client_secrets.json
- Update Redirect URI to point to your local instance (The URI should exist in the JSON)
As an admin/teacher
- Goto `profile/settings` and add the google drive user service
- Your email should be displayed with the service
- Goto Collaborations
- Make sure existing collaborations still work
- Click "Start new collaboration"
- give it a nice name (Created by admin)
- select your student
- click start collaborating
- You should be redirected to the new doc in google
- create another collaboration without the student (Created by admin, no users)
- Create an assignment with
Submission Type: Online
Online Entry Options: File Uploads
- Make sure your student has access to the course/assignment
- Goto Account settings -> Users
- Click View User Groups in the top right
- create a new group set with a group in it
- add yourself and your student to the group
- Goto the Group's Collaborations (Courses & Groups -> [group name] -> Collaborations)
- Click "Start new collaboration"
- give it a nice name (Created by admin for group)
- select your student
- click start collaborating
- You should be redirected to the new doc in google
As a student
- Goto `profile/settings` and add the google drive user service
- Your email should be displayed with the service
- Goto the assignment
- Submit the assignment
- You should have a "Google Doc" tab
- Choose a document and submit it
- After it submitted, click download on the right side
just to make sure its correct
- Goto Collaborations
- Make sure existing collaborations still work
- make sure the "created by admin" collaboration works
- make sure you can't see "Created by admin, no users"
- Click "Start new collaboration"
- give it a nice name (created by a student)
- click start collaborating
- You should be redirected to the new doc in google
- Switch to your admin/teacher and make sure they can't access it
- Edit the collaboration add the teacher, click Save
- Switch to your admin/teacher and make sure they can access it
- Goto `profile/settings` and REMOVE the google drive user service
- Go back to collaborations
- You should be forced to add the google service in order to use a collaboration
- Goto the Group's Collaborations (Courses & Groups -> [group name] -> Collaborations)
- Make sure you can access "Created by admin for group"
- Click "Start new collaboration"
- select your admin/teacher
- click start collaborating
- You should be redirected to the new doc in google
- make sure your admin can access it to
As a site admin
- Disable Google Drive
- Then with your student
- Make sure you can still do file upload submissions on the assignment
- Collaborations should no longer show up (unless you have etherpad enabled)
- Google drive should no longer show up in your profile settings as a registered service
Change-Id: I4dfaff6f5262743c044aadd12266fd0bd85a60e1
Reviewed-on: https://gerrit.instructure.com/69078
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
refs #CNVS-26056
Change-Id: I0cb3c3c46ccee9e26972853aa0f08db0f0fffcce
Reviewed-on: https://gerrit.instructure.com/70967
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs #CNVS-26056
Change-Id: I1ad89e2d9922e9994937963b0ad783eccebc5bc5
Reviewed-on: https://gerrit.instructure.com/70759
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs #CNVS-26056
Change-Id: I07bd4c15c2d6eb3840a0a600acece485a01d4f05
Reviewed-on: https://gerrit.instructure.com/70785
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
rely on test_all_gems.sh to output header and trailer,
and use `set -e` in each test.sh to simplify passing
through errors
Change-Id: I3ba724ad2539ddfe31195394c43f646acfc73920
Reviewed-on: https://gerrit.instructure.com/70469
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
order by context type, then id. previously it just ordered by id, and since
we're comparing apples and oranges (well, courses and accounts), there's no
guarantee that one's sequence would be higher/lower than the other (depends
on which specs run beforehand)
Change-Id: I3e91d67c9cbf60d0151f0c8d52627d23ffa173f5
Reviewed-on: https://gerrit.instructure.com/70536
Tested-by: Jenkins
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
refs #CNVS-26056
Change-Id: Ia94ee2fcfded1ec66cb77a19085b005c81304800
Reviewed-on: https://gerrit.instructure.com/70251
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
closes PLAT-701
As an admin I would like to be able to tell what tools are installed
in my Canvas instance. I want to see if there are tools we are using a
lot or if there are tools we do not want our instructors to use.
Ideally, I would see tool information, course information and privacy
level (including if variable substitution is used).
test plan:
* run 'Lti Report' as an admin
and make sure it works
* should run in root and sub accounts
* should be scoped to only run on current root
account and associated sub-accounts
Change-Id: I24fd1cb4c542f70d967ef34cfd46df881d239ae8
Reviewed-on: https://gerrit.instructure.com/69622
Tested-by: Jenkins
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
This reverts commit 2073553507.
This reverts commit 56381d06b4.
rubocop upgraded today, and we tried a couple times to fix it, but since
we only run rubocop when ruby files change, the fixes themselves passed
the build but didn't fully fix the problem. for now, until we can
complete an upgrade, just pin the known working version of rubocop.
Change-Id: Ib7587e5ff9f3c00817f920506208a0e20444d379
Reviewed-on: https://gerrit.instructure.com/70356
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
rubocop wasn't version pinned, so jenkins got a later version,
and the aux build started failing because of a config difference.
this fixes the config and pins the version of rubocop
Change-Id: I5d94b779a8d29dac66ad0e121737816459c62ba3
Reviewed-on: https://gerrit.instructure.com/70337
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
Parser::CurrentRuby hadn't been loaded in some cases, requiring
explicitly makes sure it's always available here.
TEST PLAN:
1) aux build should pass
Change-Id: Ic5d2ef0ebbd8673e9ccec0c6617be49ef451f617
Reviewed-on: https://gerrit.instructure.com/70305
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Rob Orton <rob@instructure.com>
closes CNVS-18870
CNVS-18870 as described in the ticket description is not a bug. see
comments on the ticket for more details. but while investigating and
confirming that, it became obvious that the odd structure and scattered
implementation of the CSRF protection was both making it hard to reason
about and easy to introduce new bugs. after the refactor, we still:
* don't perform CSRF validation on GET requests
* don't perform it on token-authenticated API requests
* do perform it on session-authenticated API requests
* do perform it on non-API requests regardless of authentication method
additionally, we now:
* don't perform CSRF validation on HEAD requests
finally, we _don't_ support a csrf_token in the session anymore. that's
been deprecated forever; we can remove the code now.
test-plan:
- should not perform CSRF validation for:
- GET requests
- token-authenticated POST requests to API endpoints (path prefixed
by /api/) without an authenticity_token parameter or X-CSRF-Token
header
- token-authenticated POST requests to API endpoints even with an
authenticity_token parameter
- token-authenticated POST requests to API endpoints even with an
X-CSRF-Token header
- should perform CSRF validation for:
- POST requests to non-API endpoints
- session-authenticated POST requests to API endpoints
- when CSRF validation should occur, but the user has cookies off:
- POST requests to non-API endpoints should redirect to a "need
cookies" page
- XHR POST requests to non-API endpoints should not redirect
- POST requests to API endpoints should not redirect
Change-Id: I3dbb3a68623bc9d03a3e744a9d4e1f038a32709c
Reviewed-on: https://gerrit.instructure.com/65103
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
test plan:
* use the content migrations api to import
content from a course using a url
* it should work as expected
closes #CNVS-26233:
Change-Id: I66ef4a7d445cfb40209b46386179395de58e59f2
Reviewed-on: https://gerrit.instructure.com/70005
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
As an admin, I would like to be able to easily see who in my Canvas
account has API tokens and for what tools. This will allow me to audit who is
accessing data and manage tools.
columns:
user_name, user_id, token_name, token_expiration, token_creation_date,
token_last_used, developer_key_name, developer_key_id
Fixes PLAT-1261
Test Plan:
Generate the report
make sure it has all of the right columns
Change-Id: Ifb5b950586fd344ede8eb95b9d3c5e6783bbd70d
Reviewed-on: https://gerrit.instructure.com/69734
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
compiled/tinymce is special-cased in config/build.js.erb and friends; since
it's special/separate like the common bundle, we need to test all the
things when it changes
test plan:
1. edit a tinymce file, like public/javascripts/tinymce_plugins/instructure_equation/plugin.js
2. run `rake canvas:compile_assets`
3. run `gems/selinimum/bin/selinimize any list of spec files`
4. the last line of output should be that same list of spec files
Change-Id: I14d52003dd095769967053022bc2433999d23418
Reviewed-on: https://gerrit.instructure.com/69886
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
destroy! is now a method in rails
refs #CNVS-26056
Change-Id: I66e512265ff5cda6a12d7820e3cf69c77ef9e746
Reviewed-on: https://gerrit.instructure.com/69721
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs CNVS-25916
remove selenium tests for handlebars compilation,
and move relevant coverage to unit tests in that
gem. Also removes an unused helper. Translation
wiring is covered in i18n_js_spec in the selenium
suite
Change-Id: Ib63ca0e1cdd73529a5e1a15cd579edc70fca02e0
Reviewed-on: https://gerrit.instructure.com/69772
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
refs #CNVS-26056
Change-Id: I46d64790db53f81a33bd8bec55a32c44088568fa
Reviewed-on: https://gerrit.instructure.com/69569
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs #CNVS-26056
Change-Id: Idee28041d97a6e8a7566ef922f3001906c617864
Reviewed-on: https://gerrit.instructure.com/69500
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs #CNVS-26056
Change-Id: Ied93b069b5124f2e2c9e5587c6d9d2c70d3ae78b
Reviewed-on: https://gerrit.instructure.com/69611
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs CNVS-18507
test plan
- report should work the same as it did before
Change-Id: I40dc56c0383cc2fe102bb0daf2d121efa69cc62a
Reviewed-on: https://gerrit.instructure.com/69531
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
either with Relation#all or Association#scope
refs #CNVS-26056
Change-Id: Ie370a3c47c575007ce3b0ba75a122d854e6f8fbc
Reviewed-on: https://gerrit.instructure.com/69497
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs #CNVS-26056
Change-Id: I4a4d91c8f96a9d86646bdd14ba9ed75e365a9764
Reviewed-on: https://gerrit.instructure.com/69227
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs #CNVS-26056
Change-Id: I6048e9c9e0d3eaf897c4082f7d936fe2b687c66c
Reviewed-on: https://gerrit.instructure.com/69499
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
e.g. use .seconds.ago instead of .ago
refs #CNVS-26056
Change-Id: I5af8541116623a8fc8b49682b0829a065aba59c8
Reviewed-on: https://gerrit.instructure.com/69339
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>