Commit Graph

5887 Commits

Author SHA1 Message Date
Zach Pendleton aeb2328ccf add new collaborator picker interface. fixes #CNVS-1160
test plan:
  * set up etherpad and google docs collaborations at
    /plugins;
  * navigate to a course collaborations page and test
    creating both an etherpad and google docs
    collaboration (for google docs, make sure that each
    user has a gmail account set up);
  * verify that the picker properly loads and alphabetizes
    course users and groups;
  * verify that you can select both users and groups to
    collaborate with;
  * as a student, verify that the picker only displays
    groups that you are a member of;
  * verify that editing a collaboration works as expected
    and that, on update, the collaborators list is
    properly updated;
  * navigate to a group's collaborations page and verify
    that it also works as expected, but that the
    people/groups filters are not displayed and that only
    users can be selected.

Change-Id: I99372daff141f2d0847dacbe88c5d289d117a5f9
Reviewed-on: https://gerrit.instructure.com/16343
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
2013-01-11 09:57:04 -07:00
Cody Cutrer 5db8700b1a this migration is non-transactional
Change-Id: Ia54bd05cc58ee95160b52dd27c918df2bba005eb
Reviewed-on: https://gerrit.instructure.com/16719
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-01-11 09:04:06 -07:00
Shawn Meredith 1daead4940 spec: added spec/integration/files_spec.rb back to exclude list
Change-Id: I394f273a0b04e446bad1faf3022472f0e3d7480c
Reviewed-on: https://gerrit.instructure.com/16722
QA-Review: Bryan Madsen <bryan@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2013-01-10 17:24:54 -07:00
Zach Pendleton 1a9ffccfe4 show right course domain for new users in course invites.
fixes #CNVS-2581

when sending a course invitation, rely on the course's
HostUrl instead of the user's HostUrl. This ensures that
new users will see the proper domain (e.g. the domain of
the course) instead of "canvas.instructure.com."

test plan:
  * register a new user - a user w/o an account in canvas -
    for a course;
  * view the email sent and verify that it displays the
    domain of the course and not the default domain.

Change-Id: I37f09037100d42f0d9fe52eb2172c6562ff3e976
Reviewed-on: https://gerrit.instructure.com/16512
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-10 16:37:08 -07:00
Cody Cutrer 30c3c50628 extend Account.get_special_account to support possibly not creating the account
Change-Id: I53e2bb58e3b4d01f163918658a968ef711efb0f5
Reviewed-on: https://gerrit.instructure.com/16715
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-01-10 15:26:20 -07:00
Brian Palmer f1c826d137 bump rails to 2.3.15
Closes #CNVS-2691

test plan: In theory this could affect most anything. However, most of
the differences between 2.3.14 and 2.3.15 were security patches that
we'd already applied manually. See
https://github.com/rails/rails/commit/v2.3.15

Change-Id: I60626ba66a2b257674cb3e412282979558464954
Reviewed-on: https://gerrit.instructure.com/16641
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2013-01-10 14:59:13 -07:00
Ethan Vizitei 36c1318962 fix cross-sharding bug for primary enrollment courses
refs #CNVS-2634

TEST PLAN:

1) start with 2 students on the same shard
2) add 2 courses, one on the same shard as the
  students, one on a different shard.
3) the target student should be given an
  active enrollment in the remote-shard course
4) the distracting student should be given a
  completed enrollment on the local-shard course
  WITH THE SAME LOCAL ID AS THE ACTIVE ENROLLMENT
  FOR THE TARGET STUDENT
5) run '#courses_with_primary_enrollment' on
 the target student AR object.
6) the remote-shard course should be present
  in the returned courses array.

Change-Id: Icf892839e90ea0c5e7de69802e4979db9e9d2a23
Reviewed-on: https://gerrit.instructure.com/16635
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-01-10 14:30:55 -07:00
Shawn Meredith 3aa55db6c2 specs: removal of files in parallel_exclude.rb
Change-Id: Ic2796bef0c636973ed369b61c8b07aca39c8c4fc
Reviewed-on: https://gerrit.instructure.com/16593
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
2013-01-10 14:11:25 -07:00
Zach Pendleton 3445bf4c34 stop writing to discussion topics in stream items.
fixes #CNVS-2591

while cleaning discussion topic data for stream items, the
original discussion topic was having its root entries
inadvertently deleted. this commit edits a cloned discussion
topic so that the original isn't written to.

test plan:
  * create a discussion topic with the "Users must post
    before seeing replies" option checked;
  * create at least one discussion entry for that topic;
  * create a stream item w/ the created discussion topic as
    its asset;
  * call `data` on the stream item with a viewing_user_id of
    a user in the course that has not posted on the
    discussion;
  * verify that the original discussion topic's root entries
    have not had their discussion_topic_ids set to nil.

Change-Id: I4cddaeaceb13aee5aaeae4209c1567148766c1e6
Reviewed-on: https://gerrit.instructure.com/16683
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
2013-01-10 14:10:28 -07:00
Cody Cutrer 44537d1284 spec: one more conversations transitionary commit
when adding to the user_ids, use the same type of object as the caller

Change-Id: I96ac0cd95c4b3492a398620c562af360a92e1036
Reviewed-on: https://gerrit.instructure.com/16623
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-01-10 13:38:59 -07:00
Cody Cutrer ca4f9ce86e fix PopulateStreamItemAssociations data fixup
fixes gh-258

the dropped columns initializer was hiding the data from the migration,
so avoid using the model at all

Change-Id: I25fa901a36c17a30587725b482a74eff62da5094
Reviewed-on: https://gerrit.instructure.com/16658
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-01-10 13:23:09 -07:00
Joel Hough 620560b5b0 apply overrides when showing a quiz
fixes #CNVS-510, #CNVS-511

test plan
- start with a course with students in different sections
- create a quiz with a lock date that locks the quiz currently
- create a lock date override that unlocks the quiz for one section
- ensure that a student from a section that the override does not apply to
  sees the original "Availability" dates and cannot take the quiz
- ensure that a student from the section that the override does apply to
  sees the overridden "Availability" dates and can take the quiz
- ensure that an observer observing the overridden section sees the
  overridden "Availability" dates
- ensure that an observer observing the overridden student sees the
  overridden "Availability" dates

Change-Id: Ib07b8ffd93f4077f40e814de607a774ec9626b06
Reviewed-on: https://gerrit.instructure.com/16398
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-10 13:10:47 -07:00
Cody Cutrer 93351f1b52 fix facebook integration
facebook puts canvas in an iframe - we have to allow it to

test plan:
 * link your facebook account with canvas
 * go to canvas from facebook
 * it should not be blank

Change-Id: I1b5ecfbe121d2e519447daed9af5c86f52ffcc21
Reviewed-on: https://gerrit.instructure.com/16695
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-01-10 12:56:10 -07:00
Cody Cutrer e55493e070 remove unused association
test plan:
 * no behavior change - specs should still pass

Change-Id: I2b53389e2c2715395628b2eda688d913f309e3e5
Reviewed-on: https://gerrit.instructure.com/16689
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-01-10 12:52:00 -07:00
Bracken Mosbacker 1285c47690 make all teacher permissions configurable
Two discussion-related permissions weren't configurable for
teacher enrollments, now they are.

Test Plan:
 * In the permissions UI make sure "View Discussions" and "Post to discussions" are editable for teacher roles

closes #CNVS-2635

Change-Id: I3d886c33a591fcd4d47058e35dc77a4ab0f3a78e
Reviewed-on: https://gerrit.instructure.com/16597
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-01-10 12:10:08 -07:00
Simon Williams 6a8642c161 Revert "validate authenticity token on quiz backup and submit"
This reverts commit 5ef87548a8.

people keep quizzes open in tabs for a long time, and since we don't handle
being logged out and back in in another tab well, we need to revert this for
now.

fixes #CNVS-2696

test plan:
- start a quiz in one tab
- in another tab, log out and back in
- submit the quiz in the original tab
- you should not get an authenticity token error

Change-Id: Id1be2425e95d679c78673e94324e411a109d26c7
Reviewed-on: https://gerrit.instructure.com/16677
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2013-01-10 11:34:39 -07:00
Jon Willesen fde85544e7 fix failing calendar feed spec
Change-Id: I3c5d13948a88d4bcc52c1524366eaea235a8bdbf
Reviewed-on: https://gerrit.instructure.com/16693
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Jon Willesen <jonw@instructure.com>
2013-01-10 11:15:46 -07:00
Brian Palmer 41279b9251 fix HashAccessTokens migration
Avoid using the model, since the column may have already been added to
dropped_columns

Change-Id: I6d7eb623875572ebc3efe9c16e8f677d0fc61dc2
Reviewed-on: https://gerrit.instructure.com/16690
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2013-01-10 10:12:10 -07:00
Jeremy Stanley d53ee487ae users tab: fix counts when a user is enrolled in multiple roles
fixes #CNVS_2680

test plan:
 - create a custom course role (e.g., "CustomStudent")
 - create a user with a login ID (pseudonym)
 - go to the Users tab in Course settings
 - enroll the user, via the login ID, in the _base_ role
   (e.g., "Student")
  - confirm the Student count increases by one
 - enroll the same user (by login ID) in the custom role
  - confirm the CustomStudent count increases by one
 - remove the CustomStudent enrollment (click on the cog
   next to it and select "Remove from Course")
  - confirm the CustomStudent count decreases by one
  - confirm the Student count does not change
  - reload the page and confirm the Student was not
    unenrolled

note that a prior commit fixes #CNVS_2636, but this commit
includes an automated test that verifies this

Change-Id: I9620caa017e365c34a3c0cdd3722e73fd5eb49c4
Reviewed-on: https://gerrit.instructure.com/16653
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-01-10 09:58:29 -07:00
Bracken Mosbacker d2d6dc7d36 fix content import form submission in ie
Internet Explorer offered to download the json response
instead of parsing it and starting the progress bar. This
moves the submission out of an iframe and changes the
response type to text so that IE doesn't offer to download

Test Plan:
 * import content into a course in IE
 * import content in other browsers too to make sure they still work

closes #CNVS-2454

Change-Id: If968d2d4c01a0c4f12042d5cd7b2e177af552282
Reviewed-on: https://gerrit.instructure.com/16544
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-01-10 08:18:59 -07:00
Joe Tanner 27ebae2e42 adding ActiveRecord::Base.count_by_date
refs #CNVS-2064

Change-Id: Idc122b7550e112abc57ac7ffd810005fd303e493
Reviewed-on: https://gerrit.instructure.com/16663
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Joe Tanner <joe@instructure.com>
2013-01-09 16:40:51 -07:00
Stanley Stuart 93f4efdc0f document assignment override features as beta
Changes the documentation to signify the Assignment Overrides feature as
a beta feature.

test plan:
  - run rake doc:api
  - view the documentation for assignments. The Assignment Overrides
    feature should be marked as in beta.

Change-Id: I2d523e73f1dd3c610823c7f5e16dba2602980a0e
Reviewed-on: https://gerrit.instructure.com/16637
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2013-01-09 16:14:32 -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
Jon Willesen b5097a54a3 add reserved scheduler appointments to calendar feed
fixes #CNVS-2133

test plan:
 - create an appointment group as a teacher
 - reserve some appointments as students
 - view the teacher's calendar feed in an external calendar
   program
 - make sure only the reserved appointments show up
 - view the student's calendar feed in an external calendar
   program
 - make sure that student's reserved appointment shows up
   (this behavior was already there)

Change-Id: I7b1644fd8aeba5a1e64cfab49f27a51698532b47
Reviewed-on: https://gerrit.instructure.com/16561
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-09 15:21:00 -07:00
Cody Cutrer 1c8d8f0d30 use a shard-safe query for selecting question bank questions
refs #CNVS-2641

Change-Id: I85a60fdb7a862b1a095b40a892de2304446184e1
Reviewed-on: https://gerrit.instructure.com/16603
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-01-09 14:26:39 -07:00
James Williams f3131325fa don't freeze on loading screen for content import with no items
handles the case when the content migration import page is stuck
on the loading screen when the content import doesn't have any
items to select on the import page (and thus populateItem never
gets run)

test plan:
* import the attached import (which only has questions, no course
 items to select)
* should load the content import screen, (even though there's
 only one option: "Copy Everything"

closes #CNVS-2662

Change-Id: I17ddeca10752f42000edc928995dd8766e9ff51c
Reviewed-on: https://gerrit.instructure.com/16661
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-01-09 14:14:29 -07:00
Bracken Mosbacker c7fee544da improve sentence for modules shortcut helper
Test Plan:
 * When hitting the question mark div in a screen reader it should say "question mark" instead of "quote quote"

closes #CNVS-283

Change-Id: Ib05bc8b9a0d169e40f7b1a122dbf4572343b36e1
Reviewed-on: https://gerrit.instructure.com/16519
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-01-09 13:31:30 -07:00
James Williams ee8741da13 fix past enrollments scope
fixes a problem where deleted enrollments
would show up in past enrollments if course is completed

test plan:
 * Enroll a user
 * Delete the enrollment
 * Conclude the course
 * The enrollment should not show up in
 the users' past enrollments

fixes #CNVS-2237

Change-Id: I632db943c4232b5959fd7e4d87000e8e4f65225b
Reviewed-on: https://gerrit.instructure.com/16136
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-01-09 12:22:06 -07:00
Mark Ericksen 41d307a017 Enable C2 undated events to be edited and identify their type. Fixes #CNVS-459 Fixes #CNVS-460
Improves feature parity with C1. Show the undated event title as a link
that can be middle clicked to open the event. Clicking on the undated event
shows the event information in a popover. This is based on g/16332.

Testing Notes:
============
* In Calendar2, in the right sidebar, click the "Undated Events" to load them.
* Verify that an icon distinguishes an assignment from a calendar event.
* Clicking the event should open the event details popover.
* Middle-clicking (with a mouse) the event title should open the event
   in a new browser tab.

Change-Id: Ib645b753a191cd725686cf68534056a0001a64d9
Reviewed-on: https://gerrit.instructure.com/16510
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-09 10:12:36 -07:00
Brian Palmer 46219b0a53 Fix importing an outcome into a rubric
The points and description were not getting filled in properly, so were
lost when saving.

Fixes #CNVS-1272

test plan:
1. On account level create Outcome with custom description and values
2. Import Outcome into course
3. Create rubric in course
4. Add outcome as criterion in rubric
5. Verify the points and descriptions for the ratings are correct
6. Save the rubric, reload, verify they are still correct

Change-Id: Iba1313cae77be23a8ac588c9b40f54450ddeb291
Reviewed-on: https://gerrit.instructure.com/16644
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2013-01-09 09:40:00 -07:00
Dave Donahue 6ab15d087b bug: if override due date is before default due date on an assignment, it is not applied
fixes #CNVS-2309

Problem:
Overriding a due date to be earlier than the default was having no
effect because the default date was getting lumped in with the overrides
and treated the same way when deciding which to use.

Solution:
If there are applicable overrides, don't take the default into account.

Notes:
The issue was happening as a result of the way the VariedDueDate class
indiscriminately lumped due dates together and returned the last one.
Part of the solution was removing the VariedDueDate class and instead
relying on the override methods on an Assignment. This was done not
only to fix the bug at hand but also to move toward a more consistent
interface for handling varied due dates.

Change-Id: If9d24725a19b134d5d92d3a5c08d6794f466fa9c
Reviewed-on: https://gerrit.instructure.com/16406
QA-Review: Myller de Araujo <myller@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2013-01-09 09:37:00 -07:00
Brian Palmer e0c6571304 spec: fix spec failures in ruby 1.9
these strings are frozen, causing spec in the test controller class

Change-Id: I6ddda4de24e3661a6a0336371450b720c17563ef
Reviewed-on: https://gerrit.instructure.com/16654
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2013-01-09 09:24:16 -07:00
Simon Williams 2e8f07b1e6 fix for root accounts without a custom turnitin pledge
fixes #CNVS-2608

test plan:
- create a course with turnitin on a root account
- make sure the account doesn't have a custom turnitin pledge
- as a student, submit a turnitin assignment
- it should work

Change-Id: Ic4f328ea4cc9e7d985fd15f3cb219f164a3048e1
Reviewed-on: https://gerrit.instructure.com/16629
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-01-09 00:00:58 -07:00
Simon Williams 9038175eb4 api: support turnitin_settings in assignment api
fixes #CNVS-2598

test plan:
- on an assignment in a course with turnitin enabled
- make sure turnitin_settings are returned in the api
- make sure you can modify them

Change-Id: Ief9465ef3ef9f1d180dd551dcb846b25bc63b3fa
Reviewed-on: https://gerrit.instructure.com/16583
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
2013-01-09 00:00:48 -07:00
Stanley Stuart 389bcb4ed2 removal of add assignment group dialog js block
test plan:
  - as a teacher, go to Calendar 1, click on an assignment and edit it.
    Select "New Group" from the Assignment Group dropdown.
  - You should get a popup dialog to enter a new group name. Enter a
    new group name.
  - Make sure the group is really added when you hit submit by going to
    Course Assignments page (/courses/:course_id/assignmetns) and
    verifying the presence of the group there.
  - Do the same for the assignments edit page. As a teacher, add a
    new Assigment Group from that page.

Change-Id: I4f0adf6f594ef357c95c06dae2f01019d26c6fcd
Reviewed-on: https://gerrit.instructure.com/16517
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2013-01-08 17:25:32 -07:00
Jeremy Stanley eb65125135 track the role each UserView applies to
Each user box under a role is associated with a UserView, but each UserView looks
at all the user's enrollments, not just those of the containing role.  Fix.

Test plan:
 - Enroll a user as both a TA (in Section 1) and an Observer (in Section 2).
  - Ensure the gear menu in the TA box has an "Edit Sections" menu item
   - Click Edit Sections and add the TA to Section 2; make sure this works.
  - Ensure the gear menu in the Observer box has a "Link to Students" menu item.
   - Link the observer to a student, and confirm this works as expected.
 - Enroll a user as both an Observer and a custom role based on Observer.
  - Verify this actually worked in the UI--the user should show in both
    boxes, and should not disappear from one and appear in the other
  - Link each enrollment with a different student.  Make sure the student
    appears in the right place.
 - Enroll a user as both a TA (in Section 1) and a custom TA-based role
   (in Section 2).
   - Ensure the TA box shows only "Section 1", and the Custom-TA box shows
     only "Section 2".
   - Click "Edit sections" for the Custom TA and add Section 1.  make sure
     the Custom TA box shows both sections after this, and that the
     (regular) TA box continues to show only Section 1.

fixes #CNVS-2432
fixes #CNVS-2596
fixes #CNVS-2628

Change-Id: I93fe0da90064b7530541010775f2ae0d280e033d
Reviewed-on: https://gerrit.instructure.com/16560
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-01-08 16:32:16 -07:00
Simon Williams a4f0cae321 spec: fix intermittent notification policy failure
Change-Id: I62b3de6bb57bb5376e4ea3fc314a88d41aa2626b
Reviewed-on: https://gerrit.instructure.com/16634
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-01-08 15:11:40 -07:00
James Williams e352748afe add specs for using overridden dates on modules page for observers
turns out the code was already working, just needed some
specs to make sure for the case of observers

test plan:
* as an observer:
 * should see one due date, (the latest one)
  when not associated with a student

 * when associated with a student, should see the same
  due date that the student does

 * when associated with multiple students who have
  different dates applied to them, should see
  "Multiple Due Dates" indicator

closes #CNVS-2012

Change-Id: I358eb8433ff640bc9b7c15ab071b2b790ea2ce85
Reviewed-on: https://gerrit.instructure.com/16557
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
2013-01-08 14:48:54 -07:00
Brian Palmer 3662505029 disable XML params parser
Change-Id: I68b9fd05f6f33f4af5377b1fe9df5e7d3f68db08
Reviewed-on: https://gerrit.instructure.com/16632
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2013-01-08 13:32:13 -07:00
Joel Hough d1739afae8 don't show time for all day calendar events
fixes #CNVS-2582

test plan
- create an all day event
- ensure that the details popup shows only the date, not the time
- create a not all day event
- ensure that the details popup shows the time as well as date
- ensure that other event types like assignments and quizzes are
  unchanged

Change-Id: I4bd1cedcd33d098caf40a9d63fd62324b3e92183
Reviewed-on: https://gerrit.instructure.com/16599
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-08 13:30:36 -07:00
Jon Willesen 03a74245b0 respect assignment overrides in gradebook2
fixes #CNVS-472

When determining lateness of an assignment, use the cached late
value of the submission instead of doing manual comparisons.

test plan:
 * create an assignment due in the past with an override
   due in the future
 * submit the assignment both as a student the override
   applies to and a student the override does not apply
   to
 * as a teacher or admin, visit gradebook2 and verify that
   the late submission appears late and the on-time
   submission is not marked as late
 * check the mouse-over text on both submissions to make sure
   they display the lateness of the submissions correctly.

Change-Id: I4a77d2f065402babd737f887c08dfb844c342cbf
Reviewed-on: https://gerrit.instructure.com/16356
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Jon Willesen <jonw@instructure.com>
2013-01-08 13:29:03 -07:00
Mark Ericksen bd4286d53f Support "Switch Views" when editing a calendar event's description. Fixes #CNVS-458
When creating a new CalendarEvent or editing an existing one, the description
uses the TinyMCE editor but there was no way to toggle between HTML and
source versions. This adds that ability.

Testing Notes:
=============
* As a user, create Calendar event on either
  Calendar1 or 2. Click the "more options" link
  which takes you to a dedicated edit page.
* Between the title and description, there should now
   be a "Switch Views" link that toggles the editor
   between HTML and source view.
* It should work for any user (teachers or students).
   There is nothing user-specific about it.

Change-Id: Icfd5b58dc7708bf9b2d75312983629af5e505ea9
Reviewed-on: https://gerrit.instructure.com/16475
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-08 12:03:33 -07:00
Shawn Meredith c4d07b680f parallelized gem update to handle rspec thread failures
Change-Id: I37ad7bcdc788182e5d9f3889c4eb33e561c37b57
Reviewed-on: https://gerrit.instructure.com/16602
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2013-01-08 11:04:31 -07:00
Cody Cutrer 1e339db4c5 add support for applying role overrides to just self or just descendants
* wrap RoleOverride#permission_for with enabled_for? that also takes a
   context of where the permission is being applied, and recalculates its
   enabled-ness relative to that context; use that for checking account
   admin and enrollment permissions
 * refactor User#can_masquerade to properly check for descendant
   permissions

test plan:
 * create a custom role in site admin. give it permission to
   manage permissions
 * in script/console, find that override and set apply_to_self=false
 * add a user to that role, and login as that user
 * the user should not be able to change permissions in site admin
 * the user should be able to change permissions in the default
   account
 * add another role in site admin. give it permission to manage
   permissions
 * in script/console, find the override and set apply_to_self=true,
   apply_to_descendants=false
 * add another user to that role, and login as that user
 * the user should be able to change permissions in site admin
 * the user should not be able to change permissions in the default
   account
 * the first user should not be able to masquerade as the second user
   and vice versa
 * an Account Admin should be able to masquerade as either user
 * create a custom role in the default account, give it permission
   to manage permissions, and add a user to that role
 * the first user should be able to masquerade as the new user;
   the second user should not be able to masquerade as the new user

 * general regression tests on permissions and masquerading

Change-Id: I20a1183b7dfec419634a92cda498f245187060ef
Reviewed-on: https://gerrit.instructure.com/15896
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2013-01-08 11:01:13 -07:00
Zach Pendleton 7b9b232cce respect assignment overrides in gradebook1.
fixes #CNVS-470

when calculating assignment lateness in gradebook,
consider assignment overrides by looking @ the cached
"late" value on the submission and not comparing the
assignment due date against the submission date.

test plan:
  * create an assignment due in the past with an override
    due in the future;
  * submit the assignment both as a student the override
    applies to and a student the override does not apply
    to;
  * as a teacher or admin, visit gradebook1 and verify that
    the late submission appears late and the on-time
    submission is not marked as late;
  * click the typewriter icon on both submissions to view
    the submission details popup and verify that it also
    respects each submissions timeliness/lateness.

Change-Id: Ib80e6c83d6075e05fa674ac3c0160977179e01d2
Reviewed-on: https://gerrit.instructure.com/16351
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-08 10:25:31 -07:00
Brian Palmer 7c46375684 don't store the page view if it has no user
These page views won't ever be queried anyway, so storing them is
pointless.

Change-Id: I8242c50be32f626d64caa528e7a5fd3a921af461
Reviewed-on: https://gerrit.instructure.com/16572
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-01-08 08:25:30 -07:00
Shawn Meredith 8d6580a149 spec: gradebook_spec.rb syntax issue`
Change-Id: Ib4d8861be2ee0730866fd91025479186e2596cf8
Reviewed-on: https://gerrit.instructure.com/16609
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
2013-01-07 17:10:56 -07:00
Mark Ericksen 44e6765889 Display "Multiple Due Dates" on speedgrader when applicable. Fixes #CNVS-740
On SpeedGrader, when an assignment has multiple due dates, in the header,
display something to let the grader know that.

Testing Notes:
==========
* Using an assignment with no due date, visit SpeedGrader and verify
   that it says, "due: No Due Date"
* Using an assignment with a single (no override) due date, visit
   SpeedGrader and verify that it says "due: <the date>"
* Using an assignment with multiple override due dates, visit
   SpeedGrader and verify that is says "due: Multiple Due Dates"

NOTE: This also changes the previous behavior of not showing anything for a
due date when the assignment didn't have one to now showing
"due: No Due Date" when there is no due date. This is because the assignment
might have no due date but an override might specify one.

Change-Id: I1337015eef623f9579be3af990c8651cacd957af
Reviewed-on: https://gerrit.instructure.com/16391
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-01-07 16:26:08 -07:00
Simon Williams 38e90e5f3d spec: fix ruby 1.9 only spec helper
Change-Id: I8183b8690583736674424359dcc6924785d50ad3
Reviewed-on: https://gerrit.instructure.com/16587
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2013-01-07 16:10:37 -07:00
Brian Palmer ee80c2bb7a spec: clear attachment domain_namespace before each spec
This fixes some failures that happen depending on spec ordering

Also fix a selenium spec bug that was trying to turn an Announcement
into an assignment discussion.

Change-Id: Ic252844ae348642ea66f02cfedbd735d1eeb1d53
Reviewed-on: https://gerrit.instructure.com/16582
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2013-01-07 16:08:18 -07:00