Update CourseSection#move_to_course to not use the recompute singleton
as that is intended for a single student and a course section is
likely multiple users. Also, raise an exception in
Enrollment#recompute_final_score_in_singleton if its called with more
than one user.
fixes CNVS-36089
test plan:
- Have two courses. In the first course have a section with at least
60 students.
- Move the section to the second course.
- In development mode, inspect the development.log to make sure that
course.recompute_final_score was called with no errors by finding
the log message that starts with "GRADES: recomputing scores in"
Change-Id: Id135e4ddc387d8faa513e2759b5e4399f9824275
Reviewed-on: https://gerrit.instructure.com/107322
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Tested-by: Jenkins
Product-Review: Keith T. Garner <kgarner@instructure.com>
test plan:
* have a section in a course set to begin in future
* enroll a student in the course
* cross list the section to an active course
* the student should have access
closes #CNVS-31553
Change-Id: I0cdf277c9c2a10f0f3cab06aaafbd1db8b753c29
Reviewed-on: https://gerrit.instructure.com/89722
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* create a course section
* invite a student to the section
* reject the invitation
* should be able to delete the enrollment
closes #CNVS-31092
Change-Id: I71ae19d8cbd923fc77776484487e3eaad94e619c
Reviewed-on: https://gerrit.instructure.com/88429
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-15503
test plan:
- turn DA on
- create a course section
- add an due date for this section and this section only
on an assignment, graded discussion topic, and quiz
- destroy this section
- when you come back to the assignment edit page
the due date for this section is gone
- a warning telling the user that
no students are assigned should exist
- when you click to add a due date, this
warning goes away
- check that the discussion topic & quiz edit
pages behave similarly
Change-Id: I079a025789f657fa55c66943daac14447ae288a3
Reviewed-on: https://gerrit.instructure.com/45667
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Hilary Scharton <hilary@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>
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 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>
it was false for sections that the user is not enrolled in, even if the user
enrollment 'limit_visibility_to_course_section' is false.
fixes CNVS-6092
test plan:
- turn of :manage_students for TAs on the account
- enroll TAs with and without section-limiting
- use the api to query sections in which the TA is not directly enrolled
- it should obey section-limiting
Change-Id: I28323ec46d2e47c7567e3f3973bd3bbd5b52bceb
Reviewed-on: https://gerrit.instructure.com/21045
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 CNVS-2623
test plan:
- create a course
- create a section
- use student view
- delete the empty section
- it should not give you a snarky message about you can't
delete a section with enrollments
Change-Id: Ieabf6dfa6c25eed7f637d529cd755490bde5635a
Reviewed-on: https://gerrit.instructure.com/19120
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
closes CNVS-3417
test plan:
* after the migrations are run, ensure that every section has at
least one entry in CourseAccountAssociations in the database
* smoke test SIS imports
Change-Id: I261cad633788efbf4b0c64db34436ef695856fee
Reviewed-on: https://gerrit.instructure.com/17256
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
optimize crosslisting itself:
* use ids where possible to avoid unnecessarily loading up objects
* Don't worry about keeping track of if we need to save; we're gonna
save anyway
* update account associations on any account change, not just root
account change (if you re-crosslist a section from one sub-account
to another sub-account, the users may no longer be associated with
the first sub-account).
optimize sis imports:
* really batch up update_account_associations
Change-Id: Ic0fbe1601afcbcd3e6540e69febc2e6a1a94157f
Reviewed-on: https://gerrit.instructure.com/5137
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
* Manually cache account chains (query cache gets dumped after every
update or delete)
* Use batch queries and preloads to make the number of queries
constant wrt how many users are getting updated
* Simplify calculation - find the root account ids, and merge the
account chains together
* Fix depth to be defined as the minimum depth to reach that account
(rather than whichever path happened to be processed last)
* Add incremental mode to only add accounts, rather than re-calculate
all associations (only for User)
* Don't auto-create the default section during
update_account_associations; it costs a query and possibly an
insert, causes angst with schools that don't want it, etc.
Instead, always create associations against a 'nil' section so
that a course has the proper associations.
Change-Id: I7d476d45f41d9c3e382fac9b5c0c0aaa5369b956
Reviewed-on: https://gerrit.instructure.com/5135
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>