Commit Graph

182 Commits

Author SHA1 Message Date
Jacob Fugal 0843818a0c let User.for_course_section work with no sections
if called with no sections, just no-op. this behavior is just moved into
the scope from Course#instructors_in_charge_of(student) so it can be
reused elsewhere later

Change-Id: I574e90a5565993e8969f344f0bbffe51d5160941
Reviewed-on: https://gerrit.instructure.com/8794
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-02-21 10:40:49 -07:00
Rob Orton 669832c943 fixes gradebook csv with muted assignments fixes #6390
Test Plan:
     * create a course with assignment that is not muted
     * csv should not have muted line
     * create a course with a muted assignment
     * csv should have muted line
     * attempt import csv without muted assignments row to grades
     * attempt import csv with muted assignment row to grades
     * muted assignmet row should not impact grade import

    closes #6390

Change-Id: Iab7c1d9c93e15a15e0ef1797cceee536aa2447ab
Reviewed-on: https://gerrit.instructure.com/8308
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-02-16 14:21:05 -07:00
Zach Pendleton 113b16e2db add course import notification. fixes #6930
when course import is happening, display notification on
course home page that explains why some content may not
be visible.

test plan:
  * create new course;
  * verify that no message displays on course home page;
  * start course import (or create a CourseImport
    in the console);
  * verify that course import notification appears on course
    home page;
  * complete CourseImport or set its workflow_state to either
    'completed' or 'failed.'
  * verify that course import notification no longer appears.

Change-Id: Ia62fbf9d8d1a36440d4f36d28ee4ebc83fe8668d
Reviewed-on: https://gerrit.instructure.com/8624
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-02-14 14:57:58 -07:00
Brian Palmer 21d2c608c6 optimization to Course#gradebook_json
The previous method of mapping over the entire submissions array once for
each student was inefficient for courses with a large number of
submissions (which is typically students * assignments)

refs #7235

test plan:
  * download the csv from the gradebook
  * re-upload the csv to the gradebook, verify that things work as before
  * on a large course, this should be significantly faster than the
    previous code. however, it could still timeout on a huge course.
    this won't be completely solved until we refactor and make this an
    async process.

Change-Id: Icd2d7aae79fa933f1338de0b1c18a7219d772e93
Reviewed-on: https://gerrit.instructure.com/8642
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-02-10 13:16:29 -07:00
Simon Williams 6e0bf1954d show mult. enroll. in groups; fixes #6998
We want to show all sections that a user belongs to when building groups, and
make sure that section-restricted groups take into account multiple sections.
The data model already (mostly) supported this, but the UI did not.

Test plan:
- create a course with > 2 sections, > 2 users, at least one in multiple
  sections.
- Go to the groups page, make sure that both sections show up under the user.
- Make the group category section-restricted, make sure things work as you
  expect.

Change-Id: Ic13bc81cf62811a0e5dcb9572240fae685056989
Reviewed-on: https://gerrit.instructure.com/8435
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-02-09 11:14:02 -07:00
Brian Palmer 1d533ef154 don't wait on media object processing when importing a course
Just fire off the kaltura upload jobs in the background, so that the
import can continue. Attachments in the special media_objects export
folder will still be deleted when those uploads complete.

Note we still wait for canvas common cartidge imports, since we need the
completed media object imports in order to translate the rich text
content. We plan to address this limitation later.

test plan:

 * do a course import from a source other than canvas CC, verify that
   the import finishes without waiting on Kaltura.
 * do a course import from a canvas CC package with
   some audio/video. Verify that the import finishes after waiting on
   kaltura, but the attachments in /media_objects are removed as the
   kaltura jobs complete.

fixes #5383

Change-Id: I7dbf12c211fc332fe9d4f16bc4d31fd0656c1941
Reviewed-on: https://gerrit.instructure.com/8031
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2012-02-01 09:05:23 -07:00
Cameron Matheson 74e82ff818 Properly add/remove external tool tabs from nav
fixes #6769, #6939

Test plan:
  - enable caching with redis or memcached
  - log in to a course page
  - use the api to  add an external tool with course navigation (see the
    redmine bug)
  - refresh (you should see the external tool in the navigation)
  - delete the external tool
  - refresh (nav item should be gone)

Change-Id: I734bd726818ea84ffe333597eb0197db2200c235
Reviewed-on: https://gerrit.instructure.com/8141
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2012-01-24 21:15:07 -07:00
Jacob Fugal 3fa57b33e8 fix invitees visiting unpublished courses
don't try and accept! (or reject!) when they're not actually invited.
only show "invitation accepted/rejected" flashes when it actually
happened. don't allow previewing invitees to see unpublished courses.
don't show invitation related flashes when displaying a "you can't look
at this" page. fixes #6708.

test-plan:
  - create unpublished courses in the default account and in a
    non-default account
  - create a user for each course and invite them as students to the courses
  - try and visit the courses as the respective students
  - both should see the "this course hasn't been published yet" page
  - both should see no flash-notice on that page
  - neither should be accepted to their course
  - create a user and invite them to one of the courses as a teacher
  - try and visit the course as the teacher
  - should not see the "this course hasn't been published yet" page

Change-Id: I5e6ce4541621bdc3d6dac0efe62a2741f7addabf
Reviewed-on: https://gerrit.instructure.com/8079
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-01-20 09:11:20 -07:00
Simon Williams db37920cf0 hide discussions from observers; closes #6825
provides a role override permission for viewing discussions. primarily useful
for disallowing observers from reading discussion, although by default it is
enabled.

test plan:
- create a course
- create a discussion (d1) in that course
- create a discussion assignment (d2) in that course
- log in as an observer and make sure you can see both discussions above
- log in as an admin and revoke the read_forum permission for observers
- log back in as the observer and make sure you can't see the discussions
- also check that the assignment shows the assignment page, but does not
  redirect to the associated discussion.

Change-Id: I4c6441c781c24e6aadacbfc23dcc307c772ecd2c
Reviewed-on: https://gerrit.instructure.com/8069
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2012-01-18 14:49:22 -07:00
Jacob Fugal 317378f775 straighten out course designer permissions
fixes #6194

test-plan:
  - create a course
  - create a user
  - add the user to the course as a designer
    (course.add_designer(user).accept in script/console)
  - the user should be able to do almost everything a teacher can in the
    course
  - the user should *not* be able to view grades or user notes
  - the user should *not* be included in the course roster

Change-Id: Id0e642fb19906529627917fffac26f0dae378bcc
Reviewed-on: https://gerrit.instructure.com/8047
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jacob Fugal <jacob@instructure.com>
2012-01-13 18:56:50 -07:00
Jacob Fugal daf2a48e23 fix typo; fixes #6755
test-plan:
  - create a course A
  - create a graded quiz in course A
  - create a course B
  - go to import content from course A into course B
  - make sure "Copy Everything from A", "Quizzes for A", and the
    specific quiz from A are all unchecked.
  - check the assignment for the specific quiz from A.
  - click "Import Course Content"
  - the quiz should be imported from A to B without error

Change-Id: I88511511f6c8494ec04d551af3f15a2b32e374f1
Reviewed-on: https://gerrit.instructure.com/7914
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-01-06 15:05:50 -07:00
Jon Jensen 80c90587d6 calendar and scheduler apis; refs #3395
Change-Id: I0bafb21630086ff2a99b8b881568bff51afabedc
Reviewed-on: https://gerrit.instructure.com/7823
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-01-06 12:35:27 -07:00
Cody Cutrer 057a8c8930 remove sis_source_id from enrollments API
this hasn't been released yet, and doesn't actually mean anything

test plan: run the specs

Change-Id: I391623e63fa7710717c26f33dac9c5ae220577e3
Reviewed-on: https://gerrit.instructure.com/7902
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2012-01-05 15:36:56 -07:00
Cody Cutrer de92da47b0 remove the account.root_account || account idiom
just make Account#root_account return self if it is a root account

test plan:
 * run existing specs

Change-Id: Iff3f621bb722e0f5e90659c4b711d48d8d3c510f
Reviewed-on: https://gerrit.instructure.com/7700
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2012-01-03 11:47:33 -07:00
Zach Pendleton 82ad7ee0f5 add course enrollment creation api. fixes #6559.
new api available at /courses/:course_id/enrollments.
takes params:
  * enrollment[user_id]
  * enrollment[type]
  * enrollment[workflow_state]
  * enrollment[sis_source_id]
  * enrollment[course_section_id]
  * enrollment[limit_privileges_to_course_section]

affects: api
test plan:
  * post all params and ensure that new enrollment is
    created;
  * post params with workflow_state of active and
    verify that user is properly enrolled in course;
  * post only user_id and type to verify that they
    are only required params;
  * post as unauthorized user to verify that 401 is
    returned;
  * post without user_id and/or type to verify that
    error message is returned with 403 status.

Change-Id: I38e8df930efb2793bf0fa6a190f74f7fb37c7f78
Reviewed-on: https://gerrit.instructure.com/7375
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-12-19 16:48:50 -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
Bracken Mosbacker e98c5059d7 fix infinite recursion in outcome groups
The learning outcome UI has some bugs that allow you to
drag groups into other groups. This causes groups to have
multiple parents and so they'll show up on the page more
than once. Once that happens you can even drag a group
into itself. Once in that state loading the outcomes
page would cause an infinite render.

This commit makes the page render even with the existing
bad data. It also prevents groups from being added to a
group of any of its ancestors. It also fixes groups
having multiple parents.

This commit doesn't address the current bugs in the UI that
allowed these problems to happen, it just prevents those
from creating relationship loops.

Test Plan:
 * Load outcomes page and create two groups
 * Drag one group into the other group
 * Refresh page, there should not be two of the group you dragged
 * If you want to test the page loading despite existing bad relations:
 * Create a content tag that makes a group point to itself like the specs do. (You can't make this happen in the UI anymore)
 * Loading the outcomes page shouldn't freeze

Change-Id: I416e99b3bc57a3b8c82db5cc895bccd141dc3dab
closes: #6384
Reviewed-on: https://gerrit.instructure.com/7559
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-12-19 16:28:26 -07:00
Zach Pendleton 86580eb0a8 add course creation to api. fixes #6539
courses can now be created by posting to
/api/v1/accounts/:account_id/courses. it accepts
the following params:

  * account_id
  * offer
  * course[name]
  * course[course_code]
  * course[start_at]
  * course[conclude_at]
  * course[license]
  * course[is_public]
  * course[allow_student_wiki_edits]
  * course[allow_student_assignment_edits]
  * course[allow_wiki_comments]
  * course[allow_student_forum_attachments]
  * course[open_enrollment]
  * course[self_enrollment]
  * course[sis_source_id]
  * course[sis_name]
  * course[sis_course_code]

test plan:
  * post the above params to /api/v1/accounts/:account_id/courses
    as a site or account admin and verify that a new course is
    created;
  * post an empty params[:course] to the api as a site or account
    admin and verify that it creates a course named 'Unnamed
    Course.'
  * attempt to create a course as a non-admin user and verify
    that a '401 Unauthorized' response is returned.
  * attempt to create a new course as a site or account admin and
    set the 'offer' param to true. verify that the course is
    immediately available.

Change-Id: Ie5f9af8bfe3a7ec189c5532b73f5ab28314d02cb
Reviewed-on: https://gerrit.instructure.com/7330
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2011-12-19 08:27:49 -07:00
Brian Palmer d7248a9539 don't delete enrollments for students with multiple in the same course
refs #6440

we know for a fact that we don't fully support multiple student
enrollments in different sections of a course, but deleting duplicate
enrollments on gradebook load is a solution that is causing more trouble
than the original problem, especially because it's such a random event.

this exposes a known issue, where if you filter the gradebook by
section, the student will appear in one of their sections but not the
other.

test plan: enroll a student in multiple sections, either through SIS or
the console. going to the gradebook should not delete any of the
enrollments, but downloading the csv should still only list the student
once. and re-uploading the csv with a changed grade for that student
should work. you'll see other weirdness, like the student will have the
course listed twice in their dropdown. these are known issues discussed
in the the ticket.

Change-Id: I78c3ed513ce3986e90c65d51562bbc4b24439661
Reviewed-on: https://gerrit.instructure.com/7540
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-12-16 08:44:47 -07:00
JT Olds f39c453cde cleaning up grade exchange
test plan:
 * set up an account with a course
 * start netcat in listening mode
 * enable the grade export plugin for the course to post to your netcat
   instance
 * visit the course as a teacher and set up some assignments with grades
 * publish the grades

Change-Id: I7f5b6b264b70ffe06c38f29ad52ee1d4694e5a8d
Reviewed-on: https://gerrit.instructure.com/7279
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-12-09 13:45:19 -07:00
Cody Cutrer df55776d07 remove completely unused aborted workflow state
test plan: n/a

Change-Id: I85628abbc211d07ee1fb4abba028eea4b71e93be
Reviewed-on: https://gerrit.instructure.com/7041
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-11-28 16:33:30 -07:00
Cody Cutrer a696880bf2 fix permissions for date-completed users fixes #6431
test plan: enroll a teacher in an active course; set the dates for
  the associated term in the past.  log in as the user,
  they should still be able to see the course settings page, but
  not change anything

Change-Id: I27cbdc961e977c1ae1c70ae5198b6f8478430f1a
Reviewed-on: https://gerrit.instructure.com/7077
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-11-28 14:39:27 -07:00
Cameron Matheson d315baa896 keep root_account_id in sync between course/enrollments
fixes #6142

test plan: Create a course and enroll some students.  Move the course to
  another root account.  The following SQL query should return 0:

    SELECT COUNT(e.id) FROM enrollments e
    INNER JOIN courses c ON e.course_id = c.id
    WHERE e.root_account_id != c.root_account_id

  To test the migration, mess up some of the enrollment
  root_account_ids:

    UPDATE enrollments SET root_account_id = 99

  Before migrating, the SELECT COUNT snippet above should return
  false, after migrating, it should return true.

Change-Id: I9b18dded8a763a8a05f5e631907f77b4e9a1bd49
Reviewed-on: https://gerrit.instructure.com/7081
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-11-28 14:29:58 -07:00
Cody Cutrer 0fb3b5a925 show invitations for temporary users to users that have the same e-mail
refs #5833

testplan: enable open registration, invite a user, have that user accept
  and create a new account.  Then invite with the same e-mail again,
  login as the old user, and the invitation should be visible in the UI.
  Accept the invitation, using the existing account, and the enrollment
  should not be duplicated in the UI.

Change-Id: I64c886617f87f64bad35593229ee18434163ca7b
Reviewed-on: https://gerrit.instructure.com/6778
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-11-18 13:38:19 -07:00
Bracken Mosbacker 6e4eab5f42 add api for copying course content
Test plan:
 * use the /api/v1/courses/:course_id/course_copy endpoint to start a course copy
 * use the returned status url to make sure the status works
 * when the copy is complete make sure the course has all expected data

closes #6250

Change-Id: I95c2567d0a566d97836579dd3b7b0a224328ec38
Reviewed-on: https://gerrit.instructure.com/7032
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-11-18 08:29:23 -07:00
Cody Cutrer 9b9fd331a2 fix permission check for TAs refs #5833
also add a checkbox for admins to only search for existing users
(i.e. ignore open registration)

Change-Id: I84d2ba7992339b37506e41a50c336325af0ac73b
testplan:
 * add a student to a course as a TA
 * add a user to an account or a course as an admin, with and without
   open registration, with and without manage_user_logins permission,
   with and without checking "search only existing users" (not all
   combinations applicable, each underlying condition is checked in
   specs)
Reviewed-on: https://gerrit.instructure.com/6969
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-11-16 10:28:51 -07:00
Bracken Mosbacker ba28a28d16 copy and export/import external tool assignments
External tools weren't copied when copying a course
so that is implemented here as well

test plan:
 Export/Import:
  * Create an external tool assignment
  * export the course
  * import the course into a new course
  * set the secrets on the external tool
  * make sure the assignment works in the new course
 Copy:
  * Copy a course into a new course
	* make sure the assignment works

refs #5892

Change-Id: I4aab8966b53ca2d144fddd71eefd0acbdb7c0bff
Reviewed-on: https://gerrit.instructure.com/6958
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-11-15 15:33:20 -07:00
JT Olds bf4bde1de1 order the gradebook csv assignment columns by due_date, then position
fixes #5824

testplan: for each sort criteria, make a number of assignments that
  differ in every field but the already matched sort criteria, and
  make sure the sort order is right in the csv.

  sort criteria are whether or not there is a due date, due date,
  assignment group, position, and title

Change-Id: Ia18f32de5ab2f44e3e64b582cca3df1bedd9553a
Reviewed-on: https://gerrit.instructure.com/6791
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-11-11 10:07:07 -07:00
Brian Palmer ed275b3293 restrict submission actions to sections
teachers and TAs can be limited to a specific section, in which case we
need to enforce those limitations in the submissions api.

testplan: set up a course with 2+ sections, and a teacher who is only
allowed to access 1 of those sections. then verify:
  * GET /submissions should not list users in other sections
  * GET /submissions/:id for a user in another section should 404
  * PUT /submissions/:id for a user in another section should 404
  * GET for_students with user ids in other sections should not return those users
  * all of the above should return no submissions if the user attempts to access the api via /sections/:section_id of the other section

close #5859

Change-Id: I102b13d1462f588277ca559f418785452e58e816
Reviewed-on: https://gerrit.instructure.com/6796
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-11-10 12:08:58 -07:00
Brian Whitmer 6b83b9227c basic lti navigation links
By properly configuring external tools (see
/spec/models/course_spec/rb:898 for examples) they can
be added as left-side navigation links to a course,
an account, or to the user profile section of Canvas.

testing notes:
- you have to manually set options on the external tool:
- for user navigation the tool needs to be created on the root account
  with the following settings:
  {:user_navigation => {:url => <url>, :text => <tab label>} }
  (there are also some optional language options you can set using
  the :labels attribute)
- for account navigation it's the same
- for course navigation it's the same, except with :course_navigation
  there's also some additional options:
  :visibility => <value> // public, members, admins
  :default => <value> // disabled, enabled

test plan:
- configure a user navigation tool at the root account level,
  make sure it shows up in the user's profile section

- configure a course navigation tool at the account level,
  make sure it shows up in the course's navigation

- configure a course navigation tool at the course level,
  make sure it shows up in the course's navigation

- make sure :default => 'disabled' course navigation tools don't
  appear by default in the navigation, but can be enabled on
  the course settings page

- make sure :visibility => 'members' only shows up for course members

- make sure :visibility => 'admins' only shows up for course admins

- configure an account navigation tool at the account level,
  make sure it shows up in the account's navigation, and
  any sub-account's navigation

Change-Id: I977da3c6b89a9e32b4cff4c2b6b221f8162782ff
Reviewed-on: https://gerrit.instructure.com/5427
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-11-04 17:07:17 -06:00
Jacob Fugal 9e9040146a disable 'randomly assign students' for restricted self-signup groups
also, make the random assignment happen on the server via an ajax call.
before, it would make one ajax call per student assigned, which is
rather inefficient when there are many students to assign.

fixes #6099

Change-Id: I89e5059fa1bd42b1a25e5cb88d552841c426530a
Reviewed-on: https://gerrit.instructure.com/6576
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-11-04 12:25:44 -06:00
Cody Cutrer 3f3f72637a expose sortable name to user, fixes #5317
* expose sortable name directly to the user
 * don't downcase it
 * use a LOWER(sortable_name) index for postgres
 * set sortable name as "last_name, first_name" explicitly for SIS imports
 * populate sortable name intelligently in the UI

Change-Id: I476641f4817e27a11b573d91f102c5a74d3eba26
Reviewed-on: https://gerrit.instructure.com/6512
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-10-31 12:22:08 -06:00
Cody Cutrer f99abb4e56 Revert "add distinct name part fields refs #5317"
This reverts commit 995110f555.

Change-Id: Ic00e7ced20ca9d912587e3440862ceb50e601d15
Reviewed-on: https://gerrit.instructure.com/6511
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-10-27 10:17:29 -06:00
Cody Cutrer 2595707b6b fix self enrollments refs #5833
note that it's not strictly broken by #5833's changes, because it
didn't work for existing users before (it would ask you to login
if you weren't, and you put in an existing e-mail address, and then
it would ask you to login again if you were already logged in).

Change-Id: Idb84397ad90987076c8e717863be496fc825b77e
Reviewed-on: https://gerrit.instructure.com/6481
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-26 16:01:16 -06: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 995110f555 add distinct name part fields refs #5317
Change-Id: I0d11c51d4e0e9be093b65cca2ea85ba18e99bce9
Reviewed-on: https://gerrit.instructure.com/6314
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-10-24 12:06:59 -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
Brian Palmer 7738123365 fix localjumperror in new html rewriter refactor; fixes #5964
Change-Id: I6d65c91f6cde58fedca7f739588ecf27bc395f09
Reviewed-on: https://gerrit.instructure.com/6217
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-15 19:28:14 -06:00
JT Olds 9d4a4944b6 allow sis imports to make things sticky or clear stickiness altogether
* adds ui

Change-Id: Id8f3639457879d23125c0fb04ef5038d91826f21
Reviewed-on: https://gerrit.instructure.com/6050
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-13 10:54:58 -06:00
Jon Jensen 56e9692b23 hide sections from students/observers in recipient finder
Change-Id: I805d05a356c99fe8dddb68f46c70d8d3ee02b4ca
Reviewed-on: https://gerrit.instructure.com/6157
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-13 10:29:59 -06:00
Cody Cutrer d2a5328993 drop Pseudonym#sis_source_id closes #5897
Change-Id: I81f2df5324ae7f9747f5d72ac1f8686932c815ff
Reviewed-on: https://gerrit.instructure.com/6093
Reviewed-by: JT Olds <jt@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-12 12:18:37 -06:00
JT Olds dab4973c64 show individual grade publishing status results on the course settings page
Change-Id: I81ddbc77fbc7ac5db4d1b26e88afa73477b2c26c
Reviewed-on: https://gerrit.instructure.com/5950
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-11 13:18:59 -06:00
Brian Palmer 150491a217 refactor user content rewriters
One in course copy, and one in common cartridge export.

refs #5739

Change-Id: I4ba016f643a22f0cf3f6dbbe6b00dcd7d228a10a
Reviewed-on: https://gerrit.instructure.com/5979
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-10-10 15:05:15 -06:00
Jon Jensen 71a650d382 revised address book, fixes #5639
added/changed functionality:

 * search for course sections
 * browse and select groups/sections/enrollment types (e.g. all
   teachers) within a course
 * browse and select enrollment types within a section
 * changed toggle vs. drilldown input handling (e.g. clicking on an
   expandable element now always expands it, unless you click on the
   checkbox)
 * "Select All" checkbox within groups and enrollment types

Change-Id: I13baa9e8b98abc5b5ec6dfb4cfbd1021160f65cc
Reviewed-on: https://gerrit.instructure.com/5955
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2011-10-10 09:58:44 -06:00
Jacob Fugal 5c8406bd35 GroupCategory model
Group#group_category_name (groups.category) and
Assignment#group_category_name (assignments.group_category) are now
deprecated.

refs #4624

Change-Id: I8fc5d03a75e962c3f649305986f77ad242d3a694
Reviewed-on: https://gerrit.instructure.com/5765
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-10 09:36:06 -06:00
Brian Palmer 2a710b2d86 course copy with replaced files, fixes #5536
Change-Id: Ie64cadffbaf801e4c28e538e503c415095865908
Reviewed-on: https://gerrit.instructure.com/5903
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-10-07 16:52:03 -06:00
Jacob Fugal 1dc8f60691 don't cross outcome groups and outcomes
a course will have content tags for both learning outcomes and learning
outcome groups. the latter still use a tag_type of
'learning_outcome_association' (maybe a bug?). course.learning_outcomes
could then choose one of these content_tags, and pull in a completely
unrelated outcome that happened to have the same id as the group from
the content_tag row.

fixes #5831

Change-Id: I1be7e579147331165fbfb7c241c224a255561715
Reviewed-on: https://gerrit.instructure.com/5977
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-10-05 11:01:15 -06:00
JT Olds b61354b3c4 order assignments in gradebooks csv. fixes #5824
Change-Id: I0129fdf15d302e28375a6401f5b48f92781dea1e
Reviewed-on: https://gerrit.instructure.com/5971
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-04 17:45:21 -06:00
Brian Whitmer ab1fddba77 basic lti tweaks for certification
fixes #5812

Change-Id: I34bd12bace487280d5531c4d84b1d8395059c716
Reviewed-on: https://gerrit.instructure.com/5597
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-04 10:59:21 -06:00
Jon Jensen 051f9195d1 enforce section visibility in speedgrader, fixes #5337
Change-Id: I9647f4956482281154f059f8e982286f36aa245c
Reviewed-on: https://gerrit.instructure.com/5921
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-10-03 09:08:33 -06:00