Commit Graph

100 Commits

Author SHA1 Message Date
Mark Severson cbd3641281 change pages to allow context-based draft state
test plan:
 - with draft state disabled and allow draft enabled for the account
   - account.settings[:enable_draft] = false
   - account.settings[:allow_draft] = true
 * enable draft state for the course
   - course.enable_draft = true
 * click on the 'Pages' tab in the course
   - the new pages UI should be shown
 * disable draft state for the course
   - course.enable_draft = false
 * click on the 'Pages' tab in the course
   - the legacy pages UI should be shown

Change-Id: If5d180e18451ec559d12b18784263b4ff92a754d
Reviewed-on: https://gerrit.instructure.com/23581
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2013-08-22 21:18:49 +00:00
Zach Pendleton a7dd148274 create context-level enable_draft option.
test plan:
  * enable "enable_draft" on an account and verify that
    draft-state changes appear on its courses;
  * disable "enable_draft" on the account, enable
    "allow_draft" on the account, and enable "enable_draft"
    on a course and verify that draft-state changes appear
    for that course, but not for other courses in the
    account;
  * disable "allow_draft" on the account and verify that
    draft-state changes are disabled for all courses on the
    account, even if they have enable_draft set.
  * verify that draft_state changes are enabled/disabled on
    groups given the criteria above.

Change-Id: I6a28dea356c2c0af5bf04de2f20efaedfb17ab2c
Reviewed-on: https://gerrit.instructure.com/22136
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
2013-08-16 15:19:39 +00:00
Mark Ericksen 298b17bc0e add group edit dialog for changing name
fixes CNVS-6215

testing steps:
* on the groups page, use the gear menu to edit a group
* change the group name and save it
* verify the name was changed in the display
* re-open the edit dialog, the new name should
  be displayed for editing
* cancel the edit dialog and verify no saving action
  happens
* reload the page and the name change should remain
* verify group name is required
* verify error displayed when group name is too long

Change-Id: Ic87d592ec4cfe4cba504c85762c4cc3a2b1e0358
Reviewed-on: https://gerrit.instructure.com/22583
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-07-26 22:32:01 +00:00
Jon Jensen 931276caf5 normalize group sorting, add SimpleBookmarker for common case
refs CNVS-6219

what's different in this change:
1. /groups now sorts by name. previously there was no guaranteed order.
2. /api/v1/users/self/groups should now sort by name (was id).
3. /api/v1/group_categories/:group_category_id/groups now sorts groups.
   previously there was no guaranteed order, making pagination unreliable.
4. /api/v1/accounts/:account_id/groups and /api/v1/courses/:course_id/groups
   are no longer case-sensitive, and sort by id in the event of a tie.

test plan:
* see specs
* ensure groups are sorted alphabetically (case insensitive) in the
  following places:
  1. /groups page
  2. /api/v1/users/self/groups
  3. /api/v1/accounts/:account_id/groups
  4. /api/v1/courses/:course_id/groups
  5. /api/v1/group_categories/:group_category_id/groups

Change-Id: I9c4cb34ead05f72640db43d40a67dcef97643de0
Reviewed-on: https://gerrit.instructure.com/22210
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
2013-07-12 23:09:50 +00:00
Landon Wilkins 6441ef9d14 api functionality: unassigned group members, with search
adds list and search users functionality to group_category api,
  including the ability to filter to only list/search unassigned
  users.

depends on #CNVS-6152

test plan)

0) verify that the api doc is error free and makes sense
1) make the following requests for both a course and an acccount
     group category, then verify the results:
  a) list all the users (i.e. no search_term)
  b) list all the unassigned users (i.e. no search_term)
  c) search users (e.g. search_term=bob )
  d) search unassigned users (e.g. search_term=bob&unassigned=true)

fixes #CNVS-6151

Change-Id: I99b33f29531579478ccece595a20971a1f8ad914
Reviewed-on: https://gerrit.instructure.com/21292
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Tested-by: Landon Wilkins <lwilkins@instructure.com>
2013-06-13 18:04:38 +00:00
Landon Wilkins 4c7ab5a576 adds user search functionality to the group api
see the @argument search_term in the following doc:

  # @API List group's users
  #
  # Returns a list of users in the group.
  #
  # @argument search_term (optional)
  #   The partial name or full ID of the users to match and return in the results list.
  #   Must be at least 3 characters.
  #
  # @example_request
  #     curl https://<canvas>/api/v1/groups/1/users \
  #          -H 'Authorization: Bearer <token>'
  #
  # @returns [User]

test plan)

1) verify the specs work
2) make a request (see above)
   (e.g. https://<canvas>/api/v1/groups/1/users?search_term=bob)
3) verify it returns the users in the specified group with the related name or full ID

fixes #CNVS-6152

Change-Id: I034b8b6ec2779895408276a894a3cf978baee12b
Reviewed-on: https://gerrit.instructure.com/21252
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Landon Wilkins <lwilkins@instructure.com>
2013-06-10 21:03:57 +00:00
James Williams 94d1f2ee97 add default_group_storage_quota setting to accounts
test plan:
* in account settings - quotas tab,
 set the default group storage quota
* attempt to upload files to a new group (without a set
quota) until the quota is hit or exceeded, confirming
that the set default is in effect

refs #CNVS-271

Change-Id: Ia4cbd84da19eb07d188dcc85c81c6b45bc2fa7ce
Reviewed-on: https://gerrit.instructure.com/21191
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2013-06-07 21:11:57 +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
James Williams 6b3bde6df3 fix and refactor content migration issue messages
test plan:
* import a package containing an item that is
 invalid so it will create a
 "Couldn't import the" item warning, but also
have an extremely long title (~250 characters)
(an example is attached to the ticket)
* confirm that when trying to import,
 the entire migration does not fail silently,
 and thus hang in the import phase,
 but instead creates a proper migration issue
 for the invalid item and continues the import
 normally

fixes #CNVS-5467

Change-Id: I2659ac0c5531ad609f3f58abc1fc0960e9d85c51
Reviewed-on: https://gerrit.instructure.com/19961
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-04-26 21:33:24 +00:00
Bracken Mosbacker 83455f2252 wiki page draft state support
wiki pages can be unpublished but will still default to
active until the feature is enabled.

Test Plan:
 * make an unpublished course in the console
 * using the wiki api make sure students can't see it in
   the index or show actions

closes CNVS-5270

Change-Id: I48970ce9c6b86a3039432b6d7647810b434bfdfc
Reviewed-on: https://gerrit.instructure.com/20014
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-04-26 16:31:27 +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
Jeremy Stanley f2e5c59acf add ability to set/retrieve storage quota to groups API
fixes CNVS-4782

note that setting quotas requires the manage_storage_quotas
permission; not everybody who can create a group has the
right to set the storage quota for that group

test plan:
 * view the API documentation and notice the new
   'storage_quota_mb' field, which represents the group's
   storage quota, in megabytes
 * as an account admin,
  - retrieve a group via the API; verify the storage_quota_mb
    field is returned
  - create a group via the API, setting storage_quota_mb;
    verify the value was set properly
  - update a group via the API, setting storage_quota_mb;
    verify the value was set properly
 * as a teacher,
  - retrieve a group via the API; verify the storage_quota_mb
    field is returned
  - create a group via the API, setting storage_quota_mb;
    verify the value was ignored (but the other values
    were accepted)
  - update a group via the API, setting storage_quota_mb;
    verify the value was ignored (but the other values
    were accepted)

Change-Id: Ia0c6c2ac2cbe85289a2e18d16589e4fe04b08a30
Reviewed-on: https://gerrit.instructure.com/18919
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-03-29 18:27:46 +00:00
Brian Palmer 77ca8ac013 remove deprecated rails constant usage
basically convert RAILS_ROOT -> Rails.root , RAILS_ENV -> Rails.env ,
RAILS_DEFAULT_LOGGER -> Rails.logger

This is necessary for rails 3

Change-Id: I138e1aa217fa8fb186d23ac09b04031c1e2b665e
Reviewed-on: https://gerrit.instructure.com/18412
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-03-11 12:14:08 -06:00
Jon Jensen 7fe105b278 course setting to prevent students from editing/deleting own posts
fixes CNVS-3178

test plan:
1. as a student, create a discussion topic and a reply
2. as a teacher, uncheck "Let students edit or delete their own discussion
   posts" on the course settings page.
3. as the student, confirm you cannot edit or delete the topic or reply
   that you created
4. as a teacher, recheck the box and save
5. on the discussion index page, confirm the setting is checked in the menu
6. disable it via the menu
7. repeat step 3

Change-Id: Ib7d6ba3604370241de1145aac8e23d35f78591c4
Reviewed-on: https://gerrit.instructure.com/17535
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
2013-02-08 16:11:23 -07:00
Jon Jensen d1434fffb3 don't let students message the whole class by default, fixes CNVS-3536
adds new "Send messages to the entire class" permission, which defaults
to off for students. controls whether or not the "Select All" checkbox
and the checkboxes next to Everybody/Teachers/Students/etc. are
available in the recipient finder.

test plan:

1. As a teacher, confirm that the Everybody/Teachers/Students/Select All
   checkboxes are available in any courses you teach
2. As a student, confirm that the Everybody/Teachers/Students/Select All
   checkboxes are not available in any courses where you are just a
   student
3. In course permissions, let students "Send messages to the entire class"
4. Confirm that students now see all those checkboxes

Change-Id: I5bca82414dc6e1e2f19abdd2e3257ca935d6f2c4
Reviewed-on: https://gerrit.instructure.com/17519
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
2013-02-08 15:47:26 -07:00
Jacob Fugal fd305e90c4 bookmarked pagination, including multi-shard
introduces a new BookmarkedCollection module with behavior similar to
PaginatedCollection in the simple case.

the primary advantage is that assigning to current_page (e.g. from the
:page parameter to paginate) expects a bookmark token value and
automatically deserializes into current_bookmark. the library client can
then use current_bookmark to skip forward in the collection, rather than
using (current_page - 1) * per_page as the number of items to skip. the
client then calls set_next_bookmark on the pager if there's more
results, and it automatically derives the bookmark for the next page and
serializes it into next_page, for use by Api.paginate, etc.

in addition to the PaginatedCollection.build analog, you can simply wrap
an existing scope to change it from something that will paginate by page
number into something that will paginate by bookmark.

finally, the key reason to use bookmarked pagination is to enable
composition of collections. you can merge multiple collections into one
collection which when paginated will pull results from each
subcollection, in order, to produce the page of results. you can also
concatenate multiple collections into one collection which when
paginated will exhaust the collections in order with seamless transition
from one to the next when a page spans both.

with collection merging available, you can paginate an association where
you'd like to use with_each_shard. one collection is created per shard,
and then they are merged together. this process is automated for you in
the BookmarkedCollection.with_each_shard method.

fixes CNVS-1169

Change-Id: Ib998eee53c33604cb6f7e338153428a157928a6d
Reviewed-on: https://gerrit.instructure.com/16039
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-01-22 09:41:18 -07:00
Ryan Florence cde076eafd show all users not assigned to group in unassigned
fixes #CNVS-2619

test plan:
1. create an account level group
2. put somebody in the group
3. remove them from the group
4. refresh the page
   - the user should be in the unassigned area

if a user had previously belonged to a group, they
were no longer included in unassigned since the
query didn't check the workflow state

Change-Id: Iaca501c4fc35847759f56a925707618571943bf6
Reviewed-on: https://gerrit.instructure.com/16638
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
2013-01-09 15:47:33 -07:00
Zach Pendleton a69f77218d add groups to collaborators table, add api endpoint.
refs #CNVS-1160

adds group_id to collaborators table to identify
collaborators associated w/ a group versus collaborators
added as individuals.

also adds a new API endpoint to return collaborators for
a given collaboration.

test plan:
  * run migrations to add the group_id column;
  * create new collaboration and add at least one user
    as a collaborator;
  * in the console, add a group as a collaborator, giving
    it a group_id and no user_id;
  * make a GET to /api/v1/collaborations/:id/members
    and verify that users added as individuals are
    returned as type 'user' and that users added with
    group_ids are returned as type 'group' and not
    displayed as individuals.
  * verify that one record exists for each collaborator
    regardless of type;
  * verify that adding per_page params will paginate
    requests to the endpoint.

Change-Id: Id509fd0e7eebe6a889b2ca86e8d7d8d1a9e93c63
Reviewed-on: https://gerrit.instructure.com/16203
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-04 20:18:04 -07:00
Ethan Vizitei bbda931a4a consider mooc performance
refs #CNVS-1292

Was unable to find any job-per-student
behavior (not to say that we won't ever discover
any), but I did find several instances of loading
full collections into memory
 of student objects or objects
that would be instantiated in the same order of
magnitude as students for a course, and was able
to tweak many of those.  There are undoubtably
more to find.

Change-Id: I044a1d92f90c830b4d1d07f0d4de17a718bcbe55
Reviewed-on: https://gerrit.instructure.com/16030
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2012-12-18 10:38:58 -07:00
Cody Cutrer bdbeeb992d cross shard dashboards
two major pieces:
 * use context_type/context_id instead of context_code for
   three relations so that sharding extensions will
   automatically work
 * deserialize stream item data as actual AR objects instead
   of OpenObject (for similar reasons)

test plan:
 * run the predeploy migration, but not the postdeploy one
 * view your dashboard on a shard other than your home shard;
   it should be identical to your home shard
 * view courses that you are enrolled in with the same id but on
   different shards. the activity stream should have the correct
   data for the course in that shard, for both courses (i.e.
   no mixing of data from the two shards)
 * do actions that generate new stream items, and verify the new
   items appear correctly for the above two steps
 * run the postdeploy migration, wait for the job to finish, then
   repeat the test plan

Change-Id: I8d5fcadb8d971acf7388a12e9151a3e927751f44
Reviewed-on: https://gerrit.instructure.com/15462
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-11-29 17:36:24 -07:00
Simon Williams f984b9b26b remove announcement/discussion badges from left nav
closes #11452

they were confusing because they represented "never before seen",
but there was no way to filter for them on the discussion/announcement index
page.  grades badges still exist though.

test plan:
- make sure new discussions/announcement don't make badges for other course
  users in the left nav.
- make sure grade badges still work correctly.

Change-Id: I04a3c8d4a0c246be1660201b7e9f7f73c5065ffa
Reviewed-on: https://gerrit.instructure.com/14708
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-10-25 17:04:17 -06:00
Joel Hough d1f1d46f0d fixed css class typo for tab in group model
Change-Id: I4a2cc56e2dc3411f11b99326516a20cb4bd158aa
Reviewed-on: https://gerrit.instructure.com/14556
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-10-19 12:21:42 -06:00
Simon Williams 5ce9fb146e unread badges in left nav
refs #10541

add counts of how many unread discussions and announcements a user has in
a course or group in the left hand nav bar of the course or group, next to the
appropriate navigation link.

these counts are cached in a context/user/content_type join table.
unfortunately, there are situations that can change whether or not a discussion
or announcement is visible to the user (and thus unread) without triggering any
backend action. for example, a post delayed announcement, a locked discussion
assignment, or a discussion with prereqs in a module. because of these types of
situations, the count has to be re-queried every so often, and the time chosen
for this is if it's been stale for 10 minutes.

test plan:
- as a teacher, create some announcements and discussions
- as a student, you should have unread counts in the left nav
- read the announcements and discussions
- the counts should update appropriately
- (see explanation above for the following)
- try post delayed announcements
- try locked discussion assignments
- try discussions locked in a module
- make sure the count badge looks good in all browsers

Change-Id: Ia6428717e91ed389c63ca97a065232dac7121b7e
Reviewed-on: https://gerrit.instructure.com/13926
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2012-10-08 11:38:01 -06:00
Cody Cutrer d70945c1bd remove unused twitter tables and no-op jobs
test plan:
 * edit course settings, there should not be an error
 * copy a course, there should not be an error

Change-Id: I733bef83b69d9c513be801d3e4b25422bcd10ebd
Reviewed-on: https://gerrit.instructure.com/13832
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-10-02 13:11:13 -06:00
Cody Cutrer a993ba3cbb remove default_wiki_wiki_pages relations fixes #10993
it was a has_many :through that is broken for auto-created wikis

existing specs cover all changes except /undelete page, which
is unsupported

test plan:
 * ensure user's rss feed can be opened correctly
 * ensure wiki sidebar loads and has wiki pages in it

Change-Id: I7c3f0f68641b67f602e6b412ab5a386140bb68b2
Reviewed-on: https://gerrit.instructure.com/14023
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2012-10-01 09:15:25 -06:00
Simon Williams e465cf7eb4 render correct page after joining self-signup group
fixes #10880

when joining a self-signup group, permissions were being incorrectly cached
causing a 'membership pending' page to be shown.

test plan:
- as a teacher, create a set of course groups, and allow self-signup
- as a student, join one of these groups
- it should not say 'membership pending'
- it should say 'you joined the group'

Change-Id: Ic11cdeead8db23293e64faa0dc3c803310e426cc
Reviewed-on: https://gerrit.instructure.com/13959
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-09-27 14:42:46 -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
Joe Tanner 035ac510bc fix permissions for group discussion attachments, fixes #10241
test plan:
- In a course where "Let Students attach files to Discussion Posts"
  check box is checked (under "more options" when editing course details)
- Create a group and add a student to the group
- Log in as the student and create a new discussion or reply to a discussion
- Click on the choose file button and attach something
- The attachment should be saved
- Also verify that the student doesn't have the option to attach
  a file when the above checkbox is not checked

Change-Id: I56f4e2e29a8350a50a85a926f8ca9493a1c3fd0c
Reviewed-on: https://gerrit.instructure.com/13365
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2012-08-31 17:12:34 -06:00
Cameron Matheson 6c10743864 disable group settings page (fixes #9767)
Test plan:
  * Go to a group's page
  * There should not be a 'Settings' link in the sidebar
  * Appending /edit  to the URL should result in a 404

Change-Id: I7c2115f6c42d420c306aa312d2c7ec319d08b115
Reviewed-on: https://gerrit.instructure.com/12747
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-06 16:59:36 -06:00
Cody Cutrer 29cf0db046 remove WikiNamespace fixes #9121
no user visible behavior change

test plan:
 * make sure existing wiki contents haven't disappeared
 * make sure a new course gets a wiki that functions correctly
 * make sure wiki rss feeds are still functional
 * try to access the wiki from a new course from multiple requests
   simultaneously; it should get a single wiki that's not conflated

Change-Id: I339b56c39d7868dbdec3df4007291a429272b1cf
Reviewed-on: https://gerrit.instructure.com/12432
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-07-30 09:15:04 -06:00
Simon Williams b45d2e16d7 add collaborations to group nav; fixes #5475
collaborations were set up to work with groups, but not to be shown in the
group sidebar, this closes that loop so that they can be fully used.

test plan:
- enable a collaboration plugin, eg google docs
- collaborations should show up in the left sidebar for groups
- you should be able to use collaborations in a group just like with a course

Change-Id: I31cf134151fc7e68b9aa7688ed02e37f09a6161b
Reviewed-on: https://gerrit.instructure.com/12372
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2012-07-24 10:21:50 -06:00
Ryan Shaw aab9b18887 fix spec when accout.root_account is nil
Change-Id: Iafa59ef616d8ea6794d02241b5e9615e55cee340
2012-06-27 17:22:53 -06:00
Cameron Matheson a64087b478 use Account#canvas_network_enabled? to enable group profile tab
Change-Id: Iac5a959396b4c2c2c3554dcc8d84c987afb28daf
2012-06-27 16:13:11 -06:00
Ryan Shaw 77138c4d4a Merge remote-tracking branch 'origin/master' into dev/fft
Conflicts:
	app/controllers/collections_controller.rb
	app/views/layouts/application.html.erb
	config/build.js
	lib/tasks/parallel_exclude.rb

Change-Id: Ic9664c29d1469c13b514343915c5929dfb15c6ad
2012-06-26 10:14:46 -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
Cameron Matheson 665d295ce7 Merge branch 'master' into dev/fft
Conflicts:
	Gemfile
	app/controllers/courses_controller.rb

Change-Id: Ie01f68d5ab6f02e3a581d70adf674f222b88574b
2012-06-18 15:24:09 -06:00
Cameron Matheson 9b0919d855 fix a bunch of spec failures
Change-Id: Ie63d9219aa0a5405da43a2629197183bde9907da
2012-06-13 16:21:15 -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 62bc3faeab auto-follow collections when following a user/group
test plan: follow a user and a group, make sure that makes you
auto-follow all the existing collections. add a new collection and
verify you're now following that new collection.

this only applies to public un-deleted collections, or all un-deleted
collections if you're a member of the group.

Change-Id: I163f26661d8537f059955cf34edb48cbeafa24b6
Reviewed-on: https://gerrit.instructure.com/11381
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-06-08 10:38:02 -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
Cameron Matheson ec816c3dac group profile page
closes #8827

Change-Id: Ifd02bfe30828b4f3d5e6da1d1c00976fa65be6ac
2012-06-07 02:00:06 -06:00
Jon Jensen b61331effb Merge remote-tracking branch 'origin/master' into dev/fft
Conflicts:
	app/models/group.rb
	spec/selenium/profile_spec.rb

Change-Id: Ifbe09f50e90756a965d532f098f94c700225fc20
2012-06-06 15:14:35 -06:00
Simon Williams 8cf11daeb1 create default collection when queried; closes #8804
the first time a user queries their own collections, or a member of a group
queries the group's collections, we create a default private collection for
them and return it, so there is always a colleciton to add to.

test plan:
- as a user who has never used collections before
- go somewhere that shows your collections (query through api for now,
  eventually go to your profile page).
- you should have a collection named after you
- do the same as a member of a community

Change-Id: I6f75cf8971c6e2a0e990ce221d4cb149a8a8254e
Reviewed-on: https://gerrit.instructure.com/11275
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-06-06 14:17:06 -06:00
Brian Palmer a64cce52be allow changing a collection from private to public
test plan: create a private collection, then use the api to update it to
public. verify it can't go back to private, right now.

Change-Id: Ic11dcb3c60e8130304b9fa1c9c7482461f5b6cdd
Reviewed-on: https://gerrit.instructure.com/11368
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-06-06 12:56:03 -06:00
Jon Jensen bae0ce910a fix a couple little regressions
Change-Id: Ib630cecd8f5a05cdc37783e59553e786fa9873ea
Reviewed-on: https://gerrit.instructure.com/11322
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-06-05 21:09:48 -06:00
Cameron Matheson 7427406c56 group settings page
Change-Id: I86cc94a030d12d25e9efebf718faa4fccfd9bddb
2012-06-05 17:26:12 -06:00
Cameron Matheson 3aeca18123 Merge branch 'master' into dev/fft
Conflicts:
	app/controllers/groups_controller.rb

Change-Id: If8522f96eeb698cbeada45a49f7f5c61ba15ac84
2012-06-05 13:54:46 -06:00
Simon Williams 51dd50f233 add avatar_attachment to groups
give groups an avatar, and add a way to set the avatar in the api.

test plan:
- add an image to the group's files (either through api or web)
- use the group api update action to set the avatar
- make sure the resulting object has a valid, non-nil avatar_url

Change-Id: I7db62615e65800fca9caba81c2de67a59bccf5f7
Reviewed-on: https://gerrit.instructure.com/11208
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-06-05 12:54:02 -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