Commit Graph

38 Commits

Author SHA1 Message Date
Jacob Fugal d9c6e2a0cd clarify Slug vs. UUID and fix event stream
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>
2014-07-11 16:58:42 +00:00
Cody Cutrer 1277aaae90 stabby lambda scopes for rails4
Change-Id: I34f2527471cdb4d8cab5cde426ba959baa26189e
Reviewed-on: https://gerrit.instructure.com/37151
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>
2014-07-04 02:11:56 +00:00
Ethan Vizitei b68c8fc772 Automatically Assign group leaders
closes: CNVS-11834

This creates a way for an instructor to
assign a random student as the group leader.
It only applies when an instructor is having groups
created automatically at the time of defining
a group category.

This also take an opportunity to refactor out
some bloated code from the group_categories_controller
and move it into some separate objects
that can be more easily understood and rapidly
unit tested through all the necessary permutations
(allowing higher level integration tests to just
cover a case or two)

It ALSO removes group leadership knowledge into
it's own object so that the callbacks in other
objects are simple and the logic regarding
how to do group leadership management is in
one place.

TEST PLAN:

AUTO_DISTRIBUTION:
1) login as an instructor
2) go to the "people" tab and try to create a group
set.
3) click on the "Create [0] groups for me" radio
button; verify you now have controls for assigning
a group leader automatically and that the strategy
radio buttons are greyed out.
4) check the "Assign a group leader automatically"
checkbox; verify the 2 nested radio buttons for
"random" and "first" strategies become enabled
5) select a strategy and fill out the rest of the
form, then submit (make sure your background job
is running)
6) verify after groups are created that each group
has a leader, and that the leader is in fact a member
of the group.

SelfSignup:
1) login as an instructor
2) go to the "people" tab and try to create a group
set.
3) enable self-signup.
4) check the "Assign a group leader automatically"
checkbox; verify the 2 nested radio buttons for
"random" and "first" strategies become enabled
5) select a strategy and fill out the rest of the
form, then submit.
6) Login as a student for the same course and join
the group.
7) verify that the student has been made the group
leader.

Change-Id: I2cdd9f5ed2fd577469beec4ab7369c69ecf7eaa6
Reviewed-on: https://gerrit.instructure.com/35130
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2014-05-23 17:23:53 +00:00
Joel Hough 0d186e3c1a group leaders
fixes CNVS-11833

test plan
- regression test teacher view of groups page

a group can only have one group leader, and that user must be in
the group. anything that can be done to remove a user from a
group should revoke their leadership if they have it. a user's
leadership should not be revoked unless the teacher revokes it,
a different leader is chosen, or that user leaves the group. a
leader's user should have a user icon on it and their name should
appear next to the group's name

a few test cases:
- set group leader using gear menu on user in group
- revoke the leadership of the user using the gear menu
- ensure that the group is now leaderless

- set a group leader
- set a different user as leader
- ensure that a screenreader identifies the group leader link as "Group
  Leader"
- ensure that the first user is no longer the leader

- set a group leader
- remove that user from the group by dragging and dropping
- ensure that the user is no longer the group leader

- set a group leader
- move the user to another group using the option on the gear
 menu
- ensure that the user is not the leader of their original or new
 group

- in a large-roster course, add users to a group user the plus
 button next to the gear menu
- set a group leader using the gear menu next to a user
- fill a group up to it's maximum limit of students
- ensure that the "full" label shows up for that group
- ensure that when you narrow the browser size, you can
still tell that the group is full

Change-Id: I8bb1b62e0f36a37a24e050878c945f822fe9f66c
Reviewed-on: https://gerrit.instructure.com/34360
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2014-05-20 22:22:12 +00:00
Anthus Williams 828981e72c define exportable attributes/associations on models
instead of passing an :exportable option to
ActiveRecord::Associations, simply define a constant
on the class containing exportable associations and
attributes. This is due to :exportable breaking
ActiveRecord, and we can't simply monkey-patch in
config/initializers because models are included in
migrations before the initializers are run

Change-Id: I11f1a6b4570c397d8e01010c517bc6efdac7afca
Reviewed-on: https://gerrit.instructure.com/33235
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Anthus Williams <awilliams@instructure.com>
QA-Review: Anthus Williams <awilliams@instructure.com>
2014-05-06 23:54:24 +00:00
Raphael Weiner 644b29d12f extract auto_handle to new canvas_uuid gem
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>
2014-02-25 19:30:59 +00:00
Cameron Matheson 3c434e8aff Remove unused collections stuff
This was a beta api that didn't work out.

Test plan:
  canvas should still work (sorry, this touches lots of stuff)

Change-Id: I31680b83f72f6d739ce74735ba40d7a760debb33
Reviewed-on: https://gerrit.instructure.com/29506
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2014-02-07 19:32:46 +00:00
Zach Pendleton 8b5cb2495b stop sending notifications for SIS group memberships
fixes CNVS-10561

when a group membership has been created through sis, it
should not send a notification to the new group member.

test plan:
  * as a student in a course, set your notification
    preferences to ASAP;
  * using an sis import, create a new group;
  * using an sis import, create a membership in the group
    for the student in step 1;
  * verify that the student has not received a notification
    about their group membership.

Change-Id: I4509f1614faa2e094323a272ff57ec24610d988d
Reviewed-on: https://gerrit.instructure.com/28724
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
2014-01-17 15:06:32 +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 d3f0b18684 validate nullness in the db on a bunch of columns
fixes CNVS-7414

Change-Id: I60978f66d88d916dc5736dbb975715172bd1e14b
Reviewed-on: https://gerrit.instructure.com/23141
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>
2013-09-12 22:20:39 +00:00
Cody Cutrer 00d5829fdc make group category assignments query fast
include conditions on the context, so it can use that index

test plan:
 * have at least one student in a course
 * create a new group category
 * it should work

Change-Id: I793d42a8838872eee407a3ba19362c14940f2d47
Reviewed-on: https://gerrit.instructure.com/23876
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-08-28 22:39:32 +00:00
Cody Cutrer 84ba40dcad optimize GroupMembership#update_cached_due_dates
fixes CNVS-6887

use a smarter query, and skip it altogether for account groups

test plan:
 * regression test adding/removing users to groups in a course with
   overrides and stuff.
 * an sis import of account level groups should still work

Change-Id: Ie9943af04ce6aab31f9f0d76f51c7474c1299616
Reviewed-on: https://gerrit.instructure.com/22317
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-07-18 22:15:18 +00:00
Jacob Fugal a771fe00ef replace submissions.late column with .cached_due_date
refs CNVS-5805

with efficient calculation of all due dates for any submissions for a
given assignment when related records (the assignment, its overrides,
related enrollments, and related group memberships) changes.

compares this cached due date to the submitted_at or current time when
determining lateness.

populates the column for existing submissions in a post-deploy
data-fixup migration.

test-plan:
  - run lib/data_fixup/initialize_submission_cached_due_date.rb
  - all submissions' cached_due_dates should be updated over several
    jobs
  - enroll a student in a course and create submissions in that course
    - create a second enrollment in a second section; the
      cached_due_dates for the user's submissions should recalculate
    - destroy the second enrollment; the cached_due_dates for the user's
      submissions should recalculate
    - create a group assignment
      - add the student to a group in the assignment's category; the
        cached_due_dates for the user's submissions should recalculate
      - remove the student from the group; the cached_due_dates for the
        user's submissions should recalculate
  - enroll more students in the course
    - change an assignment's due date; the cached_due_dates for the
      assignment's submissions should recalculate
    - create an override for the assignment; the cached_due_dates for
      the assignment's submissions should recalculate
    - change the due date on the override; the cached_due_dates for the
      assignment's submissions should recalculate
    - delete the override; the cached_due_dates for the assignment's
      submissions should recalculate
  - during any of the above recalculations:
    - the most lenient applicable override should apply
    - if the most lenient applicable override is more stringent than the
      assignment due_at, it should still apply
    - the assignment due_at should apply if there are no applicable
      overrides

Change-Id: Ibacab27429a76755114dabb1e735d4b3d9bbd2fc
Reviewed-on: https://gerrit.instructure.com/21123
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
Tested-by: Jacob Fugal <jacob@instructure.com>
2013-06-10 19:11:31 +00:00
Joe Tanner a5cc1bcf96 limit self-assigned group size, closes #CNVS-5407
test plan:
- go to the groups page of a course or account
  /courses/*/groups or /accounts/*/groups
- edit a group category by clicking on the pencil icon or
  click 'make a new set of groups'
- check the 'Allow self sign-up' checkbox
- a textbox should appear to limit group members
- enter a number (2 or 3) for the group limit and save
- add at least on group
- masquerade as students in the course and join a group until it's full
- once the group is full students should not be able to join the group
- also, when editing a group category you should be able to remove the group limit

Change-Id: I0d035320a171b03a7cd2e4d81ecb0648c5aacad0
Reviewed-on: https://gerrit.instructure.com/20309
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Joe Tanner <joe@instructure.com>
2013-05-08 16:47:14 +00:00
Cody Cutrer 8c94e53dc7 arel-ify scopes
s/named_scope/scope/g

refs CNVS-4707

Change-Id: I930d229fc9985c7c0096a0f4888933addd4f3aee
Reviewed-on: https://gerrit.instructure.com/18834
Reviewed-by: Duane Johnson <duane@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-04-01 21:57:16 +00:00
Cody Cutrer d9111f5414 arel-ify models
closes CNVS-4707

Change-Id: I32c8ec5a53525f89cf232890eaac790fbc2b4744
Reviewed-on: https://gerrit.instructure.com/18745
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-04-01 18:42:38 +00:00
Simon Williams 95df846ff3 fix possible infinite loop saving group memberships
if there were two active memberships for the same user in different groups
within the same group category, they would endlessly try to destroy each other.

fixes CNVS-4835

test plan:
- set up the situation above (i'm not sure how to do this in the UI yet, but
  from the console you could do something like this:
  https://gist.github.com/simonista/82201b9075748ae591c6)
- now try to create a third group in the UI and drag the user into it
- It should work, and the user should be removed from the other two groups.

Change-Id: I4787845082092ab928de5098e77f02be2aa981d6
Reviewed-on: https://gerrit.instructure.com/18920
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-03-22 23:39:33 +00:00
Duane Johnson 1d97ac0fc7 don't check section homogeneity on group membership update
When a GroupMembership is updated, don't check to make sure the user's
group is within the section, as this could impact SIS imports. We
only care about validating homogeneity when creating a new
GroupMembership.

Test Plan:
  - create a batch import in which a user is enrolled in a class,
    and is also in a group within that enrollment
  - add something else to the batch (to test that the rest of the
    batch is imported even when the error, below, occurs)
  - import the batch
  - mark the enrollment as deleted
  - re-import the batch
  - rather than failing to import the batch, there should be an
    error message indicating the group user had a validation error

fixes CNVS-4225

Change-Id: I2a20756d0464d833ce66e94a4d6c847bfb894f14
Reviewed-on: https://gerrit.instructure.com/18455
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-03-14 16:45:09 -06:00
rob orton 34a3a34ce5 soft delete group memberships
fixes #11637

test plan
 * have a course group with a  student
 * delete the student enrollment
 * group membership should be soft deleted

Change-Id: Ieba3f7dabee693a4572f8c382da12dcbc4182fbf
Reviewed-on: https://gerrit.instructure.com/15297
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-11-20 13:06:56 -07:00
Zach Pendleton 126246bba5 respect course/account locale settings in notifications.
fixes #10690

previously, notifications only considered user locale settings
when translating; they now consider the context as well.

test plan:
  * create a course with a spanish or russian locale;
  * enroll an english user in the course;
  * verify that the enrollment email is sent in the course
    locale and not the user locale.

Change-Id: Ib942f35dff770ec02aa4e39880a5234e318f26a9
Reviewed-on: https://gerrit.instructure.com/14103
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-10-08 13:17:10 -06:00
Simon Williams f898562246 api: fix bugs in group invite and membership api
fixes #10268

group invite wasn't searching in the correct account when trying to match user
emails passed in to users.  group membership creation was broken for
non-community account level groups to to a missing permission.

test plan:
- create an account level group
- invite someone who belongs to that account to the group with the api
- they should be added (it should not create a temporary user)
- now add someone else directly with the api be creating a membership for them
- it should work

Change-Id: I7bb7a22b83e13ed6e9575aa059e3e3463e0541f9
Reviewed-on: https://gerrit.instructure.com/13337
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-09-05 09:17:10 -06:00
Brian Palmer 0be73307fc some auto follow/unfollow fixes for sharding
also a fix for UserFollow#check_auto_follow_collections, which was kind
of only working by accident across shards.

test plan: have a user join a group in another shard, and see that they
auto-follow collections in the group. have them leave the group, and see
that they auto-unfollow private collections in the group.

Change-Id: Ic1efd9e527d14d4a21c0db828ba228dd0b3753e8
Reviewed-on: https://gerrit.instructure.com/11719
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-06-22 12:45:57 -06:00
Simon Williams 00ce2f0668 auto follow/unfollow groups based on membership
when a user joins a group, they should automatically be following the group,
which will cascade to follow collections and allow them to show up in the
stream.  when a user leaves a group, the should automatically stop following
the group.

test plan:
- join a group that has collections with items
- make sure you are following the group collections
- make sure those items end up in your stream

Change-Id: If615a607505452a7688563cc1ebb2d4be999241f
Reviewed-on: https://gerrit.instructure.com/11489
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-06-12 11:45:16 -06:00
Simon Williams f85e5801df group join/leave/invite api
allow users to join, or request to join groups and leave groups they are part
of, if the group allows those actions.  allow moderators to invite others
to the group by email address.  allows moderators to add or remove moderator
privleges of other group members.

test plan:
- no ui yet, so try these api actions manually and make sure they do the right
  thing.

Change-Id: I2765f07acb131e503add67b0daa37f18fdbde6c2
Reviewed-on: https://gerrit.instructure.com/11229
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-06-08 17:26:14 -06:00
Brian Palmer b7bcc762aa following groups
Uses the same functionality as following users and collections.

test plan: use the new api endpoints to follow and unfollow groups.
Verify that you can't follow private groups unless you are a member.

Change-Id: I329a6ff31031c0b501cfc724f193bf6c89db1af7
Reviewed-on: https://gerrit.instructure.com/11323
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-06-07 14:32:04 -06:00
Simon Williams 4c59a6efe7 basic groups api; refs #8598
this adds show/create/edit/delete api actions for groups.  currently create
only allows creating community groups.  the changes to these controller
functions should be backwards compatible with course and student groups.
anyone should be able to create a community (for now), but only moderators or
account admins are allowed to edit/delete them.

test plan:
 - test the four api actions from the command line
 - make sure managing course and student groups still works (there should be no
   visible changes here)

Change-Id: I9cac73ab434b0ba464ecfe399ab42174eff9b48a
Reviewed-on: https://gerrit.instructure.com/11148
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-06-05 12:51:42 -06:00
Simon Williams 127b9b3302 group model prep for communities; refs #8598
this commit just lays down a bit of ground work for communities. it defines
communities as a protected group category type for accounts which allows
membership in multiple groups. it also generalizes several places where student
organized groups was a special case. it also removes the restriction that
group.is_public always be false. this property will be used for different
visibility levels within communities. finally, it lays some groundwork for
handling group requests/invitations/following.

test plan:
- there should be no functional changes from this commit
- you should be able to run GroupCategory.communities_for(account) at the
  console for an account, and get a category shell for communities for that
  account.

Change-Id: Icff3f0e7fbd4ec3c0a72cdbaa310cbd0e75d0e3e
Reviewed-on: https://gerrit.instructure.com/10780
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-05-17 15:19:08 -06:00
Cody Cutrer 43f33049e3 only send conference invitations to active members fixes #5290
test plan:
 * create and publish a course
 * invite and accept a student
 * change the course dates to the future, and restrict access to
   them
 * create a web conference
 * the student should not get a notification

Change-Id: I06b0226c01fd38f99afed0ce767e9e7207864fbe
Reviewed-on: https://gerrit.instructure.com/10288
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-04-26 14:19:50 -06:00
Simon Williams fba4a32328 improve student group membership state flow; fixes #6948
student group memberships support requested and invited states, but there isn't
currently frontend support for accepting these memberships. students in these
states had an inconsistent group experience. this fix retroactively accepts
these memberships, and causes new memberships in these states to be
auto-accepted. it also tries to be more consistent about showing group
membership counts/members based on accepted memberships.

test plan:
- create a student organized group, inviting some people
- make sure the counts are right.
- refresh the page and make sure the counts match the group members
- make sure the people you are invited are "accepted" in the db

Change-Id: Id0e3f183a99bd4962497388ead6884243938e6fc
Reviewed-on: https://gerrit.instructure.com/8736
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-02-22 13:54:12 -07:00
Jacob Fugal 7a523474e4 include account groups in menu regardless of enrollments
account group memberships don't need a corresponding active enrollment
to be displayed in the Courses & Groups menu. fixes #6008

Change-Id: I136f1b33ed650cc7a88eaefb7f72adc0e65486e0
Reviewed-on: https://gerrit.instructure.com/6344
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-20 15:04:52 -06:00
Jacob Fugal e07e64b9ef self signup group categories
group categories can be flagged as self sign-up, and optionally
restricted to be section-homogenous. like normal groups and unlike
student-organized groups, a student may be in at most one self sign-up
group. but like student-organized groups and unlike normal groups,
students can assign themselves to the group of their choice. if the
section restriction is enabled, students can only be assigned (whether
by themselves or their teacher) to a group which is either empty, or
whose existing members are in the same section as the student.

also added an edit UI to group categories allowing renaming and
management of the self sign-up options. polished the existing UI for
creating categories.

fixes #4624

Change-Id: Ib623f4c6afd20e9700984f8294cd42950107252c
Reviewed-on: https://gerrit.instructure.com/6052
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-10-11 17:22:46 -06:00
Jacob Fugal f86aacc138 don't list groups from inactive enrollments in menu
just like we hide inactive enrollments from the "Courses" menu, also
hide groups from courses that don't have an active enrollments in the
groups portion of the "Courses & Groups" variation of the menu

fixes #5797

Change-Id: I91a9fd742b04faab5d97793b6baa17409a4f043a
Reviewed-on: https://gerrit.instructure.com/5901
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-30 10:18:18 -06:00
Jacob Fugal e749446e90 Group#student_organized?
Change-Id: Iccccefa00d7460327e9c96537ca3f187f345d773
Reviewed-on: https://gerrit.instructure.com/5764
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-27 12:59:49 -06:00
Jacob Fugal 530c5e1bdc group_category_name
wrap Assignment#group_category and Group#category accessors as
Assignment#group_category_name and Group#group_category_name accessors,
respectively, in order to make naming consistent and free up the field
"group_category" for a new association.

Change-Id: Ieb926088d96ebb8b46f70768a77b82fa1dcc8817
Reviewed-on: https://gerrit.instructure.com/5761
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-27 12:58:50 -06:00
Jacob Fugal 1a761c2d1f explicit utc db times in update_all
update_all's update hash doesn't have any magic performed on bare Time
objects; it assumes any Time object it's given is already in UTC. using
a TimeWithZone object (regardless of timezone), which Fixnum#ago and
friends happen to return, is still fine.

Change-Id: I297b2a3211b896b5225ebcfaaee3c1eb56e55fb6
Reviewed-on: https://gerrit.instructure.com/5351
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-08-30 16:46:25 -06:00
Cody Cutrer bdbebfaec8 check all models for protecting attributes refs #3847
Change-Id: I7cba6e26ad98e91723e2ccf0a28b8db79bb37b5c
Reviewed-on: https://gerrit.instructure.com/3631
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-05-25 17:38:50 -06:00
Zach Wily df3d4c6351 use something more secure than UUID for our unique tokens; fixes #4264
Change-Id: I407b50b98e44eab4e341b596ebefe9f35af3dc37
Reviewed-on: https://gerrit.instructure.com/3097
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-04-15 10:54:47 -06:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00