Commit Graph

2250 Commits

Author SHA1 Message Date
Alex Boyd bb8a81577e Fix entry of international phone numbers
Fixes CNVS-26320

Test plan:
 - Enable the International SMS feature flag for an account
 - Add an international phone number to a user in that account
 - Verify that you can add the number and get through to the
   dialog asking you for the confirmation code

Change-Id: I4f8535e61d4f10d4a1e6c263970e460aa79cd85b
Reviewed-on: https://gerrit.instructure.com/69977
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Alex Boyd <aboyd@instructure.com>
2016-01-11 19:00:37 +00:00
Sterling Cobb 8bbe4af052 disable auto focus when dialog pulls up
fixes CNVS-25967

This dialog has a tab with two options in it. It was auto focusing to
the first input in the dialog however it shouldn't be doing this. Now
it just focuses on the first tab item.

Test Plan
Given you're on the user settings page
And you have click the "Add contact method" link
When the dialog pulls up
You should see tabs with a form
And you should NOT be automatically focused on the first input field

Change-Id: If3a8f7b552a79e0ee94f7639f9785d7e90571c83
Reviewed-on: https://gerrit.instructure.com/69314
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
2016-01-08 16:54:05 +00:00
Matthew Berns d458b6dc08 address accessibility issues with quiz regrading options
fixes CNVS-15134

test plan:
- go to a quiz that some students have already taken
- change the correct answer on one of the questions, a dialog with
  regrading options should be presented
- you should not be able to change the correct answer until an option is
  selected and hitting 'update' on the dialog
- update the question, but do not save the quiz
- refresh the page and go back to that question, the option you selected
  should show text for its regrade option on the answer and reflect that
  it's the correct answer
- save the quiz and return to the question
- the regrade text should not appear on the newly updated correct answer
- create a new question
- you should not be prompted to choose a regrade method when changing
  the correct answer on the new question
- when closing the dialog box, via either cancel or update, focus should
  return to the triggering element and not get lost on the page

Change-Id: I355f246d55f23468b1cb22337140407d08e2b3b2
Reviewed-on: https://gerrit.instructure.com/69149
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Matt Berns <mberns@instructure.com>
2016-01-07 23:27:14 +00:00
Ryan Shaw 608c34bcc2 fix "fix KO navigation for equation editor"
2 things:

1. by not reusing the same element for every instance
   of this view, a few bugs were introduced because
   the code was expecting it to reuse the same element

2. by not allowing the 'compiled/views/EquationEditorView'
   module to be lazy-loaded it really does make the
   common js bundle that gets loaded on every page
   a lot bigger to download & parse (even though only
   a tiny fraction of people will actually edit RCE
   content and open this equation editor)

test plan:
* make sure basic view does not look wacky like:
  https://www.dropbox.com/s/l65gd6g74vzb32i/Screenshot%202016-01-07%2011.07.27.png?dl=0
* make sure you can toggle between basic & advanced

Change-Id: Ie0e757cbbf1def79b0925c63d86dd9e5f492c548
Reviewed-on: https://gerrit.instructure.com/69870
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
2016-01-07 20:16:02 +00:00
Jacob Fugal 14c8e6a250 add and use tz.useMeridian (vs tz.hasMeridian)
fixes CNVS-25847

distinguish predicate for "locale _supports_ 12-hour time" from
predicate for "locale _prefers_ 12-hour time". it's possible for a
locale to support 12-hour time while still preferring 24-hour time.

checking support for 12-hour time is what tz.hasMeridian implements, and
is still useful, e.g. for when automatically switching 12-hour format
strings to 24-hour format strings if hasMeridian is false. but checking
preference for 12-hour time is now implemented by tz.useMeridian, and is
what's really wanted when making 12-hour vs 24-hour choices around the
timepicker.

the locale _prefers_ 12-hour time -- or alternately, tz.useMeridian is
true -- if the locale uses %l in its localized time format strings AND
supports 12-hour time (otherwise, they'd later be translated to %k).

test-plan:
 * en-AU is an example of a locale that supports 12-hour time but
   prefers 24-hour time
 * create a user with en-AU as their selected locale
 * go to a datepicker field with a time component (e.g. assignment due
   date) as that user
 * the timepicker portion of the datepicker should not include an am/pm
   dropdown
 * entering times both before and after noon using the timepicker should
   format correctly into the attached input

Change-Id: Idd06c5222aceb3df37576cebe4c3c165fe3f8245
Reviewed-on: https://gerrit.instructure.com/69534
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2016-01-07 19:04:02 +00:00
Ethan Vizitei 479be5283a fix KO navigation for equation editor
closes CNVS-25693

Removes the span element (bad element to nest
block elements within).  This makes jQueryUI
dialog tabbing work as expected for the equation
editor.

Also remove an extraneous require statement.

TEST PLAN:
  1) Go to an RCE instance
  2) try to enter an equation
  3) in the dialog box, tab through all buttons and
     the text editor to the "Insert Equation" button
  4) you should be able to shift-tab back into
     the text area and back into the button list.
  5) make sure you can tab back to the "Basic" tab
     and use arrow keys to change which tab we're focused
     on

Change-Id: I92c149cf04281324c3ce3838c9fcbb16c25626da
Reviewed-on: https://gerrit.instructure.com/69707
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-06 23:00:28 +00:00
Keith Garner 3828edbb44 using same grade for resubmission doesn't change score
When a student resubmits to an assignment with a grading scheme
attached, if the instructor clicks on "Use same grade for
resubmission," the initial score is maintained.

fixes CNVS-25854

test plan:
 - Attach a grading scheme to an assignment
 - Give a student a grade that isn't the highest percentage possible
   of a particular range
 - Have the student submit to the assignment
 - As the instructor, use Speedgrader to grade student's submission
 - Have the student resubmit to the assignment
 - As the instructor, view Speedgrader for that student's submissions
 - Click "Use same grade for resubmission." Notice the grade stays the
   same, but the point value changes

Change-Id: Ib53e1f7de4a4eb9fcced8a584b1cab8a0fe35a90
Reviewed-on: https://gerrit.instructure.com/69390
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2016-01-06 15:21:57 +00:00
Jon Jensen b2e5d13e41 spec: fix brittle specs
fix a race condition which causes keyboard events to fire rather than
populate textarea (cuz stuff's not wired up in time)

also prevent js errors if keyboard events fire with no item selected

Change-Id: Iaf297a6d2ad5cc4dcc28b3da5cb6173a9caa8620
Reviewed-on: https://gerrit.instructure.com/69465
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2015-12-29 17:39:20 +00:00
Pam Hiett 28c49317b8 Update canvas icon font with replacements and add new one
Fixes: CNVS-25973

notes:
- old icons: http://screencast.com/t/F1iM8Nplm

- new icons: http://screencast.com/t/AhkxbTDwBs

*** running locally may require be rake icons:compile
along with compiling css AND restarting the server

test plan:
- in order to see these updated icons frd
- login in to local canvas and navigate to
  /styleguide
- click on the "Style" link and then select "Icons" from
  the sub-nav
- note: titles have been added to all of the icon for a11y

Change-Id: I54cc59dd116fae5fc792b9260a6b4a9e9e77a285
Reviewed-on: https://gerrit.instructure.com/69190
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
Tested-by: Jenkins
QA-Review: Myller de Araujo <myller@instructure.com>
2015-12-24 07:42:50 +00:00
Dan Minkevitch bab58f4eda Fix various a11y issues with user settings page
Fixes CNVS-25962
Fixes CNVS-25753
Fixes CNVS-25755
Fixes CNVS-25756
Fixes CNVS-25964
Fixes CNVS-25968
Fixes CNVS-25969

See each ticket for all items affected by this commit and what to test
for specifically.

Change-Id: I30eabb92f506e1545157bcf00b4463c6f7a5623d
Reviewed-on: https://gerrit.instructure.com/69317
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2015-12-23 22:51:25 +00:00
Chris Hart 9cf31d6603 Dashcard UX updates for design team
Fixes: CNVS-25974

Dashcard width and alignment updates requested by
Blake. See JIRA for changes and acceptance criteria.
Also added subtle animation on the placeholder
image that appears for each dashcard while the
content is loading.

Test plan:
- New UI only. Please clear browser cache.
- Open the dashboard and resize the screen.
- The dashcards should now resize like this:
  http://screencast.com/t/q6rQiQaxSV
  (stretching to the full width of the
  container until the 1200px breakpoint, then
  becoming fixed-width and stacking up to the
  left as the screen is widened)

Change-Id: I04a1c33b4792befa6175fa7e9be37da3a969d646
Reviewed-on: https://gerrit.instructure.com/69144
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
Tested-by: Jenkins
QA-Review: Myller de Araujo <myller@instructure.com>
2015-12-23 14:25:46 +00:00
Amber Taniuchi 8c33ee4caa remove student visibility of comments when assignment is muted
Previously, when an assignment was muted, teacher comments
were hidden from the student inconsistenly in a few pages.
The commments were hidden in the submission details page,
but not from the student grades page or the assignment
show page sidebar. Added logic to to the erb templates
so that the muted status of the assignment is being
checked first before displaying comments.

fixes CNVS-20047

Test Plan:
1. create an assignment and mute it
2. as the instructor add a submission comment in speedgrader
3. unmute the assignment
4. go back in and re-mute the assignment
5. As a student, go to the assignment show page
(/courses/x/assignments/y) and verify no comments
are visible in the sidebar, but rather, there is a
message about "You may not see all comments...."
6. Also go to the 'Grades' page (/courses/x/grades)
and verify no comments are visible for the muted assignment.
7. Also go to the submission details page (click on the name
of the assignmet in the 'Grades' page to go there) and
verify no comments are visible. Rather, there is a message
about "You may not see all comments...."
8. Unmute the assignment and make sure that the comments
show up in the pages from steps 5 - 7.
9. Click the 'Show All Details' button and make sure that
comments/rubrics for muted assignments do not show up.

Change-Id: Iba22ced513bdd6ba5aa3a1b939675c90b45fcb7c
Reviewed-on: https://gerrit.instructure.com/68210
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Christi Wruck
2015-12-22 22:26:51 +00:00
Keith Garner cd181be362 react gradebook loads properly on ie11/win10
The react gradebook now loads properly on IE11 after fixing an issue
where IE11 didn't respond as expected in relation to Promises.  This
change is backported from fixed-data-table 0.6.0.

fixes CNVS-25601

test plan:
 - Make sure the gradebook performance feature flag is on
 - Log in as a teacher
 - Select a class and click on grades from left nav
 - Note that the gradebook properly loads and displays

Change-Id: I7e5466a6f66832e8d8be1ad6a2cd21cdedffd117
Reviewed-on: https://gerrit.instructure.com/69280
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2015-12-22 22:23:25 +00:00
Sterling Cobb 7bc6fc5018 manage focus when deleting an email from settings
fixes CNVS-25970

Focus was getting lost when deleting an email from the users settings
page. This puts focus back on a previous or next email address after
one is deleted.

Test Plan

Given you have a canvas account
And you have 3 email addresses
When you navigate to the Users Settings page (/profile/settings)
And you use a SR or keyboard to navigate to the list of emails
And you delete an email via the trashcan icon
Then focus should be set to the next closes email address link

Change-Id: Ida6d8bf99d61b443f2a4b96f2e71312646ffa43e
Reviewed-on: https://gerrit.instructure.com/69298
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
2015-12-22 20:55:46 +00:00
Ethan Vizitei b5f593aa5d fix a rogue require statement to work with web pack
refs CNVS-25916

TEST PLAN:
  1) discussion_show_page_specific_user_spec should pass
    under webpack selenium

WARNING: This has possible regression impact on all places where we use
the little "Add Rubric" button (quizzes in the 'view rubric' link from
the gear dropdown, assignments when given the option to add a rubric
while editing an assignment, and discussions where you can mess with the
rubric on a "graded" discussion), so each rubric adding workflow should
be checked.

Change-Id: I84af8b58e4143e79bff96bd638bd2149d8e73c2e
Reviewed-on: https://gerrit.instructure.com/68988
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-12-21 23:25:13 +00:00
Davis McClellan ba56445ced Hide questions before timer starts
fixes CNVS-25378

test plan:
- start a quiz as a student
- press escape before the timer appears but after "Loading.." appears
- ensure that the student cannot take the quiz for an infinite amount
  of time
NOTE: you may want to throttle your download speed to make it easier
to press escape at the right moment

Change-Id: Idefd0860d3030b026657a90a78818cf0a4b9b6d8
Reviewed-on: https://gerrit.instructure.com/68234
Reviewed-by: Matt Berns <mberns@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-12-21 19:49:27 +00:00
Jeremy Stanley 15dd6f46d6 don't show prerequisites section for first module
previously, while editing the first module, we showed a
select-prerequisite-module dropdown with all its contents
disabled. this is confusing from an a11y standpoint
because it looks like the dropdown isn't responding to
keyboard input.

instead, we will simply not show the Prerequisites
section where it doesn't apply.

test plan:
 - when adding a new module to a course with no existing
   modules, there should be no "Prerequisites" section
   on the "Add Module" dialog
 - when editing the first module in the list, there should
   be no "Prerequisites" section
 - when editing subsequent modules, there should be a
   "Prerequisites" section and the module dropdown should
   contain only the preceding modules. it shouldn't include
   but disable the modules that follow it.

fixes CNVS-25733

Change-Id: I1a6656e23a30e7dc4ae5d0932f1fe824a8a6fd31
Reviewed-on: https://gerrit.instructure.com/69160
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-12-21 19:47:02 +00:00
Ryan Shaw 298e6808d5 get sub account branding and custom css/includes working
fixes: CNVS-24787
fixes: CNVS-23964
fixes: CNVS-23957 - Handle parent account custom css/js for new_styles
test plan:
* set up a root account, child account, and grandchild account
* use theme editor to set a custom css/js file for each
  (eg: for css `* {color:red}` and for js 'console.log("from grandchild")`
* make a course & a group in the grandchild account
* load a page in that course and group and make sure
  you see grandchild account's branding, and root's,
  child's, and then grandchild's css loaded on the page
  (grandchild should be loaded last so you see it's css
  effects override root or child's and you should see
  the console.log from root then child then grandchild)
* view a page in "child". it should have root and child's
  css/js but not grandchild
* as a user that only has enrollments (account associations)
  in "child", go to the dashboard. you should see
  css/js for both root and child but not grandchild

fixes: CNVS-25051 Opening Theme Editor for
sub-accounts shows incorrect theme preview
test plan:
* Go to a sub-account in theme editor and change
  settings so the Branding is different and save.
* the preview on the right should reflect your
  changes both after you "apply" and "save"
  (and not just show the preview of the root
  account's branding)

fixes: CNVS-23406 - global JS and CSS files are being
included when Global CSS/JavaScript includes is false
test plan:
* go to /accounts/self/, and go to theme editor and
  upload a css_override
* see that that css is loaded on pages
* back in root account settings disable Global
  CSS/JavaScript includes
* check that the css is no longer loaded.
* do the same thing checking a subaccount's custom css

fixes: CNVS-25558 - load whole chain of custom css/js 
in native app api requests

test plan:
* make api request for a wiki page in course in a 
  subaccount that has custom css/js within a root 
  account that also has custom css/js
* you should see both the root account's css/js and 
  the child account's returned in the response

to test grandchild js issue jeremyp found:
* go to theme editor for a grandchild account
* choose a js override file (like: `console.log('first')`)
* preview & apply
* you should see "first" in console
* go back to theme editor, pick a new file (like: `console.log('second')`)
* preview & apply
* you should only see "second" in console. not "first"

Change-Id: I8d9047948f5da94be41e0205844629a170f980af
Reviewed-on: https://gerrit.instructure.com/68249
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
2015-12-19 02:47:39 +00:00
Spencer Olson 7d22d162b2 fix grading standard creation
closes CNVS-25881

test plan:
  * Create a new course
  * Go to course settings
  * Check the box for "Enable course grading scheme"
  * Click "set grading scheme"
  * Once the "View/Edit Grading Scheme" modal
    appears click the pencil icon to edit the scheme
  * Make a change to the scheme (other than just
    changing the title) and click save
  * Notice that the changes that you made appear
  * Go to the grading standards page (/courses/
    :course_id/grading_standards) and verify you
    can create a new grading scheme

Change-Id: I3dd83b6fc308c0e33c856de390eff4e976654273
Reviewed-on: https://gerrit.instructure.com/69178
Reviewed-by: Strand McCutchen <smccutchen@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2015-12-18 23:01:06 +00:00
James Williams 619eb46e25 fix global announcement datepicker for non-english locale
test plan:
* set the locale to a non-english language
* use the root account Settings page, "Announcements" tab
 to create an announcement with start and end dates
* the datepickers should not clear themselves

closes #CNVS-25724

Change-Id: Id4efbf8e910a13ef7bccc05002ca2fada654eab8
Reviewed-on: https://gerrit.instructure.com/68765
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-12-18 22:02:14 +00:00
Michael Nomitch f9dae39292 pass custom options to RCS loader
fixes CNVS-25489

also extracted some code from eportfolios
for easier use in other files

test plan:
  - load RCE normally
    - it works fine
    - also run the c/29651 test plan
      (minus the unsupported IE versions)
  - load RCE via service on eportfolios
    - it works fine

Change-Id: I4eaf0ac1e11ae249c92a2cd2f9e249bc117986cd
Reviewed-on: https://gerrit.instructure.com/68349
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-12-18 20:18:44 +00:00
James Williams 139b5e740c fix quiz question group warning with drag and drop
test plan:
* create a quiz with a question group that has enough questions
 (either inside or in it's question bank)
* create another question group
* dragging and dropping the first question group should not
 cause the "This question group is set to pick more questions"
 warning to show

closes #CNVS-25750

Change-Id: Ibfa51761cba4ae12db5026e6e7840966e4ee9aa4
Reviewed-on: https://gerrit.instructure.com/68747
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-12-17 14:53:52 +00:00
Jeremy Stanley 447fc28be8 return focus after adding module item
test plan:
 - use the keyboard to activate the + button in a module
   to add a module item
 - select an item to add (tab + arrow keys) and press Enter
   to submit the dialog
 - focus should be returned to the + button

fixes CNVS-25661

Change-Id: Id64ff086f38989469bf059ea40fc77cbf5d00e1d
Reviewed-on: https://gerrit.instructure.com/68808
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-12-16 20:49:17 +00:00
James Williams bbc6f7c238 direct to new mark when following link moderation page
test plan:
* create a moderated assignment
* submit to the assignment as a student
* as a ta, add a provisional grade
* visit the moderation page and add the
 student to the moderation set
 (so it shows a SpeedGrader link) in the
 2nd review column
* follow that link
* it should automatically open the "2nd Reviewer"
 tab (as though you add clicked "Add 2nd Review")

closes #CNVS-25723

Change-Id: Ia40ff3c47317f63df32b1142ff2f82ac574f71f6
Reviewed-on: https://gerrit.instructure.com/68965
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-12-16 14:02:19 +00:00
Matt Berns 29576815c3 Revert "address accessibility issues with quiz regrading options"
This reverts commit 8b7c771bfb.

Change-Id: I63a83ea82823b1442947d93d3251fe5e9c25843d
2015-12-15 22:02:58 -07:00
Matthew Berns 8b7c771bfb address accessibility issues with quiz regrading options
fixes CNVS-15134

test plan:
- go to a quiz that some students have already taken
- change the correct answer on one of the questions, a dialog with
  regrading options should be presented
- you should not be able to change the correct answer until an option is
  selected and hitting 'update' on the dialog
- update the question, but do not save the quiz
- refresh the page and go back to that question, the option you selected
  should show text for its regrade option on the answer and reflect that
  it's the correct answer
- save the quiz and return to the question
- the regrade text should not appear on the newly updated correct answer
- create a new question
- you should not be prompted to choose a regrade method when changing
  the correct answer on the new question
- when closing the dialog box, via either cancel or update, focus should
  return to the triggering element and not get lost on the page

Change-Id: I500d018e6067436e6147e39c902af0002e61b7f7
Reviewed-on: https://gerrit.instructure.com/57090
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Rajkumar Kethavath <rkethavath@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2015-12-15 19:07:41 +00:00
Davis McClellan df114f40a8 Add an icon to quickly toggle post to SIS setting
fixes CNVS-25467
fixes CNVS-25468

test plan:
- Go to assignment and quiz page
- Ensure that "Post grade to SIS enabled" icon is attached to
  all assignments that have the option enabled and that
  "Post grade to SIS disabled" icon is on the rest.
- Click "Post grade to SIS enabled" icon and ensure that
  it toggles on the screen and that the option toggles for the
  assignment
- Ensure that the icon is accesible
- Check that tooltip on icon is correct on both toggle positions
- Disable post grades to SIS at the account level
- Check both quizzes and assignments to ensure that the icon is
  no longer there

Change-Id: Ib6682a7ca4d77dcc9a5e05095e33920eac981e9b
Reviewed-on: https://gerrit.instructure.com/68635
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Rajkumar Kethavath <rkethavath@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-12-15 18:17:59 +00:00
Michael Nomitch d692a83efd RCS - allow instructure record call via event
refs CNVS-25536

test plan:
  - with MCE loaded on non eportfolio page
    - you can record a media comment like usual

  - eportfolios with tinyMCE loaded via service
    - it loads properly (though you wont be
      able to add a media comment)

Change-Id: I892eb6033a18d67d712bda2f1bf7528533cf3ff6
Reviewed-on: https://gerrit.instructure.com/68224
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-12-14 23:01:06 +00:00
Michael Nomitch 6fa581278d RCS - initialize external tool plugin via event
refs CNVS-25535

test plan:
  - with MCE loaded normally
    - external tools are added to the tinymce
      toolbar
    - they work like normal (test multiple
      external tools)

  - eportfolios with tinyMCE loaded via service
    - loads normally and works
      (external tools arent used on this page
       so cant test this remotely until we
       add remote RCS to a different page)

Change-Id: I1ce0f9dc644d567d56615a61d7788ce42044bb2f
Reviewed-on: https://gerrit.instructure.com/68195
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-12-14 23:01:04 +00:00
Jon Jensen c00286ca61 update _core_en.js for rails 4
time to stop living in the past

test plan:
1. run compile_assets under rails 4
2. _core_en.js should not have an unstaged change in git status

Change-Id: Ia5d82ed69ae9ca4339dd990349f638c6a72ab68a
Reviewed-on: https://gerrit.instructure.com/68580
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2015-12-11 21:24:37 +00:00
Nathan Mills 700948052c add the allowfullscreen to contentitem
fixes PLAT-1291

test-plan:
embed a video or something that supports fullscreen via content-item
attempt to make it fullscreen
it should allow you to go fullscreen

Change-Id: I2d9b3bd4a4682927526cecf90b7c4a8a6ca4f6f2
Reviewed-on: https://gerrit.instructure.com/68564
Tested-by: Jenkins
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2015-12-11 18:47:02 +00:00
Strand McCutchen 556796188a round course settings grading schemes percentages
fixes CNVS-17280

Test plan:
 0. As a teacher in a course navigate to the settings page.
 1. If the grading scheme checkbox is unchecked, check it.
 2. Click View Grading Scheme.
 3. Edit the grading scheme so that it has many grades
    between D and F, each at a different percentage.
 4. Click Save.
 5. Click Select Another Scheme
 6. Review the selectable schemes and verify that the
    percentages only show digits rounded to the tenth.

Change-Id: I291444bedf36359b8e229dc7e8129fac520d85c9
Reviewed-on: https://gerrit.instructure.com/68535
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Christi Wruck
2015-12-11 17:30:52 +00:00
Chris Hart f6ca9ddef2 Dashcard UI refresh
Fixes: CNVS-25440

Test plan:
- New UI only
- The dashcards on the user dashboard should now
  look like this:
  http://cl.ly/image/0a311i3a1g25
- The dashcards should function exactly the same
  as they did before. The only non-style-related
  change is that now, when the page is loading,
  the number of "empty dashcard" placeholder
  images should now match the number of dashcards
  that will appear when the dashboard loads.

Change-Id: I92d0a9dc866718e79921c33390965471135fde21
Reviewed-on: https://gerrit.instructure.com/68356
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
Tested-by: Jenkins
QA-Review: Myller de Araujo <myller@instructure.com>
2015-12-11 15:50:45 +00:00
James Williams b144bd8135 fix moderated grading submission states
This regression was introduced by a81b46a81

test plan:
* create a submission for a moderated assignment
* as a ta, add a provisional grade
* add the user to the moderation set
* the moderator should not see the submission as already "graded"
 (since it needs another provisional grade)

clsoes #CNVS-25722

Change-Id: I8bf7476b9f731859ee5a2f4563c63614db9684db
Reviewed-on: https://gerrit.instructure.com/68669
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-12-10 21:13:45 +00:00
James Williams af46a60a20 fix conversations and group xss vulnerabilities
test plan:
* create a group with a name as described in the ticket
* hovering over the group name on the group management page
 should not cause a browser alert
* hovering over the group name in the inbox dropdown menu
 should not cause a browser alert

* create a course with a name as described in the ticket
* hovering over the course name in the inbox dropdown menu
 should not cause a browser alert

closes #CNVS-25645 #CNVS-25647

Change-Id: I7c19ac6134a4a2841e6f6ffc650420cfd61e4a9f
Reviewed-on: https://gerrit.instructure.com/68479
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-12-10 19:30:26 +00:00
Jeremy Stanley 37e873c2d5 fix quiz answer comment sanitization
test plan: see steps in CNVS-25726

fixes CNVS-25726

Change-Id: Id98fc57d80a4db01b1f08469f4df407e02144591
Reviewed-on: https://gerrit.instructure.com/68611
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-12-10 19:29:18 +00:00
Jeremy Stanley dd093d0be5 fix htmlEscape to escape attributes properly
test plan: see CNVS-25646 and CNVS-25662

fixes CNVS-25646
fixes CNVS-25662

Change-Id: Iae0bcc0df8f731ff682d24bf240fe13906fd782c
Reviewed-on: https://gerrit.instructure.com/68486
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2015-12-10 19:29:12 +00:00
Michael Nomitch c7d19b2357 equella plugin works on remote RCE
fixes CNVS-25390

test plan:
  - configure account to use equella
  - spin up RCE service
  - with remote RCS feature flag on and off
    - you can access and embed equella from
      tinyMCE

Change-Id: I9e607ef9c64a7af8185cc8e6d568b86721d46eb6
Reviewed-on: https://gerrit.instructure.com/67928
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-12-10 17:13:42 +00:00
Michael Nomitch 39e0f80355 RCS: set up event listener for image plugin
refs CNVS-25291

test plan:
  - when the RCS service has the image plugin code
    and the RCS feature flag on
    - the RCS can add images from a url or canvas
  - when the RCS flag is turned off
    - the image plugin works like normal

Change-Id: Idaac68887f9ae2dd36410a5922a0b161cca13316
Reviewed-on: https://gerrit.instructure.com/67450
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-12-10 17:13:36 +00:00
Ethan Vizitei 765507f63e several things to help webpack compile speed
closes CNVS-25714

TEST PLAN:
web pack should compile in like 60 seconds rather than 600

Change-Id: I74716d9cccfd0253693660c0b4ad4368e91b72e7
Reviewed-on: https://gerrit.instructure.com/68497
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-12-09 19:25:30 +00:00
Ethan Vizitei 3806c09a53 remove this huge file
We don't use it anywhere, and it has hardcoded paths in it
to a single developer's file system

TEST PLAN: nothing changes

Change-Id: I88923ada592fce745e7534569138c6035d000646
Reviewed-on: https://gerrit.instructure.com/68448
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-12-08 21:40:10 +00:00
James Williams f07f83844d rename duplicate files uploaded through modules page
test plan:
* upload a file into a course
* through the modules page, re-upload the same file
* it should have a unique counter (e.g. "-2")

closes #CNVS-25623

Change-Id: I82a47e095ec5665fc1ebd42c7febc894e04041ef
Reviewed-on: https://gerrit.instructure.com/68434
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-12-08 20:39:41 +00:00
James Williams b5ef5175d0 don't allow course end date before start date
test plan:
* try to edit a course end date to be before the
 start date
* it should have an error message

closes #CNVS-25409

Change-Id: I8ed930ca219dfebcc62b010f6e14ee5879cea0b1
Reviewed-on: https://gerrit.instructure.com/67974
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-12-08 13:17:27 +00:00
Michael Nomitch 0ea92efcae integration of RCS into eportfolios
closes CNVS-24828

test plan:
  - have rcs running
  - with remote tinyMCE feature flag off
    - regression test of eportfolios page
    - check DnD & multiple tinyMCEs
  - with feature flag on
    - check that a tinymce instance
      on eportfolios page can load & save
      - note: many features will be missing

Change-Id: Ib6471729fa83c15107898134fc1f1306c8e7be8f
Reviewed-on: https://gerrit.instructure.com/66378
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-12-07 23:31:33 +00:00
Jeremy Stanley 450999a315 "Message students who..." -1
Add the ability to remove students from the list of recipients
in gradebook's "Message students who..." feature

test plan:
 - have some students enrolled in a course
 - have some kind of gradeable assignment or something,
   and submit to it as some of the students
 - as a teacher, go to the gradebook, and grade
   some of the submissions
 - hover over the assignment header, and select
   "Message Students Who..." from the dropdown menu
 - notice how when you select criteria, a list of students
   whose submission (or lack thereof) matches the criteria
   appears
 - click the X next to a student to remove them from the list
 - ensure only the selected students receive the message
   when you click "Send Message" (not students manually
   removed from the recipients)
 - ensure the X buttons can be operated by the keyboard
   and contain a prompt readable by screenreaders
 - ensure the Send Message button is disabled if you
   remove all the students from the recipients
   (and you can change criteria and get the students
   back)

closes CNVS-25005

Change-Id: I375d017f4bdd1d22ba6f8bb6ae6c83dbc76d3a9d
Reviewed-on: https://gerrit.instructure.com/68180
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Christi Wruck
2015-12-07 23:19:15 +00:00
Eric adc0b83064 sort answers in formula sort correctly
fixes CNVS-25383

sorts formula editor answers correctly. before we were calling
the default method in javascript sort. this sorts lexographically
i.e. it turns everything into strings, and then sorts based off of
that. however now it will actually sort by their actual value.

Test Plan:
1. Create a formula question, in the editor.
2. create more than one variables with values between 1, and 19
3. generate values till you have one under 10, and one over 10.
4. sort the list, and notice it sorts lexographically.

Change-Id: Id58b4a506e2f4a0c004246984bbdbf625b2a4293
Reviewed-on: https://gerrit.instructure.com/67970
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Rajkumar Kethavath <rkethavath@instructure.com>
Product-Review: Eric Coan <ecoan@instructure.com>
2015-12-04 19:37:23 +00:00
Michael Nomitch 99055bbf36 modifying and adding links does not remove images
fixes CNVS-21361
fixes CNVS-22238

test plan:
  - repeat in all supported browsers:

  - insert an image into the RCE
    - with alt text & without alt text
      - make only the image a link
      - make the image and text
      - make only text a link
      - make two paragraphs links
  - all of the above combinations work

  - make sure the following text links work
    - ending in a "+"
    - containing "()"
    - containing "[]"
  - make sure the above work as part of a
    multi-paragraph link as well

Change-Id: I2a461dd1a79c5f19bda1b26e783ce8c125391e8c
Reviewed-on: https://gerrit.instructure.com/64052
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Rajkumar Kethavath <rkethavath@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
2015-12-02 19:56:28 +00:00
Clay Diffrient 19eb55d15a Give screenreader indication to speedgrader for mod grading
fixes CNVS-25128

Test Plan:
  - Set up everything for moderated grading
  - Go to speedgrader
  - select a grade to be the selected grade
  - Screenreaders should pick up a message indicating
    that the grade with the checkbox is the chosen grade

Change-Id: Ifc3281e453221630bc47076b22898fb14c853692
Reviewed-on: https://gerrit.instructure.com/67603
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-12-01 22:34:52 +00:00
Sterling Cobb e0f90e0b30 fix speedgrader dropdown when tabbing
fixes CNVS-25145

When viewing speedgrader and doing a moderated grade, tabbing to the
students dropdown would automatically refresh the page and take you to
the first reviewer rather than stay on the same page and wait for a
student selection. This fixes that by scoping an weird accessiblity
hack for firefox to only be applied when pressing the up, down, left
and right arrow keys. Note that the tab is not included in the key
event.

Test Plan
Set up an assignment that has been submitted with moderated grading
enabled.
Have two reviewers grade the assignment
Go to speedgrader for assignment, make sure the 2nd reviewer tab is
selected.
Tab forwards (or backwards, depending on where you are on the page)
until you are on the "student 1...2..etc) dropdown (top left corner)
The page should NOT refresh when you focus on the dropdown
The page SHOULD update when a new selection is made.
This should be tested on firefox and chrome.

Change-Id: I863bcd5f5dfdbeed97d4482c594e687e291ece57
Reviewed-on: https://gerrit.instructure.com/67737
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
2015-12-01 18:25:13 +00:00
Jeremy Stanley b523f29c10 improve speedgrader moderation tab keyboard accessibility
test plan:
 - set up a moderated grading assignment with one or more
   students in the moderation set
 - as a moderator looking at speedgrader, ensure the following:
   1. you can focus a moderation tab via the Tab key, and the
      focused tab will contain underlined text, similar to the
      Course Settings page
   2. the arrow keys can be used to change which tab is
      selected. as the selected tab changes, the correct
      provisional grade should be shown below.
   3. you can press Tab to move focus to the "Select" button
      to select a provisional grade, and then press the
      space bar to select the grade. focus should remain
      on the tab, so you can arrow over to a different tab.
   4. you should be able to press Tab to move to the
      "Add Review" link, press the space bar, and operate
      that menu with the keyboard.

fixes CNVS-25141 CNVS-25148 CNVS-25149

Change-Id: Icb4b0b6d270c7aa48e58897c21a5b17abeafade5
Reviewed-on: https://gerrit.instructure.com/67635
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-11-24 20:30:40 +00:00
Simon Williams a1e7f57c56 webpack tests
closes CNVS-24966

change js specs to work with web pack.
update some dependency references, make some aliases
for external dependencies to get the right version,
and clean up a bunch of leaky state.

TEST PLAN:
js tests should pass in web pack _and_ requires

Change-Id: If37fbce93e7e67021d90bacb470ffc4f1b17402d
Reviewed-on: https://gerrit.instructure.com/66309
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-11-24 18:40:58 +00:00
Keith Garner f9e34b77e9 show correct submission in speedgrader sidebar
Fixes an off-by-one error related to submission select introduced in
an earlier change.

fixes CNVS-25244

test plan:

 o Create an assignment with the file upload option and other options
   intact
 o As a student, submit to the assignment using the file upload option
 o Re-submit to the same assignment using the text entry option
 o Open speedgrader as the instructor, and notice the file upload
   submission is marked as the most recent submission
 o View the previous submission, and notice no submission is visible.

Change-Id: Ia166d05ed730f8e737339762ed6d4d05f5a6e58d
Reviewed-on: https://gerrit.instructure.com/67656
QA-Review: Derek Hansen <dhansen@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
2015-11-22 02:09:37 +00:00
Davis McClellan 3d82d4b273 Fix OQAAT regression for access codes
fixes CNVS-23169
refs CNVS-25241

test plan:
- take a OQAAT quiz with an access code
- navigate with the sidebar
- shouldn't ask for the access code each time

Change-Id: I2bbbef8ed94956b2961baaa6251d92f0d6f29974
Reviewed-on: https://gerrit.instructure.com/67648
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
Tested-by: Jenkins
Product-Review: John Corrigan <jcorrigan@instructure.com>
2015-11-21 18:13:43 +00:00
Keith Garner 3706d2b54b speedgrader remains at top when switching quiz submissions
When you update a score on a quiz question and then click "Update
Scores" the page refreshes and automatically scrolls to the question
again. When you navigate to another submission it will not scroll to
the same question, but remain at the top.

fixes CNVS-19438

test plan:
 - Create a quiz that has enough questions to require scrolling in the
   SpeedGrader
 - Have at least 2 students take the quiz
 - Go into SpeedGrader for the quiz
 - Edit a student's score for a question and click the Update Scores
   button at the bottom.
 - The page should refresh and scroll you to the question you updated.
 - Navigate to any other submission, notice it does not auto-scroll

Change-Id: I454c5976c3c64645b5d85d3bec11aab31a756d3d
Reviewed-on: https://gerrit.instructure.com/67408
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2015-11-20 15:50:40 +00:00
Clay Diffrient 991548b93d Update Files to React 0.13.3
This also fixes the color picker on the calendar page

closes CNVS-24618

Test Plan:
  - Make sure files works as intended
  - There should be no errors warnings in the console related to
    React.
  - NOTE: There will be some really big warnings in Files because of
          React Router.  It will say something about parent context vs
          owner context.  Don't worry about this for now.

Change-Id: I62225f30174044c7114b79adc1e2d7541e60d17e
Reviewed-on: https://gerrit.instructure.com/66020
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-11-19 00:35:45 +00:00
Clay Diffrient bbe7b598b6 Update Shared Components for React 0.13.3
skip-ci

This commit includes upgrading react-modal to v0.5.0

Test Plan:
  - Tests should pass
  - Anywhere react-modal is used (Files, Color Picker, etc.)
    should work as expected
  - There should be no warnings/errors in the console.

Change-Id: I25e585fe992001cb1a225b8f76c688854c072de6
Reviewed-on: https://gerrit.instructure.com/65971
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Tested-by: Clay Diffrient <cdiffrient@instructure.com>
2015-11-19 00:35:09 +00:00
Clay Diffrient 324be48e47 Update React Gradebook to work with React 0.13.3
skip-ci

closes CNVS-24573

Test Plan:
  - Enable Gradebook Performance feature flag
  - Go to gradebook
  - Everything should work as expected
  - There should be no react related errors/warnings in the console

Change-Id: If10c0825e41c8e0e51832fe00730e411c096a707
Reviewed-on: https://gerrit.instructure.com/65818
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Clay Diffrient <cdiffrient@instructure.com>
2015-11-19 00:34:11 +00:00
Clay Diffrient 34b8f3448e Update External tools to work with React 0.13.3
This commit also upgrades React Router to version 0.13.4

skip-ci

closes CNVS-24259

Test Plan:
  - Everything at /accounts/XX/settings/ on the Apps tab should
    work as expected
  - There should be no React related errors/warnings in the console

Change-Id: If36dfb32ad79ad164bd2d122ca72d42d2f3222bf
Reviewed-on: https://gerrit.instructure.com/65810
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Clay Diffrient <cdiffrient@instructure.com>
2015-11-19 00:33:55 +00:00
Clay Diffrient f3ecd70d3a Update Modules to work with React 0.13.3
skip-ci

closes CNVS-24232

Test Plan:
  - Make sure that modules page files publish icons work
  - Make sure that you can add a file to a module without problems
  - Make sure there are no errors/warnings in the console.
    - EXCEPTION: When publishing a file the publish icon, if you set
                 a restricted date, opening the date picker will make
                 a warning about using the selected prop show up. This
                 is caused by a bug in React that prevents us from
                 doing things The Right Way™ at the moment here.

Change-Id: I87d8e987a8d5343d56d1462f2fcf6ce56dc3805f
Reviewed-on: https://gerrit.instructure.com/65691
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Clay Diffrient <cdiffrient@instructure.com>
2015-11-19 00:32:59 +00:00
Clay Diffrient 6cc74d3efc Upgrade React to 0.13.3
skip-ci

closes CNVS-24203

Test Plan:
  - Make sure all tests pass
  - Make sure all react areas in canvas work properly

Change-Id: If989f091ae6e45f0c47081464c739344822d2e4a
Reviewed-on: https://gerrit.instructure.com/59913
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
2015-11-19 00:31:25 +00:00
Zach Wily 5955051e5f send interaction_seconds updates in response headers
Closes CNVS-23363
Closes CNVS-24692

Include interaction_seconds updates to previous requests in
request metadata.

Instead of passing around a page view id, we are now passing around the
URL used to update the current page view. This URL includes a page_view
token, which is a JWT including the page view id, user id, and page view
creation time.

Previously the DOM was used to store the page view id of the current
page and the update URL. The update URL now is sent via js_env. The
DOM node with the page_view_id is left in place in case any 3rd party
javascript is querying it (but nothing in Canvas should be).

This change also logs in metadata the page view creation time. This
is so we can correctly correlate the updated page view with the original
page view (using its id and creation time).

There is also a mechanism to send a new update URL in AJAX requests,
which is preserved with this change.

Some code to send the page view id with every ajaxJSON request was
removed, as it appears completely unused.

Also fixed a bug that was preventing the "store page view info
in cookie on pageunload so the next request can send the update"
code from working. When setting the cookie, it was not specifying
a Path, so the cookie only got set on the current path. Now it
will always be handled on the next request.

test plan:
 * Open Network Inspector to see requests being made
 * Open a page that constitutes a "page view" (like a course's
   discussion page)
 * Note the X-Request-Context-Id response header for the request you
   just made. This is your current page view id.
 * Move your mouse around a whole bunch on the page you're on. This
   generates "interaction time".
 * Eventually, you'll see a new request pop up to /page_views. Look
   at the response headers for X-Canvas-Meta. It should have a field
   r=<guid>|<timestamp>|<seconds>. The `guid` field should match the
   page view id from the original page you loaded, and `seconds`
   should be about how long you've been moving your mouse around.

Change-Id: I7c418c1c690e7c2384fbcae86f21f5081b834a7e
Reviewed-on: https://gerrit.instructure.com/63818
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Zach Wily <zach@instructure.com>
2015-11-18 03:20:51 +00:00
Jeremy Stanley 6dbb9f39a0 sections page: hide X button for non-removeable enrollments
test plan:
 - enroll a student in a course via a SIS import
   (or set the sis_source_id on the enrollment in the console)
 - enroll another student manually
 - as a teacher who is not an account admin, go to
   course settings | section, and click on the section the
   students are enrolled in.
   -> the manually-enrolled student should have an X button
      that appears on hover and removes the student if clicked
   -> the sis-enrolled student should not have that button
 - repeat the previous step as an account admin. both enrollments
   should be removeable

fixes CNVS-24975

Change-Id: Ia20b55054e33fa5c14327ee3536b05e954da4e4f
Reviewed-on: https://gerrit.instructure.com/67116
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-11-16 19:52:56 +00:00
Jacob Fugal 292c63e9e6 localize rendering of the selected datepicker time
fixes CNVS-24942

also makes the datepicker time line align right

test-plan:
 - using a locale with 12hour time but with different strings for am/pm
   - open a datepicker that has a time component
   - enter time values and close
   - the string placed in the input by the datepicker should use the
     localized strings for am/pm
 - using a locale with 24hour time
   - open a datepicker that has a time component
   - enter time values and close
   - the string placed in the input by the datepicker should be in 24hr
     time and not have an am/pm component

Change-Id: Ic3a5726013397c63258a2e025ed635ed6de718c6
Reviewed-on: https://gerrit.instructure.com/65686
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2015-11-13 21:23:36 +00:00
Strand McCutchen a81b46a816 graded icon updates when SpeedGrader's scores are updated
fixes CNVS-23976

This regression was introduced by 71a64419.

test plan:
 0. As a teacher, create a quiz with an essay question.
 1. As a student, take the quiz.
 2. As the teacher, go to the SpeedGrader.
 3. Enter a score for the essay quiz question.
 4. Click the "Update Scores" button.
 5. Verify the orange dot next to the students name becomes
    a green check mark.
 6. Delete the score for the essay quiz question.
 7. Click the "Update Scores" button.
 8. Verify the green check mark next to the students name
    becomes an orange dot.

Change-Id: I2b7b1ce787375f60fb3c8967b520049108bf5edf
Reviewed-on: https://gerrit.instructure.com/67016
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2015-11-13 17:48:30 +00:00
Spencer Olson f2f46bb600 fix loading of grades on grades page
pass in the enrollment ids as strings instead
of numbers. javascript was rounding the global
ids since they were very large numbers, and this
was breaking grade loading. passing them in as
strings ensures they will not get rounded.

closes CNVS-24924

test plan:

1) sign in as a student that is enrolled in
   3 courses: 1 course with MGP disabled, 1
   course with MGP enabled and 'display all
   grading periods totals' (DAGPT) disabled,
   and 1 course with MGP enabled and DAGPT
   enabled. go the the 'grades' page (/grades).
   a) verify there is a grading period dropdown
      next to the totals for courses that have
      MGP enabled. verify there is not a grading
      period dropdown next to the total for the
      course with MGP disabled.
   b) verify that the current grading period is
      selected by default, if one exists. if a
      current grading period does not exist, then:
      - the dropdown next to the total for the
         course with DAGPT disabled should show
         'Select a grading period' and the total
         grade should show as '--'.
      - the dropdown next to the total for the
        course with DAGPT enabled should show
        'All Grading Periods' and the total grade
        should be displayed.
   c) verify clicking a grading period in the
      dropdown changes the total, and shows
      the correct total for that grading period.

2) repeat steps 2a-c, but sign in as an observer that
   is observing at least 3 students in 3 different
   courses(1 course with MGP disabled, 1 with MGP
   enabled and DAGPT disabled, and 1 course with
   MGP enabled + DAGPT enabled).

Note: The 'grades' page (/grades) will _always_
display the total for 'All Grading Periods' when
signed in as a teacher. We are aware of this
and we're working on a solution.

Change-Id: I710f2cae84d3ad5105ec8d9bf49aeacbf3d2e3c4
Reviewed-on: https://gerrit.instructure.com/67046
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2015-11-13 16:17:28 +00:00
Jon Jensen 9bc2dc05bb new account course search page
also lay foundation for new account user search

test plan:
* in development mode, enable the
 "Course and User Search" feature flag
* should be able to view the "Search" tab on the
 sidebar (may need to resave the account to
 clear the sidebar cache)
 (replaces the "Courses" and "Users" tabs)
* searching for courses on the account page
 should work pretty good
 (the people tab is still forthcoming)

closes #CNVS-24750

Change-Id: Id44d1b3c7c36e407339858d2c1657579d1128abc
Reviewed-on: https://gerrit.instructure.com/65268
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-11-12 19:39:16 +00:00
Spencer Miller 39c0669bb1 Prevent window.opener errors from breaking JavaScript
If the window, for whatever reason, is unable to access
the referring window (e.g. due to CORS), a DOMException
would be thrown, preventing all other JS from running on
the page. This just wraps it in a try/catch block so we
don't break all the things when this inevitably happens.

Fixes CNVS-19778

test plan:
- Create course and enroll a student
- Create and publish an assignment with media upload
    submission type
- Masquerade as student
- Put link to assignment on a cross-origin website
    (for best results use a Service Cloud case)
- Follow link to the assignment and click the
    "Submit Assignment" button
- Verify the "Record/Upload Media" button opens
    the "Record/Upload Media Comment" modal dialog

Change-Id: I043f08db318c3a7cf9d39c51da1589dd342d5fe8
Reviewed-on: https://gerrit.instructure.com/65154
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Landon Holmstead <lholmstead@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
2015-11-11 18:49:54 +00:00
Spencer Miller 052ec871fe Adjust wording in changePointsPossibleToMatchRubricDialog
Make wording a little more clear; describe consequences of
leaving the assignment and rubric points different.
Also adjusts width of dialog so the title doesn't wrap.

Fixes CNVS-11210

test plan:
- create an assignment
- add a rubric
- change rubric total points to a value different than
    assignment's total points
- check 'use this rubric for assignment grading'
- update rubric
- verify message makes sense and is clear
- bonus: set assignment total points to 0

Change-Id: I1770fa0e27cb3a01e6486c5d2736a90705cc7bcc
Reviewed-on: https://gerrit.instructure.com/65311
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
2015-11-11 18:49:44 +00:00
Davis McClellan 44e75c1112 make it so regrade options show after updating
Based on a conversation with jsparks we have decided
to put off the fix for "remembering" the regrade option
because of possible regressions.

fixes CNVS-20404

test plan:
- have a quiz with a MC, T/F, or MA question
- have a student submit the quiz
- as a teacher edit one of the answers to a question
- select a regrade option and click 'Update Question'
  (also try navigating away/ refreshing)
- re-edit the question, the new answer should still be selected
- regrade option should still be there

Change-Id: Id370e4d57556501fd08585e2ba15bd3bb71647ec
Reviewed-on: https://gerrit.instructure.com/64940
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-11-11 18:31:42 +00:00
Cameron Matheson 2d22381f01 fix speedgrader sorting
fixes CNVS-9723

Test plan:
  * set up a course in speedgrader with a variety of submission types:
    - several unsubmitted
    - some submitted
    - some graded
    - some re-submitted
  * test the various sort options of speedgrader
  * sorting should be consistent across browsers

Change-Id: I746bbb2b6b2763e622f741efe815ff3247a708f4
Reviewed-on: https://gerrit.instructure.com/66854
Reviewed-by: Cody Poll <cpoll@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-11-11 17:26:45 +00:00
James Williams 14267a7d2c fix problems caused by quiz groups with too few questions
in practice, if we make a question group pick more questions
 from a bank/group than it has available, it duplicates the
 available questions to make up the difference, so we should
 really reflect that in the points_possible

but we're also going to show a warning to avoid this if possible

test plan:
* create a question bank with one question
* create a quiz with a question group linked to the bank, picking
 2 questions (even though there's only one question)

* there should be a warning on the quiz group while editing
 indicating that it is trying to pick from a bank
 that does not have enough questions, but ignore it

* the points possible should be 2 * the question value
 (since it will show the question twice)

closes #CNVS-23164

Change-Id: Ia31a5b71df49f7a5ef242e057ecd2f71113aaab4
Reviewed-on: https://gerrit.instructure.com/65750
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-11-10 20:05:00 +00:00
Michael Nomitch 4546a40e6d calendar respects locale
fixes CNVS-23720

test plan:
  - change your settings to each language
    - check that the calendar changes month/date
      display based on this language
      - time in 24 hours if needed
      - start of week Monday vs Sunday
      - calendar functionality works
  - note Maori and Armenian will be in english
    this is okay for now

Change-Id: I8705a7c146df225b50db9d12293f4a01432a178a
Reviewed-on: https://gerrit.instructure.com/65009
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2015-11-10 00:00:22 +00:00
Bracken Mosbacker f1b0466ec1 add lti post message for scrolling to top of iframe
fixes PLAT-1282 PLAT-1283

If a tool is a single page app and has resized the iframe
it will need to scroll to top when a new page is loaded

Sometimes tools don't want Canvas' navigation because
it is confusing to users to have 2 sets of prev/next
buttons. This allows Canvas' to be hidden in those
cases.

Test Plan:
 * the tool provider example on instructure's github has support for
   this in the extensions branch

 * send a post message of lti.scrollToTop from an LTI app
 * It should scroll to the top of the tool iframe

 * Send a post message lti.showModuleNavigation from an LTI app
 * The sequence footer should show/hide

Change-Id: I807119c3cadcbd04d90e68eeabdfe5872a3fffa4
Reviewed-on: https://gerrit.instructure.com/66439
Tested-by: Jenkins
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2015-11-09 20:09:56 +00:00
Alex Boyd d3ebff04a9 Link to reset bounce counts for communication channels
Fixes CNVS-20747

Test plan:
 - Create a user
 - Add an email address to the user
   - The address doesn't need to be able to actually receive
     messages, so put anything you want in here
 - Make note of the user's id
 - Assuming the user's id is 42, open a rails console and type:
     c = User.find(42).email_channel
     c.bounce_count = 3
     c.save!
 - Log in as the user (actually log in, don't just masquerade)
 - Visit the user's settings page
 - Verify you see the usual warning triangle next to the user's
   email address
 - Verify you don't see the reset icon (just a refresh-like icon,
   two arrows pointing in a circle)
 - Log in as a siteadmin
 - Masquerade as the user
 - Visit the user's settings page
 - Verify you see both the warning triangle and the reset icon
 - Click the reset icon
 - Verify that the reset icon and the warning triangle go away
 - Refresh the page and verify that they're still gone
 - Assuming the user's id is 42, open a rails console and type:
     c = User.find(42).email_channel
     c.bounce_count = 1
     c.save!
 - Log in as a siteadmin
 - Masquerade as the user
 - Visit the user's settings page
 - Verify you see only the reset icon and not the warning
   triangle
 - Click the reset icon
 - Verify that it goes away
 - Refresh the page and verify that it's still gone

Change-Id: Ibd9d2e04555be2ec3eae811fd93f2cba0645d870
Reviewed-on: https://gerrit.instructure.com/55139
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
2015-11-03 00:43:35 +00:00
Ethan Vizitei 7f37f56885 Encourage users to submit an email
refs #CNVS-11466

Users who aren't logged in should submit
an email, otherwise we can't get back to them.
This adds some front-end validation to require
an email address if the user isn't logged in.

If they are, we leave it alone, we can identify
them from their session.

This also removes the 404.html page, I can't find
anywhere where we actually use it (and it is
exactly duplicated in the error_form and such)

Change-Id: I0aaa322aa25f4c3f316cb2ce15573c2ac288035c
Reviewed-on: https://gerrit.instructure.com/63715
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-11-02 22:05:49 +00:00
Ethan Vizitei d7f61d1820 use web pack
closes CNVS-24124

makes working with web pack possible in canvas
instead of require-js.  See doc/working_with_webpack.md
for instructions.

TEST PLAN:
Nothing should change in non-webpack'd behavior
Things should mostly work when you use the
USE_WEBPACK environment variable, but make sure to document
and ticket things that don't

Change-Id: I493a259a609e9e183950bc57aa5876df70108547
Reviewed-on: https://gerrit.instructure.com/64386
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-11-02 16:27:14 +00:00
Strand McCutchen c24f8a7a94 late submission message is displayed when appropriate.
fixes CNVS-9378

Some on-time submissions displayed the message,
"Note: This submission was LATE" while other late
submissions did not.

The error was caused by submissions being given a
value attribute of 1, 2, …, an off-by-one-error
which led to this message never being applied to
the last submission, and always being applied to
the last on-time submission when an assignment
had late submissions.

test plan:

1. Create a quiz with a due date and allow multiple
    attempts.
2. As a student take the quiz before the due date.
3. After the due date as the student, take the quiz again.
4. Check speedgrader and confirm that no message is
   displayed below the submission to view dropdown.
5. Confirm in speedgrader that the last submission displays
   the message "Note: This submission was LATE".

Change-Id: I470c20fc7bb161457faa6ddfb92071eacf83ec66
Reviewed-on: https://gerrit.instructure.com/65607
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Strand McCutchen <smccutchen@instructure.com>
2015-10-30 18:19:42 +00:00
Alex Boyd 5b7559cad7 Show a disclaimer when entering an international number
Fixes CNVS-24109

Test plan:
 - Enable the International SMS feature flag
 - Go to your settings page
 - Click the button to add a new other form of contact
 - Ensure that a disclaimer saying that "international text messaging
   rates may apply" does NOT show up
 - Select a non-U.S. country from the list
 - Ensure that the above disclaimer now shows up
 - Select the U.S. from the country list
 - Ensure that the disclaimer no longer shows up
 - Select a non-U.S. country and ensure that it shows up again
 - Select the "[Select Country]" option
 - Ensur that the disclaimer no longer shows up
 - Disable the International SMS feature flag
 - Go to your settings page, and refresh if necessary
 - Click the button to add a new other form of contact
 - Ensure that the disclaimer does not show up

Change-Id: I04493410be37fe3e1602c71ce1fc0618ed60a36d
Reviewed-on: https://gerrit.instructure.com/65789
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Alex Boyd <aboyd@instructure.com>
2015-10-30 16:04:12 +00:00
Brian Finney 9af39f8757 Tweak calculated answers
Refs CNVS-10866

Decrease formating precision to remove floating point noise

Test plan:
 - Create and take calculated questions with lots of big and small
    numbers with varying significant digits
 - Formating should be better, but any question that could be answered
    before should still be able to be answered now.
 - At least the following
    123456789 * 10^-5
    123456789123456789 * 10^-5
    123456789 * 10^25
    123456789123456789 * 10^25
    123456789123456789123456789123456789 * 10^25
    1 * 10^100
    and the examples in CNVS-10866

Change-Id: I601633740665ad90a9b8e4086a6439ea8457a4ab
Reviewed-on: https://gerrit.instructure.com/63258
Reviewed-by: Davis McClellan <dmcclellan@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-29 23:20:11 +00:00
Simon Williams d076ff934c remove an unused partial
fixes CNVS-24126

test plan:
- search the app and make sure there are no external references to this
  partial

Change-Id: Ief7f62586c54eb66e58846fcdd0de0dab6ddc551
Reviewed-on: https://gerrit.instructure.com/65416
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2015-10-29 13:53:20 +00:00
Clay Diffrient 3ea78381c2 [a11y] Have only one set of buttons for add module dialog
This replaces the fixDialogButtons helper that was causing a second
'hidden' set of buttons to be displayed with styles for form-dialog.

Ideally it would be nice to use react-modal, but the modules page
is sufficiently complex that its a bit difficult to do so.

closes CNVS-22870

Test Plan:
  - Go to the modules page
  - Click the 'Add Module' button
  - Using a JAWS make sure that only one set of buttons
    is read.  This should be the case in all screenreaders though
  - Close the dialog
  - The screenreader form navigation listing should not show the
    buttons as still being there.

Change-Id: I4ef0f782bb393241d1ce4bccd61ce90a0e1ba00f
Reviewed-on: https://gerrit.instructure.com/64805
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-10-29 02:17:40 +00:00
Spencer Olson 802299b2cf feature flag for 'All Grading Periods' totals
Add grading period dropdowns on the 'grades' page,
and add a "Display Totals for 'All Grading Periods'"
feature flag. By default, the feature will be turned
'off'.

When the feature is 'off':
 - Totals will not display in the gradebook
   or the 'student grades' page when the 'All
   Grading Periods' option is selected.
 - The grading period dropdowns on the 'grades'
   page will not have an 'All Grading Periods'
   option.

When the feature is 'on':
 - Totals will display in the gradebook and the
   'student grades' page when the 'All Grading
   Periods' option is selected.
 - The grading period dropdowns on the 'grades'
   page will have an 'All Grading Periods' option.

closes CNVS-23995

test plan:

1) as a teacher, enable the 'multiple grading
   periods' feature (do not enable the 'display
   totals for all grading periods' feature yet).
   a) verify the gradebook does not show totals
    when the 'All Grading Periods' option is
    selected.
   b) verify the 'student grades page'
    (courses/4/grades/9#tab-assignments) does
    not show totals, and the calculation of
    'what-if' grades is disabled when the
    'All Grading Periods' option is selected.
   c) turn on the 'display totals for all
      grading periods' feature. repeat steps
      a & b and verify that the totals now
      show up (and you can calculate what-if
      grades on the student grades page when
      'All Grading Periods is selected')

2) sign in as a student that is enrolled in
   3 courses: 1 course with MGP disabled, 1
   course with MGP enabled and 'display all
   grading periods totals' (DAGPT) disabled,
   and 1 course with MGP enabled and DAGPT
   enabled. go the the 'grades' page (/grades).
   a) verify there is a grading period dropdown
      next to the totals for courses that have
      MGP enabled. verify there is not a grading
      period dropdown next to the total for the
      course with MGP disabled.
   b) verify that the current grading period is
      selected by default, if one exists. if a
      current grading period does not exist, then:
      - the dropdown next to the total for the
         course with DAGPT disabled should show
         'Select a grading period' and the total
         grade should show as '--'.
      - the dropdown next to the total for the
        course with DAGPT enabled should show
        'All Grading Periods' and the total grade
        should be displayed.
   c) verify clicking a grading period in the
      dropdown changes the total, and shows
      the correct total for that grading period.

3) repeat steps 2a-c, but sign in as an observer that
   is observing at least 3 students in 3 different
   courses(1 course with MGP disabled, 1 with MGP
   enabled and DAGPT disabled, and 1 course with
   MGP enabled + DAGPT enabled).

4) verify that the grading period dropdowns that were
   added are accessible.

Note: The 'grades' page (/grades) will _always_
display the total for 'All Grading Periods' when
signed in as a teacher. We are aware of this
existing bug and we're working on a solution.

Change-Id: If501b47aa57121d17d4e6629d1dcdbc8676971a2
Reviewed-on: https://gerrit.instructure.com/65847
Tested-by: Jenkins
Reviewed-by: Strand McCutchen <smccutchen@instructure.com>
Reviewed-by: Dylan Ross <dross@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2015-10-28 21:03:45 +00:00
Simon Williams 1a2f3f85b4 remove raw script tag from eportfolios show page
fixes CNVS-24175

test plan:
- general regression test of editing and viewing an eportfolios page
  with several sections.

Change-Id: I61ccb14dad1286985df3a182b2af3add2f7353b2
Reviewed-on: https://gerrit.instructure.com/65535
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-10-27 19:33:13 +00:00
Jeremy Stanley d76e49f08d fix publishing newly created module items
test plan:
 - create an item such as a wiki page via add-module-item
 - without reloading the modules page, click the publish cloud
   for the item
 - reload the page and confirm that the item is *really*
   published

fixes CNVS-24578

Change-Id: Iec359cf7654b9477377b4617fbfa763db8df3f29
Reviewed-on: https://gerrit.instructure.com/65891
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-10-27 18:37:24 +00:00
Jeremy Stanley 68f2a5952c modules: don't show overdue icon when submission exists
test plan:
 - as a teacher:
   - create an assignment with a due date in the past
     that expects a submission
   - put it in a module
 - as a student:
   - view the modules page and notice the "past due" icon
     next to the assignment's module item
   - submit the assignment
   - return to the modules page
   - the "past due" icon should be gone

fixes CNVS-24207

Change-Id: I1ee23322920b476dc035da433849f9b6bb78b085
Reviewed-on: https://gerrit.instructure.com/65695
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-10-27 15:44:16 +00:00
Simon Williams b43d221dee set publishing_enabled with js_env instead of script tag
fixes CNVS-24128

test plan:
- with users that both can and cannot publish sis grades, visit the
  course settings page.
- the appropriate controls should be present/absent and work correctly.

Change-Id: I45ded2726a64b3a7457e76e67e681e3d3274b000
Reviewed-on: https://gerrit.instructure.com/65454
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-10-26 20:55:41 +00:00
Jonathan Featherstone 1568c75ab7 Fullcalendar Upgrade
fixes CNVS-23816
fixes CNVS-23718
closes CNVS-23721
closes CNVS-23717
refs CNVS-23719
refs CNVS-19514
fixes CNVS-23719

note: feathj, cpalmer, and mnomitch
all worked on this jointly

test plan:
  - general regression of calendar
    - all 4 views
    - with events, assignments, overrides
      and scheduler
    - with personal timezone and course
      timezones different

  CSS plan:
  - stylistic regression of the calendar
  - confirm that orange border around current day should show completely

    hover:
    - Create an event for the calendar
    - Hover over the event, it should be pulling in the custom
    color (it's not working if, on hover, it changes white)

    big cal borders:
    - The current date should have an orange background and now
    is pulling in the border along the title at the top

Change-Id: I92df1271545db7a00fcd9695e018822279ba56d5
Reviewed-on: https://gerrit.instructure.com/65007
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2015-10-26 17:09:14 +00:00
Davis McClellan 67c621eb29 Fix multiple attempts on access code quizzes
fixes CNVS-23643

test plan:
use case 1
- make a quiz with multiple attempts and an access code
- enter the access code, take and submit the quiz
- attempt to take the quiz again
- notice that the access code is requested again
use case 2
- make a quiz with multiple attempts and an access code
- enter the access code, and start the quiz
- navigate away from the quiz
- resume the quiz
- notice that the access code is requested again

Change-Id: Iadc6bbc4d759a1bf74c54cf475dbd1fa79a9835d
Reviewed-on: https://gerrit.instructure.com/64084
Tested-by: Jenkins
Reviewed-by: Brian Finney <bfinney@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-23 20:30:33 +00:00
James Williams 3ebacdfac7 hide sequential order checkbox when first edited
test plan:
* edit a context module with no requirements
* the checkbox for sequential order should not be shown
 until there are requirements

closes #CNVS-24094

Change-Id: Iae993d2f9f23713a33886872bd46ab29b3d0ee61
Reviewed-on: https://gerrit.instructure.com/65293
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-22 16:49:17 +00:00
James Williams 77690bb08f filter module requirement types when first adding
test plan:
* create a module with an item
* edit the module
* click to add a requirement
* without changing the item in the left dropdown,
 check the requirement type dropdown
* it should not show all the types

closes #CNVS-24112

Change-Id: I5c5eabde762ea7424f70d910fed2361235130006
Reviewed-on: https://gerrit.instructure.com/65431
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-22 12:32:28 +00:00
James Williams b3ac7c4fde allow submissions graded through rubrics to be graded anonymously
test plan:
* create an assignment in a course with anonymous grading
* add a rubric to the assignment and mark "use for grading"
* make a student submission
* in speedgrader, fill out the rubric and save
* the grade should be updated
* in the grade change audit log, it should record that
 it was graded anonymously

closes #CNVS-24057

Change-Id: Id7c62459050ff0398caadc75a8d56a7181b5d698
Reviewed-on: https://gerrit.instructure.com/65280
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Jon Willesen <jonw@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-20 18:12:16 +00:00
James Williams 1cbf896cbd improve quiz question explanations for ungraded quizzes
test plan:
* create an ungraded survey quiz
* start to add a new question
* the instructions at the top of the question form for
 each question type should not refer to "correct" answers
 when not applicable
(i.e. for types other than numerical/formula questions)

closes #CNVS-8248

Change-Id: Ifa0111a5aeb700e88221e903e36e48f723423ab6
Reviewed-on: https://gerrit.instructure.com/64987
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-19 16:18:37 +00:00
Derek Bender dc5146e0c5 make submit button finder more strict
fixes CNVS-23348

Change-Id: I5cab25f65c0da41d494cda92e58c5659b4062983
Reviewed-on: https://gerrit.instructure.com/64951
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2015-10-13 16:27:07 +00:00
Davis McClellan 7a373a82b8 fixes creation of fill in the blank question types
fixes CNVS-18312

test plan:
- Create a quiz, edit quiz.
- Add a Fill in Multiple Blanks question with 2 or 3
  blanks/variables in the description and fill out the
  correct answers for each of the blanks and save.
- Add a Fill in the Blank question, fill out possible \
  answers, and save.
- Ensure that question can be created

Change-Id: Id2e1a36e1a3d08c8496ccfb21824acad8a6118d2
Reviewed-on: https://gerrit.instructure.com/64469
Tested-by: Jenkins
Reviewed-by: Brian Finney <bfinney@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-09 19:46:25 +00:00
James Williams 8b0d764cae moderated grading speedgrader refreshing on changes
test plan:
* as a moderator, changes to a student's provisional grades
 or provisional grade selection made after loading speedgrader
 should be loaded when switching students

closes #CNVS-23274 #CNVS-23321

Change-Id: Ife72bfaf8710a0428148978859a85f89a72d5fd9
Reviewed-on: https://gerrit.instructure.com/64818
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-09 16:16:55 +00:00
Brian Finney 28c202db85 Add precision fields to numerical question ui
Adds edit ui for "Answer with Precision" as a "Numerical Answer" subtype.

Precision answers are rounded to a precision of 16 to handle floating
point errors and then truncated to the specified precision for grading
and comparison.

If any of the potential answers to a numerical question is a precision
answer then the student form will accept precision answers. If none of
the possible answers are precision answers then the student form will
continue to round to 4 decimal places.

Refs CNVS-10866

Test plan:
 - Create a new question
 - Select a question type of "Numerical Answer"
 - Select answer type of "Answer with Precision"
 - You should see an answer input field and a precision input field
 - The precision field should default to 10 and accept input between
 1 and 16, these are the limits of javascript floats
 - The answer input should accept numerical inputs with or without an `e`
 exponent and be formatted according to the configured precision
 - The quiz submission form should accept answers with a precision of up
 to 16 in normal or exponential format (#.##e##)

Change-Id: Idc117a61040a43b038272afec9319bada43e5f54
Reviewed-on: https://gerrit.instructure.com/64068
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Tested-by: Jenkins
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-08 22:48:10 +00:00
Brian Finney f3c115b64e Fix ui bug causing all numerical fields to show
During initialization of a numerical answer, the change event was being
fired on an element not yet inserted into the DOM. Thus the event was
not bubbling up to $(document) in order to be caught by the delegated
handler.

Moved the handler function to higher scope so as to be visible when
initializing the answer elements and modified it to accept a jquery
object.

Fixes CNVS-1604

Test plan:
 - Changing numerical answer type should show and hide the related
 fields correctly.
 - When a numerical question is saved, reloaded, and then edited, only
 the relevent numerical answer fields should be displayed for each
 numerical answer type.

Change-Id: Ia104790fe7acfd82e2e1a3934c09715feb6e3787
Reviewed-on: https://gerrit.instructure.com/64067
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Tested-by: Jenkins
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-08 22:48:06 +00:00
Nathan Mills 484c4e663e fix bug where we don't detect mixed content lti launches
fixes PLAT-1241

test-plan:
*install an insecure (http://) tool in a secure (https://) instance of canvas
* attempt to launch the tool
* you should eventually get a message stating that the tool couldn't be launched,
and a button to launch it in a new tab

Change-Id: I4179751c78fcba4746712bed20df8cae5e550c43
Reviewed-on: https://gerrit.instructure.com/64162
Tested-by: Jenkins
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2015-10-08 22:14:35 +00:00
Cameron Sutter 6dc71ac328 don't mark survey answers correct
fixes CNVS-23695

test plan:
- when a student views his results of a survey
  it shouldn't show any arrows on the side
  that say correct/incorrect/partial/etc but it should
  say You answered or Unanswered

Change-Id: I40daec6c21bd0db9a49644e797d34ff13b76d33e
Reviewed-on: https://gerrit.instructure.com/64686
Reviewed-by: Matt Berns <mberns@instructure.com>
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-08 22:07:43 +00:00
James Williams dc6c05bdff don't allow "require sequential progress" with nc-or
test plan:
* edit a module and add some requirements
* the "Students must move through... in sequential order"
 checkbox should not be shown if the radio button
 for "Students must complete one requirement" is selected

closes #CNVS-23692

Change-Id: I37b23c549fa3517a06b8222c28d55a3a48e7f742
Reviewed-on: https://gerrit.instructure.com/64650
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-08 16:26:19 +00:00
Jon Willesen 6148c935a4 remove containment for sortable modules
this allows tall modules to be dragged to the bottom of the list

fixes CNVS-22525

test plan:
 - make a few modules
 - add a few module items to one of the modules to make it
   taller
 - with the tall module open, drag it to the bottom of the
   module list to put it at the bottom

Change-Id: I96047e68a044fd1b48b62a4d45a1787f200cbf1e
Reviewed-on: https://gerrit.instructure.com/64599
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2015-10-07 16:33:22 +00:00
Clay Diffrient 60d3834e9d [a11y] Adds context to module level buttons
Makes it so that screenreaders are given specific module context
i.e., the module name, whenever they navigation to a module
level button

fixes CNVS-22866

Test Plan:
  - Go to the modules page
  - Using a screenreader go to the publish cloud at the module
    level.
  - It should indicate the name of the module, for example:
    "Published. Click to unpublish My Cool Module."
  - Similar things should occur for the Add content button and
    the manage module dropdown.
  - The publish button and cog buttons for items within modules
    should similarly give context.

Change-Id: I1ba3f5e5c09e8186667af38eb19852295d5f01e2
Reviewed-on: https://gerrit.instructure.com/63049
Product-Review: Aaron Cannon <acannon@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
2015-10-06 20:30:45 +00:00
Jon Willesen 8dd8e03623 record anonymous grading in grade change audit log
anonymous grading is currently only possible from speedgrader.
when a grade is changed in speedgrader, it now sends in a
parameter that indicates whether the "hide student names" flag
was on (by any means).

when the grade changes on a submission, the submission also
remembers whether it was graded anonymously. If the grade
changes and the graded anonymously flag was not explicitly set,
the flag is reset to false. This way we don't have to modify
every place that changes a grade to update the anonymous flag.

this commit includes migrations to add anonymous grading to both
the submission record and the cassandra auditing table. The
grade change audit API was augmented to include this information

finally, added the 'Anonymous' column to the grade change audit
log displays admin tool to display the value of the field
fetched from the API.

closes CNVS-21537

test plan:
 - setup your environment for grade change auditing (requires
   cassandra).
 - check "Grade Change Log" API documentation and behavior for
   the new "graded_anonymously" field.
 - check the behavior of the new "Anonymous" column in the
   "Grade Change Activity" account admin tool.

Change-Id: Ief6c0da2a36986acf8639ba2620820813d2b8047
Reviewed-on: https://gerrit.instructure.com/63815
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2015-10-06 16:20:22 +00:00
James Williams 404c92725a moderated grading speedgrader provisional grade selection
test plan:
* as a moderator for a moderated assignment, should be able to
select provisional grades for publishing from speedgrader

closes #CNVS-23264

Change-Id: Ia7e75e30220ef115ff634c16ad6a360efb2a9fe4
Reviewed-on: https://gerrit.instructure.com/64404
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-06 16:17:37 +00:00
Dylan Ross 9dfe5ed917 speegrader checkbox doesn't save while disabled
this commit prevents users from saving the 'eg_hide_student_names'
user setting when anonymous grading is enabled

test plan
  - go to the speedgrader
  - click settings
  - ensure the 'hide student names' checkbox is not checked
  - go to admin feature options
  - turn 'Anonymous Grading' on
  - return to the speedgrader settings modal
  - save
  - return to the admin feature options page
  - disable 'Anonymous Grading'
  - return to the speedgrader settings modal again
  - ensure the 'hide student names' checkbox is not checked

closes CNVS-22577

Change-Id: Ie5f18a9c21b851c2aea46f769737752814f0fa6f
Reviewed-on: https://gerrit.instructure.com/64491
Tested-by: Jenkins
Reviewed-by: Cody Poll <cpoll@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Dylan Ross <dross@instructure.com>
2015-10-06 16:13:09 +00:00
Jennifer Stern e824c568e0 Improve dashboard loading and view toggle UX
fixes CNVS-22052

Test plan:
* As the dashboard card view loads, you should see ghost images of the cards.
* When you toggle to the recent activity view, it should load immediately.
* If you reload the page, the recent activity view should load.
* If you toggle back to the cards view, it should load immediately.
* If you reload the page, the cards view should load.

Note: this change could result in a slight negative performance impact.
I think that it's worth it for the improved UX when switching views, but
it's something we should look at when testing.

Change-Id: Ib83234a3d955e42cbd1133e8d8634f23184277f4
Reviewed-on: https://gerrit.instructure.com/64040
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Tested-by: Jenkins
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2015-10-05 23:34:02 +00:00
Chris Hart 77752b4d13 (NUI) fix spacing around full-width LTI iframes
Fixes: CNVS-22877

Test plan:

1) Test Commons (a full-width LTI iframe)
- Turn on the Use New Styles feature flag and clear
  your cache
- Make sure you have Commons installed, if you don't
  already
- When you load Commons from the primary nav, it
  should now look like this:
  http://screencast.com/t/XsS5yDpH60
- Repeat in the legacy UI, to make sure nothing
  has changed from production

2) Test an LTI tool that loads in a non-full-width
   iframe, to make sure nothing is broken. Roll Call
   is a good choice. Instructions for local
   installation are here:
   https://gollum.instructure.com/Rollcall
   https://gollum.instructure.com/OtherServiceTestAccounts

Change-Id: I7af2eecc2fda155d78433923b21fb61c81442e0b
Reviewed-on: https://gerrit.instructure.com/64056
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2015-10-05 19:13:17 +00:00
Cameron Sutter 8ed3c8bf64 no 'correct answer' for surveys
fixes CNVS-22945

test plan:
- while editing  surveys, none of the answer labels should say 'Correct Answer'

Change-Id: I50a958a87dc5e298c2e6384b4d7d2127daf2b7b7
Reviewed-on: https://gerrit.instructure.com/63540
Tested-by: Jenkins
Reviewed-by: Brian Finney <bfinney@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-05 15:08:17 +00:00
Spencer Olson b57ce34ef6 grading period filtering respects overrides
the grading periods filter in the gradebook and
on the student grades page should now respect
overrides.

closes CNVS-21917
closes CNVS-23235
closes CNVS-22963

test plan:

turn on multiple grading periods and create assignments
with student and section overrides. verify that the
grading periods filtering in the gradebook and on the
student grades page respects the overrides. also verify
that grade cells in the gradebook are 'grayed out' if
the student's override places them in a different grading
period than the currently selected one. finally, verify
that, if a student has multiple overrides, their effective
due date is the most lenient (farthest in the future), and
grading period filtering should be based on that most
lenient date. if a student has an override with no due date,
the submission should be filtered into the 'last' grading
period.

Change-Id: Idd06a0575b155e64a726b29254c2f197d0a83523
Reviewed-on: https://gerrit.instructure.com/63286
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Christi Wruck
2015-10-05 15:01:14 +00:00
Jonathan Featherstone c16e0d6590 Fixed focus issue on assignment add rubric
Previously, clicking the "add rubric" button was opening the rubric
section and setting focus on the title field. Focus is now set on the
"find a rubric" button, which is more intuitive for non visual users.

Test Plan:
  * Navigate to details page of assignment using voiceover / safari
  * Using voiceover, click on the "Add Rubric" button
  * Note that "find a rubric" is now focused

closes CNVS-21404

Change-Id: I19bd5c48f1d2d7fa3eca52c97476367b5165c1fa
Reviewed-on: https://gerrit.instructure.com/63975
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Reviewed-by: Davis McClellan <dmcclellan@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-05 14:57:57 +00:00
Dylan Ross 544fae839b speech recognition icon displays in chrome
the speech recognition icon displays beneath
the add comment text area in speedgrader when
viewing the speedgrader in chrome

closes CNVS-23408

test plan:
  - in chrome, go to speedgrader
  - verify the speech recognition icon displays
    below the add comment text area

  - in safari, go to speedgrader
  - verify the speech recognition icon does not
    display below the add comment text area

Change-Id: I2f3f7147fe8464ad40f3340fd4fd70aeca2f377a
Reviewed-on: https://gerrit.instructure.com/64435
Tested-by: Jenkins
Reviewed-by: Cody Poll <cpoll@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Dylan Ross <dross@instructure.com>
2015-10-02 17:07:59 +00:00
James Williams 34cbc4cd43 moderated grading speedgrader final mark drop-down
test plan:
* create a moderated assignment with student submissions
* add the students to the moderation set

* as a moderator (teacher) go to speedgrader

* should be able to create
 a 2nd mark or a final mark through the drop-down

* should also be able to copy the 1st or 2nd mark
 as a final mark (and should get a warning if there
 already is a final mark)

closes #CNVS-23262

Change-Id: Ie51f378a8665ba78204ca65bb65f4286ada5337d
Reviewed-on: https://gerrit.instructure.com/64105
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-02 15:58:52 +00:00
Jeremy Stanley 857db08135 publish files when publishing module
test plan:
 1. add an unpublished file to an unupblished module
 2. publish the module
 3. the file's module item should appear published
 4. a student should be able to click on the module item
    and get to the actual file, instead of an error message

fixes CNVS-22955

Change-Id: I5c5736afc7e4b984f7aed56df3b0cc278b4bb467
Reviewed-on: https://gerrit.instructure.com/63905
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-09-30 00:09:42 +00:00
Strand McCutchen a600a6d344 keyboard-only student can edit their what-if grade
fixes CNVS-23327

 0. As a student in a course with an assignment…
 1. Navigate to the students grade summary for a course.
 2. Change focus with the keyboard so it is on a grade.
 3. Press return, and verify that you can edit the what-if
    grade.

Change-Id: I84a5077cd3cdc8b256c1b3b409d6a0ffcf4ff2c8
Reviewed-on: https://gerrit.instructure.com/63991
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Nathan Rogowski <nathan@instructure.com>
2015-09-28 22:21:00 +00:00
Davis McClellan 1d303b52df Fixes small number rounding issue formula questions
fixes CNVS-22981

test plan:
- Create a Formula question which uses 1 decimal place
- Use a set of numbers which would generate a two decimal
  answer ending in a 5
- Ensure that number rounds as expected

Change-Id: Id8bcd017795b85b60636bcc0d202b55ad74b3bdf
Reviewed-on: https://gerrit.instructure.com/63706
Tested-by: Jenkins
Reviewed-by: Brian Finney <bfinney@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-09-28 22:14:42 +00:00
Keith Garner fb010d77cc fixing speedgrader student dropdown for accessibility
updated page so ui dropdown is invisible to screenreaders, and
original select menu that the ui is built on is screenreader acessible
so SR users will get the behavior they would expect from a dropdown.

fixes CNVS-15548

test plan:
- go to speedgrader with screenreader on
- navigate to the select menu with keyboard or tab
- small arrow on side of ui menu should turn blue (for keyboard only
  users that can see screen so they know where they are)
- interact with menu, graded/not graded should reflect same data in ui
  menu
- add a grade to a student, select menu should show same update ui
  menu does
- repeat process for removing grade
- resubmit an assignment as a student then return to speedgrader,
  dropdown should reflect this
- use forward and back buttons on speedgrader to scroll through
  students
- name and grade status should be annouced

Change-Id: I5a3d2920595e254c45afefea5756f134dbd6231a
Reviewed-on: https://gerrit.instructure.com/62564
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
Reviewed-by: Dylan Ross <dross@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
2015-09-25 21:52:55 +00:00
James Williams 9d9e91e137 show 2 marks to moderators in speedgrader
test plan:
* create a moderated assignment with some student submissions
* ta's should still only be able to see their own mark

* when there are no marks, teachers should only see their own
* if there are multiple marks, teachers should be able
 to see the marks that other people have made (in a readonly
 state)
* teachers should still be able to edit their own marks
* they should be able to make changes, then switch to the other
 mark and back, and have their changes still reflected in the ui

* provisional grade switching should work with crocodoc annotations

closes #CNVS-23030 #CNVS-23032 #CNVS-23029

Change-Id: I9314afff929aca58d6981dd2b9dc6724265409fb
Reviewed-on: https://gerrit.instructure.com/63698
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-09-25 15:07:30 +00:00
Davis McClellan 10274cede9 Fixed IP validation error box positioning
fixes CNVS-22837

test plan:
- As a teacher, begin creating a new quiz
- Click the checkbox for ip address filtering and enter in
  something that is not a valid IP address
- Click save
- Ensure that error box is placed by the IP filtering input

Change-Id: Icd19907feff346079ab052e1253bef5411bdf705
Reviewed-on: https://gerrit.instructure.com/62537
Tested-by: Jenkins
Reviewed-by: Brian Finney <bfinney@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-09-24 21:52:51 +00:00
Dan Minkevitch aa1a1d5ff3 Throw error message when submitting empty file
fixes CNVS-23389

Test Plan:
* Create an assignment that allows file upload
  submissions
* As a student, submit the assignment with a file
  of 0 bytes attached (e.g. a blank text document)
* An error flash message should display stating that
  files must be greater than 0 bytes

Change-Id: I999b748bcb4460e12a76dde4709a35a890e6b05c
Reviewed-on: https://gerrit.instructure.com/63744
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2015-09-24 15:55:59 +00:00
Simon Williams 5576d41823 support capital letters in password reset email form
fixes CNVS-23338

test plan:
- validate the reset password form, ensure that valid emails are
  accepted and invalid emails are rejected

Change-Id: Ibb84b05a96c61550c71da099a8f72cce9719a2c0
Reviewed-on: https://gerrit.instructure.com/63735
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-09-24 15:31:27 +00:00
Cody Tanner afd4fce104 adds ability to filter quiz statistics by section
closes PFS-2226
Tests:
1. Create a course with two or more sections
2. Create a Quiz with submissions.
3. with student A submit a submission to the quiz in the first section
4. With Student B submit a submittion to the quiz in the second section
5. As a teacher navigate to the quiz statistics section and view the
results
6. By default all submission will show, once you select a section only
that sections results will show.
Change-Id: Ifd32bbfb67068008f008b8323a10b9ea18a67468
Reviewed-on: https://gerrit.instructure.com/58962
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-09-23 23:54:28 +00:00
Simon Williams d9476cfbaa use handlebars for media_comments partial
this file was being loaded directly via html and rendered in the page,
which bypassed the possibility of properly translating the strings in
the file.

fixes CNVS-7053

test plan:
- enable the kaltura plugin (with and without the html5 uploader)
- go to conversations, compose a message, click the media upload button
- content in the dialog should be translated (other than the actual
  "use the camera" warning message)
- spot check other places that use the media upload button (like
  speedgrader comments)

Change-Id: I3d38e923f840567a571b8aa607684b78599f7dbf
Reviewed-on: https://gerrit.instructure.com/62422
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-09-23 19:09:32 +00:00
Clay Diffrient 25edf74d42 Move Moderated Grading to Redux
This is an initial stab at the conversion.  It gets most of the
boilerplate stuff in and working.

It also handles converting over the publish button.

closes CNVS-23313
closes CNVS-23037
closes CNVS-22746

Test Plan:
  - Set up your environment to function with moderated grading stuff
  - Go to a moderated grading assingment as a teacher
  - You should see the list of students that can be moderated
  - Test Plan from CNVS-22746:
    - Activate Moderated Grading feature flag
    - Create an assignment that is moderated
    - Submit a few assignments as students
    - Go to speedgrader on those assignments and give
      an initial grade
    - Go to the assignment page as the teacher and
      click the "Moderate" button
    - Click the "Publish" button
    - A confirmation box should appear
    - Cancelling should do nothing
    - Confirming should then flash a green success flash message
    - The grades should now be published to the gradebook.
  - The publish button should be disabled after doing the previous steps.
  - Refreshing the page should still have the button disabled.

Change-Id: I15f4bc5d71f7bd3120c4c2ba2d4d239e8ad22db7
Reviewed-on: https://gerrit.instructure.com/63547
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-09-22 21:37:08 +00:00
James Williams 3d62ae80a8 turn on and remove nc_or feature flag
closes #CNVS-22745 #CNVS-22790

Change-Id: I7e3287c6e4a55d2f735004b2f58470ec62471e50
Reviewed-on: https://gerrit.instructure.com/62948
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-09-22 12:16:39 +00:00
Rob Orton 2735de883e add maori to canvas
CNVS-23047

test plan
 - change locale to maori
 - canvas should work

Change-Id: I0811b45159f6d85493b61ea5d910d9f6ddd2f680
Reviewed-on: https://gerrit.instructure.com/62875
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2015-09-21 23:05:26 +00:00
James Williams c6c1937b7c check whether provisional grades are needed on student switch
test plan:
* in addition to the test plan for g/63441, it should
 lock provisional graders out if another provisional grader has
 made a mark *after the first one has loaded speedgrader* but before
 they've switched to the student's submission view
 (by going back and forth in speedgrader)

closes #CNVS-23282

Change-Id: Iff45f1424c1b0815bfe30de58d5aa5412d1e5a4f
Reviewed-on: https://gerrit.instructure.com/63515
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-09-21 19:05:09 +00:00
Brad Horrocks a11fdec9f6 Make LTI configurations accept canvas icon class
Support passing a class for an icon for styling goodness.

added support for `canvas_icon_class` allowing use od css classes from canvas
style guide which can make it look better and maintain our styling
standards.

Fixes PLAT-1222

Test Plan:

prereq's
- "LOR External Tools" feature flag enabled
- (notice the lack of lti example tool, you dont need it)

A new commons icon has been added so you should probably run the
following
`bundle exec rake brand_configs:clean canvas:compile_assets`

Add a new LTI tool to the account using [this xml](https://gist.github.com/defektive/dbd182cb04500e236bde)
check placements to make sure they show a fancy new icon instead of a
crappy star. course_home_sub_navigation should show up as the commons icon

placements to look at
:assignment_menu - cog on an assignment
:course_home_sub_navigation - right side of page
:course_settings_sub_navigation
:discussion_topic_menu
:file_menu (no icon)
:global_navigation (no icon)
:module_menu
:quiz_menu
:wiki_page_menu

Change-Id: Ib462e928a5a3811df490f9bf2441b755db2882a9
Reviewed-on: https://gerrit.instructure.com/62492
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2015-09-21 17:59:40 +00:00
Jacob Fugal 7339952ea4 rollback aba0de7 and its effects
until we can update transifex at the same time as we merge the rename.

this reverts commits:

 * f2cbb3e76e
   (Updated zh_Hant translation)

 * 9ab70066fd
   (Updated zh translation)

 * d861ceca74
   (Updated fa-IR translation)

 * aba0de7b96
   (rename some locales)

Change-Id: I130a0a14e366274c86026bbaccad985a24bb4f1f
Reviewed-on: https://gerrit.instructure.com/63496
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2015-09-21 14:51:24 +00:00
James Williams 71a64419a0 lock provisional graders from speedgrader when marks are made
test plan:
* enable moderated grading for a course and assignment
* have some students with submissions
* as a provisional grader (e.g. TA or teacher)
 should not be able to add a provisional mark for a student
 if someone else has already made one

(it should hide the grading sidebar and add a message)

* once students can be selected for moderation, it should
 let graders make one more mark

closes #CNVS-22018

Change-Id: I728380b169fdf40663f8216dc2723d83f5523eb0
Reviewed-on: https://gerrit.instructure.com/63441
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-09-21 14:22:53 +00:00
Clay Diffrient 8e76ab59e1 Adds publish button and header for moderated grading
This also slightly modifies permissions checks in
the show_moderate action to make a little more sense
and be less repetitive.

closes CNVS-22746

Test Plan:
  - Activate Moderated Grading feature flag
  - Create an assignment that is moderated
  - Submit a few assignments as students
  - Go to speedgrader on those assignments and give
    an initial grade
  - Go to the assignment page as the teacher and
    click the "Moderate" button
  - Click the "Publish" button
  - A confirmation box should appear
  - Cancelling should do nothing
  - Confirming should then flash a green success flash message
  - The grades should now be published to the gradebook.

Change-Id: I71861476d9bc11aeb143860c76929b8412fd6552
Reviewed-on: https://gerrit.instructure.com/62339
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-09-18 17:10:18 +00:00
Clay Diffrient 8b95023ffb Add redux-thunk and redux-promise to help with redux development
Change-Id: I096b6a750c5ae265ecbeddb92723abbdab7d8a1d
Reviewed-on: https://gerrit.instructure.com/63457
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-09-18 16:51:33 +00:00
Clay Diffrient 6dbe13d4dc Add redux library
This makes redux available via requireJS build in Canvas.

Test Plan:
  - Nothing really to test at this point, just adding a lib.

Change-Id: Iac6110f5e633fd81f07572a38d5fce344c334504
Reviewed-on: https://gerrit.instructure.com/63452
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-09-18 16:50:10 +00:00
Davis McClellan a6a14926c6 Added warning message to quiz previews
Made it so the "Once you have submitted an answer, you will not
be able to change it later" message appears when trying to preview
a quiz with the ock questions after answering switch ON.

fixes CNVS-22772

test plan:
- On an OQAAT quiz enable Lock Questions after Answering.
- Start the quiz in preview mode as a teacher.
- Observe the "Once you have submitted an answer, you will not
  be able to change it later" message.

Change-Id: I3d4bc55bbfb7d2bec5f31270fe73d128d3b4d939
Reviewed-on: https://gerrit.instructure.com/61992
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-09-18 00:00:24 +00:00
Dylan Ross 55c4224b87 accessibility fixes for grading scheme dialog
closes CNVS-20765

Change-Id: I28f38225f03875ef35e0ba690e0222ffc0fdcb58
Reviewed-on: https://gerrit.instructure.com/63412
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Dylan Ross <dross@instructure.com>
2015-09-17 20:59:24 +00:00
Cody Cutrer aba0de7b96 rename some locales
fixes CNVS-19910
fixes CNVS-23061

 * zh_Hant => zh-Hant (dash according to IETF standard)
 * zh => zh-Hans (it's really simplified Chinese)
 * fa-IR => fa (so that it will apply for _any_ Persian locale,
   not just Iran)

also handle fallbacks for deprecated languages

test plan:
 * _before_ applying this commit, change your language to one of
   the locales being renamed
 * apply the commit, but don't run the migration
 * ensure that your Canvas is still translated, both normal and
   JS translations
 * run the migration
 * you should still be translated, and in your user settings it shows
   the correct language translation

Change-Id: If02793fce1db57856895899804f1389076093d0a
Reviewed-on: https://gerrit.instructure.com/57111
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2015-09-16 21:36:58 +00:00
James Williams ad5bc644c8 move the modules student view "enhancements" out of the erb
test plan:
* the modules page for students should actually work now

* there should be no view caching issues
* only the students' own submissions should be used to
 show progress on the page

* should have useful icons and tooltip information

closes #CNVS-22897

Change-Id: Ic3651f1b587427cfca1a38f0386f70ed46f3bae4
Reviewed-on: https://gerrit.instructure.com/62590
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-09-14 20:43:12 +00:00
Alex Boyd 6039fd0506 Allow entry of international phone numbers
Fixes CNVS-20605

Test plan:
 - Enable the international SMS feature flag
   - You can do this from a console with this, assuming your root
     account's id is 1:
       Account.find(1).enable_feature!(:international_sms)
 - As a test user, pull up your settings page
 - Under "Other Contacts", click "Add Contact Method"
 - Verify that you see two fields, "Country" and "Cell Number"
 - Verify that the country names and country codes presented in the
   "Country" dropdown are as given in the AC of CNVS-20605
 - Click "Reigster SMS" and verify you get a popup saying that
   "Country is required"
 - Select "Belgium (+32)" from the dropdown
 - Verify that no extra fields show up
 - Click "Register SMS" and verify that you get a popup saying
   that "Cell Number is required"
 - Enter "12345", then click "Register SMS"
 - Ensure that a box pops up saying that "We sent a four-character
   confirmation code to +3212345".
 - Close the dialog, then click "Add Contact Method" again
 - This time, select "United States (+1)"
 - Regression test this part of the dialog - it should work as
   it always has
 - Regression test adding email addresses via the "Email" tab as
   well
 - Disable the international SMS feature flag
   - You can do this with:
       Account.find(1).disable_feature!(:international_sms)
 - Regression test both adding email addresses and adding phone
   numbers and verify that they work as they did before, with
   no mention of the ability to select different countries

Change-Id: I83982d1ee1fc3e22dced29fd28a714333e531899
Reviewed-on: https://gerrit.instructure.com/59811
Reviewed-by: Joel Hough <joel@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
2015-09-14 15:46:17 +00:00
Strand McCutchen 675eb53df2 end date datepicker defaults to 11:59 pm
fixes CNVS-19943

Test plan:

0. As your site admin go to `/accounts/1/grading_standards`
1. Create an account grading period selecting a start date
   of April 1st and an end date of April 30th. Do not
   specify a time in either datepicker.
2. Confirm the end time defaults to 11:59 pm
3. Create an assignment that ends on April 30th, the same
   end date as the grading period.
   Confirm that assignment due dates default to 11:59pm
   for the day they were selected.
3. Go to gradebook and select the grading period you created
   in step 1.
4. Confirm that the assignment in step 3 is included.

Change-Id: Ibe13519c2d59c9a347e7be70e79f39109dcc7747
Reviewed-on: https://gerrit.instructure.com/61128
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Tested-by: Jenkins
Product-Review: Josh Simpson <jsimpson@instructure.com>
2015-09-11 23:23:48 +00:00
Jacob Fugal d79f9bc3ae cleanup mathquill braces and slash
fixes CNVS-11615

* use \lbrace and \rbrace instead of adhoc \opencurlybrace and
  \closecurlybrace for delimiter buttons in basic view (they don't
  render right outside of the editor)

* use \lbrace and \rbrace instead of \{ and \} for delimiter buttons in
  advanced view (both work, but can't use \{ and \} for basic view
  buttons due to mathquill implementation, so be consistent)

* use \slash instead of '\unicode{47}' for the slash delimiter button in
  the advanced editor

test-plan:

 [ editing consistency ]

 * using mathquill editor button in tinymce
   - create an equation with braces by just typing { and } in basic view
   - create an equation with braces using the delimiter toolbar buttons
     in basic view
   - create an equation with braces using the delimiter toolbar buttons
     in advanced view
   - create an equation with a \slash using the delimiter toolbar button
     in basic view
   - create an equation with a \slash using the delimiter toolbar button
     in advanced view
 * in all cases, the delimiters should show up in the image
   representation of the equation, both in the tinymce editor and in the
   view after saving
 * in all cases, the delimiters should be present in the mathml
   representation of the equation

 (note: just typing { and } in basic view will produce \left\{ instead
 of \lbrace; this inconsistency is unavoidable due to mathquill.js, but
 the two are functionally equivalent)

 [ tooltip consistency ]

 * using mathquill editor button in tinymce
   - the tooltip for the brace delimiter toolbar buttons in basic view
     should say \lbrace and \rbrace, not \opencurlybrace and
     \closecurlybrace
   - the tooltip for the slash delimiter toolbar button in basic view
     should still say \slash
   - the tooltip *and* aria label for the brace delimiter toolbar
     buttons in advanced view should say \lbrace and \rbrace
   - the tooltip *and* aria label for the slash delimiter toolbar button
     in advanced view should say \slash, not \unicode{47}

 (note: no aria label in basic view; known existing issue due to
 mathquill.js, not fixed by this commit)

Change-Id: Iff5a955d066bae7bb38d0f2b46d87030a5e4ac7f
Reviewed-on: https://gerrit.instructure.com/62777
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2015-09-11 22:04:39 +00:00
Dylan Ross, Cody Poll, and Spencer Olson b9534edd64 merge react-gradebook and put behind feature flag
merge the dev/react-gradebook dev branch into
master, and put it behind a feature flag.

closes CNVS-23056

test plan:

go to account settings, and verify the
gradebook performance feature is turned
off. verify no bugs have been introduced
on the current, non-react-gradebook.

Change-Id: Ia1723d14df8bb77f91ffd832b446b0df842ac56e
Reviewed-on: https://gerrit.instructure.com/62978
Tested-by: Jenkins
Reviewed-by: Dylan Ross <dross@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2015-09-11 16:00:35 +00:00
Stephen Jensen 6ffc144f17 Login preview capability from theme editor
Closes: CNVS-21895

This commit allows a user to preview changes
made to the login screen from within Theme
Editor as can be seen here
http://www.screencast.com/t/RGzK7dvNuTr

Test Plan:
- In the NUI, open Theme Editor

- The preview page should appear similar to
  this http://www.screencast.com/t/isstjV9eC

- Selecting 'Login Screen' from the left
  side navigation should cause the screen
  to scroll down to the login preview.

- With the 'Login Screen' option selected,
  selecting any other options should scroll
  the screen back to the top of the Theme
  Editor preview page

- As a user updates different values, the
  Login preview should update to reflect
  those changes.

  From within the login preview:
  - The user can interact with the form text
    fields and input dummy values
    http://www.screencast.com/t/nlJx4ajq3AR0

  - Pressing the 'Log In' button should NOT
    log the user into Canvas from the preview
    iframe. The button can be clicked, but
    the form should not be submitted

  - Selecting the 'Forgot Password' link
    should allow the user to preview the
    password request page.

  - The user can interact with the text
    field on the Forgot Password login
    page. http://www.screencast.com/t/M6HuDrPYv

  - The 'Request Password' button can be
    clicked, but it should not be functional
    and the form should not be submitted.

    Note: the 'Request Password' form can be
    submitted by hitting the ENTER key. This is
    a known issue and is acceptable as it is an
    edge case.

Change-Id: I2314db188c9ce561c21c745455ad17c61697968b
Reviewed-on: https://gerrit.instructure.com/61890
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
2015-09-11 14:29:47 +00:00
Michael Nomitch 89e455b521 account settings to allow branding on subaccounts
refs CNVS-21426

test plan:
  - make an account (parent) with a child and
    a grand child
  - on the parent go to settings and
    enable subaccount branding
    (check "Let sub-accounts customize themes
    and add additional includes")
  - go to the grand childs account and they
    are able to open the theme editor
    - make a theme
    - it works
  - disable subaccount branding on the parent
    - both the child and grandchild cannot open
      the theme editor and lose their specific
      custom css (they have the root css tho)
  - turning it from the parent makes it all work again

Change-Id: I0b4c043de891c9201a4f58b867c3a9430b9c6b75
Reviewed-on: https://gerrit.instructure.com/61603
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2015-09-09 23:02:02 +00:00
Chris Hart 25a739b96f OAuth and Confirmation Box re-style
closes: CNVS-20724

This commit brings the new login styles to Canvas'
many login confirmation screens.

QA: Please note that this commit does not touch the
User Terms page or the OAuth2 request permissions
page. Those will be addressed in subsequent tickets.

Test Plan:

There are a lot of pages to this, and Chart has
documented the things that we know and are aware
of that these changes touch here:

https://docs.google.com/document/d/1csN1YJOm9zcl-bzUaA5yT3deUWlENleTyYuN8_VGhFE/

- See document
- Go through the document, and make sure all the
  pages work as advertised :)

Change-Id: I2b9d85643a01e436613e22761a71286b3bcc07a0
Reviewed-on: https://gerrit.instructure.com/61561
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
Tested-by: Jenkins
QA-Review: Myller de Araujo <myller@instructure.com>
2015-09-09 13:44:00 +00:00
Colleen Palmer 630accfea3 Change login logo to pull in with image tag
closes: CNVS-22954

Notes for front-end devs:
- Created a partial for the logos that get pulled through the login header
- Branding variable is now pulling in as an image path in an html image tag
vs a background-image path in css
- SVG added back as a file option
- Change Canvas logo back to svg (no longer png)

Test Plan:
- With new UI on, go to Theme Editor and upload a logo to the Login screen.
You will have to apply the changes to your theme in order to see it.
- Go to login screen and make sure logo appears.

Change-Id: I9e71ba53cc8607377e60ea61ecf266fdb767b743
Reviewed-on: https://gerrit.instructure.com/62487
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
Tested-by: Jenkins
QA-Review: Myller de Araujo <myller@instructure.com>
2015-09-08 14:54:06 +00:00
Colleen Palmer 054938d2f4 Add Login to Theme Editor
This adds the login branding to our Theme Editor. You can
now customize the Login screen!

closes: CNVS-19361
closes: CNVS-22446

Test Plan:
- Turn on New UI
- Go to Theme Editor (Account > Settings > Open Theme Editor)
- Go to Login Screen
- Edit all the things!
- Apply the styles
- Logout > Go to login screen

Here is a layout of what can be customized:
http://cl.ly/image/1m043S0x0e1w

Note:

- Currently we don't have a good way of previewing applying the styles. You
need to apply the styles fully in order to preview it.
There is another ticket to address this issue.

- This does not (and should not) affect Multi-Auth or Sign up screens. These
should still remain the same white/light color scheme.

- This also sets the default background image on login to be nothing
which fixes CNVS-22446

- We've taken out the ability to use svg for the login logo. There are some
complexities with loading these in as a background and properly applying the
right sizes and will be tackled in a future ticket

Change-Id: I1185cbdf41ffab082a7cf1d51c1e0c403dbb8188
Reviewed-on: https://gerrit.instructure.com/58479
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
2015-09-01 21:20:41 +00:00
Davis McClellan 717c2dab31 Added recompute flag check to change the example value so that the
recompute button could work.

fixes CNVS-22750

test plan:
- Create a quiz and add a formula question to the quiz.
- Specifying a question text.
- Give max and min values (should create first example value)
- Click the 'Recalculate' button (should give new example value)

Change-Id: I6f152cf11fff1626bd86002c7afe9ecfb9783b63
Reviewed-on: https://gerrit.instructure.com/61852
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-09-01 16:28:54 +00:00
Ryan Shaw 1819ebc395 fix css & js on 404.html page
fixes: CNVS-22835

this is just a quick fix so it works like it used
to.  We really should re-do that entire page so
it does not fragilely depend on css and js from
the rails app & load it in a way that is different
from everything else.  We'll do that as a separate
ticket.

Change-Id: I362b66f968015520d9b44e787d84021fa258218b
Reviewed-on: https://gerrit.instructure.com/62092
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2015-08-30 01:11:53 +00:00
Sterling Cobb e946fe2b57 add axios to canavs
Change-Id: I85c024371bda818c3daaefd7ad8ed3d7dd4a5a2d
Reviewed-on: https://gerrit.instructure.com/62009
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Sterling Cobb <sterling@instructure.com>
2015-08-28 16:26:00 +00:00
Clay Diffrient 530780436f Converts PublishCloud to JSX
refs CNVS-22335

Test Plan:
  - Make sure you can publish/unpublish files on the files
    page and the modules page

Change-Id: Ib8d1e38fa0bb5198ef359bfbebdd55546b820913
Reviewed-on: https://gerrit.instructure.com/61572
Tested-by: Jenkins
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Charles Kimball <ckimball@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-08-27 21:48:42 +00:00
Colleen Palmer f1f4c9663a Bring back elementpath for tinyMCE, but hide in UI
Kenneth tools relies on this path being on the page in order for their stuff
to work. This brings back the html elementpath below tinymce, but hides it
using css from the UI so it isn't visible.

closes: CNVS-22759

Test Plan:
- Open up a view that had TinyMCE
- You should not see any html elementpath below the editor

Example with path: http://cl.ly/image/1O3u3J3j361w
Example without path: http://cl.ly/image/050n0Q1B1P2g

Change-Id: I93e7fa65c1d05a105c7e80e7b65ba4e4176fec4e
Reviewed-on: https://gerrit.instructure.com/61956
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Stephen Jensen <sejensen@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2015-08-27 21:27:06 +00:00