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>
test plan:
- as a teacher, create multiple assignments with assignment overrides
- as a student in each section with an override, request the index
(/ap1/v1/courses/:course_id/assignments), making sure that each
assignment in the list has the due_at, lock_at, unlock_at dates as
they apply to the user
- Do the same check for the show action
(/api/v1/courses/:course_id/assignments/:assignment_id)
- make sure editing exising assignments with overrides works
- test override assignments with calendar 2 (including editing)
fixes CNVS-5537
Change-Id: If0f673236ccc95d276b5624d65e323118b0573b5
Reviewed-on: https://gerrit.instructure.com/20104
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
and only show published assignments to students
fixes CNVS-5681
test plan:
- create an assignment as a teacher
- using the api, set the published flag to true
- using the api, set the published flag to false
- as a student, using the api, get the assignments in that course
- only the published ones should be shown
Change-Id: Ie01a2de3c829a3f830053b3b660a835f4fe1988c
Reviewed-on: https://gerrit.instructure.com/20812
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
adds undocumented arguments to context module items API
update action, identical to the context modules API
test plan:
* to publish a module item, update through the API
with the argument 'module_item[published]=1'
* to unpublish an item, use
'module_item[published]=0'
* NOTE: the published/unpublished status of an item
will not affect whether the item is viewable/usable by students
* confirm that publishing/unpublishing an item syncs the
state with the associated content (e.g. a wiki page's
published/unpublished state)
closes #CNVS-5943
Change-Id: I80c45a787a5cf8ac7b3bc569056d9590ab2f74bc
Reviewed-on: https://gerrit.instructure.com/20633
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Pause the migration workflow to allow a user to select content that they
want to migrate.
Change-Id: I1196f8c6c62aa6cae5ffb8a0925cb898f78f8137
fixes: #CNVS-5941
Reviewed-on: https://gerrit.instructure.com/20817
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>
if we're dealing with the actual assignment/quiz instead of the model
from one of its versions, we don't need to align the history of the
overrides with the history of the assignment/quiz. we can just use the
most recent version of each override.
refs CNVS-5805
test plan: existing specs cover that this optimization doesn't break
reading overrides of older versions
Change-Id: I52d55da0619688744d63d6523e1bc055ecdaa667
Reviewed-on: https://gerrit.instructure.com/20813
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
fix all the places we incorrectly translate during rails initialization
rather than at runtime
test plan:
1. canvas should work
2. those strings should now get translated
Change-Id: I1c0e3b9513103cfddfd4ad94dde4b3a0dd49203e
Reviewed-on: https://gerrit.instructure.com/20468
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
closes CNVS-5736
test plan:
1. see specs
Change-Id: I1edbd4062d3c1a25394bdaaf028fa8198609a881
Reviewed-on: https://gerrit.instructure.com/17312
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
test plan:
verify that the cog menu functions as it did on the course settings users tab
some good edge cases to test are:
- user enrolled as Student and TA (or other roles) in same (or different) sections
- user enrolled as Observer and other roles (should see 'Link to Students' and 'Edit Sections')
Change-Id: I2bf7546b8a5f63ffd603fe4ee9055595089a99eb
Reviewed-on: https://gerrit.instructure.com/20523
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>
spec plan
-specs should pass
Change-Id: Ia85b8976b07619cacbf3865dea197454ac15c0a3
Reviewed-on: https://gerrit.instructure.com/20691
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
This adds the ability for you to process migrations quickly. Includes a
paginated list for migrations and issues.
Test Plan:
* Make sure old migrations UIs work the same
* Make sure new UI works wonderfully
* go to /courses/:id/content_migrations to see the new UI
fixes: CNVS-4732
Change-Id: I7cabc51348c32ed03d581e495756eefbf1060ad3
Reviewed-on: https://gerrit.instructure.com/20349
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
allows api users to find available migrators since different
canvas installs can have different oens available.
Test Plan:
* Hit the api/v1/courses/:id/content_migrations/migrators
endpoint and verify it works
refs #CNVS-4228
Change-Id: I3a2585cea8286b09c9e1039fd722d05a2e82d558
Reviewed-on: https://gerrit.instructure.com/20318
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Course copying and importing .zip files will now work the
same as other content migrations.
Test Plan:
* Using the ContentMigration api test course copy and zip imports
* Make sure the current course copy and zip import UIs still work
* for course copy make sure selective options work
closes CNVS-4228
Change-Id: I80a849471dffaf44d683e980cf0b73505b353d83
Reviewed-on: https://gerrit.instructure.com/19740
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
allows creating content migration through the api
Test Plan:
* Create a content migration through the api along with a file upload
* You should be able to follow along with the progress and
the migration should be complete when the progress is done
* Try to update the migration type, you should get an error
* Upload a wrong file type the first time, then go through
the file upload process again on the update endpoint.
refs CNVS-4228
Change-Id: Iab1082ca68b61d1b0493c191b48169a164444d06
Reviewed-on: https://gerrit.instructure.com/19108
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
fixes CNVS-5680
test plan:
- create an account that has enable_draft enabled
- as a teacher within that account, create an assignment
- using the api, get that assignment and check for the 'published' flag
- there should be a 'published' flag that is either true/false
- now, turn off enable_draft on the account
- using the api, get that assignment and check for the 'published' flag
- there should not be a 'published' flag
Change-Id: I161e3144ca6b82e41e72d5dbb56bebcee03e6fa4
Reviewed-on: https://gerrit.instructure.com/20609
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>
test plan:
- as a few different students, take a quiz with at least two questions
that are file upload questions. Answer each question as each
student.
- as the teacher, you should see a "Download All Files" button on the
right on the Quiz Show Page next to "Quiz Stastics" and "Moderate
This Quiz".
- You should get a pop up that successfully downloads all the zips
(make sure you have delayed jobs running!). Make sure all the files
you submitted as the students are there, with the student's name,
user id, question number, and attachment display name in the
filename of each file.
closes CNVS-3048
Change-Id: I23cb2d4262bb0446476eeac4fdcb356e604e6a05
Reviewed-on: https://gerrit.instructure.com/20495
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
test plan:
* create a module item through the api of type 'page' by
setting the 'page_url' attribute to the 'url' of the
desired wikipage (since the id is not exposed in the api)
* in index and show actions, confirm that the 'page' item
includes a 'page_url' attribute
Change-Id: Ie39bf8b4b58eeed3d98e51843a26b592cc2746b0
Reviewed-on: https://gerrit.instructure.com/20608
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>
fixes CNVS-5807
test plan:
- index or show action for module item should show the id
of the referenced object (content_id), if it has one
- note that wiki page ids are not exposed by the api
Change-Id: I05748fa562b9e7cb5a775b6c8e40a5ff2e835f01
Reviewed-on: https://gerrit.instructure.com/20525
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reworked how the calls were passed through to take advantage of the
app center pagination. Also added an endpoint for retrieving app reviews.
The following canvas api calls should work, after configuring the app center plugin
- /api/v1/accounts/:account_id/app_center/apps
- /api/v1/accounts/:account_id/app_center/apps/:app_id/reviews
- /api/v1/courses/:course_id/app_center/apps
- /api/v1/courses/:course_id/app_center/apps/:app_id/reviews
These should also accept a page and per_page params
Change-Id: I15fe1225c01d04bc2ad6efa1736013b88e541c51
Reviewed-on: https://gerrit.instructure.com/20455
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Brian Whitmer <brian@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
* actually check if tags are balanced (not just innermost tag)
* allow single closed tag on either side of content (e.g. for an icon)
test plan:
N/A, see specs. i18n:check should also pass
Change-Id: I1ecbce833ab35955e21e40a2d2404de4aa1b359f
Reviewed-on: https://gerrit.instructure.com/20565
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
mysql requires auto_increment columns to be defined as a key
test plan
- using mysql run the Student Assignment Outcome Map Csv report
- report should not fail
Change-Id: I092e66e3e108e677b24a773bc5a46f118110ef8a
Reviewed-on: https://gerrit.instructure.com/20261
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
fixes PS-271
test plan
-create custom admin role
-launch lti tool, admin role is avail.
Change-Id: I4f93eee990e8b89cf6265a3fee19bafdb7ef62a4
Reviewed-on: https://gerrit.instructure.com/20017
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
test plan:
* account admins with 'Manage storage quotas' should:
* see the 'Quotas' tab in account settings
* be allowed to modify quotas on the 'Quotas' tab
* be allowed to modify quotas through the accounts api
* admins without 'Manage storage quotas' should:
* not see the 'Quotas' tab in account settings
* not be allowed to modify quotas through the accounts api
* accounts api should
* allow updating the default_storage_quota_mb
* allow updating the default_user_storage_quota_mb
* reject values for these fields that are too large
closes #CNVS-4798
Change-Id: Icebe863b8e155efac1849a387b0bd7b3f47590fd
Reviewed-on: https://gerrit.instructure.com/19849
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Don't automatically mark a discussion entry as read if the user
manually marks the entry as unread.
fixes CNVS-5705
test plan:
- As one user, create a discussion with lots of posts.
- As a different user, go to the discussion, see the entries
are automatically marked as read. Don't scroll all the way
to the bottom of the discussion so there are still some
unread posts.
- Click the gray circle to manually mark some of the read
entries as unread.
- Refresh the page. The manually marked entries should show
as unread and should not be automatically marked as read.
- Scroll down. Unread entries that were not manually marked as
unread should still be automatically marked as read.
Change-Id: I963d1dea9fc961a28a0a5c488399d4e3964c8d10
Reviewed-on: https://gerrit.instructure.com/20414
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
also removes a race condition for report file downloads
fixes CNVS-5768
fixes CNVS-5769
fixes CNVS-5784
test plan
- in a course use the student view student
- in the account for that course run the users, and enrollments provisioning report
- neither report should include the student view student
Change-Id: I03544c7a38d91bd7d356c4ae73ea8857f948da7e
Reviewed-on: https://gerrit.instructure.com/20517
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes CNVS-5493
test steps:
Trigger the following emails and ensure that the HTML and plain text
versions of the email appear proper.
* conversation message received
* new announcement
* new discussion entry
* new discussion topic
* updated wiki page
* summary (daily or weekly)
Change-Id: I9638badb500eeb6cb23e4a83bd8395cd5dc40608
Reviewed-on: https://gerrit.instructure.com/20296
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Eric Berry <ericb@instructure.com>
QA-Review: Eric Berry <ericb@instructure.com>
test plan:
* refer to the API documentation to:
* create a module
* update existing module
* delete a module
* create a module item
* update a module item
* delete a module item
closes #CNVS-5534 #CNVS-5555
Change-Id: Icf13300d015e37bae636324a218ecf9ab9f2f8d0
Reviewed-on: https://gerrit.instructure.com/20200
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes CNVS-5744
test steps:
- visit the 'quiz statistics' page on a quiz
- ensure that the 'Standard Deviation' and 'Mean Score' on the
right side appears to be accurate
Change-Id: Ib9b2da07f0280852fe2f979f1ed159e22809577e
Reviewed-on: https://gerrit.instructure.com/20445
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
add button to create item analysis report, and make student analysis
creation async. make both buttons show a progress indicator, and auto-
download the file when it's ready (or not, if you refresh the page)
test plan:
1. make sure delayed jobs are running
2. create a quiz that allows multiple submissions
3. have some students take the quiz
4. go to the quiz statistics page
5. click "Generate Item Analysis"
6. it should be generated and prompt you to download
7. the data should be useful/correct
8. click "Generate Student Analysis
9. it should be generated and prompt you to download
10. the data should be useful/correct
11. have another student take the quiz
12. you should be able to regenerate both reports
13. have a student retake the quiz
14. you should get the link to view stats for all submissions
15. you should be able to download a different "Student Analysis" report
for all submissions vs latest submission
16. the "Item Analysis" report should be the same for all submissions and
latest submissions
Change-Id: Ib6bfa259f386a6660a41cd7e093d3a6eb0119eda
Reviewed-on: https://gerrit.instructure.com/20137
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
fixes CNVS-5553
test plan
- as a teacher create an assignment
- as a student submit that assignment with a comment
- a call to the submission api that includes submission comments
should include the id of the submission comment
Change-Id: I2f207a7db3e0de2f9f3deb3a8f04467b2e7950bc
Reviewed-on: https://gerrit.instructure.com/20454
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
when a user explicitly logs out of one pseudonym session, invalidate all
the others
fixes CNVS-1923
test-plan:
- create a user in two different accounts
- log them in to both accounts
- click "log out" in one account
- should be logged out of both accounts
Change-Id: I79e70017d753c8201429901421e015f5d20e2000
Reviewed-on: https://gerrit.instructure.com/20096
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
fixes CNVS-4106
test steps:
- go to create a discussion topic and ensure that you can toggle between
the 'Graded' and non-graded availability dates. If the Graded is not
checked, you should see the Available From/Until.
- create a discussion topic with a past from and past until. ensure that
the discussion is locked for a student
- create a discussion topic with a future from and future until. ensure
the discussion cannot be seen by the student
- update the above created discussion topic and switch it to be graded
and set a future due, from, until date. ensure that the student cannot
see the discussion.
- edit the discussion and ensure that the graded checkbox is checked and
the group assignment fields are showing
- update the assignment with a past due, from, until and make sure the
discussion is locked for the student.
- do all above with current dates (from in past, until in future) and
make sure the student can see and reply to them.
- create an announcement and ensure that the functionality and forms are
the same as before
- verify that you are able to lock and unlock discussion topics on the
show view by using the gear drop-down
Change-Id: I99c9d54763fe3a74aa8a4bb37c22f09d4765d41e
Reviewed-on: https://gerrit.instructure.com/20339
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
fixes#9725, fixes#9776, fixes#7311,
Test plan:
* go to the 'external tools' tab on the 'course settings' page
* create and edit some external tools
- make sure to omit fields or input invalid data and make sure you
get sensible error messages back
Change-Id: I88a7d5e439a27a599cbcfcfbd576434386949d35
Reviewed-on: https://gerrit.instructure.com/13332
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
fixes CNVS-5458
test steps:
- create a module with a quiz
- perform an API call to module items and ensure the quiz url is
part of the response
Change-Id: Ic0f4235ae76a1a729cb0fcbb0a9f588218c4016e
Reviewed-on: https://gerrit.instructure.com/20396
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Eric Berry <ericb@instructure.com>
fixes CNVS-5650
test plan:
- go to the root account permission page and turn off "see the list of users"
for students
- then create an assignment with only overrides (no default)
- the students should see the due date
Change-Id: I518f651db96b14509c997628575834943042117f
Reviewed-on: https://gerrit.instructure.com/20395
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
The combination of these two changes fixes an issue with using extended
utf-8 chars in cql queries (including inserts)
fixes CNVS-5719
test plan: enable cassandra page views, and from a script/console run a
test query with extended utf-8 data, for instance:
PageView::EventStream.database.execute("SELECT * FROM page_views WHERE request_id = ?", "test \xEF\xBF\xBD one")
This will return no results since that request id isn't a UUID, but the
key is it shouldn't error.
Change-Id: I1dafb6165cdda65ab64267edbf9fabc4fccd783c
Reviewed-on: https://gerrit.instructure.com/20397
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
test plan:
- enable the quiz file upload feature for your account.
- make sure you have s3 credentials for your Canvas installation
- as a teacher, create a quiz with some file upload questions
- as a student, take the quiz, making sure the following works:
- you should get a warning if you leave any questions unanswered
- you should see your file in the right spot if you refresh the page
- when you finish the quiz, make sure a link to the file shows up on
the quiz show page and the display name for that file is the same
name of the file you uploaded
- take the quiz again and make sure files you uploaded for hte
previous submission don't show up when you first take the quiz.
closes CNVS-1153
closes CNVS-5331
Change-Id: Id3f8706e87cef9876946b52fd564caf31f31e4b5
Reviewed-on: https://gerrit.instructure.com/20174
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
fixes CNVS_5151
test plan:
by using the new image button in the tinymce toolbar, you
should be able to:
* insert an image from Canvas content (course or group files;
whatever the context for the editor is)
* test in wikis, discussions, quizzes, eportfolios...
anywhere you can find a rich content editor
* if you're in a course or group context, you should be
able to add course/group files. otherwise (in account
context, for instance) you will only see "my files".
* also, pls to test that subfolders work
* single-click an image to select it (and set size/alt text etc.
before pressing Update)
* double-click an image to select it and insert with the
default alt-text and size
* note that the size is constrained to the image's aspect ratio
* insert an image from the user's own files
* insert an image by URL
* insert an image from Flickr via search
* images inserted from flickr should link to the source flickr page
(this is part of flickr TOS, and is not a new behavior, but should
be tested explicitly)
* make sure if you change to a different flickr image, the link
is updated
* also test that if you change a flickr image to a canvas image
or url image that the flickr link goes away
* NOTE: also test the old flickr search dialog on the wiki sidebar
(the blue magnifying glass thing) for possible regressions.
(the tinymce plugin that powers this thing was modified.)
* create or edit alt text for any image type
(note, it does not add uploading new files, that will come in another commit)
Change-Id: I2d5f8ca9f2301168f442955fda791631ee886636
Reviewed-on: https://gerrit.instructure.com/14391
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
closes CNVS-2049
Test plan:
* download the gradebook csv in a course with unweighted assignment
groups. you should see "Current Points" and "Final Points" columns
* download the gradebook csv in a course with weighted assignment
* groups. there should not be any points columns
Change-Id: If795ab3dc0ae8a4fb84f29c9e759b463b7a14d04
Reviewed-on: https://gerrit.instructure.com/20189
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
provides an unpublished, backbone accessible api endpoint for the app center to consume.
In this commit the apps api just acts as a proxy to the external apps website based on plugin
settings, but in the future this endpoint will be able to match up data to tools installed in the
current context, cache data from the external website, return data to the external website,
and so forth.
Test Plan:
- Before installing the plugin:
* Visit /api/v1/accounts/:account_id/app_center/apps
* You should get an empty json array
- Enable the app center plugin
* Visit /api/v1/accounts/:account_id/app_center/apps
* You should get a json formatted array of app data
Change-Id: I48072053950e67aa583a3c79e2a582d30e7cd409
Reviewed-on: https://gerrit.instructure.com/20161
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>
- update the Gemfile to be 1.9 only, and raise an exception on wrong
ruby version
- remove RUBY_VERSION checks, replacing with the applicable code
- remove the FasterCSV compatibility shim, just use CSV now
test plan: trying to bundle install on ruby 1.8 or 2.0 should raise an
exception, specs should pass, canvas should work as normal on 1.9
Change-Id: I49088e9d227c59c6d5d5acb417c2df971129474a
Reviewed-on: https://gerrit.instructure.com/19806
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
Rails 3 doesn't handle them, so just ignore them.
also fix api usage of pluck depending on an include
Change-Id: Ia39b8ef6e5f442f4f7b873ae3bd6839f0422b906
Reviewed-on: https://gerrit.instructure.com/20071
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-5309
test steps:
- as a teacher, create a few discussion topics with graded
checked and due, begin and until dates are in the future, past
and current.
- as a student, view the discussions list and ensure that the
present and past topics are visible but the future is not.
- click the past discussion topic and make sure you are able to
view the discussion but not reply to it.
- click the present discussion and make sure that you can reply
to it.
- as the student and teacher, ensure that the visible discussion
topics appear in the stream items (dashboard) and the future
do not (for the student).
Change-Id: Ibb0a3d05ae830e764c8068a6c9d4ead804e91139
Reviewed-on: https://gerrit.instructure.com/20082
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
test plan:
- create a calendar event with section-specific times
- the teacher should see all times
- the student should see only the time for their section
(this is the bug being fixed here)
- if the syllabus is public and no user is logged in,
the event should show up just once, beginning at the
earliest section time and ending at the last
(this is not new behavior, but needs to be retested)
fixes CNVS-5087
Change-Id: Idb34a5e972256e38565ad2cc1c4ab4dae886b740
Reviewed-on: https://gerrit.instructure.com/20128
Reviewed-by: Mark Severson <markse@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Mark Severson <markse@instructure.com>
fixes CNVS-5514
fixes CNVS-4487
testing this is very cumbersome. currently there is no way to test
the facebook app on any environment other than production. here are
the steps required to get it tested locally:
1. start up your server. if you are using localhost:3000, you can
use localtunnel (http://progrium.com/localtunnel/) to set up a
proxy to your server. once you have the localtunnel gem installed,
run the command to have your port broadcast. copy the url it
returns
2. create a new facebook app. make sure the app domain includes the
domain you are using. if you are using localtunnel, put
'localtunnel.com' for the app domain. for the app on facebook
settings, use the full url with /facebook after it. for example,
'http://3s2r.localtunnel.com/facebook/'. trailing slash is
important. make sure you have 'sandbox mode' enabled.
3. in your facebook account, go to 'security settings' and change
the 'secure browsing' to disabled. not log off and log back in
to facebook making sure that the url is http://www.facebook.com
and not https://www.facebook.com
4. in canvas, set up the account to use facebook (/plugins/facebook).
use the app ID, key and secret from your facebook app you created.
for the canvas name, use the namespace you set up on the canvas
app. for the canvas domain, use 'localhost:3000'. Make sure SSL is
disabled.
5. log into your local canvas as a user and link your account to
facebook.
6. log into facebook and you should see the canvas app on the left
side with the name that you provided in the facebook app config.
click on this and make sure the page loads.
Change-Id: I19ac7d3a7ddb44990f82071514057ac84f4e8dae
Reviewed-on: https://gerrit.instructure.com/20220
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
The submission history formatter was returning a lot of data that it
shouldn't, and it wasn't going through the standard api_json helpers.
This commit modifies Api::V1::SubmissionHistory to use
Api::V1::Submission for the json formatting with the extra fields added
afterwards, and updates the documentation and tests to match.
fixes CNVS-5581
test plan: use the submission history api endpoints, including the new
feed endpoint. you should get submission history objects back in the new
format described -- it's a superset of the normal submission api
response object.
Change-Id: I01f6a1eacae5a1d6644dbd5b151fb41fe04eb469
Reviewed-on: https://gerrit.instructure.com/20184
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
test plan:
* create a rubric using non-decimal point values
(e.g. '1.5')
* copy the course
* should retain the same values
fixes #CNVS-1625
Change-Id: I23031bdf10c8ea2932bdd7c770ece14fddc3a12e
Reviewed-on: https://gerrit.instructure.com/20150
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
test plan:
- run rake js:generate_runner
- it generates a working runner
Change-Id: I38a53dddaae1526aaf5b9f998e07f271efaac6a7
Reviewed-on: https://gerrit.instructure.com/20197
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
QA-Review: Stanley Stuart <stanley@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
test plan:
* create a discussion topic in a course, checking
"allow threaded replies"
* copy the course
* the new discussion topic should retain the option
fixes #CNVS-1589
Change-Id: I0a37babac340c1f6ee869e4805217553d954e165
Reviewed-on: https://gerrit.instructure.com/20152
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Currently, when an Assignment is replaced by a cloned version via
AssignmentOverrideApplicator, the new object is a singleton and there-
fore cannot be serialized / cached.
This patch removes the creation of the singleton and uses instance
variable @new_record to get the same effect.
Refs CNVS-5253
Change-Id: Id26377b6f9c4cd226d0144ccaf33452de1148050
Reviewed-on: https://gerrit.instructure.com/20158
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
Create an event_stream_failures table, and add to it when an EventStream
operation intended for cassandra fails. intentionally swallows the
error, so the code inserting/updating the event stream doesn't notice
and bail on the failure, but we can keep an eye our for new rows and
also have enough data to replay those failures once fixed.
fixes CNVS-4161
test-plan:
- enable cassandra page views but intentionally misconfigure so that
inserts into cassandra fail
- generate traffic in canvas that should create page views
- the browsing user should not notice any errors
- but page views should stay empty
- event_stream_failures should be getting new rows
Change-Id: I1acabfef785ee0637b241924c6ff254c41d3d1e3
Reviewed-on: https://gerrit.instructure.com/19975
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
this commit is to help make canvas extensions more robust by
allowing tool level defaults and allowing both tool domains and launch
urls. Also added some helper methods for getting the correct properties,
and refactored to use the new helper methods.
Test Plan:
- Add a tool with both a domain and an launch url
- It should not give an error
- Add a tool configured with defaults for for canvas extensions
(such as icon_url, url, selection_height, selection_width, etc)
- Add a canvas launch (resource_selection, editor_button, course_navigation, etc)
with minimal configuration
- The canvas launch should inherit the properties from the extensions default
- Add an launch that has its own properties
- The launch should prefer its properties over the defaults
* should test that all launch types are accepting defaults
closes #CNVS-4498
Change-Id: I0dd4e78efb54db9c0cd1204383934db50f402674
Reviewed-on: https://gerrit.instructure.com/17715
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
fixes CNVS-5552
some requests may need to make several messageable_user related calls
for the same user. using a new calculator object for each skips any
in-object caching we've done, resulting in excessive cache traffic.
instead, reuse the same calculator object for any calls for the same
user during a request.
removes the convenience class methods on MessageableUser::Calculator
since (1) they're no longer used, and (2) the user's
messageable_user_calculator should be used instead.
test-plan:
- general conversation regression
- have redis caching set up
- create a user with multiple courses all with a common letter in the
title
- create multiple sections for each of those courses
- in the recipients field search for that character
- check logs; should not have excessive
context_permissions/courses/X/users/Y cache lookups
Change-Id: Ib015c59e7c735fca8ec5ba1998f08dff609e29d2
Reviewed-on: https://gerrit.instructure.com/20126
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
During the EventStream refactor we changed the page view inserts from
using PageView#changes to PageView#attributes. This was the right thing
to do, because #changes won't include columns that have the
default value for that column, but cassandra needs to be given any
non-nil default values. Not a problem for PageView, but it could be for
other models.
However, this introduced a performance regression, because #attributes
includes nil attributes which means the cassandra driver was sending a
DELETE (list of columns) command, creating a new tombstone record in
cassandra. The new insert_record() method on the driver removes any nil
values before calling update_record.
test plan: enable cassandra page views, then visit some pages. after the
insert job runs, the page views should have been created properly and
still display properly in the history.
Change-Id: Iccb967d3ec1f6b295d98b3f330b4b8ffe4508437
Reviewed-on: https://gerrit.instructure.com/20151
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
test plan:
* Enable the file_upload_question type for
the root account in the console:
> a = LoadAccount.default_domain_root_account
> a.settings[:file_upload_quiz_questions] = true
> a.save!
* Create a course with a question of type
"File Upload Question"
* Copy the course
* Confirm that the course copies successfully
and that the new question is the same type
closes #CNVS-1158
Change-Id: I99d872ee8557a83647fb2fa1425050c20a4ba518
Reviewed-on: https://gerrit.instructure.com/20013
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
replaced the mailman gem with custom code with more error
handling. this will allow the incoming message processor to
continue processing messages after encountering a message with
an encoding or parsing error. the broken messages will be moved
aside to a separate folder for later inspection.
fixes CNVS-4970
test plan:
- read up on the new incoming_mail.yml configuration settings.
- configure incoming_mail.yml with the test imap accounts
using legacy settings and check for regressions.
- reconfigure incoming_mail.yml to read from a directory.
- copy some testing email files into the configured directory.
test files should be a mix of:
- emails with encoding errors
- emails with syntax errors
- normal emails
- all of the normal emails should be processed normally
- all of the error emails should be moved into the error
subdirectory
Change-Id: I0f946a56b41492f007db2775aa6da3cdfa4fdd3f
Reviewed-on: https://gerrit.instructure.com/19729
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
fixes CNVS-2802
test-plan:
- create a course with multiple students and assignments
- create submissions for those students and assignments
- grade the submissions, including multiple gradings of some of them
- GET /api/v1/courses/X/gradebook_history/feed
- each grading should match the SubmissionVersion object described in
the API docs
- should include gradings for any assignment and student in the
course
- should include all gradings for any submission that's been graded
multiple times
- should paginate the returned gradings
- should order the most recent gradings first
- GET /api/v1/courses/X/gradebook_history/feed?assignment_id=Y
- should only return gradings for submissions on that assignment
- GET /api/v1/courses/X/gradebook_history/feed?user_id=Z
- should only return gradings for submissions by that user
- GET /api/v1/courses/X/gradebook_history/feed?ascending=1
- should order the oldest gradings first
- Repeat with combinations of the various parameters
Change-Id: I44aae11919116519f87a097f2d5cf1849acc4db3
Reviewed-on: https://gerrit.instructure.com/19680
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
test plan:
- as a teacher, grade some students submissions for some assignments.
- for good measure, make sure there is at least one student who hasn't
been graded for each of the assignmetns
- query the assignments index api
(/api/v1/courses/:course_id/assignments) and pass an include
parameter that is an array that has the string 'submission'
- you should see a submission object in the response for each student
with a submission.
- the student who was not graded should not have the 'submission' field
for each of his or assignments
- make sure the api works both from the perspective of the teacher and
student (teachers should not see the "grade" field in each of the
assignments unless they have submitted and have beeng graded on that
assignment)
closes CNVS-5316
Change-Id: I8f6f2c559a3355de4e3ad178c9ade695d7fe5b3a
Reviewed-on: https://gerrit.instructure.com/20006
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
* expose templates so plugins can override them
* tweak ENV data we pass into js
* basic cilent-side field validations
test plan:
N/A, see plugin commit
Change-Id: Ic3998affc99e24f9c8d57b8f0068d03ae3be9fef
Reviewed-on: https://gerrit.instructure.com/20056
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
closes CNVS-5218
test plan: insert audio and video comments into rich text that goes
through the api (for instance assignment descriptions, and discussion
entries). modify the content multiple times, the audio and video should
still play correctly. use the api to pull the same content, modify it,
and push it back through the api. the content should still play
correctly.
Change-Id: Id38ef78aaa478c66ae2314b30d33ec3f2199a6bd
Reviewed-on: https://gerrit.instructure.com/19598
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@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-5279
test plan:
- see API documentation to create/retrieve/update/delete pages
- exercise endpoints, including
- CRUD functionality (above)
- test renaming page
- test publishing / unpublishing
- test creating the front page in a new course or group
Change-Id: I5d3b36615b7bdbfda0d4781db14cd7d49d32eba1
Reviewed-on: https://gerrit.instructure.com/19952
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
- added assignment links for public courses
- fixed images in the syllabus body for non-enrolled admins
test plan:
* syllabus page is shown (including when the course home page is set to the syllabus)
* images in the syllabus body are shown
* links are presented when the user has access to the content (assignment, event, etc)
public and non-public courses for all role types, including:
* teacher, ta, etc
* student
* anonymous (not logged in)
* admin (with & without 'View Course Content' right)
fixes: CNVS-5364
Change-Id: Ieea5987530e67563c97eec2b495cfb8b712f8a03
Reviewed-on: https://gerrit.instructure.com/19822
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
wiki pages can be unpublished but will still default to
active until the feature is enabled.
Test Plan:
* make an unpublished course in the console
* using the wiki api make sure students can't see it in
the index or show actions
closes CNVS-5270
Change-Id: I48970ce9c6b86a3039432b6d7647810b434bfdfc
Reviewed-on: https://gerrit.instructure.com/20014
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
given app/coffeescripts/foo.coffee in canvas-lms, if you want to monkey
patch it from your plugin, create app/coffeescripts/extensions/foo.coffee
(in your plugin) like so:
define ->
(Foo) ->
Foo::zomg = -> "i added this method"
Foo
and that's it, no changes required in canvas-lms, no plugin bundles, etc.
note that Foo is not an explicit dependency, it magically figures it out.
also note that your module should return a function that returns Foo.
this function will magically wrap around Foo so you can do stuff to it
anytime somebody requires "foo" as per usual.
test plan:
1. use it as explained above
2. it should work
Change-Id: If3b21782c0e79bb0ce55b4f16804047a2c2e2143
Reviewed-on: https://gerrit.instructure.com/20004
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
fixes CNVS-5147
test steps:
- trigger a twitter notification and ensure the link is pointing to
the correct url (without 'mr' in the url)
Change-Id: Ib70b67039e919720c941c15ec1d20eca652d478b
Reviewed-on: https://gerrit.instructure.com/19882
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
update the loading of tasks to work with Gem::Specification
fix gem name and properly load hairtrigger by it's name
Change-Id: I7ce10c0688991555e9be47c7b17157ccd5063a96
Reviewed-on: https://gerrit.instructure.com/20090
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
fixes CNVS-5492
test plan (external):
- download the gradebook csv with and without sis ids
- it should still work
test plan (internal):
- run gradebook csv with sis ids from the console and watch the db queries
- it should not load quiz submissions
- it should not load the account once per student
Change-Id: I2665041d8733856d8b32547b49d5af5b69292076
Reviewed-on: https://gerrit.instructure.com/20007
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
ensure that we infer absolute keys for I18n.t calls, regardless of the
current file's scope
test plan:
1. run rake i18n:generate
2. open config/locales/generated/en.yml
3. search for "was added to the conversation"
4. its scope should be en.conversation_message.users_added.one, rather
than en.conversation_message.conversation_message.users_added.one
Change-Id: Ie35828738dbf09fb928f49d4635701d8f1c10ade
Reviewed-on: https://gerrit.instructure.com/19893
Reviewed-by: Joe Tanner <joe@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
fixes CNVS-5339
a previous datafix dissociated some discussion topics from
their related assignments; this fix restores the
assignment_id for those discussions.
test plan:
* run specs
Change-Id: I5deaea1b4969588b2bcc12e62de063c6e47a48f8
Reviewed-on: https://gerrit.instructure.com/19671
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
make i18n:check reject anything that looks html-y, since we should be
using wrappers (or markdown) instead
test plan:
1. generate the following emails and confirm that the html version is ok:
* content_export_failed
* content_export_finished
* merge_email_communication_channel
* migration_export_ready
* migration_import_failed
* new_context_group_membership
2. go to the quiz detail page as a student and confirm it loads/looks
correct (specifically where it says the number of questions below the
title)
Change-Id: I0b8bfb0628a081859915c33764bfc3ce49690e8d
Reviewed-on: https://gerrit.instructure.com/19823
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
also give the source filename
Change-Id: I7e2dd093968093108f808a00be1004a3e158a475
Reviewed-on: https://gerrit.instructure.com/19948
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
removed unused code to import an ical feed into a calendar,
and dropped the external_feed_id from the calendar_events
table because it isn't being used.
Change-Id: I9c093f4f2f63cc503d74bfc1cde089bf24ea0d73
Reviewed-on: https://gerrit.instructure.com/19615
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
this will allow it the script to be easily chained with other test
related rake tests
test-plan:
* modify a migration to have syntax that will migration_lint
* execute 'bundle exec rake db:migration_lint', should return an error
* revert migration change
* execute 'bundle exec rake db:migration_lint', should not return an
* error
Change-Id: I5b0dc9d27759662141e11bf1f42cdf376b67ad96
Reviewed-on: https://gerrit.instructure.com/19885
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
Product-Review: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
fixes CNVS-5248
test plan:
- start taking a one-question-at-a-time quiz
- log out in another tab
- hit the next or previous button
- re-login
- you should land back in the quiz
Change-Id: I578d6803bd6deb90ec3c82153d999b478e42a199
Reviewed-on: https://gerrit.instructure.com/19539
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
also supporting forcing the quiz show page to require a user even in a public
course.
closes CNVS-5250
test plan (api):
- make sure the quiz api returns a mobile_url that sets these parameters
test plan (headless):
- go to a one question at a time quiz
- add ?headless=1 to the url
- notice that the quiz loads without top/side bars
- start the quiz
- the top/side bars are back
- now go back to the show page and add ?persist_headless=1
- start the quiz
- the top/side bars should still be gone
test plan (force user):
- as a logged-out user, go to a quiz show page in a public course
- it should work
- now add ?force_user=1 to the url of the show page
- it should redirect to the login page
- after logging in, you should end up back at the show page
note: please also check that getting notified when logged out of a quiz still
work, as that code was refactored slightly.
Change-Id: Id17ce336f8d12a6f4dd0f4d1324e7b4dd5cca1d0
Reviewed-on: https://gerrit.instructure.com/19597
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
back-populate submission_versions from existing versions for
submissions, and insert new index rows when new versions for submissions
are created.
refs CNVS-2802
test-plan:
migration:
- have at least two submission with at least one submission with
multiple versions in your database before introduction of this
code
- run the migration
- for every existing submission version record, there should now be
a submission_versions record
- the submission_versions records should have the correct metadata
for the submission version
trigger:
- create a new submission
- should create a new submission_versions record
- modify the submission in a way that triggers a new version
- should create a new submission_versions record
Change-Id: I9c4c39fa60926b037142abf3f01572c9deaa0643
Reviewed-on: https://gerrit.instructure.com/19605
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
test plan:
- courses api should return 'unpublished' workflow_state for
courses in 'created' or 'claimed' state
Change-Id: I927cd6d4b66556c1d0762ad16433f69764d6a050
Reviewed-on: https://gerrit.instructure.com/19574
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
make this data fix postdeploy, and avoid find_in_batches issues
also remove :concurrently from a index created transactionally (on a new table)
Change-Id: If9744e13b2387eb1a310f19629fff6327000add5
Reviewed-on: https://gerrit.instructure.com/19834
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
fixes CNVS-5288
added a couple of fields to appointment group json so that we
don't need all the child events up front
stopped loading all the child events up front
test plan
- ensure scheduler works as before, especially the participant
count under appointment groups on a teachers view and the
signed up for times on a student view
Change-Id: I59d05484b3fdf43fdd38442e37d4a8fa98616f51
Reviewed-on: https://gerrit.instructure.com/19573
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
in particular, fixes a problem where having any parameter
in import html content would cause "/preview" to not
be appended
test plan:
* import the package referenced in the ticket
* the wiki page 'coverslip smears' should have
functioning images
fixes #CNVS-5230
Change-Id: Ifd45efd841fa94f54d0478d040709d32b6b5fc5e
Reviewed-on: https://gerrit.instructure.com/19741
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
test plan:
* create an assignment, link an attachment
in the description, and save
* open the assignment editor up again and save it
* delete the attachment and re-upload another
file with the same name
* preview the assignment
* the link should take you to the updated
attachment instead of failing
fixes #CNVS-5216
Change-Id: I7258d4ca35f6d34594bd32bd77e86c2e61262ea4
Reviewed-on: https://gerrit.instructure.com/19594
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
* create an object with html user content (such as an
assignment description)
* include a file download link (e.g.
"/courses/:id/files/:file_id/download")
* retrieve the object through the API
* confirm that the translated link (that includes
a verifier param), still has "/courses/:id"
rather than just "/files/:file_id/download"
* include a file preview link (e.g.
"/courses/:id/files/:file_id/preview")
* retrieve the object through the API
* confirm that the translated link has
"/courses/:id" and still has "/preview"
as well as a verifier param
* confirm that following the link in the browser
results in downloading the file
closes #CNVS-5213 #CNVS-5214 #CNVS-5215
Change-Id: Ib2bb6b1857055dbfe2d1b9e0873600beaa70bf75
Reviewed-on: https://gerrit.instructure.com/19512
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
fixes CNVS-1641, CNVS-3143, CNVS-5356
now it actually works :-/
* fix key getting stomped by iteration of options
* fix double-scoping (explicit and in options)
* fix absolute key bug (they were getting scoped)
* fix camelCased filenames having the wrong scope
* support single-quoted keys
test plan:
1. change your language
2. go to pages where translations didn't show up (e.g. outcomes, calendar2)
3. use optimized js, or tack on ?use_js_translations=1
4. the content should be translated
Change-Id: I9742d60e5dcbccf971ce30b1302e85d4f4033b77
Reviewed-on: https://gerrit.instructure.com/19717
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
The find_in_batches scope was applying to the self.assignment
when a discussion topic was saving itself. So the topic
wouldn't find the assignment and would set its assignment_id
to nil.
This also just updates the specific column for the assignment.
Either of these would fix the problem, but I added both anyway.
refs CNVS-5217
Change-Id: Ic77704999b6835688d9c3c88dbfce9607fe4c662
Reviewed-on: https://gerrit.instructure.com/19664
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>
test plan:
- upload images to a course
- retrieve these files via the files api
- a thumbnail_url should be in the response
- confirm that this thing is downloadable
fixes CNVS-5329
Change-Id: I583cba7d08566770223821de554b76f9c767b38f
Reviewed-on: https://gerrit.instructure.com/19612
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
fixes CNVS-5367
this allows hairtrigger and our i18n extraction code to parse 1.9 syntax
correctly.
also fixed a issue with the i18n rake tasks, so symlinks in
vendor/plugins are now followed.
test plan: without this commit, run rake i18n:generate. then copy
config/locales/generated/en.yml somewhere.
then apply this commit, update your bundle, and run rake i18n:generate again.
compare the new en.yml against the saved one, they should be the same
(unless you have symlinks in vendor/plugins, in which case the new one
will have more strings but existing strings should be the same)
Change-Id: If0df5eae25c59822a9d3c2738fe9549a756ff9e9
Reviewed-on: https://gerrit.instructure.com/19693
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
so that it can be used elsewhere
refs CNVS-4466
test plan: specs
Change-Id: I7246e5f878867c839bf276ffc857f30ee47b5bc8
Reviewed-on: https://gerrit.instructure.com/19646
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
extracted out of canvas-lms
refs CNVS-4713
test plan:
* actions that use a slave should still work (dashboard render)
* you should be able to switch envs and users in console
Change-Id: I07dda8057cf94383bc4579f1ef6b5a4b3ffc20b5
Reviewed-on: https://gerrit.instructure.com/19287
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
adds account setting and new user permission
fixes CNVS-4726
Testing Notes:
============
* To enable...
* Account Settings, check Feature
"Admins can view notifications"
* Account permission under "Account Roles"
becomes available under "Admin Tools"
group. Check "View notifications"
* appears under account "Admin Tools"
sidebar area on "View Notifications"
tab.
(EX: /accounts/[account_id]/admin_tools)
* Verify "View Notifications" tab does not
appear if either account setting or user
permission is disabled. (For AccountAdmins)
* Verify a SiteAdmin is able to access the
feature.
* Verify that notifications are returned
and displayed for a selected user
and date range.
* Verify it displays "No messages found"
when user doesn't exist or the user
exists but the date range doesn't
return data.
* Verify that the user_id is required when
searching
* Verify that the "To Date" cannot be before
the "From Date".
* Verify an invalid date like the word "couch"
gets ignored and the actually used date/time
is displayed in the overview text description.
* Verify searching by dates when either or both
are left blank and when both are used.
* Verify that the messages automatically
fetch more when you scroll down.
* Verify that before the results, it displays
the user's name and the dates used for the
results.
Change-Id: I9d2689b4760af57bbc2d15fd7d50610dcf593a7e
Reviewed-on: https://gerrit.instructure.com/18629
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
refs CNVS-5336
test plan: you should be able to use the user search api to find users
by last name and sis id even without explicitly enabling the
user_search_with_gist and user_search_with_full_complexity Settings.
Change-Id: I1d7349ddfa80987c0950b80aff189339cdd42796
Reviewed-on: https://gerrit.instructure.com/19621
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
also add computed_current_grade to the my-courses api
Adds tests for both the computed scores on the course listings as well
as the computed scores on the users listing for the course. Also adds
API documentation.
Test Plan:
- An api call to /api/v1/courses/N/users?include[]=enrollments will
include 'grades' key with 'current_score', 'current_grade',
'final_score', and 'final_grade'
fixes CNVS-5101
Change-Id: I26e3cb069e3a9ce9a80c966017251e627a7b30d1
Reviewed-on: https://gerrit.instructure.com/19466
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>
also cleaned up the calendar events api specs to make them a
little less error prone
test plan:
* syllabus page:
note: please verify against published courses
* standard access (calendar events, assignments, appointment groups)
* public course (calendar events, assignments)
* public syllabus (calendar events, assignments)
* courses api:
* create w/public_syllabus
* update w/public_syllabus
* get w/include[]=public_syllabus
* calendar events api (for public courses/public syllabus courses):
* calendar events and assignments
fixes #CNVS-4811
Change-Id: I17e9f260117c031af008592a470b6e17df93c1d5
Reviewed-on: https://gerrit.instructure.com/19376
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
* in an assignment description, add a link to an attachment
* delete the attachment
* re-upload the attachment with the same name (but different id
now)
* should be able to use the link still
* switch views and edit the link to break it by
adding "?verifier=somethingsomething" on the end of it
or shortening "/courses/:id/files/:file_id/download"
to "/files/:file_id/download"
* now run the migration/datafixup
* should be able to use the link again
fixes #CNVS-5137 #CNVS-5217
Change-Id: Ic7cd5f1acdecffce0e9ee953ca0dd732c65f2a75
Reviewed-on: https://gerrit.instructure.com/19377
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
There are three parts to this:
- API access for site admins and account admins. Account
admins can only see messages for their account.
- Includes start and end time parameters for basic searching
- Summary notification are gathered up per account now, so
account admins will not see a summary notification from
multiple accounts.
fixes CNVS-3695
test plan:
- Verify Admin Access:
- Have a user enrolled in two courses in separate root
accounts.
- Send the user ASAP notification from each account.
- Go to /users/:id/messages (the old interface) and verify
the messages appear there.
- As a site admin, get /api/v1/comm_messages for the user
(see documentation for the api).
- Verify that data for both messages are returned.
- Use the console to give an account admin on one of the
accounts :read_messages permissions.
- As the account admin, get /api/v1/comm_messages for the
user.
- Verify that only the message for the admin's account is
returned.
- Verify start_time and end_time parameters
- Use the console to modify the created_at field for the
user's messages
- As a site admin, get /api/v1/comm_messages for the user,
specifying various combinations of start_time and
end_time, and make sure the appropriate messages are
returned.
- Verify account based summaries
- Set the notification policies for the user to a summary
setting (daily or weekly)
- Send multiple notifications to the user from each account.
- Use the console to run the
SummaryMessageConsolidator::process function.
- View /messages for the user and verify that separate
summaries are sent for each account.
Change-Id: Ie33ec02cc2033a1cc2f1fcbe538b76792aab0e6c
Reviewed-on: https://gerrit.instructure.com/18586
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>