closes CNVS-7159
test plan:
- go to the new assignment index page as a student
- it should show the assignment list
- it should not show any of the add/edit/delete controls
- it should not show unpublished assignments
note: this only enables support for the page arranged by assignment group for
students. we will add support for arranging the assignments by due date (and
make that the default) soon.
Change-Id: I2ebe8d65289152ff37d13b0a7e9b9ebbf5aae371
Reviewed-on: https://gerrit.instructure.com/22681
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
- make sure the list/show module item api actions
now include the module_id in the module_item
- consult the Update Module Item API documentation to see how
to move a module item by specifying module_item[module_id]
- move an item to another module in this way
- set the module_item[module_id] and module_item[position]
to move and place an item in the same API call
- move an item with a completion requirement and verify that
the requirement still exists in the new module
(note: "must view" requirements will need to be
completed again in the new module)
- confirm that the API does not let you move an item to
a module in a different course
fixes CNVS-7068
Change-Id: I926e7bd242af7fe1743ad5da39daf96457983129
Reviewed-on: https://gerrit.instructure.com/22768
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>
also fix issue around communication_channels/confirm not giving a visual
indication that the terms must be accepted if you forget to check the box
fixes CNVS-7189
test plan:
1. go to /register
2. you should not need to agree to the terms on any form, but you should
see a link to the privacy policy
3. invite a user to a course
4. the user should not need to agree to the terms when setting a password
5. in the console, do Setting.set('terms_required', true)
6. go to /register
7. you should need to agree to the terms on all the forms
8. invite a user to a course
9. the user should need to agree to the terms when setting a password
Change-Id: I54857d7aaef1b528c6033a3464701abeae4ce14f
Reviewed-on: https://gerrit.instructure.com/22770
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes CNVS-7266
test plan:
* create an SIS user with a login id, then delete them
* create a non-SIS user with the same login id
* use an SIS import to resurrect the original user
* the SIS import should succeed, but warn that it skipped the user
cause someone else had his login information
Change-Id: I2102107fefb1d20fae6046ebe3a7e0c03416dcc9
Reviewed-on: https://gerrit.instructure.com/22867
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-7250
Test plan
- create an unpublished quiz with some questions
- the unpublished quiz should show the correct question count on the index page
Change-Id: Ia4d3760d3d2d0bca186591f2245da2be20f31f0a
Reviewed-on: https://gerrit.instructure.com/22834
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
test plan:
* create a course with announcements
* for both:
- exporting and re-importing, and
- course copying
with the "select content" box checked, confirm that:
- the selective content form lists the announcements to
import under "Announcements" and not "Discussion Topics"
- the selected announcements are actually imported as
expected
fixes #CNVS-7242
Change-Id: I647544232dd1d88305db2bc558e20df0716d3c30
Reviewed-on: https://gerrit.instructure.com/22823
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
test plan:
* refer to the Module and Module Item API documentation
* confirm that adding the include[]=content_details argument
to any index or show request that returns module items,
will add a "course_details" section to each of the returned
module items, which includes additional details (if available)
for their associated objects
(i.e. an Assignment module item can return the
'points_possible', 'due_at', 'lock_at', and 'unlock_at'
information for the assignment, after appropriate overrides
are applied)
closes #CNVS-7023
Change-Id: I3879d1ea4078f6da6aae41f941362da35558a650
Reviewed-on: https://gerrit.instructure.com/22705
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
The redis_name is usually a fqdn, which was creating very annoying
folder structures
Change-Id: If8aecd3a523673321406fedc8769a92eee6d1a78
Reviewed-on: https://gerrit.instructure.com/22744
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>
fixes CNVS-6888
testing steps:
* from a console, set a custom privacy and terms url
Setting.set('privacy_policy_url', 'http://custom.example.com/privacy')
Setting.set('terms_of_use_url', 'http://custom.example.com/terms')
* verify the following location all display the new links:
* <canvas>/enroll/<join_code> - with self_enrollments enabled for
the course and currently logged out
* when self registration is disabled at the root account,
will be prompted to authenticate, "View Privacy Policy"
* when self registration is enabled at the root account,
will be prompted to authenticate or register, "View Privacy Policy"
* when logged in as a teacher, prompted to confirm enrollment
"View Privacy Policy"
* <canvas>/register_from_website - when logged out
* page footer links for "Terms of Use" and "Privacy Policy"
* "I'm a teacher", both links at bottom of dialog
* "I'm a student", both links at bottom of dialog
* "Parents sign up here", both links at bottom of dialog
* <canvas>/accounts/<id>/users - click "Add a New User" from
the right sidebar. "View Privacy Policy" in modal dialog.
Change-Id: Ic80c369dcea8483c93fb8adfcd9a80c1d6d3ad6a
Reviewed-on: https://gerrit.instructure.com/22712
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
test plan:
- as a student
* query the pages api for a page that is currently locked
* ensure the response payload does not include the page body
fixes CNVS-7211
Change-Id: I2a073e9d8a3703b63ff3492cddcef893043c1380
Reviewed-on: https://gerrit.instructure.com/22737
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
fixes CNVS-6402
test plan:
* open conversations beta page
* choose options from course and scope dropdowns
* verify that the messages are constrained by their intersection
* verify that changing your filters updates your URL
* verify that refreshing/bookmarking/sharing URLS keeps state
* verify that the course filter includes non-favorite courses
* verify that you can filter the message list by a non-favorite course
* verify that the "More Courses" list excludes favorite courses
* verify that the current course filter display at the top of the
messages list is updated with the current course name and code
* verify that the current course filter display is present but empty
if "All Courses" is selected
* verify that the styling matches the spec, aside from
different optgroup formatting
Change-Id: Ie3215096ac2410b77be81e2f9dad44ea1ac0d98e
Reviewed-on: https://gerrit.instructure.com/22675
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
Don't list announcements in the discussion topic are of the
selective content pop-up in the new UI
Also don't show deleted items in that UI
Test Plan:
* create an announcement
* it shouldn't show up under discussion topics in selection UI
* create a discussion/assignment/wiki/whatever/etc.
* delete that item
* it shouldn't show up in selection UI
closes CNVS-7227
Change-Id: I4190e0b450ee3474d80b37cdba46a50a070450c3
Reviewed-on: https://gerrit.instructure.com/22772
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@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>
since course copies weren't marked as import_immediately,
there was a short window where the workflow state made the
new UI show the select content button even though the user
has already done that step.
Test Plan:
* do a selective course copy for an at least medium sized course
* after the progress bar appears after selecting content it should
never revert to the select content button
* try it a few times to verify
closes CNVS-7216
Change-Id: Idbfdd20f7ce29915dda5a61b629c2076d26e40ae
Reviewed-on: https://gerrit.instructure.com/22748
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-7021
test plan:
* have two separete redis servers (one being localhost and one being
soemthing that does exist is sufficient) configured in
cache_store.yml
* make sure one is inaccessible (i.e. it doesn't exist)
* run canvas. always reload every page. inspect your logs - on the
second request, approximately half of the cache lines should be
a cache hit, and half a cache miss
* you can be more fine grained by doing Rails.cache.write('key',
true); Rails.cache.fetch('key') in script/console for different
keys. Half of the time it should return true, and half of the time
it should return nil.
Change-Id: I85898e9ac5e01c01d042ce7340ad463865a0ba73
Reviewed-on: https://gerrit.instructure.com/22661
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-7130
test plan
- retrieve conversations via the api
- ensure that the participating_user_ids field for each message
lists the messages participating user ids
Change-Id: I3d7a579d610e70f06dd646d3089c8568db9bc10d
Reviewed-on: https://gerrit.instructure.com/22720
Reviewed-by: Braden Anderson <banderson@instructure.com>
QA-Review: Braden Anderson <banderson@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
test plan:
* export a course with assignments in assignment groups
(or use the package referenced in the ticket)
* import the package with "select migration content" checked
* import the assignments
* confirm that the imported assignments are in
their original groups (rather than the default
"Imported Assignments" group)
* copy a course with assignment groups, again choosing
to select the content to copy
* should preserve the assignment groups
fixes #CNVS-7103
Change-Id: I7fd36e2ea65e125b7078fe4ca9f5ba740eb08ac7
Reviewed-on: https://gerrit.instructure.com/22690
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
fixes CNVS-6732
normal test plan:
0) change the "true" on the first line of
app/coffeescripts/bundles/manage_groups.coffee to "false"
to enable the test bed (feel free to change the GroupCategory ID as well)
1) go to the new group ui test bed (http://localhost:3000/courses/1/groups)
2) ensure that the GroupCategory you pick is not student organized, nor
self signup restricted
3) click the cog
4) click "Randomly Assign Students"
5) click "Okay"
6) verify that everything in the #content area is replaced with a progress bar
7) wait for the progress bar to reach 100%
8) verify that the #content area changes back to show the groups, with the
previously unassigned students distributed among the available groups
api test plan:
1) ensure delayed jobs is not running
2) navigate to the new group ui test bed
3) perform a random assignment, which should result in being stuck in progress
4) open up Postman in another tab
5) perform a GET request to http://localhost:3000/api/v1/group_categories/1
(replace the 1 with your test GroupCategory's ID)
6) verify that the response includes a progress
7) verify that if you refresh the tab you did the random assignment in, you
still see a progress bar
8) start delayed jobs and verify that the progress bar completes
9) verify the api documentation for a GroupCategory now includes a progress
description (look in the box under "A Group Category object looks like:")
Change-Id: Ia8b24d899f428ad8ed50a9790a03802ca60d746d
Reviewed-on: https://gerrit.instructure.com/22288
Reviewed-by: Mark Ericksen <marke@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
refs CNVS-6747
Test plan:
* Make sure the new assignments index page still shows correct dates
(test in a course that has assignments with and without overrides)
* Test the assignments index api action and make sure it returns the
right dates too
Change-Id: Ibb6baaa5009fe95b68e160af2fb4e91d5ac8ef37
Reviewed-on: https://gerrit.instructure.com/22612
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
refs CNVS-7032
* mysql doesn't have boolean
* mysql will auto-commit the transaction unless you explicitly say
TEMPORARY when dropping the temp table
Change-Id: Iaca3ddd5768f509a0b610925f601e1712e9b7d42
Reviewed-on: https://gerrit.instructure.com/22666
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
refs CNVS-6659
* move validation logic into model
* standardize api error messages
* deprecate split_group_count
* document group_limit
* actually require name (since that's what the api says)
* disallow setting self_signup when editing account categories since it
shouldn't be an option (and is totally broken)
test plan:
1. run specs
2. regression of creating/editing categories on group management page
Change-Id: Iccdd4e2e98978943f0562aad5c8ac055048d204d
Reviewed-on: https://gerrit.instructure.com/22493
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
if you did a selective course copy in the new UI and your
course had groups, they should not show up in the
selection UI
Test Plan:
* add a group to a course
* do a selective course copy of that course
* open the selective content popup
* the groups should not be listed
closes CNVS-7124
Change-Id: I1129b33cc978a234871bd5d427d3db88719ff199
Reviewed-on: https://gerrit.instructure.com/22650
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
refs CNVS-6947
* don't look for them on folders
* don't do updates if no tags were found
test plan:
* from the UI, download a zip of a folder
* check the log for the ContentZipper job that created the zip
* there shouldn't be a query against content_tags
Change-Id: I51097956a2ee4d77f42f2019c6e563280af8f296
Reviewed-on: https://gerrit.instructure.com/22410
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>
fixes CNVS-7082
test plan:
* create a user on shard B, and enroll them in a course on shard A
* from shard A, you should be able to search for that user by global id
both in the course roster and the account admin tools
Change-Id: I34fc52f5d7f392e107d3ae7ea805eaf23f30235c
Reviewed-on: https://gerrit.instructure.com/22616
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>
test plan:
* create a user and login with a sis id
* confirm that the user can be added to a course
through the course 'People' page, by including
their sis id in the list (just as with the login id)
closes #CNVS-7086
Change-Id: Ia4369ba5e78083c233b3921aa1b9246f2db6824e
Reviewed-on: https://gerrit.instructure.com/22647
Reviewed-by: Cody Cutrer <cody@instructure.com>
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>
fixes CNVS-6280
refactors User#time_zone and Account#default_time_zone to return actual
time zone objects instead of strings.
Assignments to the fields accept both forms; reading the field prefers
to return a Rails friendly name, but the IANA name is easily accessible
from that object. Continue to use Rails names for the UI, but use
IANA names for the API.
test plan:
* in the UI, ensure that you can change timezones and it persists
correctly in the following locations:
* user profile as the user
* root account settings
* user page as an admin
* check the API responses for /api/v1/users/self/profile and
/api/v1/accounts/self; the time zone should be listed as an
IANA name (i.e. America/Denver, not Mountain Time)
* Update an account (PUT /api/v1/accounts/self) to change the
default time zone; ensure both friendly names and IANA names
are accepted on input, but on output the IANA name is returned
Change-Id: Ib976e7e1b2dde2639ff6fd478a59b38fdb0d07c0
Reviewed-on: https://gerrit.instructure.com/22563
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>
fixes CNVS-6869
reverts g/22303 and g/22305
Test Plan:
- make a submission
- change the due date on the submission's assignment
- the speedgrader should incorporate the change and be able to tell
if the submission is overdue based on the new due date
Change-Id: I2604e0bde43a1f5970ee3a38813295be410f2212
Reviewed-on: https://gerrit.instructure.com/22480
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
fixes CNVS-6853
test plan
- create a graded group discussion
- ensure that a teacher cannot subscribe to the topic, either from
the discussion show page, the course discussion index, or the
group discussion index
- ensure that a student in one of the groups in the discussion's
group set CAN subscribe from all those places
- ensure that a student NOT in one of the groups can NOT subscribe
- ensure that the tooltips over the subscription icons give reasons
for not allowing subscriptions
- ensure that the subscribe button can not be seen on the show page
when the user can't subscribe
Change-Id: I9ee79f8a13f48de3fa0d109580e6280d7681ea41
Reviewed-on: https://gerrit.instructure.com/22495
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
refs CNVS-6747
Test plan:
make sure teachers still get the correct due date when an assignment
has course section overrides and a default due date
Change-Id: I6ad9f99bc4558c7f1d6a48c93fbd13426d2fe409
Reviewed-on: https://gerrit.instructure.com/22531
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
We would lose any included assocations on an assignment after
overriding due to ActiveRecord::Base#clone. This just copies all the
loaded assocations back over.
refs CNVS-6747
Change-Id: I6496ad1eee257a6745edc6d8f69f9627993e9983
Reviewed-on: https://gerrit.instructure.com/22497
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
mostly just refactoring
test plan:
* reference the pages API documentation to
search for wiki pages by title
* confirm that an error is returned if
search_term is less than 3 characters long
closes #CNVS-6958
Change-Id: I12cfd9641fb223e0b56cb322920f71caa9ae19e1
Reviewed-on: https://gerrit.instructure.com/22400
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
* only read and parse the source file once, since we pull it down over http
* treat a blank languages string as "all languages" like we were treating nil
* move rake task body into method for easier re-use
Change-Id: I91537b4ce80f3ff8f328d8b4394f6e1b5040c721
Reviewed-on: https://gerrit.instructure.com/22182
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
when querying authentication events in the API, allow specifying
start_time and end_time. these are passed to the underlying event
stream.
fixes CNVS-6996
test-plan:
- create some authentication events (logging a user in and out)
- request the authentication events through the API
- choose an event in the middle and note its timestamp
- pass that timestamp as the start_time in the query string (ISO8601
formatted); only the newer portion of events should be returned,
including the selected event.
- pass that timestamp as the end_time in the query string (ISO8601
formatted); only the older portion of events should be returned,
including the selected event.
- try combining start_time and end_time where
* start_time < end_time (subset of events returned)
* start_time = end_time (only the event with matching timestamp
returned)
* start_time > end_time (no events returned)
Change-Id: I156ead6a535e08b17f44ed352cad7561ee246161
Reviewed-on: https://gerrit.instructure.com/22488
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
refs CNVS-6069
test plan: at courses/X/users , search by canvas id for a user with an
id < 100 (less than three chars). you should be able to successfully
find the user, and you shouldn't get an error message if you type
another number < 100
Change-Id: Id1655da622ee1dab3df7aad82abfce01f379d828
Reviewed-on: https://gerrit.instructure.com/22290
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>
when querying an event stream with for_indexed_item(...), allow
specifying :newest and/or :oldest timestamps. events newer than
"newest" and older than "oldest" will not be included.
refs CNVS-6995
refs CNVS-6996
test-plan:
- in conjunction with related API changes
Change-Id: Ibf0f908067b80db4dd4937763c4e9b0a43cd725e
Reviewed-on: https://gerrit.instructure.com/22486
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
fixes CNVS-6974
test plan:
* create a user with Ĭńşŧřůćƭǜȑȩ in their name, enroll them in a course
* search for that user in the course roster, they should be found
Change-Id: Ia21d4d5163eec950cd45950123c1a273673a8c9a
Reviewed-on: https://gerrit.instructure.com/22470
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-5674
changes
1. implement redesign of quizzes index with publish icon
2. adds header toggler to styleguide for item groups and condensed item groups
3. refactor publish button code to fix onmouseleave event issue
test plan:
in styleguide
1. check that item group headers toggle open/closed
on quizzes#show with :enable_draft = true
1. publish button continues to publish/unpublish and remember state
2. disabled the publish button when there are student submissions
on quizzes#index :enable_draft = false
1. make sure quizzes index page functions the same as before draft state features
on quizzes#index as a teacher with :enable_draft = true
1. shows 'no quizzes' message when there are no assignment or open quizzes
2. greys out unpublished quizzes
3. can publish and unpublish with the new publish icon in each row
4. disables the publish icon on the row when there are student submissions
5. editing/deleting quizzes works (and deleting prompts to confirm)
6. the 'search for quiz' widget filters the quizzes as you type
on quizzes#index as a student with :enable_draft = true
1. unpublished quizzes are not visible
2. publish icon or edit/delete links are not visible
Change-Id: Ida140d5e30761a520b118d0c62fb45bcf1a3a008
Reviewed-on: https://gerrit.instructure.com/22121
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Derek DeVries <ddevries@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>
fixes CNVS-6887
use a smarter query, and skip it altogether for account groups
test plan:
* regression test adding/removing users to groups in a course with
overrides and stuff.
* an sis import of account level groups should still work
Change-Id: Ie9943af04ce6aab31f9f0d76f51c7474c1299616
Reviewed-on: https://gerrit.instructure.com/22317
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
closes CNVS-6255
test plan
- make sure notification preferences popovers
look good still
- make sure translation warning popovers still
look good
- no implemented tours, so nothing else to test
Change-Id: I786a90d98a9b1b516b0252ad5aa020fc9e7b37eb
Reviewed-on: https://gerrit.instructure.com/21418
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
all migrations are put on an n_strand for the course's root
account now. This is to prevent a school copying all its
course at a semester boundary from starving other jobs.
Also, some old content migration objects don't have the
migration type set which causes a page error in the new UI
Test Plan:
* in the /jobs UI a migration should have a strand name like
migrations:import_content:#{account_id}
* Course copies from new migration UI and through course settings
should work and not cause page errors when the new UI is refreshed
* Also removed the question mark for the checkbox labeled
"Select migration content"
closes CNVS-6951
Change-Id: Ifbecbc49c40b35c3212e39e92b753c14e499ed6c
Reviewed-on: https://gerrit.instructure.com/22427
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Change-Id: I58d6fe5adb263720e3f2dd9674a309db81b51cad
Reviewed-on: https://gerrit.instructure.com/22423
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
fixes CNVS-6947
test plan:
* upload a file whose name begins with ~
* download a zip of the folder the file is in
* it should work
Change-Id: I828095b2dffe96805df5dc4921cfdce7c38af287
Reviewed-on: https://gerrit.instructure.com/22414
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>
the api was accepting an array, which was skipping the parsing, stripping of
'.' and whitespace, and downcasing that happened when the parameter was given
as a string. this caused the validation to try to match a file name against
' .DOC' which would always fail.
this fixes the problem and also runs a datafix to correct existing data that
is in this bad state
fixes CNVS-4622
test plan:
- before checking out the patchset, create an assignment and set the allowed
extensions to ".DOC, .XLS"
- check out the patchset and run migrations
- your assignment allowed extension value should have changed to 'doc,xls'
- try to enter the bad value again
- it should save and automatically become the good value
Change-Id: Iea45dd0d5251e418878567b9267eb6252f1e1250
Reviewed-on: https://gerrit.instructure.com/22299
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
in both requests and responses
test plan:
* in all group and group membership apis, it should be able to use
the sis id of the group instead of the canvas id (sis ids are only
supported on account level groups)
* in api responses that return groups, it should include the
sis_group_id if the calling user can read sis data at the root
account level
Change-Id: I439bf2d33661ed128a75c759c304c897fe0fc38b
Reviewed-on: https://gerrit.instructure.com/21612
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>
also rename method to prevent future mishaps
test plan:
* try to visit a deleted page (that is not the
front page)
* should not get a page error
fixes #CNVS-6868
Change-Id: If0bea59d810fc0d41d3e9169fffc58fa20d74cd9
Reviewed-on: https://gerrit.instructure.com/22309
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
not all old submission versions will have cached_due_date populated.
backfill it while rendering them to json for api calls. there may be
other non-api places that need this as well, so a more complete fix in
the future will replace this with some backfilling during version
loading, but this will fix the speedgrader and gradebook history for
now.
test-plan:
- find a submission created late before the initial DueDateCacher data
fixup ran
- load the submission in speedgrader
- should show as late
Change-Id: Ibbb52468a1b991fc90f4671fd7412860fde8b5e4
Reviewed-on: https://gerrit.instructure.com/22303
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes CNVS-6737, CNVS-6746
test plan:
- check the discussion topic api documentation for the
published flag.
- use the create and update api to twiddle the published flag
as a teacher. this should change the student visibility of
the topic and change the value of the published flag
returned by the api.
- use the create and update api to twiddle the published flag
as a student. Trying to set the published flag to false as a
student should result in an error in both create and update,
and the topic should remain published.
- create a topic and and add a post to it. try to use the
update api to set published to false. this should result in
an error and the topic should remain published.
- you should not be able to create a draft state announcement
- you should not be able to update an announcement to be draft
state, even if it has no posts.
- generally test creating and editing discussions to make sure
nothing has broken, especially locking, unlocking, and the
"available from" and "until" dates (see CNVS-6762).
- make sure when editing a topic, it retains the available
from and until dates when you don't specifically edit them.
Change-Id: Ie1591f380bff45f6ad6a7d7c83bc1d55947293a0
Reviewed-on: https://gerrit.instructure.com/22123
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
QA-Review: Jon Willesen <jonw@instructure.com>
refs CNVS-6219
what's different in this change:
1. /groups now sorts by name. previously there was no guaranteed order.
2. /api/v1/users/self/groups should now sort by name (was id).
3. /api/v1/group_categories/:group_category_id/groups now sorts groups.
previously there was no guaranteed order, making pagination unreliable.
4. /api/v1/accounts/:account_id/groups and /api/v1/courses/:course_id/groups
are no longer case-sensitive, and sort by id in the event of a tie.
test plan:
* see specs
* ensure groups are sorted alphabetically (case insensitive) in the
following places:
1. /groups page
2. /api/v1/users/self/groups
3. /api/v1/accounts/:account_id/groups
4. /api/v1/courses/:course_id/groups
5. /api/v1/group_categories/:group_category_id/groups
Change-Id: I9c4cb34ead05f72640db43d40a67dcef97643de0
Reviewed-on: https://gerrit.instructure.com/22210
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
test plan
- ensure subscription icon behavior is unchanged
Change-Id: I4d43401b729a84190af569199b79acf1eba60671
Reviewed-on: https://gerrit.instructure.com/22110
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
--test plan
enable SIS meta-data through kaltura plugin settings
upload or record file via tinyMCE media widget
additional partner_data should be available on kaltura
should include sis_course_id, sis_user_id where applicable
and also a context_source including where media uploaded from
perform same steps for regular canvas file uploads
fixes PS-321
Change-Id: Ie6fc64c9e212f72a9844720e3f6e8ecf993545a0
Reviewed-on: https://gerrit.instructure.com/21883
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Brandon Broschinsky <brandonbr@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
fixes CNVS-6789
test plan:
- run an academic benchmark import
- the job should succeed
Change-Id: Ia716a781ca03d6a70db748a08bec6397850f9a94
Reviewed-on: https://gerrit.instructure.com/22167
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
refs CNVS-2500, closes CNVS-6577
Test plan:
* make sure the assignment groups index api action still works
- be sure to include assignments
* test with and without overrides
* make sure gradebook2 still works (focus on anything related to
assignment due dates)
Change-Id: I440a8fdeffdb497884356f08c19b5b7792566a3a
Reviewed-on: https://gerrit.instructure.com/22102
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
fixes CNVS-390
stores and allows querying by user/account/pseudonym of login/logout
events.
test-plan:
[setup]
- set up an 'auditors' keyspace in cassandra and run migrations
- have shardX and shardY on one database server, and shardZ on a
different database server
- have accountW and accountX on shardX
- have accountY and accountZ on shardY and shardZ, respectively
- have userA on shardX with pseudonymAW in accountW and pseudonymAX in
accountX (cross-account, single-shard user)
- have userB on shardY with pseudonymBY in accountY and pseudonymBX in
accountX (cross-shard user)
- have userC on shardZ with pseudonymCZ in accountZ and pseudonymCX in
accountX (cross-db-server user)
- log in and out of each pseudonym above multiple times
[index isolation]
- /api/v1/audit/authentication/pseudonyms/<pseudonymAX> should
include logins and logouts from pseudonymAX only
- /api/v1/audit/authentication/accounts/<accountX> should include
logins and logouts from pseudonymAX, pseudonymBX, and pseudonymCX
but not pseudonymAW
- /api/v1/audit/authentication/users/<userA> should include logins
and logouts from both pseudonymAW and pseudonymAX but not
pseudonymBX or pseudonymCX
[permission isolation]
(in each of these, either :view_statistics or :manage_user_logins on
an account qualifies as "having permission")
- /api/v1/audit/authentication/pseudonyms/<pseudonymAX> should be
unauthorized if the current user doesn't have permission on
accountX
- /api/v1/audit/authentication/accounts/<accountX> should be
unauthorized if the current user doesn't have permission on
accountX
- /api/v1/audit/authentication/users/<userA> should be unauthorized
if the current user doesn't have permission on either of accountW
or accountX
- /api/v1/audit/authentication/users/<userA> should include logins
and logouts from accountW but not from accountX if the current
user has permission on accountW but not on accountX
[sharding]
- /api/v1/audit/authentication/users/<userB> should include logins
and logouts from both pseudonymBY and pseudonymBX
- /api/v1/audit/authentication/users/<userB> should not include
duplicate logins and logouts from either pseudonymBY and
pseudonymBX (potential for bug due to both pseudonyms' shards
being on the same database server)
- /api/v1/audit/authentication/users/<userC> should include logins
and logouts from both pseudonymCZ and pseudonymCX
Change-Id: I74b1573b346935f733fe5b07919d2d450cf07592
Reviewed-on: https://gerrit.instructure.com/21829
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
and plumb it through Canvas::Cassandra::Database's *_record methods
refs CNVS-390
Change-Id: I47a19a7040021d58c242f9cb483dd6f029298d84
Reviewed-on: https://gerrit.instructure.com/22155
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
fixes CNVS-6676
test plan
- open the assignments settings modal with the cog menu at the top
- change the assignment group weighting with the checkbox
- change the assignment group weights
- click 'done' and then re-open the dialog to verify changes
Change-Id: I7cf09d7796b0c47c5ec75d79ea7bba33bc7ddcaf
Reviewed-on: https://gerrit.instructure.com/21922
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
Change-Id: Iae62e4f2be4cffc4776ca11953623ddee7dd1449
Reviewed-on: https://gerrit.instructure.com/22170
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
closes CNVS-5992
test plan:
- make sure existing turnitin still works
- go to account settings, leave turnitin host blank, save
- it should still work
- change it to api.turnitin.com
- it should still work
- change it to another valid turnitin endpoint
- it should still work
Change-Id: I442871d35f3a8440f49485252cf88dd4cd441ec2
Reviewed-on: https://gerrit.instructure.com/21969
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
This data point is difficult to get with the new page views
infrastructure, and isn't displayed anywhere anyway.
fixes CNVS-6731
test plan:
* with cassandra page views enabled, open a rails console and run
Reporting::CountsReport.process
* once that completes, go to /accounts/X/statistics and verify that the
stats have been updated (there is a generated timestamp at the top)
Change-Id: I7f1144cd6dab9b68478a79e3f7f82bc6d8feb0b3
Reviewed-on: https://gerrit.instructure.com/22046
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
fixes CNVS-6576
Test plan:
* run the SubmissionsApiController#for_students action as a teacher
(it's part of gb2)
* make sure some/all of the submissions have attachments
* you should see a reasonable amount of queries (not hundreds or
thousands)
* make sure gradebook2 correctly displays student submission data
Change-Id: If301a70eb001f7876aa94e476b2c76dfa664ae05
Reviewed-on: https://gerrit.instructure.com/21790
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
test plan:
- refer to the documentation for 'List modules' and 'Show module'
- verify that adding ?include[]=items causes module items to be
included in both endpoints
- verify that modules with more than 50 items do not get items
returned directly in the json
- also check that new Module fields are returned, whether or not
"include[]=items" is given:
- items_count: the number of items in the module
- items_url: the api endpoint to retrieve the module items
fixes CNVS-6598
Change-Id: Ifd20da2588b0afd20ec2781319ddfb93924666e2
Reviewed-on: https://gerrit.instructure.com/21919
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>
fixes CNVS-6562
there were three problems:
1. ScribdAPI was caching the config locally for all root accounts,
preventing any other account plugin settings from overriding the first
config found. I removed that so it uses the normal rails cache behavior.
2. It was falling back to config/scribd.yml if the plugin was disabled
on an account, rather than correctly disabling it. I just removed the
yml support completely, it's been a plugin setting for a long time now.
3. If you tried to configure the scribd plugin on a new install, without
a scribd.yml it'd fail with a 500 error trying to validate the new
config.
test plan:
remove any local config/scribd.yml file, and configure scribd through
the /plugins interface. Upload a scribd-able file and verify it is
processed as expected.
Change-Id: I85573e27de074c69e263941012992aefc86e823a
Reviewed-on: https://gerrit.instructure.com/21853
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
fixes CNVS-6515
test plan:
- read, create, and update the apply_assignment_group_weights
flag within a course with the api
Change-Id: I29b15ddafa9403a7434f8692b53ce31f1645626f
Reviewed-on: https://gerrit.instructure.com/21795
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
- on the root account:
* settings[:enable_draft] = true
- on a course without wiki pages:
* navigate to '/courses/:id/pages'
* ensure a friendly message is displayed indicating no pages
- on a course with wiki pages:
* navigate to '/courses/:id/pages'
* ensure all pages are represented and paginate properly (30 at a time)
* validating styling
* ensure wiki page links work correctly
- for each page:
* ensure the wiki pages display properly
* ensure the publish/unpublish buttons work properly
* ensure the 'View All Pages' button works properly
- note: Edit and Settings are currently unimplemented
- for an unauthenticated session:
* ensure no access is allowed to any of the pages
- for an unauthenticated session, but a public course:
* ensure the pages index and the individual pages show properly
fixes #CNVS-5272
Change-Id: I7658e43b6fe09ce9b9ebf0446dbded2f0d4ff0e1
Reviewed-on: https://gerrit.instructure.com/21811
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
if a file_id is given to show_relative in addition to a file_path, but
that file_id is invalid, treat is just like as if they'd given an
incorrect-but-valid id (i.e. doesn't match the path).
fixes CNVS-6148
test-plan:
- create a file
- get a link to the file that includes both the file_id and file_path
- change the file id to an invalid string
- should still load the file
- should not generate a page error
Change-Id: Ifed3fbd9ef9fe2c5a4fd951f2de5facdf38e28d0
Reviewed-on: https://gerrit.instructure.com/21556
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
* add a spec to keep _core_en.js current
* remove a couple unnecessary requires
* I18n.load_path parity (we don't need generated/en.yml here)
* don't bother trying to load plugin yml files because we don't do those
test plan:
1. specs should pass
2. localized canvas should also work, i.e.
1. run rake i18n:generate_js
2. run canvas with RAILS_LOAD_ALL_LOCALES=true and USE_OPTIMIZED_JS=true
3. switch to spanish
4. go to a localized js-heavy page (e.g. conferences)
5. you should see translated stuff
Change-Id: Ia368c11f72fdc7395e4cbf82c3385d0c997b0dd4
Reviewed-on: https://gerrit.instructure.com/21788
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
This allows us to upgrade our routes file to rails 3 syntax while still
staying compatible with rails 2.3
refs CNVS-5146
test plan:
This affects literally every URL in Canvas, but shouldn't introduce any
new behavior. The automated integration and selenium tests still pass,
which is a good smoke test. Other than that, it's really just making
sure that routes are generated and recognized as before (regression
testing).
Change-Id: I443d006e3fcb5a0a0f8d6db46a8873a498ae7fd4
Reviewed-on: https://gerrit.instructure.com/21729
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>
* 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>
closes PS-438
test plan
- do a GET to an account report
- the results should include the attachment object
Change-Id: I260b7a445c606877882d567a10348e5838392523
Reviewed-on: https://gerrit.instructure.com/21686
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tyler Belnap <tyler@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
test plan:
* use the course and group API to preview html content
through the preview_html action
* should return html processed in the same fashion
that other html content is (such as assignment descriptions)
closes #CNVS-6413
Change-Id: Ibfaea9d8b0ccfd45938e5bf91b03980597428516
Reviewed-on: https://gerrit.instructure.com/21701
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>
don't load 1000 assignments, just use a range of ids
test plan:
* data migration should not fail
* on-demand recalculations should not fail
Change-Id: I7da3244a08ab6f61b8393c9f9d85257b181157cc
Reviewed-on: https://gerrit.instructure.com/21738
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>
also tweak local file api uploads to accept either file or
attachment[uploaded_data] param
ensure File models don't pass along any superfluous attributes to s3
test plan:
* see specs and corresponding plugin commit
* also, do a regression of the quiz file upload types (see g/21586 test
plan)
Change-Id: I496b150dbdc0684083bf320c77cced4c3b8eeaa0
Reviewed-on: https://gerrit.instructure.com/21434
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
per the LTI spec the lis_outcome_service_url should always
be sent, and we were only sending it for students.
Test Plan:
* Do an LTI assignment launch as a teacher or admin
* Make sure the lis_outcome_service_url value is sent
* Also check that the custom_canvas_assignment_title/points_possible are sent
closes CNVS-6392
Change-Id: If69875884029e5cba9fb329f09c21d2220fcdfd0
Reviewed-on: https://gerrit.instructure.com/21652
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
The full env isn't available on our release packaging servers
Change-Id: I5b9b6c878d061ae4d2ae75739a46c5bc22e0d639
Reviewed-on: https://gerrit.instructure.com/21675
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@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>
test plan:
* confirm that the 'vendor_guid' property is accessible
and editable through the API for outcomes and outcome
groups
* confirm that in the api, if an assignment's rubric
criterion is associated with a learning outcome, that it
returns the vendor guid
closes #CNVS-6387
Change-Id: I28d4cfb42172e69f07a03a398ba15011aaab4f7c
Reviewed-on: https://gerrit.instructure.com/21642
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
test plan:
* create a external tool with a custom field keys like:
custom_time_zone=$Person.address.timezone
custom_time_zone2=$Canvas.user.timezone
custom_offset=$Canvas.user.timezone.offset
* confirm that the tool launch parameters includes the
custom keys substituted with the current set time zone
or time zone offset (which derives from the user,
or the root account)
fixes #CNVS-6281
Change-Id: I9bf44f7ba10b2c7f68cae65496caba30ff601f15
Reviewed-on: https://gerrit.instructure.com/21621
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>
**test plan
upload a media file through file upload
validate additional metadata for sis_id, sis_user_id, and context
are available in partner data
fixes PS-322
Change-Id: Ia7c3b3e05ce08e40baf14527f4cbdcea6cd67bb4
Reviewed-on: https://gerrit.instructure.com/21334
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
when querying common contexts between user A and messageable user B, "0"
is used as a special course id to indicate user B has at least one
enrollment in an account A admins -- no actual course involved.
to manage common contexts cross shard, they are stored with global ids.
this was "globalizing" 0 to no longer be zero, causing problems. fix
that edge case.
additionally, if there were multiple shards with accounts in which B has
and enrollment and A is an admin, it would overwrite (given corrected
handling of the 0) with the last queried shard's values, rather than
combining them.
fixes CNVS-6303
test-plan:
- have at least two shards
- create user A on shard 1, user B on shard 2
- enroll user B as a teacher in a course under account X on shard 2
- add user A as an admin of account X
- on shard 1, reload user B via user A's messageable users, e.g.:
userB = userA.load_messageable_user(userB)
- userB's common courses should include a key of 0 with
'TeacherEnrollment' as the only value
- repeat on shard 2
- enroll user B as a student in a course under account Y on shard 1
- add user A as an admin of account Y
- on shard 1, reload user B via user A's messageable users (again)
- userB's common courses should include a key of 0 with both
'TeacherEnrollment' and 'StudentEnrollment' as values
- repeat on shard 2
Change-Id: I014d1f0d7793889de512a4a0262e32027ee5702e
Reviewed-on: https://gerrit.instructure.com/21542
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
test plan:
* create an account level outcome
* create an account level rubric
* attach the outcome to the rubric
* in a course, attach the rubric to an assignment
* copy the course
* check the new assignment in which you linked the rubric to
the outcome was carried over, and the association with
the account-level rubric should be preserved,
(and by extension the association with the learning
outcome)
fixes #CNVS-4200
Change-Id: I0bfa11124d599ca1a96ed3b6e684b966974e397b
Reviewed-on: https://gerrit.instructure.com/21548
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
data fixup for wiki pages that were imported during a
certain period when they were set to unpublished by default
but linked to active module content items
test plan:
(Note: the problem should no longer occur, so we will have
to manually re-create the problem)
* create a wiki page
* add the page as a module item
* identify the item id by observing the module item's url
on the modules page -
e.g. (/courses/:course_id/module/items/:item_id)
* open the console and run the following instructions:
id = [INSERT THE ITEM ID HERE]
WikiPage.where(:id => ContentTag.find(id).content_id
).update_all(:workflow_state => 'unpublished')
* now, as a student, clicking the link should give an
'unauthorized' message, as in #CNVS-6177
* run the data fixup by running the following command in
the console:
DataFixup::FixImportedWikiPageWorkflow.run
* now the page should be accessible by students
closes #CNVS-6323
Change-Id: Iffb74de96cb4d3603ccd8a6ecb55567714d95db4
Reviewed-on: https://gerrit.instructure.com/21513
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-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>
fixes CNVS-6168
test plan:
- as a teacher:
- upload a file to your own files
(/users/self/files)
- use the RCE embed-image button to embed this image in various
places, including but not limited to:
- wiki page
- assignment description
- discussion topic
- discussion reply
- as a student:
- make sure the embedded images are visible
Change-Id: I93b103041f44a385b1652f2bd48aeb4b9dec8147
Reviewed-on: https://gerrit.instructure.com/21549
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@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>
additionally added some denormalization to the external tools api
calls. This explicitly defines properties for each extension that
are normally just inherited from the general extension settings.
test plan:
-test a resource selection tool
-test a homework submission tool
-test a editor button tool
* they should all still work
- create a tool with selection_width, selection_height, and icon_url defaults
- add a tool extension with no extra properties to this tool
- make a get api call for the new external tool
* it should have added the width, height, and icon to the extension
Change-Id: I25f7d31b5c4e21b1873d41e6ea4c39b4bd0e1a24
Reviewed-on: https://gerrit.instructure.com/21383
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>
* Add icons to checkboxes when selecting content
* Truncate long folder names in reverse
* Add tooltips to folders with long names.
* Style top part of migration page including
adding a cancel button, formatting options and
re-doing the date-shift view.
* Add styling to bottom portion of the migration
page including an additional "orange" color to
completed migrations with issues.
fixes #CNVS-6252
Test Plan
1. Go to the new migrations page
2. Make sure there are icons next to checkboxes
when selecting content.
3. Make sure due date shifting is all still
working
4. Ensure other styles are looking and functioning
correctly.
Change-Id: I7a1b6d6b6ffbd3a3bcd0bd9ac0577e4a5ef28000
Reviewed-on: https://gerrit.instructure.com/21503
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>
fixes CNVS-6238
test plan
using the api:
- view a discussion topic as a user that did not author it
- ensure that subscribed: false
- view a discussion topic as the authoring user
- ensure that subscribed: true
- unsubscribe from a discussion topic that the user authored
- ensure that subscribed: false
- subscribe to a discussion topic
- ensure subscribed: true
- subscribe to a topic that requires an initial post with a user
that hasn't posted yet
- ensure that it is an invalid request
- subscribe to a topic that requires an initial post with a user
that has posted
- ensure subscribed: true
Change-Id: Ie76a046bb6e9b5253088c371ffdc4dc6ddf08231
Reviewed-on: https://gerrit.instructure.com/21402
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
fixes CNVS-5821
test plan:
* make API requests to /api/v1/accounts/<id>/users?search_term=bob
* verify it returns users with names or ids matching the search term
Change-Id: Ica91ffce6f2a381445985b4b02231a380ce820d0
Reviewed-on: https://gerrit.instructure.com/21487
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Chrome and Firefox send the session from Flash, Safari does not. So allow
inferring the authenticity token whether a session exists or not
Also, the JS no longer needs to worry about if uploading to local or remote
and adding/filtering the authenticity token - just do the same every time.
test plan:
* use local storage
* upload a file by clicking "Upload Files"
* it should work in Safari, Firefox, Chrome, and IE
Change-Id: Ia46bde6ab042f21cd0643d4f5a1dbd2f7f9cee66
Reviewed-on: https://gerrit.instructure.com/21100
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
adds list and search users functionality to group_category api,
including the ability to filter to only list/search unassigned
users.
depends on #CNVS-6152
test plan)
0) verify that the api doc is error free and makes sense
1) make the following requests for both a course and an acccount
group category, then verify the results:
a) list all the users (i.e. no search_term)
b) list all the unassigned users (i.e. no search_term)
c) search users (e.g. search_term=bob )
d) search unassigned users (e.g. search_term=bob&unassigned=true)
fixes #CNVS-6151
Change-Id: I99b33f29531579478ccece595a20971a1f8ad914
Reviewed-on: https://gerrit.instructure.com/21292
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Tested-by: Landon Wilkins <lwilkins@instructure.com>
fixes CNVS-6232
test plan:
- go to existing BBB plugin settings, make sure recording
checkbox is unchecked by default.
- go to conferences page and open new conference dialog.
select the BBB conference type. verify you do not see the
record checkbox.
- edit an existing BBB conference. verify you do not see the
record checkbox.
- verify you can still view pre-existing recordings.
- start and end a BBB conference, make sure it is not recorded.
- go back to BBB plugin settings and enable recording.
- go back to conferences page and refresh. verify the record
checkbox is now visible when creating and editing BBB
conferences.
- start and end a BBB conference with the record setting
checked. verify the conference is recorded.
- with MRA, configure BBB for all accounts, do not allow
recording.
- configure BBB plugin for a specific account that did not
already have it configured.
- verify the secret field is not populated with a default.
- populate the secret field, check allow recordings, and apply.
- verify that account can now access the BBB recording
feature, but other accounts can't.
- refresh BBB plugin settings for the configured account and
verify the secret field appears populated.
Change-Id: I86cea399669f9732b81e784646921e4ef8b4b9a2
Reviewed-on: https://gerrit.instructure.com/21369
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
fixes CNVS-6088
test plan:
* lock a file manually as a teacher, and note the file id
* as a student, visit /api/v1/files/<fileid> and verify no download information
* do the same with a file locked by date, rather than manually
* verify that students still get api download info for unlocked files
Change-Id: I9519775b19017a72eb15d7da815a58a54df6dedb
Reviewed-on: https://gerrit.instructure.com/21403
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
test plan: spec/lib/event_stream/** specs should still pass
Change-Id: I02418dde483ff7824bff2ee0eb088295422bb415
Reviewed-on: https://gerrit.instructure.com/21347
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
see the @argument search_term in the following doc:
# @API List group's users
#
# Returns a list of users in the group.
#
# @argument search_term (optional)
# The partial name or full ID of the users to match and return in the results list.
# Must be at least 3 characters.
#
# @example_request
# curl https://<canvas>/api/v1/groups/1/users \
# -H 'Authorization: Bearer <token>'
#
# @returns [User]
test plan)
1) verify the specs work
2) make a request (see above)
(e.g. https://<canvas>/api/v1/groups/1/users?search_term=bob)
3) verify it returns the users in the specified group with the related name or full ID
fixes #CNVS-6152
Change-Id: I034b8b6ec2779895408276a894a3cf978baee12b
Reviewed-on: https://gerrit.instructure.com/21252
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Landon Wilkins <lwilkins@instructure.com>
refs CNVS-5805
with efficient calculation of all due dates for any submissions for a
given assignment when related records (the assignment, its overrides,
related enrollments, and related group memberships) changes.
compares this cached due date to the submitted_at or current time when
determining lateness.
populates the column for existing submissions in a post-deploy
data-fixup migration.
test-plan:
- run lib/data_fixup/initialize_submission_cached_due_date.rb
- all submissions' cached_due_dates should be updated over several
jobs
- enroll a student in a course and create submissions in that course
- create a second enrollment in a second section; the
cached_due_dates for the user's submissions should recalculate
- destroy the second enrollment; the cached_due_dates for the user's
submissions should recalculate
- create a group assignment
- add the student to a group in the assignment's category; the
cached_due_dates for the user's submissions should recalculate
- remove the student from the group; the cached_due_dates for the
user's submissions should recalculate
- enroll more students in the course
- change an assignment's due date; the cached_due_dates for the
assignment's submissions should recalculate
- create an override for the assignment; the cached_due_dates for
the assignment's submissions should recalculate
- change the due date on the override; the cached_due_dates for the
assignment's submissions should recalculate
- delete the override; the cached_due_dates for the assignment's
submissions should recalculate
- during any of the above recalculations:
- the most lenient applicable override should apply
- if the most lenient applicable override is more stringent than the
assignment due_at, it should still apply
- the assignment due_at should apply if there are no applicable
overrides
Change-Id: Ibacab27429a76755114dabb1e735d4b3d9bbd2fc
Reviewed-on: https://gerrit.instructure.com/21123
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
Tested-by: Jacob Fugal <jacob@instructure.com>
for the convenience of api users
Test Plan:
* The top-level return value of the selective api call
should include urls to the sub-items lists
* the top-level url is: api/v1/courses/:course_id/content_migrations/:id/selective_data
refs CNVS-6061
Change-Id: I35b9288a1471dcbe66462703636e9b45dcafa31e
Reviewed-on: https://gerrit.instructure.com/21249
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
for user merge
test plan:
* merge together some users that have both taken the same quiz
* it should not fail
Change-Id: I57c9624b6f41d903b7e6bcc6436da348dddd1ccd
Reviewed-on: https://gerrit.instructure.com/20770
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>
test plan:
* go to the accounts settings -> quotas tab
* note the new section on the bottom
('Manually Settable Quotas')
* should be able to select a course or group
by their ID, and set their quota
closes #CNVS-271 #CNVS-6060
Change-Id: Iaa5336c792aa0447bc96f8b61260ee655ad40adc
Reviewed-on: https://gerrit.instructure.com/21285
QA-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
affected apis:
* assignments
* discussions
* files
* pages
* quizzes
test plan:
* verify returned attributes:
* locked - manually locked state of the item
* locked_for_user - user's access to the item
(false will always be returned for a teacher)
* lock_explanation - explanation of the reason for the lock
(if locked_for_user)
* lock_info - detailed information about the reason for the lock
(if locked_for_user)
fixes #CNVS-5837
Change-Id: I0c397a218180d58da7a2f710d9977d9ddb7745fc
Reviewed-on: https://gerrit.instructure.com/21212
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>
test plan:
* in account settings - quotas tab,
set the default group storage quota
* attempt to upload files to a new group (without a set
quota) until the quota is hit or exceeded, confirming
that the set default is in effect
refs #CNVS-271
Change-Id: Ia4cbd84da19eb07d188dcc85c81c6b45bc2fa7ce
Reviewed-on: https://gerrit.instructure.com/21191
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
fixes CNVS-5708
discussion topics can now be pinned to preserve their
position at the top of the discussion topics index page.
pinned discussions can be manually sorted, while all
other topics remain sorted by most recent activity.
test plan:
* in a course with existing discussion topics, attempt
to drag a topic into the pinned area and verify that
it properly moves to that group and persists on page
refresh;
* move multiple topics into the pinned area and verify
that they can be manually sorted and that the sort
persists on page refresh;
* drag a pinned topic to the open discussion area and
verify that it properly moves there and persists on
page refresh;
* verify that pinned and open topics cannot be dragged
into the locked area;
* verify that open topics offer a pin option in their
gear menus and that pinned topics offer an unpin
option. verify that these options work as expected.
Change-Id: I65dccba5eed11dd8b0996ecd930b93a1d61dbebc
Reviewed-on: https://gerrit.instructure.com/21260
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
Tested-by: Zach Pendleton <zachp@instructure.com>
test plan:
* enable cassandra page views
* visit /users/X for a user with page views
* search the rails log file for CQL lines, they should include the
cluster name and the environment name like "[page_views development]"
Change-Id: I61903e55c01c818f33022f2971905951a31b8f0e
Reviewed-on: https://gerrit.instructure.com/21302
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
refs CNVS-6018
* allow specifying which environment you want to check is configured/
get a connection for
* properly cache nil results
test plan:
* cassandra page views should still save and load
Change-Id: I14c667182a38da4a5c64e7685dc9db81d45fcf07
Reviewed-on: https://gerrit.instructure.com/20978
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
refs CNVS-6018
test plan:
* saving and loading of cassandra page views should work
Change-Id: Ic9730371bb1f4207cb06aa6da30baee9f4232d8f
Reviewed-on: https://gerrit.instructure.com/20979
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Added a basic variable substitution framework and implemented
a few variables as examples: $Person.name.full,
$Person.name.given, $Person.name.family
Added a concluded enrollment roles variable so that a tool
can know what a users concluded roles were. The variable is
$Canvas.membership.concludedRoles
Variable names are case sensitive.
Test Plan:
* Create an lti tool launch with a custom key like this:
* custom_my_var=$Person.name.full
* With a concluded user do a tool launch that has the
$Canvas.membership.concludedRoles variable
* it should list the concluded roles
* Configure tools through an XML file with a custom param
and make sure it works
Change-Id: Iefb85c441680c7ab3623ce85e405e1c48cda837c
Reviewed-on: https://gerrit.instructure.com/21193
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
instead of fulling in some possibly large columns that we ignore
also, we don't care about the order, so don't make the db sort
them
test plan:
* change some scores
* final scores as shown on csv exports or other places should
reflect said changes
Change-Id: Ic5c8876aab3d3eed261d9b4714642302f25e0f3e
Reviewed-on: https://gerrit.instructure.com/21153
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
test plan:
1. specs should pass
2. run canvas with RAILS_LOAD_ALL_LOCALES=1
3. you should be able to switch locales and see translations
4. run i18n:generate on the parent commit and on this commit, the
resulting config/locales/generated/en.yml should be identical
Change-Id: I5164943dc6e682c663145e91d7a9791331e9b4cc
Reviewed-on: https://gerrit.instructure.com/21014
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
Since there is a low signal-to-noise ratio on warnings from
translation files, we sometimes want to just import the file
regardless of warning status. This patch enables command-line imports
like so:
$ rake i18n:autoimport[config/locales/my-new-chinese-translation.yml]
The task discards translation keys that have wrapper or markup errors.
Also fixes a longstanding bug in the translation import that accepted
underscores in placeholder names as the beginning or ending of a
wrapper.
Test Plan:
- Import a new translation file. It shouldn't ask you for feedback on
warnings, and the file should import and augment whatever
translation file was there before (e.g. if you're importing chinese,
check the config/locales/zh.yml file for changes)
- If a placeholder name has an underscore in it (e.g. %{android_url}),
it should not show up in the mismatch report when autoimport runs.
Fixes CNVS-6139
Change-Id: I0c4c45530908e975ab1eaee0e28b9d5f0a3489be
Reviewed-on: https://gerrit.instructure.com/20940
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
fixes CNVS-6138
test plan:
- use a directory test to check:
- normal emails are still processed correctly.
- emails with irrelevant parsing errors (like a bad
Received header) get processed normally and aren't treated
like as errors.
- emails with relevant parsing errors (like a badly
folder To header) are treated as errors.
- make sure receiving actual email isn't broken.
Change-Id: Ifbe8480de4546ec1b6205ebbdfef8d7ea72d3284
Reviewed-on: https://gerrit.instructure.com/21170
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
test plan:
- have a course with a quiz
- in rich content (like a wiki page), use the wiki sidebar
to insert a link to the quiz list and a link to the quiz
- retrieve the wiki page via the pages API
- the quiz list link should have added attributes
* data-api-returntype="[Quiz]" (with brackets)
* data-api-endpoint: valid API link to the quiz index
- the quiz link should have added attributes
* data-api-returntype="Quiz"
* data-api-endpoint: valid API link to the quiz
- the API documentation should mention "Quiz" in the list
of supported data-api-returntype values, found in the
"Basics" section under "API Endpoint Attributes"
fixes CNVS-6115
Change-Id: If405f6779f1b3f3719503a9987cceaf29a508ed8
Reviewed-on: https://gerrit.instructure.com/21080
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
- in rich text somewhere (wiki page, assignment, etc.),
embed a link to launch an LTI tool.
a suitable test tool can be found at
http://lti-tool-provider.herokuapp.com
- retrieve that text through the appropriate API
(pages, assignments, etc.)
- the link should have added data-api-return-type
(SessionlessLaunchUrl) and data-api-endpoint attributes.
- the data-api-endpoint should contain a link to the
generate-sessionless-launch API. hit this link with
curl or postman or whatever (authenticating with your
token as is normal for API requests)
- the above API should return a URL with a big scary
verifier in it. (you should be able to launch *that*
URL to get into the LTI tool without a Canvas session)
fixes CNVS-5944
Change-Id: I2e51312341b08f87ff2be7bee57370318be72b65
Reviewed-on: https://gerrit.instructure.com/21075
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Replaces OpenObject with a struct in order to gain performance.
test plan:
- as a site admin, go to the account settings page
- under the Turnitin settings, set it up with valid turnitin settings
- make sure the turnitin confirmation link works
Change-Id: Ie71cc2faf8c34c3c43de66b133058c7781c4e86b
Reviewed-on: https://gerrit.instructure.com/16483
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
test steps:
- enable the app center with a valid access token
- visit the app center under account settings
- click on a tool and ensure the reviews appear in the list at the
bottom
- click the link 'Rate this tool' and add a review
- ensure that the review list reloads
** note: you will not see the actual app star rating or review
count change when you add/modify a review. this is expected behavior.
Change-Id: I79ab0769f56b3a17b6eb2056de1416eb1a0a71ca
Reviewed-on: https://gerrit.instructure.com/21054
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
this was removed from the UI in Mar 2011 but was never completely ripped out.
we'd like to remove it now since it was adding extra complexity for no benefit.
closes CNVS-5929
refs #3974
test plan:
- create/update/delete an assignment from the index page, and the show page
- grade an assignment (with and without muting)
- test assignment notifications (with and without muting)
- creating an assignment
- editing an assignment
- changing a due date (after 3 hours of being edited)
- grading an assignment
Change-Id: Ie455bed41154018b5bd2c9c0e69e1e3285a0ac09
Reviewed-on: https://gerrit.instructure.com/20778
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
fixes CNVS-6064
test plan
- using the API, create, get, and update an assignment group
- using the API, delete an assignment group with and without assignments
and both specify an assignment group to move the assignments to
and don't specify an assignment group
- it should throw an error if there are no other active assignment groups
Change-Id: I0d637d73255115258dc42e73541146c889a68afc
Reviewed-on: https://gerrit.instructure.com/20993
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* there are no crowdsourced locales currently, so
before starting the server,
add one by manually editing config/locales/locales.yml
and adding "crowdsourced: true" under a language, e.g.:
>en:
> locales:
> en: English
> crowdsourced: true
* for each area where a language is selectable:
* use the select box to select a crowdsourced language
* and confirm that an icon appears, and that hovering over it
reveals a popover warning box about selecting a crowdsourced
language
* areas to test:
* current user's profile settings
(visit '/profile/settings' -> click "Edit Settings")
* account settings
* course settings
closes #CNVS-4967 #CNVS-4278
Change-Id: I2e83df950b815fb01e5f0a2aa324020415198e5a
Reviewed-on: https://gerrit.instructure.com/21019
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
test plan:
* confirm that wiki pages can be created and updated
with the parameter wiki_page[front_page]
* if true, this will set the wiki page as the
front page for the context (assuming the page is
not hidden to students)
* if false, this will unset the page as the front page
(assuming it was the front page to begin with)
* confirm that /courses/:course_id/front_page acts
as a proper endpoint for show/update/destroy and
acts just as /courses/:course_id/pages/:url
for whichever page is set as the front page
* confirm that none of the above page breaks
normal wiki functionality
closes #CNVS-5528
Change-Id: I3f51d740e90ff0a5a39f2aafc988a1a33947ca18
Reviewed-on: https://gerrit.instructure.com/20938
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
test plan:
- Create a tool (http://lti-tool-provider.herokuapp.com/)
- Create a user with a pseydonym that doesn't have an sis id
- Launch the tool as the new user
- The launch should contain custom_canvas_user_login_id and should not contain lis_person_sourcedid
Change-Id: I3aa8618ac656eb475e8e2d26924634ff07943860
Reviewed-on: https://gerrit.instructure.com/20958
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
keep module items in the 'unpublished' state from
being viewed by students or factoring into progressions, etc
test plan:
* create an unpublished module item
* ensure that as a student:
* the module item is not viewable, either through the site
or through the api
* that it is not factored into the progression for the module
* also confirm that the unpublished module item carries over
on course copy
closes #CNVS-5491
Change-Id: I60e19ea49386e0e6c60c4a86b1a34979b4c0664d
Reviewed-on: https://gerrit.instructure.com/20834
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
new endpoints for getting totals/stats of stream items. for each asset
type (e.g. DiscussionTopic), you can get the total count and the unread
count
test plan:
see specs. also, hit the following endpoints in a browser:
/api/v1/users/self/activity_stream/summary
/api/v1/courses/:id/activity_stream/summary
/api/v1/groups/:id/activity_stream/summary
Change-Id: I101d239a788c28d2cd4c39230a401e36a31007f5
Reviewed-on: https://gerrit.instructure.com/20836
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
test plan:
* have a user associated with shards A and B into a user on shard C
* the resulting user should show enrollments and stuff from all
three shards
Change-Id: Ib094179f56d221253e65ae8756b15dcabfa373da
Reviewed-on: https://gerrit.instructure.com/20843
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>
test plan:
* add an external tool to each of:
- context module item
- course navigation (tabs)
- assignment
* exercise the index methods for each API
* ensure a url is returned for each external tool
- this url should be to the sessionless launch API
* query the sessionless launch API with the url
- this call will return another url which allows a launch of the LTI tool in a browser not logged into Canvas
* copy/paste the url into a browser that is not logged into Canvas (incognito)
* ensure the LTI tool launches correctly
fixes #CNVS-5854
Change-Id: I6b50f965f4714e7efb9cfe0f99e1cd0b5f2055f2
Reviewed-on: https://gerrit.instructure.com/20868
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes #CNVS-5939
test plan - see specs
Change-Id: Iec1be46a9463f1427f1726098c8997a91b692aa7
Reviewed-on: https://gerrit.instructure.com/20792
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Tested-by: Landon Wilkins <lwilkins@instructure.com>
this endpoints returns all the items for a migration so
that you could build a UI around selecting what to copy
when importing/copying courses
Test Plan:
* Start a content migration but don't finish the selection part
* use the /api/v1/courses/:id/content_migrations/:id/selective_data endpoint
* if called without args you should get the top-level areas
* if called with ?type=assignments (or the types in the top-level list)
you should get a list of just the specified type
closes #CNVS-5940
Change-Id: Idfc8bd9b02738801a3bf5b18df25314350929762
Reviewed-on: https://gerrit.instructure.com/20873
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
- As a student, try to publish/unpublish a quiz through the api. You
should get unauthorized errors.
- As a teacher, try deleting a quiz through the API. It should be a
successful response, and you should not see the quiz in the course
index after you delete it.
- As a teacher, try publishing/unpublishing a quiz through the api.
To do this, simply make an update request to the api and pass a
field called "published" which has the value true or false. When you
get a response back, the "published" field should reflect the value
you sent to the API. For good measure, make the same request against
the show action in the API.
(/api/v1/courses/:course_id/quizzes/:quiz_id) and the "published"
field should have the same value.
- As a teacher, create a quiz, and make sure it's published. As a
student, take the quiz.
- As a teacher, edit one of the quiz questions. You should see the
normal "You have made unpublished changes to this quiz" message on
the quiz show page, but when you query the API for the quiz the
"published" parameter should be true.
- As a teacher, try to unpublish the quiz from the API by including a
"published" parameter with a value of "false". You should get an
error response. The quiz should still be published in Canvas when
you go back to it.
fixes CNVS-5673
Change-Id: Ie32aa48e0976374605419d180c373861a1397aa9
Reviewed-on: https://gerrit.instructure.com/20773
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
there is now a plugin that can be used to enable the app center.
this pulls data in from edu-apps.org which will be presented
under the account settings 'External Tools' tab for the user.
Testing (with plugin disabled):
- disable the plugin and visit an account settings page external
tools tab
- ensure that there is a list (table view) of installed external
tools no buttons to the right of 'External Tools'
- Click on 'Add External Tool' and add a new tool:
Name: Public Collections
Consumer Key: N/A
Shard Secret: N/A
Configuration Type: By URL
Configuration URL:
http://www.edu-apps.org/tools/public_collections/config.xml
Testing (with plugin enabled):
- Enable the plugin for the account by going to /plugins and click
on 'App Center' cog. Enter the following:
Access Token: N/A
Base URL: https://www.edu-apps.org
App Index Endpoint: /api/v1/apps
App Show Endpoint: /api/v1/apps/:id/reviews
- Save the plugin and go to the external tools view again for the
account
- Ensure the first page you see is the app center page (box view)
- Ensure there is a button 'View Installed Tools' to the right of
the 'External Tools' header
- Click on 'YouTube'
- Ensure that the show page appears with star ratings and reviews
at the bottom
- Click 'Back to App Center' and ensure it returns to the prior
view. Click on YouTube again to return here.
- Click 'Add Tool' and then 'Submit'
- Ensure that there is notification that the tool was added and
the table with the installed external tools are visible (inc.
YouTube)
- Click the trash icon next to YouTube and confirm you can delete
the tool
- Click on 'View App Center' to return to the App Center view
- Click on 'Prula'
- Click 'Add Tool'
- Click 'Submit' and ensure that there are missing required fields
feedback
- Enter the following:
Name: Prulu
Consumer Key: ABCDE
Shared Secret: FGHIJ
Show Course in Navigation (check this)
Course Nav Link: http://google.com
- Click 'Submit' and ensure it saved
- On the table view, ensure that 'Course Navigation' appears next
to 'Prulu' on the installed tools table view
Change-Id: Icbc5516e93ca2586cc3a8e9a78b877e30607026c
Reviewed-on: https://gerrit.instructure.com/20165
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Eric Berry <ericb@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>