canvas-lms/app/models/group_categories
Rob Orton cda82fb549 fix create n users per group by section for reals
this is a partial revert of 673e55edea
the previous commit attempted to use a variable from memory but in a
job process. This correctly calculates the number of groups needed to
accommodate the per section logic.

This will still not be perfect, because we are not aware of the n from
when the group category was created. That number gets thrown away and we
are left with a number of groups. This tries to calculate the number of
groups needed better and tries to calculate the number of people per
group slightly more accurate.

test plan
 - create 2 sections with 3 students each
 - create a group category keeping students in same section
using 2 users per group
 - it should create 4 groups

fixes VICE-1241
flag = none

Change-Id: I13a051dc7669d6471e531834f2d0f4f1422ce703
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262537
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2021-04-09 17:38:01 +00:00
..
params.rb add # frozen_string_literal: true for models 2020-10-28 22:08:12 +00:00
params_policy.rb fix create n users per group by section for reals 2021-04-09 17:38:01 +00:00