authentication
Fixes PFS-1084
Parent Registration:
When a Saml config is designated for Parent Registration the parent
signing up will be redirected to a Saml login page where they will log
in with their child's credentials. After login the child user's
Saml session will be ended and the parent registration process will complete.
Parent Adding Student:
When a Saml config is designated for Parent Registration the parent
adding another observee will be redirected to a Saml login page
where they will log in with their child's credentials. After login the child user's
Saml session will be ended and the observee creation process
will complete.
---------------------------------------
TEST PLAN:
SETUP:
1) In your account settings check the box for 'Self Registration' (and
either of the sub-options)
2) Add the following users to your account (these will be the students):
billyjoel
eltonjohn
3) In Authentication Settings add a SAML authentication service
and enter the following fields (I've set up a remote SAML Idp):
IdP Entity ID: http://107.170.212.143/saml2/idp/metadata.php
Log On URL: http://107.170.212.143/simplesaml/saml2/idp/SSOService.php
Log Out URL:
http://107.170.212.143/simplesaml/saml2/idp/SingleLogoutService.php
Certificate Fingerprint:
9C:11:68:93:95:CD:18:01:EC:52:2B:9E:22:7F:73:55:ED:6D:82:D4
Parent Registration: check
TEST:
Parent Registration:
* Go to '/login/canvas'
* Click on the signup banner
* sign up as a parent for billyjoel or eltonjohn
(on SAML login page the password for either user is: tantrum)
Add Student:
* Log in as a parent user w/ a Canvas Auth login
* Go to '/profile/observees'
* Add Student 'billyjoel' or 'eltonjohn'
Authentication Settings (new parent reg checkbox):
* Go to Authentication Settings
* Add a second SAML config
* check the parent registration checkbox
- it should warn that selection will deselect the other
and in fact do so upon save.
- the selected config is the one used for
parent reg/add student
---------------------------------------
Change-Id: Ief83b604fc252c88dbb912c56de65d8620fe802f
Reviewed-on: https://gerrit.instructure.com/49691
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
closes CNVS-19452
* add the column and foreign key, uniquely index it,
and replace the old unique index to make sure it's null
* change lookup of pseudonyms on log in. CAS/SAML/LDAP
look for matching or non-namespaced pseudonyms. OAuth
looks only for matching.
* update API for creating/exposing the provider info
* update canvas_authentication modulation so it's only forced to true
when deleting the LAST aac
test plan:
* create a pseudonym for a specific provider (via the API)
* ensure that even it matches for another provider, it's
not found when you try to log in
* check a CAS login will find a pseudonym with no provider,
or the correct one
* check that a OAuth login won't find a pseudonym not
associated with any provider
* finally, check that a OAuth login _will_ work with a
matching pseudonym
Change-Id: I5d9ef8a992c6e0f6e1d8e13e4fb87d25304d982e
Reviewed-on: https://gerrit.instructure.com/55117
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
remove attachment_id foreign key constraint from
the gradebook_csvs table to prevent foreign key constraint
violation. also added `has_many :progresses` to the course
class to keep the progress_id foreign key on the gradebook_csv
table
closes CNVS-20549
test plan
ensure a an admin user (a user on a different shard
than the course shard) can export a gradebook csv
successfully
Change-Id: Iae9d0201192320ed45d5e901867ae20a9eb7ab1d
Reviewed-on: https://gerrit.instructure.com/54494
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Dylan Ross <dross@instructure.com>
refs CNVS-12716
test plan:
- make course with many assessed outcomes
- load the mastery gradebook
- it should load relatively fast
Change-Id: I81a91d58d37e5ae3d5399d59f6e3626af53496ea
Reviewed-on: https://gerrit.instructure.com/53493
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Tested-by: Jenkins
Product-Review: Hilary Scharton <hilary@instructure.com>
fixes CNVS-20736
This is part of 3 other commits to create a modified_at endpoint for
attachments
Change-Id: I46719ecde2d5293243fbafab9e413c27a2a282af
Reviewed-on: https://gerrit.instructure.com/55275
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
QA-Review: Sterling Cobb <sterling@instructure.com>
closes CNVS-19536, CNVS-19540, CNVS-19545
test plan:
* test google auth
* re-test the other oauth providers, cause more stuff got refactored
Change-Id: Ib1c0332cc31f0825f171f3281bf7255abb602844
Reviewed-on: https://gerrit.instructure.com/54526
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-20620
no need to have 1 per AAC
test plan:
* use a delegated auth provider
* configure an unknown user url
* log in with a user that doesn't exist in canvas
* it should redirect to your url
Change-Id: I962513a58993bbb98921c2337d228cb53de06e9e
Reviewed-on: https://gerrit.instructure.com/54671
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
closes CNVS-19463, CNVS-19460, CNVS-19461
test plan:
* you know the drill by now.
* retest facebook, because that was refactored to share code
Change-Id: Iaf99b7b3c6850b1ac3690d1a5ebd1286268b5ae7
Reviewed-on: https://gerrit.instructure.com/54313
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
closes CNVS-17549
closes CNVS-17553
Test plan:
* excuse and unexcuse assignments from the api
* student grades should be correct
Change-Id: Id8e0fa9edb404bdf65bff0bfc4c79c6f33e8a7e4
Reviewed-on: https://gerrit.instructure.com/53409
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Adrian Foong <afoong@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
Overwrites timestamps from the client if they differ from server time by
greater than 30 seconds.
Closes CNVS-20405
Test Plan:
- Start a quiz attempt.
- Take a question or two
- Change system clock to +2 minutes
- Take a question or two
- Change your system clock to -2 minutes (from real time)
- Take a question or two.
- Submit quiz.
- View quiz submission event log (QLA) and confirm that
the page events have correct timestamp information. Remember that answer
events are not subject to the system clock problems, so look at page
focused/page blurred events and others which are JS based.
Change-Id: I9e1fa20a9bb9e9373ad7422cc2e917480e7ac628
Reviewed-on: https://gerrit.instructure.com/53974
Tested-by: Jenkins
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
* move most of the logic into PartitionManager
* use a setting for how many partitions to precreate/prune
* enumerate existing tables for pruning, instead of assuming
we can just roll off the last one
* actually run the tests for partman from CI
* simplify configuring partitioned migrations (just rely
on the model to get the table name, instead of trying to
guess the model from the table name, and sometimes having
to provide both)
Change-Id: Ic8ac2b603a02f092b2f278d2b366b1cd9f942954
Reviewed-on: https://gerrit.instructure.com/53286
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Reviewed-by: Brian Finney <bfinney@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
closes CNVS-20076
First, pull a presenter out of the AAC index
This thing needs more flexibility before introducing
multiple OAuth connectors. This commit adds a couple characterization
specs for the AAC controller, then drives out a presenter to pull
as much logic and config out of the nested views as possible.
Then, this commit refactors the
previously-somewhat-bespoke-and-presumptive sac
configuration into a workflow that shows each aac
in turn according to it's type, creating forms for
each type at the bottom, and
showing the relevant form for a new one based on
selection on the right.
Have regression tested in the browser to the level
of CRUD functionality, but also deserves solid QA
for SSO functionality post-configuration.
DONE:
-successful CAS creation/editing/deletion
-successful LDAP creation/editing/deletion
-proper differentiation between LDAP primary and secondary
-proper SAML creation/editing
-move away from "update_all" deprecated endpoint
-Selenium Spec fixes
-ensure discovery URL and debugging workflows for saml
-remove duplication from views
-tear down old JS workflow
-apply appropriate tests for new behavior
-remove presenter methods that are no longer valuable
-Moved change_password_url and login_handle_name
-up to account settings, removed them from AACs, and built
-migrations to manage the transition.
-Found and fixed all references to change_password_url on AACs
-Found and fixes all references to login_handle_name on AACs
-add datafixup for migrating AAC data to account settings
-unify repetative individual files into single form delcarations \o/
-remove old SAML editing js
-Make sure SAML still works
-Make LDAP partial flow just like SAML/CAS
-Unify position information across all types
-update "acts_as_list" to support STI classes
-move discovery URL into account auth form
-remove discover URL js management
-Unify form generation between new/existing aacs
-deprecate discovery url API endpoints
-update docs for authorization settings to deprecate their usage in AAC
api and redirect their values to current settings for now
-make delete links non-js-y to stop this silly page refresh on api
completion
-make form submissions actually submit the form rather than do this silly
page refresh on api completion
-See if anything needs “Edit Details” button, remove if not
-Wire up removing account settings by blanking out form
-Removed "cancel" button from form because fields are always open
-placate gergich
-Test removing config info
-Test population fixup on real data
-write docs for authorization settings
-fix existing specs
-fix routing and docs to not break doc generation
-fix stupid jenkins task that thinks it can’t see controls
-re-fix selenium
-fix saml debugging workflow
-write tests for acts_as_list behavior
-write tests for authorization settings
-remove auth_info types of things
-clean up and unify styles where possible
TEST PLAN:
Regression test creating/deleting/editing and logging
in with SSO solutions for CAS, LDAP, and SAML.
Should be no functional behavior modification, though
workflow will be a little more unified between the
3 currently supported types (each one will
require using the menu in the right sidebar
to add a new AAC).
Also test setting and deleting account settings through
the form underneath the configs when there are AACs in existence.
Finally, make sure that the SAML Debugging workflow still works.
Change-Id: I448db10185512d1b9469c2a425be0a3bcf9e6ebf
Reviewed-on: https://gerrit.instructure.com/53448
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
This updates the functionality of our QS data fix script to allow for
finding/fixing in a single delayed_job operation
Also, corrects a bug in the existing event_aggregator which
unnecessarily looped over the answers repeatedly. This should speed up
the data fix by orders of magnitude.
Refs CNVS-20069
Test Plan:
- Confirm script works well on beta
Change-Id: Icd4a1b1fa866650162a2b1b4ac97201efe6d5e76
Reviewed-on: https://gerrit.instructure.com/54249
Reviewed-by: Ben Chobot <bench@instructure.com>
Reviewed-by: Brian Finney <bfinney@instructure.com>
Product-Review: Brian Finney <bfinney@instructure.com>
Tested-by: Jenkins
QA-Review: Robert Lamb <rlamb@instructure.com>
test plan:
* run bin/rake doc:api and open /doc/api/bookmarks.html
* verify that the following endpoints are documented
* GET /api/v1/users/self/bookmarks/
* GET /api/v1/users/self/bookmarks/:id
* POST /api/v1/users/self/bookmarks/
* PUT /api/v1/users/self/bookmarks/:id
* DELETE /api/v1/users/self/bookmarks/:id
* using RESTClient, Postman, or similar, verify endpoints work
Change-Id: I9b7c7941b25e1ea8dfec6a11c4515b8ea558c523
Reviewed-on: https://gerrit.instructure.com/53827
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
QA-Review: Pedro Fajardo <pfajardo@instructure.com>
Fixes: CNVS-19783
Test Plan:
Run migrations
Create a new web conference.
Get the conference key from a rails console:
conf_key = WebConference.last.conference_key
Get the secret key:
secret = WebConference.last.config[:secret_dec]
Put together a signed payload like this:
signed = JWT.encode({meeting_id: conf_key}, secret)
Then post it to your localhost like this (not in the rails console):
curl --data "signed_parameters={the string you got handed when you signed the payload}" http://localhost:3000/api/v1/courses/{your course id}/conferences/{your conference id}/recording_ready
If you look at the rails server you should see the html of the notification email fly by.
Change-Id: I87cf9fc229130c2e23529c47856a66aa8e57c697
Reviewed-on: https://gerrit.instructure.com/51813
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins
QA-Review: Derek Hansen <dhansen@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
migration 20150506164227 should be skipped on large environments and the
following command should be manually run instead.
rails console
DataFixup::FixCorruptAssessmentQuestionsFromCnvs19292.run(
[
'calculated_question',
'numerical_question',
'matching_question',
'multiple_dropdowns_question'
],
Date.parse('2015/3/14').beginning_of_day, # Beginning of corruption
Date.parse('2015/3/18').end_of_day # End of corruption
)
Fixes CNVS-19365
- Increments AssessmentQuestion version numbers so quizzes will pull new
data on next quiz take
Test plan
- Effected quizzes should be fixed
Change-Id: Iafae6525ae2406a6a4b3ae88c6f61e451719dd2b
Reviewed-on: https://gerrit.instructure.com/53536
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Brian Finney <bfinney@instructure.com>
QA-Review: Brian Finney <bfinney@instructure.com>
exporting the gradebook as a csv is now
done in a delayed job. when the user
clicks export, the export button will
be disabled. when the export has
completed, it will download the report
automatically. the csv generated previously
will be stored on the course, so it can
be downloaded again at a later time,
if a user leaves the page
fixes CNVS-17200
test plan
ensure the data is consistent with the
synchronously exported gradebook
ensure the teacher can see the exported
gradebook csv in the user's files page
Change-Id: I3d1e800326d82fe5cbca5a57ed7f60fad64daad5
Reviewed-on: https://gerrit.instructure.com/52689
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Tested-by: Jenkins
Product-Review: Christi Wruck
rails console
DataFixup::FixCorruptAssessmentQuestionsFromCnvs19292.run(
Date.parse('2015/3/14').beginning_of_day,
Date.parse('2015/3/18').end_of_day
)
Fixes CNVS-19365
- Increments AssessmentQuestion version numbers so quizzes will pull new
data on next quiz take
Test plan
- Effected quizzes should be fixed
Change-Id: Ie1471f1920d8e59f4081732b26c48ed649054dfc
Reviewed-on: https://gerrit.instructure.com/50611
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins
Product-Review: Brian Finney <bfinney@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
fixes CNVS-16277
test plan:
* create a discussion topic
* open edit page
* change Allow liking, Only graders can like, Sort by likes
* verify that changes persist
* open topic show page
* verify that like buttons are present if Allow liking is enabled
and Only graders can like is disabled or the user can grade
* click on a Like button
* verify that the button is activated
* refresh the page
* verify that the rating persists
* verify that the number of likes on each entry is displayed
* enable Sort by likes
* wait a minute for the topic's cache to rebuild
* refresh the page
* verify that entries are sorted by number of likes
Change-Id: I8e329899c8b81832bdf9132438537bcd7a32e258
Reviewed-on: https://gerrit.instructure.com/42786
Reviewed-by: Joel Hough <joel@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Tested-by: Jenkins
Fixes PLAT-991
Test plan:
- Run through an OAuth flow in the usual manner with a given
developer key
- Run through it again, this time giving replace_tokens=1 to the
call to /login/oauth2/token
- Ensure that the old token was nuked and only the new one remains
- Set replace_tokens to true on the developer key you're using
- Run through the OAuth flow again, without giving replace_tokens=1
to /login/oauth2/token, and ensure that the old token was once
again nuked
Change-Id: Id2b40bfd16918ab3d0852dabc13ed7b500277dc9
Reviewed-on: https://gerrit.instructure.com/52286
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Alex Boyd <aboyd@instructure.com>
also fixup old ones
test plan:
* export a course with a wiki page set as the front page
* create a new course
* import the exported package
* should be set as the front page
closes #CNVS-14601
Change-Id: Icb660f2c84ab9a9c208d0fc092cf348d69edcab7
Reviewed-on: https://gerrit.instructure.com/52245
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
add migration lint as rubocop cops
create frozen constant linter
find_ids datafixup lint
send_later lint
lint send_later in predeploys
add freeze_constant cop to default config
don't forget to include rubocop when running
get the rubocop runner into the script
lint for wrong algorithm name
lint primary key
lint remove_column in predeploys
get rubocop output as parsed json
diff munging for gergich
disable a few style cops
tweak rubocop setup to allow IDE plugins to work
get gergich comment format right
shell out to gergich if we're in jenkins-land
Change-Id: I6eecc8d8ede17a755c9d9a86121c3658776de9cd
Reviewed-on: https://gerrit.instructure.com/51755
Tested-by: Jenkins
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
also when dropping columns, you either need to specify full arguments so
that the inferred down works, or add an explicit down (in this case,
explicit because the conditional may interfere with generation of the
inferred down)
Change-Id: I314b1b17bfee973182827303575b3662a04bbc47
Reviewed-on: https://gerrit.instructure.com/51541
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Test plan:
* uploading the gradebook should work like it used to (except it will
even work for ridiculous-large courses)
* try to break it by running multiple uploads in parallel / etc
Change-Id: I80dfe7babe320a1cee4021c59c5691d1df5382dd
Reviewed-on: https://gerrit.instructure.com/51499
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
add workflow state to grading period groups and grading period grades.
also add a default value of 'active' and a not-null constraint for
workflow state on grading periods, grading period groups, and grading
period grades. also add a validate method for grading period group
that ensures the group belongs to either a course or account. add a
not-null constraint for grading period group id on grading periods. add
an index for workflow_state on grading period groups, grading periods,
and grading period grades.
closes CNVS-18995
test plan:
run migrations. in rails console:
$ bundle exec rake db:migrate
$ bundle exec rake db:migrate RAILS_ENV=test
Grading Period Groups:
- you should not be able to create a Grading Period Group without
assigning it either a course or account. If you don't supply a
workflow state when you create a grading period group, it should
default to 'active'.
$ g = GradingPeriodGroup.create
$ g.valid? #should return false
$ g = Account.default.grading_period_groups.create
$ g.valid? #should return true
$ g.workflow_state #should return 'active'
$ new_course = Course.create
$ g = new_course.grading_period_groups.create
$ g.valid? #should return true
$ g.workflow_state #should return 'active'
- when you delete a grading period group, it should do a 'soft delete',
which means it should set its workflow_state to 'deleted' instead of
actually deleting it from the database
$ g = Account.default.grading_period_groups.create
$ g.destroy
$ g.workflow_state #should return 'deleted'
- when you delete a grading period group, it should also soft delete
any grading periods that belong to it.
$ gp_group = Account.default.grading_period_groups.create
$ gp = gp_group.grading_periods.create(
start_date: Time.now,
end_date: 1.month.from_now)
$ gp_group.destroy
$ gp_group.workflow_state #should return 'deleted'
$ gp.workflow_state #should return 'deleted'
Grading Periods:
- you should no longer be able to create a grading period without
giving it a grading_period_group id. also, if you don't give it
a workflow_state, it should default to 'active'. when you
delete a grading period it should do a 'soft delete'.
$ g = GradingPeriod.create(start_date: Time.now, end_date: 1.month.from_now)
$ g.valid? #should return false
$ gp_group = Account.default.grading_period_groups.create
$ gp = gp_group.grading_periods.create(
start_date: Time.now,
end_date: 1.month.from_now)
$ gp.valid? #should return true
$ gp.workflow_state #should return 'active'
$ gp.destroy
$ gp.workflow_state #should return 'deleted'
- when you delete a grading period, it should also do a 'soft delete'
on any owned grading period grades. Enrollments are tricky to make
via the rails console, so i'm just grabbing one here that was already
made -- you should be able to do the same. if you don't have any
enrollments created, create one via Canvas and then come back to
the rails console.
$ gp_group = Account.default.grading_period_groups.create
$ gp = gp_group.grading_periods.create(
start_date: Time.now,
end_date: 1.month.from_now)
$ enrollment = Enrollment.first
$ gp_grade = gp.grading_period_grades.create(
enrollment_id: enrollment)
$ gp_grade.workflow_state #should return 'active'
$ gp.destroy
$ gp.workflow_state #should return 'deleted'
$ gp_grade.workflow_state #should return 'deleted'
Grading Period Grades:
- these should now 'soft delete' as well. they require a grading period
and an enrollment to be created (no change here, this has always been
the case).
$ enrollment = Enrollment.first
$ gp_group = Account.default.grading_period_groups.create
$ gp = gp_group.grading_periods.create(
start_date: Time.now,
end_date: 1.month.from_now)
$ gp_grade = gp.grading_period_grades.create(
enrollment_id: enrollment)
$ gp_grade.workflow_state #should return 'active'
$ gp_grade.destroy
$ gp_grade.workflow_state #should return 'deleted'
Change-Id: Ic397a03beca4782c0c80e486673c7cfef59d38e5
Reviewed-on: https://gerrit.instructure.com/49754
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Tested-by: Jenkins
Product-Review: Spencer Olson <solson@instructure.com>
fixes CNVS-18980
test plan
- attempting to observe yourself should throw an error
- attempting to add an observer enrollment where user_id
is equal to the associated_user_id should throw an
error
- merging two users that would result in self observing
should delete user observers
- merging two users that would result in enrollments
with user_id = associated_user_id should be marked
as deleted and not moved
- enrollments in this state should be removed
- user observers in this state should be removed
Change-Id: I308bf474406a60b81550c21cefcab323ed0850db
Reviewed-on: https://gerrit.instructure.com/49759
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
this constraint is problematic because entries belong to the course's
shard, but attachments belong to the user's shard.
test plan:
- a user from a different shard than the course should be able to
attach files to discussion entries without error
refs CNVS-19181
Change-Id: I7055b63df48a3726a615dd3b8810ad45633edc9a
Reviewed-on: https://gerrit.instructure.com/50222
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
fixes CNVS-18977
test plan
BEFORE CHECKING THIS OUT
- have some facebook user services
- have some facebook communication channels with notification
policies and delayed messages waiting to be sent
AFTER CHECKOUT
- run migrations and allow delayed jobs to run
- ensure that all facebook channels and user services are deleted
Change-Id: I1e210be8d517a138496576879bde58ad7ca63614
Reviewed-on: https://gerrit.instructure.com/49279
Tested-by: Jenkins
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
fixes CNVS-17473
Test plan:
* create two new shards
* create a course in each shard (the courses should both have id 1)
* in the rails console, try course.turnitin_id for each shard. they
* should be different
Change-Id: I70892e35eb53b32ede26cd00505142962c9785be
Reviewed-on: https://gerrit.instructure.com/49196
Tested-by: Jenkins
Reviewed-by: Strand McCutchen <smccutchen@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
the duplicate external feeds are referencing discussion
topics in addition to announcments
test plan
- migrations should run
Change-Id: If99c583a35c87182c97c84ab13d40f230107576e
Reviewed-on: https://gerrit.instructure.com/49532
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
This opt-in preprocessing pass does a diff on the current SIS Import against
the last successful import tagged with the same "data set identifier",
and generates a new zip of CSVs containing only the diff between the
two. It then continues with the import as normal, applying that diff'd
zip, greatly speeding up large imports where most data doesn't change.
closes CNVS-18432
test plan:
Exercise the new diffing options using the diffing_data_set_identifier
and diffing_remaster_data_set api options. See the new API
documentation for details and expected limitations. Edge cases include:
- zips that contain multiple CSVs for the same data type (won't diff)
- failed SIS imports (shouldn't diff against these)
- remasters should skip doing the diff, but should be diffed against on
the next import
We don't expose any functionality for downloading SIS data that has been
uploaded, but you can grab it from the rails console:
> SisBatch.find(<batch id>).attachment.authenticated_s3_url
and
> SisBatch.find(<batch id>).generated_diff.authenticated_s3_url
Change-Id: I40d5e5ca8c376cecd685f4d06012f11bac021599
Reviewed-on: https://gerrit.instructure.com/48428
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Tyler Pickett <tpickett+gerrit@instructure.com>
Product-Review: Linda Feng <lfeng@instructure.com>
API consumers should generally try to reuse the api tokens that
they generate. This property makes it so that new tokens
won't be issued to a developer key for a user if that user
has a token that is still valid for that key.
Test Plan:
* for both a trusted and an unstrusted developer key:
* without force_token_reuse set on the key:
* do the token request flow twice, you should get a new token each time
* with force_token_reuse set:
* do the token request flow twice, the second time access_token should be blank
closes PLAT-767
Change-Id: I94e7dfbe24ce534cca0ecba940c1e0b3af15b0cd
Reviewed-on: https://gerrit.instructure.com/44393
Reviewed-by: Dave Donahue <ddonahue@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
these have not been used ever
test plan
- migrations should run
Change-Id: I44df2abe7df87ff4b3789ec55d8a6a553139155f
Reviewed-on: https://gerrit.instructure.com/48814
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
test plan
- migrations should work
Change-Id: I29a2b27607690ee62eee5c64e1111ea05772d2a7
Reviewed-on: https://gerrit.instructure.com/48810
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
test plan
- should not get a db error when to: is longer than 255 char
Change-Id: I55c697b3a0848cf700ecb4a19ef7447a643e0a64
Reviewed-on: https://gerrit.instructure.com/48157
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes CNVS-18403
test plan:
- quick regression test on DA for quizzes
Change-Id: I2c9521ce9fd22374cd192ca228967fa6ec50ade7
Reviewed-on: https://gerrit.instructure.com/48372
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-17929
test plan:
- simple DA regression test
Change-Id: I0e6624b7dd8a9758df7bce8cf991639346f064d8
Reviewed-on: https://gerrit.instructure.com/48172
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
this commit does three things:
* runs a data migration to delete duplicate external feeds. duplicates
are defined as having the same context, url, verbosity, and header match
* prevents duplicates from being created on course copy, by searching
for and re-using an existing feed if it exists when importing
* validating uniqueness of newly created/saved external feeds, and
exposing validation errors in the UI
fixes CNVS-17523
test plan:
- before downloading this commit, create two courses, go to the
announcments pages, and create several different external feeds, some
of which only duplicate the url (but have differences for other values)
and some of which are exact duplicates
- checkout this patchset, run migrations
- those courses should now only have unique feeds (the full duplicates
will be deleted)
- now try creating a new full duplicate
- you should get an error message that says "taken" on the url field
- try importing the feeds from a course with a feed into another course
that has the exact same external feed
- it should succeed, but not create a duplicate feed in the second course
Change-Id: If1655283102a74626c4579c24382cde92115e776
Reviewed-on: https://gerrit.instructure.com/45991
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
run a migration to remove the 'weight' non-null constraint
on the grading_periods table. also, remove the non-null
validation from the grading period model.
closes CNVS-18443
test plan:
1. run the migration to alter the grading_period table:
$ RAILS_ENV=development bundle exec rake db:migrate
$ RAILS_ENV=test bundle exec rake db:migrate
2. create a new grading period without a 'weight' attribute
In rails console:
$ grading_period = GradingPeriod.new(start_date: Time.now,
end_date: 2.months.from_now)
3. verify that the grading period is valid and saves
(Still in rails console)
$ grading_period.valid? #verify this returns true
$ grading_period.save #verify this returns true
Change-Id: Ic081eaca859f85e0457e074509b1196dddacf2d4
Reviewed-on: https://gerrit.instructure.com/48554
Tested-by: Jenkins
Reviewed-by: Brian Finney <bfinney@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
(remnant of scribd)
test plan:
* upload a file to a course
* preview the file
* previewing should not change the "modified at" column
closes #CNVS-18348
Change-Id: Id7ab17cadde8a218c3b7073632af9b3cf705afd0
Reviewed-on: https://gerrit.instructure.com/48461
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
refs CAT-819, CAT-822
Test plan:
1. rake db:migrate and sign into Canvas as an admin
2. Visit the permissions page for your account hooked
up to Catalog and switch to the Account Roles tab.
3. Note the "Manage catalog" permission does not show up.
4. Now, console in and update that account to have a
setting of :catalog_enabled => true, e.g.
a = Account.find(1)
a.settings[:catalog_enabled] = true
a.save!
5. Reload Canvas and note that "Manage catalog" now displays
in the Account Roles tab.
refs CAT-823
Test plan:
1. As a few different user types, make API requests to
/api/v1/accounts/:id/permissions/manage_catalog
For instance:
curl 'http://canvas.dev:3000/api/v1/accounts/1/permissions/manage_catalog' -H 'Authorization: Bearer your-token'
* Account admins should receive {granted: true}
* Non-admin users should receive {granted: false}
* Users with custom roles that have the Manage Catalog
permission should receive {granted: true}
* If :catalog_enabled is not set on the account in
question, it should never return {granted: true}
* Try changing up the permission name in the URL (to
something other than manage_catalog). The response
should be an error (status code: 400), since we only
support checking manage_catalog for now.
Change-Id: I4fa53665ff866f5c016f32ce72036e8b5a75bda5
Reviewed-on: https://gerrit.instructure.com/48119
Tested-by: Jenkins
Reviewed-by: Ethan Gunderson <egunderson@instructure.com>
Product-Review: Ethan Gunderson <egunderson@instructure.com>
QA-Review: Ethan Gunderson <egunderson@instructure.com>
refs CNVS-17788
so you can easily tell the difference between how long a batch took
vs. how long it took to start
test plan:
* upload an SIS batch and let it run
* when you view it via the API, it should include a started_at
timestamp
Change-Id: I142024f82260c2ba690a950a09365e90c18cd43d
Reviewed-on: https://gerrit.instructure.com/47412
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
since the constraint migration now exists, and will also run
synchronously
Change-Id: Ia17711300f7a19143a4cdfb73cc44362bb2d7236
Reviewed-on: https://gerrit.instructure.com/47393
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-7398
test plan
- using canvas mobile app with push notification support, enable
push notifications
- cause a notification to be sent from the canvas web ui
- ensure that the canvas app gets a notification
Change-Id: Idb320520a23ba6c5c2649253da557160be54084a
Reviewed-on: https://gerrit.instructure.com/42892
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
since it's no longer created on-demand for production environment
test plan:
* set up a new database with `rake db:initial_setup` in a
production environment
Change-Id: Ia048c77e74091c2e10ed81ded0a4c652788bb02a
Reviewed-on: https://gerrit.instructure.com/46311
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
external feeds have three columns that really aren't adding any value
* body_match: never used anywhere in the code, always nil in the
database
* feed_type: always 'rss/atom' (built to handle ical, but never used)
* feed_purpose: always 'announcements' (build to handle calendar_events,
but never used)
closes CNVS-17581
test plan:
- create an external feed on the announcements page
- wait for the rss feed to post a new story and the aggregator to run,
OR, in a rails console:
* set the created_at date on the external feed to before the last
posted entry, something like
ef = ExternalFeed.last
ef.created_at = 5.days.ago
ef.save!
* run the external feed aggregator, like so:
ExternalFeedAggregator.process
- it should create an announcement for the blog post from that feed
Change-Id: I74deffbdaaa1e217f8eefbdfd1000d50c2406cb1
Reviewed-on: https://gerrit.instructure.com/45990
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Change-Id: Ia099ecbfe6c3fa5ae2bec76daf16ebfb79c14a0b
Reviewed-on: https://gerrit.instructure.com/46573
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-17723
test plan:
- as a teacher
- create a OQAAT quiz with a few questions
- publish the quiz
- as a student
- take the quiz
- you should not get errors when answering questions
Change-Id: I5811e775112bd030d1ea3703985c7f3b194d4901
Reviewed-on: https://gerrit.instructure.com/46458
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
Tested-by: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Tested-by: Ahmad Amireh <ahmad@instructure.com>
test plan:
* should be able to run migrations with duplicate
ObserverEnrollments as well
Change-Id: I15d811a31081177fc2c4c7b9b356858ab79db307
Reviewed-on: https://gerrit.instructure.com/46390
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
fixes CNVS-17632
test plan:
- create a graded group discussion
- add an entry to the group discussion as a student that is part of that group
- the gradebook should show a submission for that student
- the student's entry should also appear in speedgrader
- go back through test plan from gerrit.instructure.com/#/c/45461
- ensure that test plan still passes
Change-Id: Ib47a9c1299c8fa4083be19a61337dfc26060c36e
Reviewed-on: https://gerrit.instructure.com/46315
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
test plan: fixes migrations with lingering StudentViewEnrollments
with null role_id
fixes CNVS-17644
Change-Id: Ic75dee9a73447afdd21aabb0ef9732f9dcd74d30
Reviewed-on: https://gerrit.instructure.com/46239
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
fixes PLAT-795
test-plan
do a GET at /api/v1/courses/#{@course.id}/lti_apps
it should retunr a list of lti_app definitions
Change-Id: I383682d1638f584ffae9544757cf5aa361777553
Reviewed-on: https://gerrit.instructure.com/45697
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
fixes CNVS-16915
(all mentions of 'gradebook' refer to learning mastery gradebook)
test plan:
- go to gradebook
- all existing mastery scores should still default to highest score to retain
accuracy of existing calculations
- in rails console, set 'calculation_method' to 'latest' for an outcome
- all results for that outcome should now show student's latest score on gradebook
- in rails console, set method to 'highest'
- all results for that outcome should now show student's highest score on gradebook
- in rails console, set method to 'n_mastery' and set 'calculation_int' to a number
between two and 5
- all results for that outcome should now show avg of student's higest n# of scores
(#n being the number set for the outcome's 'calculation_int')
- in rails console, set method to 'decaying_average' and set 'calculation_int' to 75
- scores should now appear as they did first time gradebook was viewed on step #2
- in rails console, set 'calculation_int' to 65
- scores for that outcome should now reflect decaying average with 65% weight given to
most recent score, and 35% weight for avg of all prior scores
- have a student make a new submission to an old assignment and give it a score
- the re-submission should now be most recent score for 'latest' and
'decaying_average' methods
- amend a score for an old submission without a new submission from the student
- the amended score should not become the most recent, but still be accurately
reflected in the 25%/35% part of the 'decaying_average' method
Change-Id: I330c47cb2288d99e589deca00ddb5a8ee8103a91
Reviewed-on: https://gerrit.instructure.com/44935
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
Change-Id: I167620165171b6fd0d41e69590e1f3225ac2fe2c
Reviewed-on: https://gerrit.instructure.com/45690
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
This patch makes it so that whenever we generate a submission that pulls
questions from a QuestionBank, we are assured that we're dealing with
QuizQuestion objects. Retroactively, a data fixer is installed that will
process every submission on hot points like the API readers if they
happen to have bad data.
There are a lot of comments in the additions which should give you more
context.
Huge refactors:
- Quiz is no longer responsible for "preparing" its question data, nor
generating questions for submissions. That's now delegated to the
QuizQuestionBuilder
Closes CNVS-17412
TEST PLAN
---- ----
- create a crazy quiz with all sorts of things:
a) single questions,
b) question groups with manual questions
c) question groups tied to question banks
d) question groups that have questions from banks and others
manually created
e) multiple attempts so we can verify versioning is not affected
- MAKE SURE that you can get some questions duplicated (even if it
takes you a couple of attempts), you can achieve this by creating 1
group that is linked to a bank, and another group that has 1 or more
questions from that same bank (and possibly other banks) - keep
trying the quiz until you get a duplicate
- take the quiz both as a student and a teacher, and do it multiple
times
+ verify all the answers to the questions are as you entered
+ ON DUPLICATES: provide different answers, and make sure that all
answers were recorded
+ go over all the submission-related pages and verify everything is
still rendering
+ use the API to read the quiz, its questions, and the submissions
and verify that all endpoints are functional
Change-Id: I322e2786d33eda03fb18dde0fbb5cd11a16f2449
Reviewed-on: https://gerrit.instructure.com/45456
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
fixes CNVS-16961
don't create a SubmissionVersion when the Version fails to save. and if
we try to, don't let it be valid. add a data fixup to remove those that
had already happened (all of the instances of this found in production
came from cases where there was no corresponding Version the
SubmissionVersion should have been tied to).
Change-Id: I4e08acf41779ab88de85387b88db155955d3c50e
Reviewed-on: https://gerrit.instructure.com/44916
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
fixes CNVS-16454
test plan:
* test in the console
- `GradingPeriodGrade.all` should return `[]` (no error)
- `Enrollment.find(1).grading_period_grades` should return `[]` (no error)
- make a GradingPeriod:
`g = GradingPeriod.create(weight: 100, start_date: Time.now, end_date: 1.month.from_now)`
`g.save!`
- `g.grading_period_grades` should return `[]` (no error)
Change-Id: I7183d715dbfac3fcd89ab7e453237ad4ce6c650d
Reviewed-on: https://gerrit.instructure.com/45312
Product-Review: Cameron Sutter <csutter@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
test plan:
* regression test wiki pages
closes CNVS-16203
Change-Id: Ic37c69c8696151dc99f1df6f3cc9b013835b12a4
Reviewed-on: https://gerrit.instructure.com/42552
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Closes CNVS-16878
TEST PLAN
---- ----
Similar to g/44145 but no rake tasks needed.
- check out the patch
- run `bundle exec rake db:migrate`
- run the rails server and visit any page:
+ if you got this far, and jenkins has passed, things are good
Change-Id: Icfed777974269c344b5e1e1c2617ab2f3836f38f
Reviewed-on: https://gerrit.instructure.com/44405
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
migrate each missing role to their own unique
role to preserve the unique index
refs #CNVS-17068
Change-Id: Ibecd48a880d2948fb02af8d50fb1e2eb5b9fe8ba
Reviewed-on: https://gerrit.instructure.com/44840
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs: CNVS-16627
First part is to add the framework for tracking external keys. This
commit handles the ability to add multiple types easily to the
external_integration_keys with custom rights per type of key.
Test Plan:
- Make sure the section for External Integration Keys does not display
when no types are set.
- Add a few custom types to the external integration keys with all
combinations of write and read rights.
- Make sure you can edit the appropriate keys inside the account
settings page and that they are persistent.
- Remove a value from a key and it should delete the appropriate
record.
- If the user does not have access to any keys the section should not
display.
Change-Id: I37d56c3ee1bf44876c220e9d5a1ae80a22ac1289
Reviewed-on: https://gerrit.instructure.com/44161
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
test plan:
1. consult the files API documentation and note the additions:
A. usage_rights include parameter on 'List files'
B. usage_rights include parameter on 'Get file'
C. 'List licenses' endpoint
D. 'Set usage rights' endpoint (PUT)
E. 'Remove usage rights' endpoint (DELETE)
2. exercise these new API features
closes CNVS-16826
closes CNVS-16841
Change-Id: I6c01128423adc24a5b70f71bb109d5a005379c37
Reviewed-on: https://gerrit.instructure.com/44403
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
add GradingPeriodGroup, and change associations between GradingPeriods,
GradingPeriodGroups, Courses, and Accounts. also adjust the grading
periods controller to account for addition of grading period groups
closes CNVS-16538
test plan:
-run bundle exec rake db:migrate, and bundle exec rake db:migrate RAILS_ENV=test
-verify the migrations successfully run
-open the rails console in sandbox: bundle exec rails c -s
-create a course, a few grading periods, and a grading period group. Add the grading periods to the group. Assign
the grading period group to the course.
$ course = Course.create
$ grading_period1 = GradingPeriod.create(weight: 25.0, start_date: Time.zone.now, end_date: 2.days.from_now)
$ grading_period2 = GradingPeriod.create(weight: 30.0, start_date: Time.zone.now, end_date: 2.days.from_now)
$ grading_period_group = GradingPeriodGroup.create()
$ grading_period_group.grading_periods << grading_period1
$ grading_period_group.grading_periods << grading_period2
$ grading_period_group.course = course
-verify the associations are working as expected, i.e. a GradingPeriodGroup has GradingPeriods, a GradingPeriod
belongs to a GradingPeriodGroup, and a GradingPeriodGroup belongs to a course or account.
$ grading_period_group.grading_periods #should return an array containing grading_period1 and grading_period2
$ grading_period1.grading_period_group #should return grading_period_group
$ grading_period2.grading_period_group #should return grading_period_group
$ grading_period_group.course #should return course
$ grading_period_group.account #should return nil (should not throw error)
Change-Id: I9d7465431dabd2afa18e7a8a33706b9a78a94cd1
Reviewed-on: https://gerrit.instructure.com/43512
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
fixes #CNVS-16391
Change-Id: I37943039912d88e2ea3946fa5c2fcacbf9909265
Reviewed-on: https://gerrit.instructure.com/44416
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Change-Id: I19d60fee85e4cb4cd1bddf606adc53be1caa36eb
Reviewed-on: https://gerrit.instructure.com/44296
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
- workflow for modular event tracking
- two basic event trackers: PageFocused and PageBlurred
- events are buffered, and are stored in localStorage when possible
- they will also be (re)loaded when the page is reloaded
- events can be submitted in bulks to the API
backend changes:
- renamed "answers" column to "event_data"; answers is now an alias
for nicer API when dealing with EVT_QUESTION_ANSWERED events
- renamed EVT_ANSWERED to EVT_QUESTION_ANSWERED for consistency with
how we're naming events
- API now accepts and stores the "event_data" attribute
- The optimizer in the Snapshot parser is now more aggressive; it will
do as many passes as needed to achieve 0 data redundancy
Closes CNVS-16177
TEST PLAN
---- ----
- create a quiz
- take it
- open the developer's console, go to the Resources tab and also leave
the console open (i left some messaging in to make this easier)
- move the cursor out of the window then back in
- look at the console, you should see messages like
"Enqueuing event ... for delivery"
- click the little reload/refresh icon in the dev tab
+ verify you see an entry called "qla_events"
+ the value of this entry should be a JSON that looks something
like what's shown below
- in a few seconds, if you look at the Network tab, you will notice
a request to a URL like
"/api/v1/courses/1/quizzes/1/submissions/1/events"
- (optional) look up the records in the database and verify they
make sense (don't really need to do this if the request was
successful :)
Sample of PageFocused and PageBlurred events serialized in localStorage:
[
{
"type": "page_focused",
"created_at": "2014-10-09T14:55:50.887Z"
},
{
"type": "page_blurred",
"created_at": "2014-10-09T14:55:51.131Z"
}
]
Change-Id: I7efbbef281faece5df90f09c299bfa3260abcff6
Reviewed-on: https://gerrit.instructure.com/42466
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
A small gem for abstracting partitioning at the model layer, as well as
helpers for dynamically creating the partitions needed for quiz
submission events.
You can read more about the gem's API in its README file.
Closes CNVS-16795
TEST PLAN
---- ----
- check out the patch
- run `bundle exec rake db:migrate`
- run `bundle exec rake canvas:quizzes:create_event_partitions`
- run the rails server and visit any page:
+ if you got this far, and jenkins has passed, things are good
Change-Id: I7d6b77c62db8510e09a54fbae00048a14b5366bb
Reviewed-on: https://gerrit.instructure.com/44145
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Change-Id: I6550a53b2cde3ff9e5638c5af9c60ed77698e9b7
Reviewed-on: https://gerrit.instructure.com/44208
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
closes PFS-201, PFS-202, PFS-203
Test Plan Happy Path:
1) Setup Canvas and run migrations
2) Create a quiz and set the number of attempts to 2
3) Check "Let students see their responses"
4) Check "Let Students see their correct answers"
5) Check "Only after last attempt"
6) As a student, take the quiz. On the first attempt verify that you do not see the correct answers.
7) As a student, take the quiz for the final attempt and verify that you see the answers to the questions.
Change-Id: I6c108174c817959be23770b3dfa9065831907460
Reviewed-on: https://gerrit.instructure.com/43179
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Cody Tanner <ctanner@instructure.com>
Product-Review: Cody Tanner <ctanner@instructure.com>
QA-Review: Cody Tanner <ctanner@instructure.com>
Tested-by: Cody Tanner <ctanner@instructure.com>
refactor everything that used to use strings for roles
to use actual role_ids
the apis should be backwards compatible so we don't need
to update (most of) the UI's right away in this commit
test plan:
* regression tests for permissions, role overrides,
alerts (for account roles), enrolling users,
adding account admins, etc.
refs #CNVS-15481
Change-Id: Id57fd3104c5c518b6fbf180609950dcddcdd474d
Reviewed-on: https://gerrit.instructure.com/41208
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
closes CNVS-16215
Test plan:
* create some grading periods
* delete some
* the api shouldn't return deleted grading periods in subsequent
requests
* the grading periods should be soft deleted
Change-Id: If4b795a05fd8eee9cde1bd90ab4db941004bc2a0
Reviewed-on: https://gerrit.instructure.com/43266
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
test plan:
* the course link validator should look at all user supplied
HTML content in a course and return a list of bad links:
- links to external content that does not return
a valid response (i.e. dead links).
- misconfigured urls
- links created by missing file references in imports
* use the (currently) undocumented link validator API
POST /courses/:course_id/link_validation
- Starts a link validation process
GET /courses/:course_id/link_validation
- Gets the current process status
and results (if processed)
* should return a list of items in a course, the
bad urls, as well as a direct link to the item (for the
future UI to follow)
refs #CNVS-15162
Change-Id: I613fff7d603e133cc155e5fb33c7f257affe0f48
Reviewed-on: https://gerrit.instructure.com/42821
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
closes CNVS-16370
test plan:
-in rails console, create a GradingPeriod and give it a title.
$ rails c
$ g = GradingPeriod.new(start_date: Time.zone.now, end_date: 2.days.from_now, weight: 25.0, title: "Custom Name")
-verify you can get the title, change it, and save it.
$ g.title #should return "Custom Name"
$ g.title = "New Title!"
$ g.save #should return true
$ g.title #should return "New Title!"
Change-Id: I3c1fe8f7f5849fb9550b0006b837e22aeef0abdb
Reviewed-on: https://gerrit.instructure.com/43172
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
this removes our db triggers and instead uses AR callbacks in conjunction
with after_transaction_commit. this way we won't get processes fighting
over the same assigments tuple.
note that we can't actually remove the hairtrigger gem until we clean up/
remove all those old migrations :-/
test plan:
1. tests should pass (and cover 2. and 3.), but just to be sure...
2. ensure that "assignments needing grading" counts work as expected
3. ensure that quizzes w/ essays don't show as graded in the speedgrader
until the essays have been graded
Change-Id: I6af67605b18378bd3c181c710ba5027ec944394b
Reviewed-on: https://gerrit.instructure.com/43202
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
fixes CNVS-15783
test plan:
- as a teacher make a DA'd quiz
- as a student with an override and a grade,
as a student with an override and no grade, and
as a student without an override with a grade
- the quiz is on the quiz index and assignment index,
and the show page is normal
- as a student without a grade or override, with a submission
* note the submission grade must be nil (the gradebook is messed
up so you may have to change it via the API)
- the quiz is on neither the assignment index or quiz index
- the quiz show page has a flash message telling you it doesnt count
- as a student without a grade or override without a submission
- the quiz is on neither the assignment index or quiz index
- the quiz show page redirects you to the quizzes index
- with DA off everything works as usual
Change-Id: I51e1e7efd1543e7bb6b858dfa04d7798a516c7c3
Reviewed-on: https://gerrit.instructure.com/41696
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
Change-Id: Ib6cb6d6e9244b6c3be9602fc3fa2c33ea866e41d
Reviewed-on: https://gerrit.instructure.com/42395
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Closes CNVS-15880
- a new model, QuizSubmissionEvent, for tracking events done during a
quiz-taking session
- utilizes the quiz question answer serializers to maintain JSON
representations of the students' answers, which are stored in the
:answers DB column (also in JSON)
- events can be optimized to track only what has really changed between
snapshots of a quiz submission
- all exported records are tagged with the "answered" event type (this
is currently all we have without josh's patch)
- a few fixes were needed for the serializers to function, primarily
adding (no)support for FileUpload and TextOnly questions so they don't
blow up
Extras:
- a new convenience rake task, canvas:quizzes:dump_events that can be
used by support to produce a JSON dump of all the events in a single
quiz submission (for tracking student behavior)
- another rake task, canvas:quizzes:generate_events_from_snapshots, for
use by developers for migrating data in QuizSubmissionSnapshots to
QuizSubmissionEvents for a single quiz (or many). This will hit the DB
TEST PLAN
---- ----
There's no UI in this commit, only touches the DB. You can still test if
you like:
- make sure you got some data logged before you check out this patch:
+ create a quiz and take it by a student, choose different answers
so you log some actions, and then:
- check out the patch
- run `bundle exec rake db:migrate`
- run the command below[1] to generate a JSON dump of the events and
view it for integrity
[1] bundle exec rake canvas:quizzes:dump_events[quiz_submission_id,out]
- replace "quiz_submission_id" with the ID of the student submission
- replace "out" with some path to store the JSON in, like
"./events.json"
Change-Id: Ifd8a43a66aba99780428623b956d868d87e53215
Reviewed-on: https://gerrit.instructure.com/41999
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
fixes CNVS-14094
test plan:
- course with DA as students and teacher
- api show & index
- quizzes index page shows only assigned quizzes
- quizzes show page url redirects to index if
quiz isnt visible to user
- grade calculation
- gradebook/grades page
- calendar events events
- modules filter out quizzes correctly
- observers see same things as their students
- if a student takes a quiz and it is not graded and then
loses visibility, make sure that the GB greys out the cell
rather than showing a submission icon
- same course with DA off works normally
Change-Id: I10b936f1516d6d24f11d74c0bb572051f0b1d1c4
Reviewed-on: https://gerrit.instructure.com/39897
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
Now it is possible to set a notification preference to receive
notifications when you create a conversation.
Fixes: CNVS-13744
Test plan:
Set conversation created notification preference
go to inbox
create a new message and send it
go to /messages to verify there is a notification for the new conversation
note: you will have to have a verified channel to see the new message
Change-Id: I662f2eb62806183871adcce39602d639dbbfc0a3
Reviewed-on: https://gerrit.instructure.com/40873
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
refs CNVS-15776
test plan
- migrations should run
Change-Id: I38f694782ed1733b83271bc1369c318183ed0120
Reviewed-on: https://gerrit.instructure.com/41770
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
test plan:
0. BEFORE APPLYING THIS PATCHSET,
a) delete a file in a course
b) restore it via /courses/X/undelete
c) notice that the restored file is not visible
to students (but is visible to teachers)
1. apply this patchset and run migrations
2. confirm that the file deleted in step 0 is now visible
to students
3. delete and restore another file
4. confirm that the restored file is visible to students
fixes CNVS-15616
Change-Id: Id8be88e63686cd0811409dfe6adb8bbf1a9d74c3
Reviewed-on: https://gerrit.instructure.com/41286
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
fixes CNVS-15511
test plan:
- turn DA off and make an assignment then delete the assignment
- note the assignment's id
- open the rails console and run this
- "AssignmentStudentVisibility.where(assignment_id: XXXXX)"
- instead of XXXXX, you should write the assignment's id
- the result of that command should be an empry array => []
Change-Id: I2f09560ce46bd4682e9bf671b4c116508a6f4b49
Reviewed-on: https://gerrit.instructure.com/41114
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>
fixes: PLAT-646
Test Plan:
* Install an external tool with the property "not_selectable" as true
* when you look in the asmnt/module item external tool list the tool
should not be listed
Change-Id: If66e09b83373fad83274d0120cb464e7caf60c83
Reviewed-on: https://gerrit.instructure.com/41205
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>
closes CNVS-13380
closes CNVS-8057
closes CNVS-5156
Test plan:
* scribd should no longer exist
* document previews should work in canvadocs
Change-Id: I5ac60c3e986f030c3aea88e32d2992ec7b1c7a08
Reviewed-on: https://gerrit.instructure.com/37895
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Creates a new notification preference for announcements created by
you. Now you can see what you've sent, and how it looks in specific
communication channels. This new notification preference will also
send notifications when someone responds to the announcement.
Fixes CNVS-13745
Fixes CNVS-2135
Test Plan:
- Set "Announcement Created By You" preference
- Create an Announcement
- Check /users/[:user_id]/messages for "Announcement Created By You"
- As another user comment on the announcement
- Check /users/[:user_id]/messages for "Announcement Reply"
Change-Id: Ibb16f0dc3ba34d98f749c40d1df1eb12430aecca
Reviewed-on: https://gerrit.instructure.com/40636
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
fixes CNVS-15063
test plan:
- in course with DA
- as a student submit multiple times to a selrel'd assignment
- go to grade summary page and ensure there aren't dupes
- in a course without DA, everything still works
Change-Id: I7bd24b71bc8661f9747200579e7c11ade4fac1bf
Reviewed-on: https://gerrit.instructure.com/39894
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
refs CNVS-15212
test plan
- rake db:migrate should succeed
- user search should work and be faster
Change-Id: I8af5a1928e315a8ec68ea7b2b580a28d961c4147
Reviewed-on: https://gerrit.instructure.com/40690
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes #CNVS-12711
Using three seperate trigram searches
when looking for courses by a name match
is taking more time than we'd like.
This builds an index for all 3 relevant
columns together and reworks the scope
that references them to build a search
clause that takes advantage of that index.
TEST PLAN:
- no behavior changes, just performance improvements
- regression test /users/x/manageable_courses api
endpoint with a name parameter as that's what
makes the primary use of this query.
Change-Id: Ia645da66f0df1a4cec9298f7fa941fa51de815f4
Reviewed-on: https://gerrit.instructure.com/40507
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
Since the work we are doing here is still very much
WIP, this makes sure no one has the new styles feature
flag turned on
this is a different approach than previous patchsets
since, because of caching or whatever, it was not
working correctly on test portals.
this just renames the feature so if anything was cached
for the previous feature, it won't matter.
and finally, just to clean up, we clear out the db
of any people that had set the old, now meaningless,
feature flag of 'new_styles'
fixes: CNVS-13571 CNVS-14903
test plan:
a) enable the feature flag before checking out the
patch set
b) check out the patch set and run migrations
c) verify that the feature is no longer set and
is hidden from non-site-admins
Change-Id: I6230064fe965c80128b047786c393043292114d5
Reviewed-on: https://gerrit.instructure.com/36225
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Thumbnails will now have namespace column which will be populated with
its attachments namespace on save. Old thumbnails will have null
namespace and should behave as they used to. New thumbnails will work
like boss.
Fixes CNV-12380
Test Plan
=========
Prerequisites
-------------
- S3 storage
- **Sharding**
- multiple users with the same ID on different shards
- profile photos on all the users with the same fileID
Details
-------
Before the fix the last uploaded avatar will be the *thumbnail* for
all user avatars that collide with each other.
After the code is updated all avatars will be blank.
After `bundle exec rake db:migrate` avatars should display correctly.
Change-Id: Iec533086308da352f317cda60b404327b14516e3
Reviewed-on: https://gerrit.instructure.com/39108
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
* use a join, not an include, when looking for channels by frequency
* make the index more specific and unique
Change-Id: Ie8b83144e5155241ff22e40519584ffe5314541b
Reviewed-on: https://gerrit.instructure.com/39442
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
it's never used
NotificationPolicy#preference also becomes obsolete, because NOT NULL
and FK ensure that #communication_channel can never be nil; it's
also never used
Change-Id: I0669d3b89964ee6f6d4c6a62e348e276bb7ef315
Reviewed-on: https://gerrit.instructure.com/39446
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes an issue that arose with rails 3, where
module items that were not set with content (and thus
shouldn't have been saved) were being autosaved and
breaking the entire modules page
test plan:
* import the package(s) referenced in the ticket
* the modules page should still be functional
fixes #CNVS-14777
Change-Id: I82fe287a4db9492489461e971911a0f7c15fbcb0
Reviewed-on: https://gerrit.instructure.com/39404
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes: CNVS-9194
This adds a configuration to CAS and SAML which will redirect to when an
unknown user is authorized from CAS or SAML but we do not have a
pseudonym for them in canvas yet. Instead of logging them out of CAS or
SAML it will redirect them to a custom url. By default if no url is
configured it will redirect to the login page or cas login page.
Test Plan:
CAS:
- Setup a User on the CAS server that can login.
- Make sure the user is not in Canvas and wont be matched up to any
other Canvas pseudonyms.
- Log in to CAS and Canvas.
- Canvas should redirect to cas_login_url.
- Configure the Canvas CAS setting unknown user url to redirect to
a custom url.
- Log in to CAS and Canvas
- Canvas should redirect to the custom url specified.
- The user should not be logged out of CAS.
SAML:
- Setup a User on the SAML server that can login.
- Make sure the user is not in Canvas and wont be matched up to any
other Canvas pseudonyms.
- Log in to SAML and Canvas.
- Canvas should redirect to login_url and provide a flash message
stating that the user could not be found.
- Configure the Canvas SAML settings Unknown User Url to redirect
to a custom url.
- Log in to SAML and Canvas
- Canvas should redirect to the custom url specified.
- The user should not be logged out of SAML.
Change-Id: I29a78f8ec60c94caecf63547584d8ae804ffc9de
Reviewed-on: https://gerrit.instructure.com/38472
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
so that we don't accidentally clear it for each new shard
Change-Id: I93f760e72646ae0231a8d6659ea3b5370ecbac10
Reviewed-on: https://gerrit.instructure.com/38913
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
currently every extension type has its own boolean db column
while this isn't strictly a problem, it is a little sad, and
given the fact that we will be adding more extension types soon,
it's probably better to take care of this now
also i'm refactoring some of the methods in context_external_tool
test plan:
* external tool regressions
refs #CNVS-13815
Change-Id: I6caf7b0e3d0de054906e3530f085fbfa9e8e499f
Reviewed-on: https://gerrit.instructure.com/38923
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
also, clean up ims-lti usage with pluralized lti methods
test plan:
- registrations should still work
- registrations without resource handlers
and using a default message handler should still work
fixes PLAT-566 PLAT-567
Change-Id: Icd9feca44ba9f5600d89a4943b0b93b34aeb78a5
Reviewed-on: https://gerrit.instructure.com/38182
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
QA-Review: Brad Humphrey <brad@instructure.com>
refs: CNVS-13987
Added a way to store the last batch that was ran. Seperated out
the batch processor and the actual cleaner methods. This will
allow us to add it to event stream to fix records as they are
queried if we choose. This also moved the temporary mapping and last
batch tables to the migration. g/38429 removes the tables.
Test Plan:
- Same as g/37956 and g/37605
- Migration should not fail if mapping table already exists.
- With a grade change try deleting the submission then running the
fixup.
Change-Id: Ibce843c22b72885f7e2510d85b482c39f513996b
Reviewed-on: https://gerrit.instructure.com/38407
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
Fixes: CNVS-3771
Adds a peer review notification to go out after
a peer reviewer is added to the discussion. This
also resolves the issue with a notification not
being sent if a rubric is not attached.
Test-Plan:
1.) Run bundle exec rake db:migrate in the console
before doing anything else -- (This sets up your
db by using notification_types.yml to populate
notification types in the DB.)
2.) Create a graded discussion with at least 2
students
3.) Make sure both students have everything
in their notifications set to ASAP.
4.) Edit the assignment settings and select the
'Require Peer Reviews' - Choose to manually
select peer reviewers.
5.) Navigate to discussions as an admin
6.) Select the cog and go to peer reviews.
7.) Assign a peer reviewer and verify that the
notification was sent out.
Change-Id: I78212cb8043de0fcf809a9ffa56ffca327ffcacc
Reviewed-on: https://gerrit.instructure.com/36646
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
refs: CNVS-13987
Test Plan:
Same as g/37605 but under Cassandra 1.1
Lower the batch size and make sure it has the same results.
Change-Id: Id35b7a2690fd33e1769d27836deb374630f27fd3
Reviewed-on: https://gerrit.instructure.com/37956
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
fixes CNVS-9766
test plan:
* turn on the Differentiated Assignments feature flag
* from the quiz edit page
- add a due date for some of the sections, but not all
- save (update quiz)
> the only_visible_to_overrides flag on the quiz should be true
> edit the quiz again and there should not be an
empty due date row for 'Everyone else'
- add a due date for all the sections
- update the quiz
> the only_visible_to_overrides flag should not be there
- edit the quiz so that there are only due dates
for some sections but not all
* on the normal quiz show page and
* on the new Quiz Statistics show page
> there should not be a row in the due date area
for 'Everyone else'
- turn off the DA flag and make sure the quiz show page works
with the 'New Quiz Stats page' flag and without it
- make sure the edit page works with the DA flag off as well
Change-Id: Ifb090a195ff3283d963df12ae7a9eb503f32ee86
Reviewed-on: https://gerrit.instructure.com/34085
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
refs: CNVS-13987
Creates new records for audit log data that has been overritten. Since
we cannot all of the actual event data they are created as a corrupted
record
Test Plan:
- Clear Audit logs (Not manditory but easier to see data)
- Generate Bad Audit data for each test case.
* Supplied script should generate the bad data.
* Refer to test case to ensure data is created correctly.
- Pull Commit and run migrations.
- Check Case 1
* The original id record should still exist with a record in
courses_by_course.
* Before the fix only one course change record will exst. After the
after the fix a second tombstone record with a record type of
corrupted should exist with related index records in
courses_by_course.
* Key column in each index should match the id/bucket format.
* ordered_id in each should match timestamp/first eight of id.
- Check Case 2
* After the fix pick a tombstone record and ensure that it as an
index record in each of the index tables: authentications_by_pseudonym,
authentications_by_user, authentications_by_account.
* Ensure cross bucket event indexes create a tombstone and match in
other indexes as well. Id should be unique in the index tables
and stream table.
- Code to generate test cases:
target_course = Course.find(...)
target_user = User.find(...)
target_pseudonym = target_user.pseudonyms.first
event = Auditors::Course.record_created(target_course, target_user,
source: :manual)
record = Auditors::Course::Record.generate(target_course, target_user,
event.event_type, event.event_data, source: :manual)
record.attributes['id'] = event.id
record.attributes['created_at'] = Time.now + 1.day
Auditors::Course::Stream.insert(record)
event = Auditors::Authentication.record(target_pseudonym, 'login')
record = Auditors::Authentication::Record.generate(target_pseudonym,
event.event_type)
record.attributes['id'] = event.id
record.attributes['created_at'] = Time.now + 100.days
Auditors::Authentication::Stream.insert(record)
Change-Id: I888da1758282d0e3f2d19a4438c1a866a6f54125
Reviewed-on: https://gerrit.instructure.com/37605
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
fixes CNVS-13306
fixes gh-453
MySQL refuses to change columns that have a foreign key on them
Test plan
- Run the polling migrations on MySQL
- They should migrate the database correctly.
Change-Id: Ib781c5237c0973b254043096e536ac094dd809cf
Reviewed-on: https://gerrit.instructure.com/35511
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-13649
test plan:
- go to a few pages and make sure no errors occur
- GB2
- assignment index
- student grades page
- do same with and without DA on
Change-Id: I72f303cf54c36420a57dfbd23635f319f9827bd0
Reviewed-on: https://gerrit.instructure.com/36675
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Adds an option to Quiz that prevents the students from seeing their
results more than once after their submission.
Closes CNVS-13877
CHANGES
-------
- New option in quiz settings:
"Let Student See Their Responses" => "Only Once After Each Attempt"
- Teacher can always see the student's results
- Moderate dialog allows teacher to manually reset the result-locking
flag, allowing the student one more glimpse
- The flag is reset whenever a new attempt is taken
TEST PLAN
---- ----
- create a quiz
- toggle the new option: "Let Student See Their Responses" then "Only
Once After Each Attempt"
Turn off Ember/quiz stats:
- take the quiz by a student, turn it in:
- verify that you see your results
- reload the page
- verify that you no longer see the results
- take the quiz again:
- verify you see the results once, then not
- go to the moderate page as the teacher
- open the moderate dialog for that student
- check the new option "Let the student see the results one more
time"
- click Save
- reload the page as the student, verify that you see the
results
Turn on Ember/quiz stats:
- repeat the process
Other things to test:
- verify the new field "has_seen_results" is visible in the
submissions API and is documented
- verify the new field "one_time_results" is visible in the quizzes
API and is documented properly
- verify that the new option has no effect if the Quiz option is not
set
- verify that you can always see the student's results as a teacher
(the setting should not affect teachers)
Change-Id: I6eb4909f777e038acf6afc9ef2823352f5ea78be
Reviewed-on: https://gerrit.instructure.com/37544
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
also fix an old migration that should have ran on all shards
Change-Id: Ib4305c4f1b84ba0cfd525d0f552cfc21d365dc24
Reviewed-on: https://gerrit.instructure.com/37492
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
refs CNVS-13987
what was called CanvasUuid was *not* generating UUIDs. it was generating
slugs. by default, its generate method only creates 4 character slugs.
these should obviously not be used as UUIDs. the misnomer already caused
a bug in EventStream where it used these slugs as UUIDs, causing
collisions. to fix:
(1) rename canvas_uuid gem to canvas_slug, and rename it's primary
class CanvasUuid to CanvasSlug
(2) create new canvas_uuid gem, with class CanvasUUID, extracted from
lib/uuid_singleton for actual UUID generation
(3) fix event stream use CanvasUUID, rather than following the rename
of CanvasUuid to CanvasSlug
test-plan:
- have cassandra set up for audit logs
- create an audit log entry (e.g. change a grade)
- look at the generated audit log entry's id field; it should be a UUID
value, not a 4 character slug
Change-Id: I19758fff4433cd6cb2e21219217dced19ee05c5a
Reviewed-on: https://gerrit.instructure.com/37506
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
Change-Id: Ibb4465348162219b4f1da6f1a842234a7cecd78e
Reviewed-on: https://gerrit.instructure.com/37316
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
fixes CNVS-13828
test plan
- prior to checking out patch set
- enroll a user in a section
- delete the enrollment
- cross list the section
- attempt to add user to sections new course
- it should fail
- checkout patch set and run migration
- attempt to add user to sections new course
- it should succeed
- enroll a user in a section
- delete the enrollment
- cross list the section
- attempt to add user to sections new course
- it should work (it will restore the old enrollment)
- enroll a user in a cross listed section
- delete the enrollment
- uncross list the section
- attempt to add the user to the sections current course
- it should work (it will restore the old enrollment)
Change-Id: Ib397f96b0761d87bf6f9fb11ffc978012f0f5b39
Reviewed-on: https://gerrit.instructure.com/37036
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes RD-76
test plan:
- as a teacher, navigate to a course settings page. the right
sidebar should look normal.
- modify an lti app's xml to include the
course_settings_sub_navigation extension
- configure an lti app via modified xml.
- navigate to a course settings page, where you should see a
button for the configured tool at the top of the right
sidebar.
- clicking on the button should launch the tool.
Change-Id: Iec9e3337437295865bab66a499fe8fc096ad0ba5
Reviewed-on: https://gerrit.instructure.com/36471
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
test plan:
0. BEFORE APPLYING THIS CHANGESET, reproduce the original bug:
a) Have a course with draft state enabled
b) Create a new module in the course, and do not publish it yet
c) Add a new assignment to the course via the modules page
d) Publish the module. This should publish the assignment.
(refresh the modules page if you don't see that happen.)
e) As a student, look for the assignment in the Assignments
index page and the Syllabus page. You don't see it there.
Because the modules page didn't publish it correctly.
1. Apply the changeset and run migrations.
2. (If production) wait for the datafix job to complete.
It should complete almost immediately unless your job
server is backed up. Look for the following in your log:
DataFixup::FixIncorrectPublishedStatesOnQuizzesAndAssignments
3. The assignment created in 0e should now be visible to
students in the Assignments page and the Syllabus page.
4. Repeat steps 0a-0e. This time, the published assignment
should be visible to students in the assignments index
and syllabus page right away.
fixes CNVS-13604
Change-Id: I657c90deb115a6d047abb81cbdabe014fd74778f
Reviewed-on: https://gerrit.instructure.com/36511
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan: run migrations in cassandra 1.2.x, and you shouldn't get an
error. migrations in 1.1 and 2.0 should still drop the
page_views.contributed column.
Change-Id: I18d0fc52c8a9f6e86e3f4907a0bf2e9a7aaee283
Reviewed-on: https://gerrit.instructure.com/36528
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
also do notification policies in bulk for sanity
Change-Id: If32f06c073f8eb86d424b1287b3423ba212e2b43
Reviewed-on: https://gerrit.instructure.com/36472
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-13242
This adds a special field to learning outcomes
to use for friendly reporting in case the outcome's
actual name is quite complex or cryptic (like common core
standard outcomes).
TEST PLAN:
- login as an instructor
- create or edit an outcome and validate that you can add a "friendly"
name and that it persists
- use that outcome for an assignment and let a student complete it
- navigate to the student mastery report for that student
- verify that by hovering over that outcome name on the student mastery
report you can see both the real title and the friendly name
Change-Id: I89d1a5de590666ddf6cbc82617e4475d1f7a5226
Reviewed-on: https://gerrit.instructure.com/35919
Reviewed-by: Drew Bowman <dbowman@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Drew Bowman <dbowman@instructure.com>
fixes CNVS-13521,CNVS-13489
This commit adds 3 things. One is a fix for deleting a poll_session when
there are poll_submissions created already for the poll_session. The
second is the addition of a new attribute on poll_choices called
'position'.
The 'position' attribute specifies the order a poll choice should be
returned in. The third is the visibility of poll sessions to students:
as long as a student is enrolled in the course (and course section, if
it exists on the poll session) associated with the poll session, they
can access it, whether or not it's open or closed.
Test plans
1. Deleting a poll session
As a teacher
- Create a poll and related poll session
- Open the poll session for submissions
As a student
- Create a submission for the newly created poll session
As a teacher
- You should be able to delete the poll session
2. Position ordering attribute
As a teacher
- Create a poll
- Create poll choices, passing along the 'position' attribute to specify
ordering (try to mix these up, e.g. create a poll choice with a
position
of 2, then a poll choice with an position of 4, then a poll choice with
an position of 3, then a poll choice with an position of 1)
- Retrieve the poll choices for the poll with the poll choices index
endpoint
- The poll should be returned in the order they were specified using the
'position' attribute
3. Poll session visibility to students
As a teacher
- Create a poll
- Create an associated poll session with a valid course
As a student enrolled in the given course
- You should be able to view the poll session whether or not it's open
or closed.
As a student not enrolled in the given course
- You should not be able to view the poll session, whether or not it's
open or closed.
Change-Id: Ifabd64540d843c83f3a22fb6668c4fcac8f728b0
Reviewed-on: https://gerrit.instructure.com/36087
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
fixes CNVS-13440
this commit addresses bad polling performance, particularly in
poll_sessions. It also removes a foreign key constraint on the
poll_sessions poll_id, that would introduce sharding issues.
Test plan
- Test the following attributes on particular models to insure that
they're still correct:
- Poll#total_results should accurately return the aggregate results for all of
the poll_sessions that belong to the poll
- PollSession#results should accurately return the results of all poll
submissions submitted for the particular poll session
Change-Id: Ic0d4aaeb77c735fa4ba6c5f73dfbf84d8e6ac615
Reviewed-on: https://gerrit.instructure.com/35860
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
fixes CNVS-12916
test plan
- as a teacher in a course, use the api to create a live
assessment aligned with an outcome (see the api docs for how the
endpoint works)
- create results for some students
- ensure that the results and the assessment can be read back using
the index endpoints
- ensure that the assessment shows up in the web ui at
/course/:course_id/outcomes/users/:student_id (click 'Show All
Artifacts')
- try to create an assessment using the same key as an existing
assessment
- ensure that the existing assessment is returned (check the id)
- fetch results specifying a user id to filter by
- ensure that only results for that user are returned
Change-Id: I2d09691f772658aea3ccdd36cff2df5835b1f2cd
Reviewed-on: https://gerrit.instructure.com/35092
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Derrick Hathaway <derrick@instructure.com>
this puts lti app links on the right side bar of the course
home page.
fixes RAN-53, RAN-55
test plan:
- modify an lti app's xml to include the
course_home_sub_navigation extension
- configure an lti app via modified xml
- navigate to a course home page, where you should see a button
for the configured tool on the right sidebar.
- clicking on the button should launch the tool.
- configure another tool the same way, but include a
"visibility" property in new extension with a value of
"admins"
- view the course home page as a teacher. you should be able
to tee the newly configured tool, in addition to the
previously configured tool.
- view the course home page as a student. you should only see
the first tool you configured, and not see the tool with the
limited visibility property.
Change-Id: Ibe50c649f6d5f6806a87f0c8e8402f1209b9ed40
Reviewed-on: https://gerrit.instructure.com/35161
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
self.up works in rails2 and rails3, but up only works in rails3+
also tag the switchman migrations as RAILS3 only, now that they actually
run in rails2
Change-Id: I768c8e657e86de6504a40444d127e2d875ce6934
Reviewed-on: https://gerrit.instructure.com/35390
Tested-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
test plan:
1. upload a file to a folder in a course
2. link to the file from course content (such as a wiki page
or assignment body)
3. overwrite the file with another file of the same name
4. rename the file
5. view the course content and ensure the file link still works
6. repeat steps 1-5, replacing step 4 by "move the file to another folder"
fixes CNVS-12359
Change-Id: I11832c307f286920174ba4731af2e88490497f92
Reviewed-on: https://gerrit.instructure.com/35677
Reviewed-by: James Williams <jamesw@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
This gives certain user-triggered events
a "look" as though they came directly from
that user (the FROM and REPLY-TO headers
have the name of the source user).
This also introduces "letter_opener" into the
dev environment. If you use "letter_opener"
as your send method for dev emails, it will
open all emails in a browser tab. Very useful.
closes: CNVS-11837
TEST PLAN:
Validate each of the following notifications
looks like it's "from" the source user:
- Submitting an assignment
- Resubmitting an assignment
- Posting to a discussion
- sending a conversation message
- posting a comment on a submission
Change-Id: I0e04aa9aa5bf31a590e69507e04b86b637247acf
Conflicts:
app/models/message.rb
Reviewed-on: https://gerrit.instructure.com/35362
Reviewed-by: Drew Bowman <dbowman@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Drew Bowman <dbowman@instructure.com>