Commit Graph

34 Commits

Author SHA1 Message Date
Cameron Ray 8e25fecec6 Rename DueDateCacher to SubmissionLifecycleManager
closes EVAL-3285

[fsc-timeout=30]

We will need to follow this up next release with a commit
to remove the alias `DueDateCacher = SubmissionLifecycleManager`.

flag=none

Test plan
- Tests pass

Change-Id: Ib3566e9d581f5826ab07ee2265277bb75ba02ee0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320685
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2023-07-11 14:43:12 +00:00
Cody Cutrer 502aa068da rubocop: Layout/Multiline*LineBreaks
[skip-stages=Flakey]

Change-Id: I24912809267088bc19a4082c49bc5f78ca7b76bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317302
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-05-01 19:31:42 +00:00
Cody Cutrer c2cba46851 RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation
[skip-stages=Flakey]

auto-corrected

Change-Id: I4a0145abfd50f126669b20f3deaeae8377bac24d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279535
Tested-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-11-25 14:03:06 +00:00
Cody Cutrer e73cf9ddf4 RuboCop: Style/HashSyntax
[skip-stages=Flakey]

auto-corrected

Change-Id: I9371a61046aee6b148f89dd434114a8ba2b1188c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279533
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-11-25 14:02:35 +00:00
Cody Cutrer 1ccd29b412 RuboCop: Style/PreferredHashMethods
[skip-stages=Flakey]

auto-corrected for the most part, but I went through specs and used
the have_key matcher when possible

Change-Id: I4a2df1cdd536a94f3b493668386883d1148660c9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278050
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-12 16:24:14 +00:00
Cody Cutrer 649e5b36a2 RuboCop: Lint/ShadowingOuterLocalVariable
[skip-stages=Flakey]

all manual

Change-Id: Ieb74efcd4206426973dd72eb2ca7c5f5af5167f4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277394
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-04 14:02:24 +00:00
Cody Cutrer c65d57737a RuboCop: Layout lib
Change-Id: I0655d9a9d750f2debd6378b03d8ddc1403ebc31b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274158
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-22 20:01:52 +00:00
Cody Cutrer 06763dd519 add # frozen_string_literal: true for lib
Change-Id: I59b751cac52367a89e03f572477f0cf1d607b405
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-27 20:49:50 +00:00
Gary Mei 2019a545b1 calculate scores when re-enrolling into course
This occurs when a student was previously enrolled in a course, had
grades, removed from the course, and then enrolled into a section of
the course that they were not previously enrolled in. The grade
calculator was not running as they re-enrolled, despite having prior
graded submissions.

fixes GRADE-2193

Test Plan
- Enroll a student in a course.
- Create an assignment.
- Grade the student.
- Delete the enrollment, and any other enrollments the student may
  have in the course.
- Create a new section.
- Enroll the student in the new section.
- Do not accept the invitation yet.
- Hit the enrollments endpoint and verify that it returns non-null
  scores for the student:

  GET `api/v1/users/6/enrollments`

Change-Id: Ib12ee4a99eff4db7951b216abd1bed2bb4690990
Reviewed-on: https://gerrit.instructure.com/200124
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: KC Naegle <knaegle@instructure.com>
2019-07-24 20:41:12 +00:00
Adrian Packel 8a594a5b14 Audit submission due date changes
closes GRADE-1487

Test plan:
- Specs pass
- Smoke test the following for an anonymous (or otherwise auditable)
  assignment:
  - Changing the due date for the whole assignment, a particular
    section, or a particular student
  - Adding or removing a student
  - Updating student groups
  - Updating grading periods
- Smoke test the above for a non-auditable assignment and make sure the
  functionality works as expected

Change-Id: I31858a38059bc3ff73d91dd138ffa20cd8a76fac
Reviewed-on: https://gerrit.instructure.com/164776
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2018-10-01 16:34:37 +00:00
Keith Garner 5f5c159fb0 make DDC calls more efficient if we can scope to specific users
This patchset changes calls of DueDateCacher.recompute_course to
DueDateCacher.recompute_users_for_course in places where we only have
specific enrollments or users we can work on and avoid doing the work
of the entire class.

fixes GRADE-1129

test plan:
 - specs pass

Change-Id: Ia6814e4584993bd9d0f2ba330eb33c3a635ca0e1
Reviewed-on: https://gerrit.instructure.com/148854
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2018-05-03 22:01:37 +00:00
James Williams 2b0f57c560 rename user_observer/observee classes/associations
for my sanity because it's too confusing to actually refactor

closes #CORE-1140

Change-Id: I445e0edeb3fde76ffd02a467180ee7a83d916067
Reviewed-on: https://gerrit.instructure.com/143538
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2018-03-14 19:51:49 +00:00
Shahbaz Javeed e0c96ddaab ensure DueDateCacher kicks off after commit for consistency
closes GRADE-701

test plan:
* Create and publish a course and enroll five students in it
* Create and publish an assignment and add an override with a due date
  that includes all five students
* From the Rails console, verify all students have the same due date

  # a is the Assignment you created above
  a.reload.submissions.map(&:cached_due_date)

* Go to the assignment details page
* Verify it shows one override with its corresponding due date and the
  description "5 students"
* Conclude the enrollment of one of the students and go back to the
  assignment details page
* Verify it now shows one override with its corresponding due date and
  the description "4 students"
* Change the due date of the override to a different date
* From the Rails console, verify all students have the same due date
  except the concluded student, who should still have their old due
  date

  # a is the Assignment you created above
  a.reload.submissions.map(&:cached_due_date)

* Deactivate another student and go back to the assignment details page
* Verify it now shows one override with its corresponding due date and
  the description "3 students"
* Change the due date of the override to a different date
* From the Rails console, verify all students have the same due date
  except the concluded student, who should still have their old due
  date.  The inactive student should have their due date updated to the
  one you just entered

  # a is the Assignment you created above
  a.reload.submissions.map(&:cached_due_date)

* Restore the enrollment of both students and go back to the assignment
  details page
* Verify it now shows one override with its corresponding due date and
  the description "5 students"
* Change the due date of the override to a different date
* From the Rails console, verify all students have the same due date
  including the student who was previously concluded but was just
  unconcluded

  # a is the Assignment you created above
  a.reload.submissions.map(&:cached_due_date)

Change-Id: Ifd64afcfffb5924f29710545d403e53470241a41
Reviewed-on: https://gerrit.instructure.com/134158
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-12-06 22:34:15 +00:00
Jeremy Stanley c94b159f09 use opaque tokens rather than ids to mass-enroll users
make user_lists v2 and invite_users return a `user_token`
in addition to id, and make enroll_users accept an array
of these instead of ids

test plan:
 - regression test the "+ People" functionality on the
   course People page
   - using each way to find people
   - when finding existing users and creating new users
   - when finding a user in another shard

fixes ADMIN-265

Change-Id: I792a50d2d9504d13471794889708a69d11144fdd
Reviewed-on: https://gerrit.instructure.com/131933
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2017-11-08 20:29:07 +00:00
Rob Orton 37db902edf also touch user observers for enrolling from user_list
refs CNVS-38364

test plan
 - specs should pass

Change-Id: Ie8a53b8ae025b65ffda3f91ff4383d9e8b369213
Reviewed-on: https://gerrit.instructure.com/120426
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2017-07-25 18:11:50 +00:00
Landon Wilkins 79215618d4 da licença part 29
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: I49a8930917a609d3f118da1b20b51dedfd5d5903
Reviewed-on: https://gerrit.instructure.com/110053
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-27 21:59:53 +00:00
James Williams fd5a42d054 allow sending user_ids to enroll_users
test plan:
* should be able to post to the /courses/:id/enroll_users
endpoint with a "user_ids" array instead of a "user_list"
to bulk enroll users in a course

closes #CNVS-32188

Change-Id: I60dea5ca748ac2732b9187c0f3f4b26811d35dd6
Reviewed-on: https://gerrit.instructure.com/91529
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
Tested-by: Jenkins
2016-10-31 19:17:59 +00:00
Jeremy Stanley ffa567374b make batch user enrollment a bit easier on the database
take a few steps to avoid murdering the database:
1. split enrollments into multiple smaller transactions
2. touch only users whose enrollments have changed
3. batch-touch users after the transactions complete

test plan:
 - regression test enrolling lists of users on the
   course People page

fixes CNVS-27724

Change-Id: Ib6a8997648398ae8e3e273a0a386decae47cf4c7
Reviewed-on: https://gerrit.instructure.com/73642
Reviewed-by: James Williams  <jamesw@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2016-03-07 20:20:23 +00:00
Jeremy Stanley 7e16719004 allow enrollments in multiple sections via Add People dialog
(note that the Enrollments API already works this way,
and the Edit Sections dialog can be used to accomplish this
also)

test plan:
 0. have a course with multiple sections
 1. have a user with a login
 2. use the Add People dialog to enroll the user in the course
 3. use the Add People dialog again, to enroll the same user
    with the same enrollment type as before, but choose a
    different section from the dropdown
 4. the user should be enrolled in both sections

fixes CNVS-17594

Change-Id: Ia39537591c779af9ba3fc3163a32d6487c2c4e88
Reviewed-on: https://gerrit.instructure.com/46165
Reviewed-by: Jon Willesen <jonw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-12-22 17:21:18 +00:00
James Williams 81d4adc319 new roles
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>
2014-10-31 19:44:14 +00:00
Cody Cutrer 5d42d023d2 no more dynamic finders (lib)
refs CNVS-15126

Change-Id: I4087b1c2442c5b8f70ce2138bf4aeef6ef7e59cd
Reviewed-on: https://gerrit.instructure.com/41259
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-09-23 16:53:56 +00:00
Jacob Fugal a2c3dc44fc rename skip_callback->suspend_callbacks
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>
2014-02-11 23:14:41 +00:00
Jeremy Stanley 5773e05c3c avoid excessive update-cached-due-date callbacks
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>
2013-10-16 21:04:03 +00:00
Cody Cutrer 7fbc099986 batch up due date cachers during user list
refs CNVS-8071

test plan:
 * create a course and a section with an SIS ID
 * create a an assignment, and override it's date for that section
 * enroll two users via UI into the course; one with no section
   (i.e. the default section), and one into the section with the override
 * confirm that the users show appropriate due dates for the assignment

Change-Id: I5e06f812dbe8afe08eebb8c8809699c8ef685746
Reviewed-on: https://gerrit.instructure.com/24257
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-09-12 20:08:44 +00:00
Bracken Mosbacker 5585c3a203 add custom role support to course users tab
You can add enrollments with the custom roles and see who
has the roles.

Test Plan:
 * Create custom roles for each enrollment type
 * Test all the settings page's functionality like adding/deleting users with custom roles
 * Make custom observers observe students in various combinations of custom roliness
   - verify that the new observer role has the custom role
 * Make sure the section limited check box shows up for custom tas/teachers by selecting those options in the new user select box

closes #cnvs-1166

Change-Id: I5f133bf1b5b1438d7f8e34297b450ff561d401d0
Reviewed-on: https://gerrit.instructure.com/16272
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2012-12-26 15:46:12 -07:00
Cody Cutrer bcc51ad1de remove "auto-accept" feature closes #7160
it was misleading to begin with, and downright buggy when combined
with open registration

test plan:
 * go to add a user to a course as an admin.  no more checkbox

Change-Id: Ibb40bae6f5b0a43fe66b2d809d56a256e06e57ba
Reviewed-on: https://gerrit.instructure.com/8537
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-02-10 15:13:11 -07:00
Zach Pendleton 3ca0c208c9 fix spelling of "privileges" in enrollments.
enrollments previously had attribute
"limit_priveleges_to_course_section," but should
be spelled "privileges." replaced spelling in a
migration and across app.

affects: enrollments model
test plan:
  * run specs

Change-Id: I15dcf9a023ead9bb1aed42abc2d1a7c233610840
Reviewed-on: https://gerrit.instructure.com/7431
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-12-19 16:48:42 -07:00
Cody Cutrer c59c0f593f refactor user creation/invitations closes #5833
fixes #5573, #5572, #5753

 * communication channels are now only unique within a single user
 * UserList changes
   * Always resolve pseudonym#unique_ids
   * Support looking up by SMS CCs
   * Option to either require e-mails match an existing CC,
     or e-mails that don't match a Pseudonym will always be
     returned unattached (relying on better merging behavior
     to not have a gazillion accounts created)
   * Method to return users, creating new ones (*without* a
     Pseudonym) if necessary. (can't create with a pseudonym,
     since Pseudonym#unique_id is still unique, I can't have
     multiple outstanding users with the same unique_id)
 * EnrollmentsFromUserList is mostly gutted, now using UserList's
   functionality directy.
 * Use UserList for adding account admins, removing the now
   unused Account#add_admin => User#find_by_email/User#assert_by_email
   codepath
 * Update UsersController#create to not worry about duplicate
   communication channels
 * Remove AccountsController#add_user, and just use
   UsersController#create
 * Change SIS::UserImporter to send out a merge opportunity
   e-mail if a conflicting CC is found (but still create the CC)
 * In /profile, don't worry about conflicting CCs (the CC confirmation
   process will now allow merging)
   * Remove CommunicationChannelsController#try_merge and #merge
 * For the non-simple case of CoursesController#enrollment_invitation
   redirect to /register (CommunicationsChannelController#confirm)
   * Remove CoursesController#transfer_enrollment
 * Move PseudonymsController#registration_confirmation to
   CommunicationChannelsController#confirm (have to be able to
   register an account without a Pseudonym yet)
   * Fold the old direct confirm functionality in, if there are
     no available merge opportunities
   * Allow merging the new account with the currently logged in user
   * Allow changing the Pseudonym#unique_id when registering a new
     account (since there might be conflicts)
   * Display a list of merge opportunities based on conflicting
     communication channels
     * Provide link(s) to log in as the other user,
       redirecting back to the registration page after login is
       complete (to complete the merge as the current user)
   * Remove several assert_* methods that are no longer needed
 * Update PseudonymSessionsController a bit to deal with the new
   way of dealing with conflicting CCs (especially CCs from LDAP),
   and to redirect back to the registration/confirmation page when
   attempting to do a merge
 * Expose the open_registration setting; use it to control if
   inviting users to a course is able to create new users

Change-Id: If2f38818a71af656854d3bf8431ddbf5dcb84691
Reviewed-on: https://gerrit.instructure.com/6149
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-24 12:07:08 -06:00
Cody Cutrer 2df7fceadb drop unused Enrollments#invitation_email
Change-Id: I4e80fda6312e4050c4316aceb8de07cfe4c6df51
Reviewed-on: https://gerrit.instructure.com/6287
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-21 10:41:22 -06:00
Cody Cutrer 6656cea6ab fix adding only users by login fixes #5523
Change-Id: I6868357afb9920c91aaa06e1748babdcf63ec7e8
Reviewed-on: https://gerrit.instructure.com/5442
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-09-06 12:50:18 -06:00
Jon Jensen f9c88ae0da case-insensitive lookups when adding users to course, fixes #4980
Change-Id: I676ce5c7e2735a3d240dcd53ec5021140edaf945
Reviewed-on: https://gerrit.instructure.com/5277
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-25 15:24:33 -06:00
Cody Cutrer f997efd263 re-write update_account_associations for SPEED!
* 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>
2011-08-19 10:21:42 -06:00
JT Olds 98ffbbc83e allow enrollments through the UI with usernames
also adds enrollments in batches, instead of one at a time via ajax.

closes #4835

Change-Id: Ic2aac24db2c4d5fb4482901daf8627419c548e37
Reviewed-on: https://gerrit.instructure.com/4584
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-07-12 11:54:38 -06:00
JT Olds 45f0fbd370 renaming EmailList to UserList
Change-Id: I35d8f072ed19741baa8598e78813c00d0e54a28a
Reviewed-on: https://gerrit.instructure.com/4585
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-07-12 11:54:30 -06:00