the object is likely @current_user, which probably has lots of stuff
preloaded on it, and if the course gets cached out-of-process, it
will be lots more than we want serialized (and could cause weird
deserialization loops)
Change-Id: I815791ccc194ce285fd6573e4c97bfe7608048a8
Reviewed-on: https://gerrit.instructure.com/31433
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Anthus Williams <awilliams@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
index should be unique per user, section, role,
type, and associated_user_id
fixes CNVS-7698
fixes CNVS-7700
test plan
- add duplicate enrollment in script console
- run migrations
- duplicates should be removed
- attempt to add duplicate enrollment in console
- duplicate enrollment should fail
- test user merge with conflicting enrollments
- test creating, deleting, and restoring enrollments
- enrollment regression testing
Change-Id: I0fb600ba6ff98054f71dc41a8519680413507494
Reviewed-on: https://gerrit.instructure.com/30986
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes CNVS-9933
test plan:
- basic regression on the following:
- teacher activity pages
- gradebook pages
- grades page
- gradebook upload
- changing due dates on assignments
- submissions api
- assignments api
- sorry
Change-Id: I7bb4c32a74b159565772da8ee1d5a43e27369ca0
Reviewed-on: https://gerrit.instructure.com/30367
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Change-Id: Ic226e61e900532cc3acf08444b316b6e2bb6b368
Reviewed-on: https://gerrit.instructure.com/30049
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes SIS-160
Test Plan
---------
- Create an enrollment via the api with start_at and end_at parameters
- verify start_at and end_at are poplutated for resulting record in enrollments table
- verify user can only access course during start_at and end_at times
Change-Id: Icfeaded1f43c6b0309d41280d7caa17482b9182e
Reviewed-on: https://gerrit.instructure.com/30136
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ken Romney <kromney@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
fixes CNVS-10570
fixes CNVS-11104
test plan:
- as a teacher enter in scores for students and a test student
- make test student grade the hightest (not tied)
- on the grades page, in assingment stats, the test student score shouldnt show up
- make test student grade the lowest (not tied)
- on the grades page, in assingment stats, the test student score shouldnt show up
- on the grades page, test student score shouldnt change the average
Change-Id: I9916a999cf7db4872b09d03e8e14883503025d96
Reviewed-on: https://gerrit.instructure.com/29091
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Matthew Irish <mirish@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
refs CNVS-9522
in rails3 ActiveRecord::Base.skip_callback is a real thing that doesn't
do what this does. because of load order, ours happens, but it would be
nice to leave the other available.
to simplify the switch, both suspend_callback and suspend_callbacks are
kept as renames, but suspend_callback should not be used, preferring
suspend_callbacks. suspend_callback will go away in the near future.
skip_callback is temporarily added back in as an alias to
suspend_callback to allow time for fixing a plugin that uses
skip_callback. it will be removed as soon as that plugin is updated.
Change-Id: Iaefd16dde3b6ce575780cb8f721dc826258eef4e
Reviewed-on: https://gerrit.instructure.com/29808
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
* don't use respond_to if json is the only possible format
* when filtering scribd_doc, rails 3 serializes as a hash with
string keys, as opposed to a HashWithIndifferentAccess, so
delete with string key
* don't use StringIO as an uploaded file; Rails 3 TestCase will
call to_param on it
* don't require the .:format part of the public_url route
Change-Id: I282f529f1ee0941b52a996eefa01647a018f70d3
Reviewed-on: https://gerrit.instructure.com/29930
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-9874
when teacher choses to show total grade as points in GB2, a setting is saved
student grade summary page shows the total grade in same format
if assignment groups are weighted, grade is displayed as a percentage again
test plan:
- new addition:
- go to a course where GB2 is displaying totals as points BUT has no DB setting about show_point_totals
(ask mike if you need help getting to this state)
- as a student look at the grade summary page, total should be a percent
- as a teacher in that class, go to GB2 and wait for 5 seconds
- as that same student, go back to grade summary, total should be points now
- as a teacher, change total grade to show as points in GB2
- when you return to the GB, even from a new browser, this should be the same
- in GB, tooltip should show points if cell shows percent, and visa vera
- as a student in that class, you should see your total grade as points
- grade tooltip should show points if cell shows percent, and visa vera
- switch to weighted assignment groups
- total grade as a teacher and student should switch back to percent
- switch back to non-weighted
- total grade should stay a percent until explicitly changed back to points
- GB2 weighting and points/percent switching should have no unintended effects on the GB
- student grade summary page should display everything in a consistent manner
Change-Id: Id0c4f496576c226eb7000d6684a37faf0b439359
Reviewed-on: https://gerrit.instructure.com/28780
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
fixes PS-969
test plan:
*the posistion should reflect the posistion displayed in the UI
*the visibility should reflect the visibility in the UI
*hidden should be set if the nav tab is hidden
*unused should be set if the nav item has no content
*you should be able to update a tabs position
*you should be able to set a tab to hidden
*you shouldn't be able to modify home, or settings tabs
Change-Id: I96beba411551ea0709ecf0e876c61d90b35b8482
Reviewed-on: https://gerrit.instructure.com/28093
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Adam Phillipps <adam@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Brandon Broschinsky <brandonbr@instructure.com>
fixes CNVS-10679
this commit refactors quiz into a quizzes namespace. it contains various
shims to facilitate the data migration of polymorphic relationships
('Quiz' -> 'Quizzes::Quiz'). JIRA contains several tickets linked to
the above tickets in regards to removing these shims after the data
migration, as well as the strategies on reverting the shims once the
data migration is complete.
Change-Id: I30c566d60a87af6ee83e9d0041fdcb909ead6a89
Reviewed-on: https://gerrit.instructure.com/28573
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
test plan:
- Create a course via SIS import or Accounts page
(not via front page, since this will enroll you as a teacher)
- Go to the settings page for the created course and verify
no sections were created
fixes CNVS-10683
Change-Id: I4ee7296cf45b44335a5fc49d701951e079800b20
Reviewed-on: https://gerrit.instructure.com/29189
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Change-Id: I3b2337e88c0b4717d76cd6735a82be0ededa0950
Reviewed-on: https://gerrit.instructure.com/29041
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>
closes CNVS-9968
Test plan:
Download gradebook.csv, it should include grades for each assignment
group. Points will be included for courses with unweighted
assignment groups (just like for current/final grades)
Change-Id: Ic47a4cd6cfb62726d3ec6e015b1d3ecfd71f79cc
Reviewed-on: https://gerrit.instructure.com/28579
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
hide_from_students is being deprecated in lieu of the workflow states
'active' (published) and 'unpublished'
test plan: (draft state and legacy)
special attention should be given to areas related to hiding wiki
pages from students (legacy: hide from students checkbox;
draft state: published/unpublished items)
items that are hidden from students or unpublished should show for
teachers, but should not show for students
- areas to test:
- pages api and ui (regression)
- validate hide_from_students and published values in all api calls
- course migrations (specifically course copy)
- wiki sidebar in other parts of canvas
fixes CNVS-10354, CNVS-10366
Change-Id: I70f4d8c07c2be4150163279f0673377bad6e9c48
Reviewed-on: https://gerrit.instructure.com/28375
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
activerecord 3 tries to call course[:asset_string] which
returns nil because asset_string is not an attribute
Change-Id: Idb4c5da5ebf4fe2eec4946e991aa091d4bc01ce5
Reviewed-on: https://gerrit.instructure.com/28477
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Activate the course's shard to retrieve teacher
enrollments, not necessarily the current shard
fixes CNVS-4450
Test plan:
- On shard A, create user A
- On shard B, create a course with one or more
students and enroll user A as a teacher
- Log in as user A on shard A; navigate to /grades
- When you click "Student Interactions Report" you
should see the report (instead of a "this user is
not a teacher in this course" error)
Change-Id: I767c88ca1ebb27a33060dd1ba62aa2ffdd646da1
Reviewed-on: https://gerrit.instructure.com/28182
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Anthus Williams <awilliams@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Anthus Williams <awilliams@instructure.com>
fixes CNVS-10147
test plan
- set sis id, section name to longer than 255 chars
- should throw rails error
- should not throw database error
Change-Id: I05ebdf3ae89ace4f737ae6c124f015efceafec1d
Reviewed-on: https://gerrit.instructure.com/27835
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
closes CNVS-6906, CNVS-6475
Test plan:
Use the new custom gradebook column apis to create/edit/delete custom
gradebook columns, and set data for users in a course on those
columns.
only teachers/TAs should have permission to use these apis.
Change-Id: I658b8dc02d6104559c98a6b7e1be5c72e775d664
Reviewed-on: https://gerrit.instructure.com/27615
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
fixes CNVS-10058
canvas no longer integrates with tinychat; this commit
removes legacy references to it.
test plan:
* run specs
Change-Id: I4887e901d57ff39f8554af3e4eacd52ec4edd6e5
Reviewed-on: https://gerrit.instructure.com/27621
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
fixes CNVS-9902
test plan
- set sis id to longer than 255 char
- should not throw database error
Change-Id: If72466dc91c1ef48ac91b5e9d7a92bea62c88c50
Reviewed-on: https://gerrit.instructure.com/27164
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-6031
test plan:
- create a course via the Account Settings page
(not via the dashboard)
- create a section in the course
- go to student view in the course
- leave student view
- return to the course sections page. only the section you
created should be there.
Change-Id: I7e86de6f27172454d3176c46f2cc986cade85a8b
Reviewed-on: https://gerrit.instructure.com/27059
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Jeff Fox
fixes CNVS-9331
instead, as appropriate, use one of (or a combination of, if necessary):
* instance variable caching
* Rails.cache
* query caching (implicit)
also:
* remove the buggy cc.active_pseudonyms (didn't account for
sharding) in favor of cc.user.all_active_pseudonyms
* streamline assignments in the menu to not need to construct method
names
test-plan: N/A
Change-Id: Id0dec60464a283985e39493b90711b32cb5cca82
Reviewed-on: https://gerrit.instructure.com/26936
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-9268
added enrollments_for_csv method to course with test
moves test student enrollment to the end for enrollments array
test plan
- add multiple students to class
- add test_student to class
- download gradebook csv file
- ensure Test Student is the last student in the csv (and others are alphabetized)
Change-Id: Ic3dc92cf0a3e1da01e90fc270cb391bfa19c7fcd
Reviewed-on: https://gerrit.instructure.com/26745
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
fixes CNVS-9496
test plan:
- draft state feature should show up in site admin feature
flags, or root account feature flags when called as site
admin
- when site admin hits "allow" for the feature, it should
appear in the root account administrator's settings
in "Off" state
- the root account admin should be able to "Allow" the setting
which allows a sub-account or course to turn it on
- when the feature is turned on via the Feature Settings tab
or features API, draft state functionality should appear
in the course wiki pages and elsewhere
Change-Id: Id7403f2a8371b0a7bfebffbb8f29330fff5c94c5
Reviewed-on: https://gerrit.instructure.com/26308
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
for rails3 and folio
fixes CNVS-8790
test-plan:
- validate pagination of unassigned group members both for course
groups and account groups
Change-Id: Ic9e842abdbfba714829a123ca0dee4f93e5a1fdc
Reviewed-on: https://gerrit.instructure.com/26534
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
fixes CNVS-5860
test plan
* with draft state OFF
* in a course with 1 section
* create an assignment
* under advanced options, select the single section (usually course name)
* set the due date and save assignment
* verify that assignments index shows single date for students, teachers
* create a quiz
* under advanced options, select the single section
* set due date and save
* verify that quiz index shows single date for students, teachers
* verify that modules page shows single date for students, teachers
* with draft state OFF
* in a course with 2+ sections
* create a quiz and assignment with VDD
* verify that assignments and quiz index show 1 date for students
* verify that assignments and quiz index show multiple due dates for teachers
* verify that modules page shows "Multiple Due Dates" for observers with multiple students
Change-Id: Ie6b2f571eb7b344d40ca4ffda26e27d43778d17d
Reviewed-on: https://gerrit.instructure.com/26449
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Liz Abinante <labinante@instructure.com>
Teachers can now control when, and for how long, students get to see the
correct answers to their quiz submissions.
The patchset introduces two new columns to Quiz and a CSS rework of the
quiz options form. See linked references for more info.
Quiz#show_correct_answers should no longer be directly accessed, use
Quiz#show_correct_answers? instead.
== Test plan
CAs stands for Correct Answers.
- Create a quiz with 3 questions
- Take the quiz as a student, and:
- get 2/3 of the questions answered correctly
- submit it
Case A - Showing CAs the moment the submission goes in:
- Edit the quiz, and:
- Tick the 'Let Students See Their Score Points' checkbox
- Leave both date fields empty
- Save quiz
- Refresh student view
- You should see the CAs
Case B - Showing CAs after some date:
- Edit the quiz, and:
- Tick the 'Let Students See Their Score Points' checkbox
- Set the "Show Correct Answers At" to 3-days from now
- Refresh student view:
- You should not see the CAs
- Edit the quiz, and:
- Set the date to 3-days back
- Refresh student view:
- You should see the CAs
Case C - Hiding CAs after some date:
- Edit the quiz, and:
- Tick the 'Let Students See Their Score Points' checkbox
- Set the "Hide Correct Answers At" to 3-days from now
- Refresh student view:
- You should see the CAs
- You should see an alert that tells you the CAs will be hidden at
the date you chose earlier
- Edit the quiz, and:
- Set the date to 3-days-back
- Refresh student view:
- You should no longer see the CAs
- Alert should read that the answers stopped being visible as of the
date you chose earlier
Case D - Creating a time-frame for showing CAs:
- Edit the quiz, and:
- Tick the 'Let Students See Their Score Points' checkbox
- Set the "Show Correct Answers At" to yesterday
- Set the "Hide Correct Answers At" to 3-days from now
- Refresh student view:
- You should see the CAs
- You should see an alert that tells you the CAs will be visible
between yesterday and 3 days from now
- Edit the quiz, and:
- Set the "Show At" date to tomorrow
- Refresh student view:
- You should no longer see the CAs
- Alert should still tell you that the CAs will be visible starting
tomorrow until 3 days from now
Case E - Choosing a bad range
- Edit the quiz and:
- Tick the 'Let Students See Their Score Points' checkbox
- Set the "Show at" to tomorrow
- Set the "Hide at" to today, or tomorrow
- You should see an error-box
== Notes and really wild things
- http://docs.kodoware.com/canvas/cnvs-8103-take2
- http://docs.kodoware.com/canvas/cnvs-8103 (legacy changes)
refs CNVS-8103, CNVS-9386
Change-Id: Ib241ee5f143b87164105b7541aadac00f38f79ad
Reviewed-on: https://gerrit.instructure.com/25505
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
test plan:
- install the test_features plugin (since no real features exist yet)
- render and consult the feature flags documentation
- have a test environment with a root account,
sub-account, course in sub-account, and user
- Use the "list features" endpoint as a root account admin
(with no site admin privileges), on the root account context, and
confirm that hidden features do not show up
- Use the "list features" endpoint as a site admin user,
on the root account context, and confirm that hidden features
show up
- Use the "list features" endpoint on the site admin account
and confirm the hidden features show up
- Use the "set feature flag" endpoint on a hidden feature on site
admin and ensure the feature becomes visible in all root accounts
- Use the "set feature flag endpoint" on a hidden feature on a
single root account, and ensure the feature becomes visible to
that root account and not others
- Confirm that root_opt_in features appear "Off" by default
in root accounts, after being "Allowed" in code or site admin
- Confirm a feature flag that is set to "on" or "off" (vs. "allowed")
cannot be overridden in a lower context (and the API returns
locked=true for them)
- Confirm that setting locking_account_id requires admin rights
in the locking account
- Confirm that a feature flag with locking_account_id cannot be
changed without admin rights in the locking account (e.g.,
set a feature flag on a course, locked with the root account's id,
and make sure a teacher who is not an account admin can't change it)
- Confirm feature flags can be deleted with the "remove feature flag"
endpoint (and they are only deleted where they are defined, not
when called on an object that inherits a flag)
Change-Id: I3e12e23b4454889b6e8b263f1315e82d8f2ada52
Reviewed-on: https://gerrit.instructure.com/25502
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
refs CNVS-4704
fake_arel gets us most of the way to rails3's arel, but with some
caveats. the workarounds (mostly) work in both, but it'll be nice to not
have them crufting around when we're on rails3. so only use the
workarounds in CANVAS_RAILS2 branches.
Change-Id: Ia1f5cfa6b10f83cdb8d9a6e397b12401d180118d
Reviewed-on: https://gerrit.instructure.com/26331
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
refer to mockups
test plan:
1. the UI should work
2. user/group counts and info should update correctly as you do stuff
3. the UI should look like the mockups
Change-Id: Ifbf90abadf00885790328b4338eb51a4ca4b8b6c
Reviewed-on: https://gerrit.instructure.com/24556
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
refs CNVS-8282
test plan
- have scribd enabled
- upload a scribdable document to a course
- document should be rendered with scribd
- previously created documents should still render
Change-Id: Id8d7ea962c7bbe16b0f124e23447c66a48dd4100
Reviewed-on: https://gerrit.instructure.com/25566
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
grade posting should allow plugin to post grades as needed and
still allow for enrollment status to be updated if provided
from callback
refs PS-744
test plan
1. ensure existing grade exports post data correctly
2. ensure that grade exports updates enrollment status
correcly even if no post resource is provided.
3. see specs
Change-Id: I80215461d37355f9fef02e1b7e61528e81cb9c28
Reviewed-on: https://gerrit.instructure.com/25610
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brandon Broschinsky <brandonbr@instructure.com>
QA-Review: Brandon Broschinsky <brandonbr@instructure.com>
deleting a user could cause thousands of update-cached-due-dates
jobs to be enqueued (one per assignment per enrollment; in the
referenced ticket, the test student had 13 enrollments and there
were 88 assignments, yielding 1,144 jobs, causing the request
to time out).
fix this by
(1) using a batch job to update all assignments in the course,
instead of a job per assignment
(2) when deleting a user with multiple enrollments in a course,
only run the update cached due date job once per course
test plan:
0. run in "production" configuration (i.e., in QA portal)
1. have a course with 10 sections and 100 assignments.
I suggest creating these in the console, e.g.
course = course.create! name: "CNVS-8068"
10.times { |x| course.course_sections.create! name: "section #{x}" }
100.times { |x| course.assignments.create! name: "assignment #{x}" }
2. enter student view mode in this course
3. reset the student view student
4. verify 1000 jobs were not created (and the request doesn't time out)
fixes CNVS-8068
Change-Id: If00dd3197b70df42b0f9ec18303b02594861f69f
Reviewed-on: https://gerrit.instructure.com/25160
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
1. have an enrollment term that has ended
2. have a course in that term whose end date is in the future
3. check that you can still add users to the course
(the add-users button shouldn't have mouseover text that
says you can't add users because the course is concluded)
fixes CNVS-2702
Change-Id: I52e0ca83f488f737c95e7f58d2e59be1187970f1
Reviewed-on: https://gerrit.instructure.com/25210
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
use arel's where() instead. use of :conditions in has_many/has_one
remains, and a small handful of cases where rails2 sharding needs the
conditions in the find.
also, cleanup distinct_on() to only allow the :select/:option values it
works with directly; other finder options should be scoped in before the
distinct_on call.
fixes CNVS-8754
test-plan:
[1] communication messages API
- fetch /api/v1/comm_messages?user_id=self as a non-siteadmin; should
not error, should include the expected messages
[2] course roster
- load /courses/<id>/users
- invite a new student to the course; do not have that student accept
the invitation
- reload and open the web console; ENV.courses.pendingInvitationCount
should be 1
[4] list enrollments API endpoint
- full regression
[5] list conversations API endpoint
- fetch /api/v1/conversations; should not error, should include the
expected messages
[6] rubrics
- create a rubric with title "Example Rubric"
- create a second rubric with the same title; title should be changed
on save to "Example Rubric (1)"
- repeat to get "Example Rubric (2)"
Change-Id: I411676285348653044696d850efacf2e1a9e6585
Reviewed-on: https://gerrit.instructure.com/24996
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
now that we have SIGHUP, we were changing everything to it anyway,
so just let caching in-proc be the default
Change-Id: Id1b44722522ac9693b17695da7107c99a359d5ac
Reviewed-on: https://gerrit.instructure.com/25020
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes CNVS-7199, CNVS-4414
abstract some ICU stuff out to Canvas::ICU, and add some missing
functionality in FFI-ICU
test plan:
* create a bunch of groups in the same category, named 1-10.
10 should sort after 9, not 1
* repeat for creating and publishing quizzes *with the same due date*.
go to the quiz index, and 10 should sort after 9, not 1
Change-Id: I323eb12dfb5bd23dbcbb3b543fa1b90a72f4341b
Reviewed-on: https://gerrit.instructure.com/24732
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>