Commit Graph

8406 Commits

Author SHA1 Message Date
James Williams 7cb416f839 inherit default group quotas from parent accounts
test plan:
* on the quotas tab of the account settings,
 set a group quota for an account
* create a subaccount
* should have the same default quota as the parent
 account

closes #CNVS-14971

Change-Id: Icdb8e4a9666e4b7f03d9819ae7eab42627fff5ef
Reviewed-on: https://gerrit.instructure.com/44678
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
2014-11-25 01:29:18 +00:00
Dan Minkevitch ad1a8dd8e1 Fixes focusing a new folder in IE
For New Files, whenever a folder was
created, it wouldn't automatically
focus the new folder.  This fixes
that issue.

fixes CNVS-17026

Test Plan:
* Enable "Better File Browsing"
  feature flag.
* In IE 10/11: Go to any course's
  Files page.
* Click the "+ Folder" button
  to create a new folder.
* That folder's text box should
  be focused, allowing you to
  enter a name.

Change-Id: Ieef503a0259a1c13499f277f9007bc87e278de5e
Reviewed-on: https://gerrit.instructure.com/44755
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-11-25 00:59:51 +00:00
Clay Diffrient 7d87e3f17e Adjusts restriced access cloud color in New Files
fixes CNVS-16969

Test Plan
  - Open up New Files
  - Set A file to have a restricted access date
  - On the overall grid view of files, the cloud lock icon
    should be a orangish color.

Change-Id: I2f9314e93a0a72598f33b0405a5d4e9d051da169
Reviewed-on: https://gerrit.instructure.com/44662
Product-Review: Cosme Salazar <cosme@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-11-25 00:40:21 +00:00
Ryan Shaw 6e59226727 fix so that if you cancel the current upload it disappears
fixes: CNVS-16883 CNVS-16844

test plan:

upload a large file to newfiles.
midway through the upload press the 'x' to cancel it
it should disappear.

Change-Id: I61af1102a398bed38aa56195f7e55db6ab800198
Reviewed-on: https://gerrit.instructure.com/44422
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-11-25 00:09:22 +00:00
James Williams 29e307d73a hide admin-only account_navigation tools from teachers
test plan
* add an external tool to an account with an
 'account_navigation' placement configured with
 visibility set to 'admins'
 (see the ticket for example xml)

* as a teacher, navigate to the course settings page,
 then click on the account name under "Department" to
 go to the account settings page

* the external tool should not be shown in the account
 navigation tabs

closes #CNVS-17050

Change-Id: I1b51c3c5cb3a56d794eb5b558e1261cc94aab0d5
Reviewed-on: https://gerrit.instructure.com/44758
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2014-11-24 23:54:57 +00:00
Nathan Mills d0fb188b10 construct uniq resource_link_id for lti_links
fixes PLAT-736

test plan:
install the lti2 test tool with all placements enabled
launch the tool from the different placements
every module item and assignment should have a uniq resource_link_id
course_nav and account_nav should have a uniq resource_link_id

Change-Id: Ifb65a27fa5b7758a27f20684a5af3f5c9bb03100
Reviewed-on: https://gerrit.instructure.com/44051
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-11-24 23:34:49 +00:00
Nathan Mills 6ffeddcc46 setup default lti2 placements
fixes PLAT-691

test-plan

install a test provider using this url template:
/accounts/{account_id}/lti/tool_proxy_registration?tool_consumer_url=https://lti-tool-provider-example.herokuapp.com/register

during install select no placements
it should show up in the assignment and module item selection

regression test module and assignment lti launches

Change-Id: Ie8a3bee8ddb9a8e9cb8671545448a4bb73caae73
Reviewed-on: https://gerrit.instructure.com/42623
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-11-24 23:34:28 +00:00
Colleen Palmer 57571b4c48 Color contrast - Discussions page
This fixes color contrast issues for accessibility on
the Discussion page

fixes CNVS-15670

Test Plan:
- Go to Discussions

webaim:
http://webaim.org/resources/contrastchecker/

areas fixed:
Unpublished and Unsubscribed icons (not hover)
ref screen: http://screencast.com/t/oNubvrHcSg

Unpublished and Unsubscribed icons (hover)
ref screen: http://screencast.com/t/mOCdUqHxqQ8

Unread replies counter (no hover)
ref screen: http://screencast.com/t/tE2zzUcHQun

Unread replies counter (hover)
ref screen: http://screencast.com/t/3qpFxzqLJ

Replies counter (no hover)
ref screen: http://screencast.com/t/U1CISxmqLOFC

Replies counter (hover)
ref screen: http://screencast.com/t/nyo0YggmeR

Line item cog menu (hover)
ref screen: http://screencast.com/t/u0wLUi6N00V

Change-Id: I6b25578342fa19c31d17ea0e71143eca183fa40b
Reviewed-on: https://gerrit.instructure.com/44741
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Chris Hart <chart@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2014-11-24 21:17:59 +00:00
Michael Nomitch 70373106af DA - restrict assignment_visibilities in api requests
fixes CNVS-16996

test plan:
  - as a teacher
    - request an assignment_group from the api with assignment_visibility
      (?include[]=assignment_visibility)
    - request a assignments in a course from the api with assignment_visibility
      - neither should show an array of assignment_visibilities in the response
  - as a student
    - request an assignment_group from the api with assignment_visibility
      (?include[]=assignment_visibility)
    - request a assignments in a course from the api with assignment_visibility
      - neither should show assignment_visibility

Change-Id: Idf8860939f01bb0cdb8324dc1e155eea748d0814
Reviewed-on: https://gerrit.instructure.com/44635
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-11-24 20:38:06 +00:00
Clay Diffrient 3f1a2e27fe Fixes a11y for the restricted access dialog
fixes CNVS-16949

Test Plan:
  - Using VoiceOver go to New Files
  - Open the Restricted Access Dialog
  - All radio buttons should be read as they indicate.

Change-Id: I5f765ae96e9cc08e2265dc479ec7f5a2843577b1
Reviewed-on: https://gerrit.instructure.com/44658
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2014-11-24 20:11:27 +00:00
Ahmad Amireh 7b74b9887d Quiz stats cleanup
Removed a couple of fields we're not using from the API and adjusted the
docs. Also added reminders for things to drop once new stats replaces
the legacy version.

Closes CNVS-16519, CNVS-13387

TEST PLAN
---- ----

  - generate the API docs, `bundle exec rake doc:api`
  - check out the quiz stats docs, it should no longer be marked in beta
  - two fields were dropped from the API: "user_ids" and
    "logged_out_users" in the "submission_statistics" set
  - turn on the new stats feature flag and visit the stats page, verify
    it loads fine

Change-Id: I16603d4f67fc334ebb994ec6e9363bdb94002e64
Reviewed-on: https://gerrit.instructure.com/44674
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Finney <bfinney@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-11-24 18:08:19 +00:00
Derek DeVries b9aad3fd0b raise exception if a quiz submission doesn't save successfully during generation
fixes CNVS-16463

test plan:
  - as a teacher
    - create a quiz
  - as a student
    - you should be able to successfully take the quiz

Change-Id: I233d093b9c45217de488a933ebe65b75b44e9d16
Reviewed-on: https://gerrit.instructure.com/44482
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2014-11-21 05:04:45 +00:00
Ahmad Amireh 1bb148ae61 QLA - QuestionAnswered
Support for extracting and recording "question_answered" events from
submission_data. Unlike the other event patches, this takes place
completely on the back-end.

Closes CNVS-16802

Other things:

  - refactored stuff to use QuizSubmission#graded?
  - QuizQuestion::AnswerSerializers now output string IDs

TEST PLAN
---- ----

You need a database browser for this, like pgadmin3 [1].

Preparation:

  - create a quiz with ALL question types
  - using pgadmin3, view the data in the quiz_submission_events_2014_XX
    table (XX would be the current month), keep this window open
    + this window should be empty so far, unless you're repeating this
      plan

  - go to take quiz page
  - do anything useful to trigger the initial backup call:
    + verify that there's a new record with "event_type" is
      "question_answered"
    + grab the "event_data" in that column and paste it in some JSON
      editor like http://jsoneditoronline.org/ [2]
    + verify that this data-set includes the initial answers for ALL
      questions

Ok, now we need to test whether each answer we update gets recorded:

  - in any question, change your answer
  - open the pgadmin3 table window
    + refresh, press F5
    + verify there's a new event record
    + copy/paste the "event_data" in the JSON editor and:
      - verify that not ALL the answers were recorded again, ONLY the
        one that you have just added/changed/updated

Rinse and repeat with the rest of the questions. Make sure that answers
to *all* question types are being recorded (this includes File Upload,
in which case the value would be the attachment ID.)

[1] pgadmin3 works on all platforms, download it for OS X from
    http://www.pgadmin.org/download/macosx.php
[2] when copying from pgadmin3, it may wrap the JSON with '' and that
    will cause an error in the editor, just remove those quotes

Change-Id: I3330bd987396aa84937af295390ec169b06c58e9
Reviewed-on: https://gerrit.instructure.com/44335
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-11-21 02:57:46 +00:00
Nick Cloward 5818ed9458 add external integration keys
refs: CNVS-16627

First part is to add the framework for tracking external keys.  This
commit handles the ability to add multiple types easily to the
external_integration_keys with custom rights per type of key.

Test Plan:
 - Make sure the section for External Integration Keys does not display
   when no types are set.
 - Add a few custom types to the external integration keys with all
   combinations of write and read rights.
 - Make sure you can edit the appropriate keys inside the account
   settings page and that they are persistent.
 - Remove a value from a key and it should delete the appropriate
   record.
 - If the user does not have access to any keys the section should not
   display.

Change-Id: I37d56c3ee1bf44876c220e9d5a1ae80a22ac1289
Reviewed-on: https://gerrit.instructure.com/44161
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2014-11-21 01:19:24 +00:00
Matthew Berns 8647a770a3 fixed speedgrader bug that showed student names when "hide student names" was on
fixes CNVS-1432

test plan:
- create a graded discussion, graded group discussion, url submission, and quiz
- update discussion with entries from students, as well as entries from teacher
- submit quiz and url submission as student
- go to speedgrader
- with hide student names disabled, names should appear as normal on discussions
quiz, and url submission
- enable option to hide student names, references to student should change to
'this student' on the discussion, quiz, and url submission
- other students/teachers on the discussion should be labelled as "discussion participant"
- the grading teacher that participated in the discussion should still have their
name appear on their discussion entries
- avatars should be hidden
- above should be true for both discussion links that appear on speedgrader

Change-Id: I23e42b3c4aaccd0a3454bfbf1dca04d9e79caf38
Reviewed-on: https://gerrit.instructure.com/41860
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-11-20 22:19:50 +00:00
Cameron Sutter 613e298271 DA - update gb cells on the fly
fixes CNVS-16565

test plan:
 * setup DA
 * setup an assignment that is only visible to two sections
 * grade all of a student's submissions so that he has a 100% in the class.
 - remove that student's section from the list of overrides on the assignment
 - navigate to gb
 - remove the student's grade for that assignment
 > the cell should be grayed out
 > the student's grade should still be a 100%
 - repeat the above with 'treat ungraded as 0' turned on

 * using all the api endpoints that return assignment submissions
   - including by not limited to:
     submit an assignment, index, show, grade a submission
 * include 'include[]=visibility' in the request
 > each submission object returned should have an 'assignment_visible' attribute
   which should match whether the submitter has visibility

Change-Id: I6eb5324ea5b96738cc40fb2446fc4bc96db094c5
Reviewed-on: https://gerrit.instructure.com/43618
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-11-20 22:01:19 +00:00
Dan Minkevitch fb22815188 Fixes restricted access labels
Changes "Available from ..." to
"Available after ..." to more correctly
convey what is actually happening.

fixes CNVS-16933, CNVS-16937

Test Plan:
* Enable "Better File Browing" feature flag
* Go to any course's Files page as a teacher
* Click on an item in the File Pane and click
  "Restrict Access" on the toolbar that appears
* Select radio button "Restricted Access", then
  select radio button "Schedule student availability"
* Two text boxes should appear with labels "Lock After"
  and "Lock Until"
* Select a "Lock After" date and click "Update"
* Hover over the item's Calendar icon in the File Pane
* It should read "Available after ..." with whatever
  date you selected.
* Repeat the last three steps with "Lock Until" (and "Lock After"
  left blank), noticing it should now say "Available until ..."
* Repeat previous step with both a "Lock After" and "Lock Until"
  date selected, expecting "Available after (Lock After Date) until (Lock Until Date)"

Change-Id: I400001dd98eaf8c108cc542aa9fd2bb5c31966c9
Reviewed-on: https://gerrit.instructure.com/44605
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
2014-11-20 21:46:10 +00:00
Andrew Butterfield 5a2eaa57d8 Correct sorting for numerically named groups
fixes CNVS-14327

Followed the tutorial at: https://gollum.instructure.com/sorting. Used
the database level solution

Groups sort first by group category name and then by group name both on
the server side and the client side.

Updated app/coffeescripts/util/natcompare.coffee because when the tests in
public/javascripts/compiled/ember/student_groups/tests/controllers/student_groups_controller.spec.js
one fails because window.I18n.locale is not defined or is null. Hence I
added a default of 'en-US'.

Added spec for server side sorting check.

Test Plan:
* Create a group set and add groups named 1-9, 10, 110, 28 and whatever
  other numbers you want
* Notice as a teacher that the groups are naturally ordered meaning that
  10 and 110 don't come directly after 1 for example

* Next, login as a student and verify that groups are naturally ordered

* Then on the account level, enable the new student groups option
* As a student go back to the groups page and verify that the ordering
  is natural on the new students group page

* Groups get pulled down from the server in groups of 50. I would
  suggest creating two group sets with the names 1 and 2. Add a couple
  groups to group set 1, then add 50+ groups to group set 2, and then
  add a couple more groups to group set 1 but that would come after the
  groups in group set 1. Then check to make sure that when the page
  loads all of group set 1's groups appear at the top of the page in the
  correct order.

Change-Id: Ie066abd3cef237fd8c8c0f73231cea0177756e21
Reviewed-on: https://gerrit.instructure.com/43565
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <braden@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Janelle Seegmiller <jseegmiller@instructure.com>
2014-11-20 18:23:05 +00:00
Mysti Sadler 0154dc6d22 Update Diigo API URL
test plan
 - verify you can set up the diigo plugin with the information in gollum https://gollum.instructure.com/OtherServiceTestAccounts
 - on the user settings page, verify you can use your diigo username and password to register the service

Change-Id: I78fb9614f03a51a8e0d11ac806a49a7a85e8e2f7
Reviewed-on: https://gerrit.instructure.com/44379
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
2014-11-20 03:12:58 +00:00
Vincent Gonzalez d2f0450179 Quiz Test Take Page
Fixes: CNVS-15527

Notes:
- updated colors to meet contrast requirements
- updated answer sprites
- added 2x sprite for flagged question

Test Plan
- log in as student
	- navigate to quizzes
	- start a quiz
		- flag a question
	- verify all contrast for both default and high contrast
		- reference attached screenshots in jira
		- use http://webaim.org/resources/contrastchecker/

Change-Id: Iaaf63e2c323fa90150cc45635c441294f05dda27
Reviewed-on: https://gerrit.instructure.com/42194
Reviewed-by: Chris Hart <chart@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2014-11-20 02:11:32 +00:00
Benjamin Porter dd10a77297 Cleanup the outcomes controller a bit to make it easier to read through
This cleans up the code, reorganizes it a bit, updates some stale
comments, adds some new comments, and follows the 'return unless
authorized' pattern which replaces the deeply nested if blocks.  So
something like this:

Instead of:

    def my_method
        if authorized_action(@context, @current_user, :read)
            code_line 1
            code_line 2
            if authorized_action(@context, @current_user, :write)
                code_line 3
            end
        end
    end

We get:

    def my_method
        return unless authorized_action(@context, @current_user, :read)
        code_line 1
        code_line 2
        return unless authorized_action(@context, @current_user, :write)
        code_line 3
    end

Fixes CNVS-16963

Test Plan:

    Make sure that all of this works:
        - Create an outcome group
        - Create an outcome in that group
        - Create more groups and outcomes and make sure they can be
          connected
            - An outcome can belong to more than one group
        - Edit an outcome
        - Delete an outcome

    Make sure that the above all fail when unauthorized


Change-Id: I31c8791cb1bbbe004462b0720f221eded0e95932
Reviewed-on: https://gerrit.instructure.com/44633
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
2014-11-20 00:41:06 +00:00
Duane Johnson 848a566f6b Implement PostGrades dialog in ReactJS
Replaces the PostGradesModel and PostGradesDialog with functional
ReactJS code.

- more visual feedback for users during correction step:
  - green check mark when whole row/assignment is good
  - uses an "ignore" (minus) icon instead of an X
  - rows stay on page, even after corrected (allowing
    users to correct any mistakes during data entry)
  - when name is not unique a visual hint is shown:
    "The assignment name must be unique"
  - "Ignore All" button is now "Ignore These" since it
    pertains to uncorrected rows, rather than all rows
  - "Ignore All" button becomes "Continue" button after
    all corrections have been made
  - calendar datepicker no longer freezes / has issues
  - when the user has fixed all assignments with errors,
    the title becomes: "No Assignments with Errors, click
    Continue"
  - if the user ignores a single assignment (with the
    minus "-" button) he/she can restore the assignment
    by editing the assignment name or due date

- corrected assignments (names, due dates) are now saved
  all at once when the user presses "Continue" (or "Ignore
  These" if he/she wants to ignore remaining issues)

- the gradebook "Post Grades" button that opens the dialog:
  - appears when selecting a section with an SIS ID, and
    disappears when the section has no SIS ID
  - is now styled like other buttons

- when closing the dialog and re-opening, the dialog
  returns to the "correction" step

- ungraded submissions message on the summary page if
  one or more students have submitted work but the teacher
  has not yet graded it
  - clicking the ungraded submissions message/link takes
    the user to a screen showing ungraded submissions
    that are clickable (takes the user to speedgrader)

Fixes SIS-646
Fixes SIS-654

Change-Id: I464fc85a3b96e5051bdad078e4483d979cfaf3e0
Reviewed-on: https://gerrit.instructure.com/44491
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ken Romney <kromney@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2014-11-19 23:55:56 +00:00
Jacob Fugal fbda0f4344 use SSL-only flag on CSRF cookie
fixes CNVS-16884

test-plan:
 - in HTTP-session environment (`secure: false` or unset in
   config/session_store.yml), CSRF cookie should be sent without secure
   flag

 - in HTTPS-session environment (`secure: true` in
   config/session_store.yml), CSRF cookie should be sent with secure
   flag.

 - on a non-files host, javascript should be able to read the CSRF
   cookie: value of "document.cookie" in javascript console should
   include "_csrf_token"

 - on a files host, javascript should not be able to read the CSRF
   cookie: value of "document.cookie" in javascript console should not
   include "_csrf_token"

Change-Id: Ifd57c973478a6d07497a404dcf1a9b9caa9014af
Reviewed-on: https://gerrit.instructure.com/44451
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-11-19 23:18:37 +00:00
Brayden Lopez dc24e7b12d Gave labels unique ids so they can be tied to checkboxes.
Labels were tied to the first dialog that popped up, when they should be tied to their own form (or context).

Fixes CNVS-16217

test plan:
- Go to any group
- Edit group settings
- Try to check/uncheck any checkbox by clicking on label.
- Go to other group
- Repeat

Change-Id: I0a25c52773458aa2242af1f43ae908060bc76ed1
Reviewed-on: https://gerrit.instructure.com/44218
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Brayden Lopez <blopez@instructure.com>
2014-11-19 22:05:17 +00:00
Joel Hough f2f74b92f1 link subject to submission in submission comment inbox
fixes CNVS-16948

test plan
- view a submission comment in the submission comment inbox
- ensure that the subject in the message detail view (right side
 display) links to the submission comment

Change-Id: I2ea4bd8c44a52ff6a250b83638b4d9a2556617d0
Reviewed-on: https://gerrit.instructure.com/44541
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Janelle Seegmiller <jseegmiller@instructure.com>
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-11-19 21:15:47 +00:00
Rob Orton 2a4f455f5f allow excluding students from global surveys
also bump switchman to allow for .uniq across shards

fixes CNVS-14873

test plan
 - site admin survey should go to students by
   default
 - accounts/self/settings should have checkbox to
   include students in global surveys checked by
   default
 - accounts that have unchecked setting should
   exclude students from global surveys
 - regular announcements should still get to
   students
 - checkbox should only be visible to site admin

Change-Id: I5b268f3e19f8710cdaf0e40f37e9af87ff437649
Reviewed-on: https://gerrit.instructure.com/44457
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2014-11-19 20:45:23 +00:00
Brad Horrocks 17c4140fcd Show all group sets in the users controller
Made it so we now show more group sets. The new limit is 50. which is the
same limit we have for the groups on the group controller.

Fixes CNVS-15436

Test Plan:

Create lots of group sets

```
require(['compiled/models/GroupCategory'], function (GroupCategory) {
	function randomName(number) {
		var names = ['Secret','Team','Awesome-Sauce','Ugly','Orange','Red','Fish-Sticks','Evil','<3','Garbage'],
			numAr = ("" + number).split(""),
			ret = "",
			num;

		while(num = numAr.shift()) {
			ret += (ret.length && " " || "") + names[num % names.length]
		}

		return ret;
	}

	var i = 50,
		course = 5; // <<<===== PUT YOUR COURSE ID HERE

	while(i--) {
		var name = randomName(i),
			model = new GroupCategory({ name: name, course_id: course});
			model.save()
	}
})
```

load up the people page!
profit!

Change-Id: I73a67e9254ebe8cfa1f71c4ba0a9811e91c3b201
Reviewed-on: https://gerrit.instructure.com/44636
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
Product-Review: Janelle Seegmiller <jseegmiller@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-11-19 20:09:32 +00:00
Jeremy Stanley 96362fd69a data model and API for file usage rights
test plan:
 1. consult the files API documentation and note the additions:
   A. usage_rights include parameter on 'List files'
   B. usage_rights include parameter on 'Get file'
   C. 'List licenses' endpoint
   D. 'Set usage rights' endpoint (PUT)
   E. 'Remove usage rights' endpoint (DELETE)
 2. exercise these new API features

closes CNVS-16826
closes CNVS-16841

Change-Id: I6c01128423adc24a5b70f71bb109d5a005379c37
Reviewed-on: https://gerrit.instructure.com/44403
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-11-19 16:14:00 +00:00
Michael Nomitch 3347ca8df2 DA - avoid seq scans in scopes
test plan:
  - with DA on and OFF
  - assignments & discussions & quizzes & modules indices load
    and filter properly for students/teachers
  - assignments needing submitting/grading load and
    filter properly
  - grade summary page for students & teachers loads
    and filters assignments properly

Change-Id: Ibff8ff0357360a7e09d500c2475885f3dfb7f495
Reviewed-on: https://gerrit.instructure.com/44215
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-11-19 15:41:47 +00:00
Sterling Cobb 9ca0b5e079 fix issue with file progress bar going over 100%
fixes CNVS-16869

You have some cases where a user has uploaded more than their quota
limit in which case, the progress bar was overflowing and creating some
style issues.

Setting up a user with more space used than in their quota
1. Create a user
2. Upload 50MB of files
3. In the console, change the users quota limit to 25MB (user.storage_quota = 25.megabytes)
4. Save the user
5. Reload the browser page.

Test Plan
Given you have new files enabled
And you have used over 100% of your quota space
When you go to your users files section
Then the file quota used bar should be 100%

Change-Id: If39aa3106cd7eea2f7d4586623f2f35069db9062
Reviewed-on: https://gerrit.instructure.com/44588
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
2014-11-19 00:07:14 +00:00
Chris Hart 8d693d684d IE Compatibility for New Files UI
Fixes: CNVS-16385, CNVS-16776

Fixes Flexbox-related layout bugs in the files list
table header columns and the File Preview overlay.
Please see JIRA for screenshots of the bugs.

Test plan:
- Test in both IE10 and 11, as well as one additional
  browser to verify nothing has broken as a result of
  the IE fixes
- Make sure you have Better File Browsing enabled for
  your test course (under Settings > Feature Options)
- From the main course page, click on Files
- Add a file to your course, if you haven't already
- Click the eyeball icon to view the file in the
  File Preview overlay
- While doing the above, verify that the bugs in
  both JIRA tickets are addressed in both IE10 and IE11.

Change-Id: Ibf7467c2f6c7f9720feda9bd545b316b6559eee6
Reviewed-on: https://gerrit.instructure.com/44356
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
2014-11-18 23:19:40 +00:00
Brad Horrocks 7303de4036 Optimized endpints for pulling back lots O' results
You can now exclude pseudonym info on api requests.
users_json will now preload section information when you include[]=section

Fixes CNVS-14836
Fixes CNVS-13093
Fixes CNVS-12932
Fixes CNVS-16216
Fixes CNVS-16218

Test Plan:

- Create a course with 800 users
- Create a group set; add 150 groups to set.
- Load groups page it should load way faster than before
- Make sure search isn't slow

Change-Id: Icff28b00141fb3573b9ed9493e8dc38521a368e4
Reviewed-on: https://gerrit.instructure.com/43356
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2014-11-18 22:56:23 +00:00
Sterling Cobb 8287cc17a0 fix restricted access form from showing too much
fixes CNVS-16834

When editing permissions for a file VO in Safari would read form fields
that were hidden via display: none. This makes sure those fields don't
get read.

Test Plan
Given you new files are enabled
And you are using VoiceOver with Safari
When you go to the few files page
And you select an item
And you open the restricted access dialog window
Then you should be able to navigate the options
And only visible options should be read by the screen reader

Change-Id: I30e1ba9f57f6071c2996efda1d61212ea60d8411
Reviewed-on: https://gerrit.instructure.com/44487
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
2014-11-18 22:44:02 +00:00
Vincent Gonzalez 2bbd8a2aea Quiz Page Contrast Fixes
Fixes: CNVS-15518

Notes:
- increased contrast of 'correct' and 'incorrect' arrows
- updated sprite
- made all text meet contrast requirements
- made published button opaque

Test Plan
- log in as admin
	- navigate to quizzes
	- open a published quiz
		- verify contrast of published button

- log in as student
	- navigate to quiz
	- start quiz
		- answer questions incorrectly and correctly
		- leave some blank
		- verify contrast

Change-Id: I1337d6e9e4cfe08ffbc8a1f013b176ee16e8f246
Reviewed-on: https://gerrit.instructure.com/43068
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
2014-11-18 22:27:08 +00:00
Dan Minkevitch e7d68703fa Fixed spacing on form dialog buttons
Adds some spacing between buttons for
dialog form modals.

fixes CNVS-16859

test plan:
* Enable "Better File Browsing" feature flag
* Go to any course's Files page
* Select a file or folder and click on
  "Restrict Access" button in the toolbar
  on top
* There should be spacing between the submit
  and cancel buttons
* Repeat for the "Move" dialog

Change-Id: If0fb977e1a61e2d8cb42d4ef74497a9b36f3344b
Reviewed-on: https://gerrit.instructure.com/44570
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2014-11-18 20:22:53 +00:00
Dan Minkevitch 11204d2f0d Clear item selection on delete
When you delete a selection of items
(folders/files), the selected items
are cleared and the Toolbar hides.

fixes CNVS-16856

Test Plan:
* Enable "Better File Browsing" feature flag
* Go to any course's Files page
* Select multiple files/folders
* Click the "Delete" button in the Toolbar
* Confirm the deletion on the popup
* The items should be deleted and the Toolbar
  should disappear

Change-Id: Ic2d37f43399e94dd2a91fbf0c1130b75c86085bb
Reviewed-on: https://gerrit.instructure.com/44494
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2014-11-18 19:05:54 +00:00
James Williams ac12c555d2 invalidate cached stream item instances after item deletion
test plan:
* with caching enabled, create an announcement or other
 object that creates items in the "Recent Activity"
* delete the item
* should refresh the activity right away and not
 show the now deleted item

closes #CNVS-962

Change-Id: I28b2165c238ad074c345db23b64384439d8b8efb
Reviewed-on: https://gerrit.instructure.com/44477
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-11-18 17:50:40 +00:00
James Williams 1de91edaa2 show custom role names in courses drop-down
test plan:
* create a custom course-level role for an account
* enroll a user into an active course with the custom role
* as that user, the "Courses" dropdown menu on the navigation header
 should read "Enrolled as: [Custom Role]" instead of
 the base type for the role

refs #CNVS-5349

Change-Id: Ife07a10852de3d5376a945c9f35d3ef56cb4ca58
Reviewed-on: https://gerrit.instructure.com/44507
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2014-11-18 16:21:51 +00:00
Clay Diffrient 387406f41b Adds usage rights to the models retrieved for new files
refs CNVS-15867, CNVS-15865, CNVS-15868

Test Plan:
- Nothing really easy to test with this commit.
- You could put a breakpoint in your developer tools and
check to see if a file has usage_rights associated, but
that's rather pointless at this point. Future commits
will be based on this one.

Change-Id: I37677ab79c82d9f08f981f5123a661dc84038793
Reviewed-on: https://gerrit.instructure.com/44544
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2014-11-18 00:38:57 +00:00
Sterling Cobb 86ced5be46 pluralize restricted access title
fixes CNVS-16902

The title wasn't pluralize. It now is

Test Case
Given you are testing new files
When you select ONE item
And you click the 'restricted access' button
Then a dialog should appear with a title that says "Editing permissions
for 1 item"

Given you are testing new files
When you select two items
And you click the 'restricted access' button
Then a dialog should appear with a title that says "Editing permissions
for 2 items"

Change-Id: If19e1cf8b7c7df080e889cf9a74888fd48253186
Reviewed-on: https://gerrit.instructure.com/44479
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-11-17 22:23:49 +00:00
Brad Humphrey 0fed483786 add lti module and module item custom variables
test plan:
 - add a tool with variable substitutions for $Canvas.module.id and $Canvas.moduleItem.id
 - launch the tool as a module item
 - it should substitute the values

Change-Id: I52540a33e4d0ada5a4d8434250e173ff1f9ffdef
Reviewed-on: https://gerrit.instructure.com/44484
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-11-17 21:24:45 +00:00
Clay Diffrient 11c666da62 Adds stars to previous courses on the courses page
fixes CNVS-16717

Test Plan:
	- Go to a course and favorite it.
	- Make the course end date / term in the past.
	- You should now be able to unfavorite it, but not re-favorite it.

Change-Id: Ie289ba1c51f9d62984c4f1a87cb2021094ca29a8
Reviewed-on: https://gerrit.instructure.com/43978
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
2014-11-17 21:15:22 +00:00
Cody Cutrer dd1b16828c don't delete from params in AssignmentsController
refs CNVS-16685

Change-Id: I9f778191f7a552a5294ba74f138b0758d7b821eb
Reviewed-on: https://gerrit.instructure.com/44287
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-11-17 18:58:42 +00:00
Cody Cutrer 0e6a661e27 don't use params.delete in CoursesController
refs CNVS-16685

Change-Id: I9b9f40a88c924aeab956977f6b553c94904a6027
Reviewed-on: https://gerrit.instructure.com/44292
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-11-17 18:58:26 +00:00
Duane Johnson f1d3ab67e5 QuizAssignmentOverrideSet needs a container
The return signature of "Retrieve assignment-overridden dates for
quizzes" in the Quiz Assignment Overrides API returns its
QuizAssignmentOverrideSet objects inside another (currently)
anonymous object with a key of "quiz_assignment_overrides". This
de-anonymizes the object and names it
QuizAssignmentOverrideSetContainer. Necessary for machines to read
the API and know what to actually return.

Test Plan:
- A new QuizAssignmentOverrideSetContainer should exist in the API
  docs.
- The type returned by "Retrieve assignment-overridden dates for
  quizzes" should be of that type.

Fixes SIS-653

Change-Id: I9a1ce38824422760a2b20ceaca1722a64b9cf061
Reviewed-on: https://gerrit.instructure.com/44286
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Tyler Pickett <tpickett+gerrit@instructure.com>
Product-Review: Tyler Pickett <tpickett+gerrit@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-11-17 17:33:42 +00:00
Joel Hough e7547b1851 better error message for send_messages_all restriction
fixes CNVS-16892

test plan
- disable the role based permission that allows sending to an
 entire course
- send a message to an entire course as a restricted user via the
 api
- ensure that the error message reads 'restricted by role'

Change-Id: Ia45ad5cd1150a3132a40da8bdd0953b08209521b
Reviewed-on: https://gerrit.instructure.com/44417
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Reviewed-by: Steven Shepherd <sshepherd@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2014-11-17 16:25:53 +00:00
Clay Diffrient 5a0003d3d4 Makes new files search results read once per search
closes CNVS-16898

Test Plan:
  - Enable New Files
  - Go to New Files
  - Enable a Screenreader
  - Search for something
  - The results should be read to you.
  - Search for something else
  - Only results for your something else should be read.

Change-Id: Ia479e68e04d3d3285c0ccd1d27180e49bf90c5d2
Reviewed-on: https://gerrit.instructure.com/44461
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2014-11-17 16:24:50 +00:00
Ryan Shaw 6cf500f895 in newfiles: when you click an filename, preview it, don't download
fixes: CNVS-16921
closes: CNVS-16860

expected behavior:
* clicking a file name should open a preview of it.
  while previewing, you should be able to use the
  arrows to flip through other things in this folder.
  This means that clicking a filename selects that
  row and unselects all other rows.
* the "href" of the filename link should still be
  the download url. this means that you can right
  click and "open in new tab" or "save link as" to
  download the file.
* if you have only selected folders, and you click the
  "preview" eye. it should open the preview and show
  all the "files" (not folders) in the current folder.

also test:
* clicking the "eye" preview button in the toolbar
  should work just like it used to.

Change-Id: I468359905ede6d32f750c3896c3eb364eb0b5c3c
Reviewed-on: https://gerrit.instructure.com/44483
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2014-11-17 16:18:45 +00:00
Chris Hart 1b942eb942 Canvas UI Component Update - Tables
Fixes: CNVS-15536

This change removes the existing table examples from
the styleguide, but keeps the styles so as not to
break anything. New table styles and examples have been
added to the styleguide, per mockups from the UI team.

Test plan:
- Open the /styleguide page from the main Canvas url
- Click on Tables on the left-side nav
- Go through each table example and make sure it's
  working as the text says it should be (i.e., is the
  row-hover table actually showing a hover effect, etc.)
- Check the colors against color contrast requirements
  for both regular and high-contrast UIs
- NOTE: the new table styles are only being used in the
  styleguide right now, so no testing of any app areas
  is needed.

Change-Id: Iaf04703dc1e2d6a6815070fe1a4c299ab152378f
Reviewed-on: https://gerrit.instructure.com/43515
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Anna Koalenz <akoalenz@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
2014-11-17 15:03:36 +00:00
Steven Burnett 524b9dab17 Removed the uneeded break all tag in sass file
The assignment title had some issues with word wrapping.  If
a word was bigger than 90 characters then it would run off screen
we fixed by adding a break all to the css, but it was unneeded
because the normal format already covered this.

fixes CNVS-14579

test plan:
-Create an assignment.
-Enter in multiple words into title see that title wraps.

Change-Id: Iad657bbc2c72c8e807c2ba4c0a4ee8decca40347
Reviewed-on: https://gerrit.instructure.com/44390
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-11-15 19:40:54 +00:00