Commit Graph

480 Commits

Author SHA1 Message Date
Felix Milea-Ciobanu dec41b2fdc implement alert-based error handling
fixes MC-164

test plan:
- kind of hard to test because it relies on things in the backend
  blowing up..
- one way might be to open up the blueprint sidebar, kill the rails
  server, and click the sync button
- note that an alert appears at the top of the screen with a proper
  error message

Change-Id: I7a7debfe2252217bc73e79d4ae79b370900553c4
Reviewed-on: https://gerrit.instructure.com/109888
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
QA-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2017-05-03 20:19:18 +00:00
Jeremy Neander 1c489cc7f3 create react foundation for gradebook grid assignment cells
closes CNVS-36301

test plan:
* basic regression checks on Gradezilla grid cells

Change-Id: I45d67613ad40e84eeb85a3f72ef2e4664c944230
Reviewed-on: https://gerrit.instructure.com/109651
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-05-02 20:40:18 +00:00
Shahbaz Javeed 5fe4539bbd persist student name display prefs and sorting by any column
closes CNVS-36430

test plan:
* Create two courses with two students and two assignments each
* Go to Gradezilla for Course 1
* From the Student Name column, change the "Sort by" value so the
  rows are sorted in a new way
* Reload the page and observe the rows continue to remain sorted
  the way they were before the reload
* Repeat with the "Display as" and "Secondary info" menus in
  the Student Name column
* Repeat with sorting on any of the Assignment, Assignment Group
  or Total Grade columns

* Go to Gradezilla for Course 2
* Verify the settings for Course 1 do not apply here
* Change any of the above settings for Course 2 and verify they
  stick after a reload
* Verify Course 1 settings haven't been changed as a result

* Create a third course, Course 3, with at least two sections
  and at least one student in each section.
* Go to Gradezilla and ensure the display is for "All Sections"
* Change the sort order of the Student column to "None" and
  verify it remains "None" after a reload

Change-Id: I4d2cf016453d2fb0f774629e5bc848fb452d4032
Reviewed-on: https://gerrit.instructure.com/109412
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Christi Wruck
2017-05-01 22:22:17 +00:00
Sheldon Leibole d0aafbf363 move publish grades to sis from settings cog to actions menu
closes CNVS-36456

Test Plan

1. Enable Grade Export plugin.
2. As a teacher in a course with grades to export,
   navigate to Gradezilla.
3. Click the "Actions" menu.
  a. Verify "Publish grades to SIS" is a menu item.
  b. Click "Publish grades to SIS" menu item.
  c. Verify that you are taken to the course
     "Grade Publishing" tab.
4. Navigate back to Gradezilla
5. Click the settings cog button.
  a. Verify that "Publish grades to SIS" is no
     longer an option.
6. Verify that the "Publish grades to SIS" Actions menu
   item is keyboard and VO accessible.

Change-Id: I8433a59406756c892dcbce7b77d9eda61daafa47
Reviewed-on: https://gerrit.instructure.com/109400
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Pert Eilers <peilers@instructure.com>
2017-05-01 16:36:13 +00:00
Landon Wilkins c6beee4c5f da licença part 44
add consistent license headers to all source files

Change-Id: I621e5e994129722ebeedb6b1cc3e75fa80ded63f
Reviewed-on: https://gerrit.instructure.com/110147
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-28 22:48:20 +00:00
Colleen Palmer 79d4e804f6 Revert to old masquerade
closes: CNVS-36564

We need to implement some better ux and more info in the new
masquerade workflow. To start we're reverting back to the old
masquerade while we sort through and work on those new features.

Original commit: https://gerrit.instructure.com/#/c/108292/16

Test Plan - Make sure all of these match look/feel of
what's on prod:

- Navigate to the following places where masquerading
  occurs
  * Courses/People (Selecting 'Masquerade' through Student
  	Context Tray)
  * Courses/People (Selecting User Details from the drop
  	down menu and selecting 'Masquerade')
  * Admin/Users (Select the user then select 'Masquerade')
  * Groups/People (Select the user, then select 'User Account
  	Details' then 'Masquerade')
  * Any other obscure locations where you can masquerade
- In each above location, selecting 'Masquerade' will open
  a modal with a panda/mask animation
- Within the modal, selecting 'Masquerade' should cause
  a loading spinner to appear briefly. Then you should
  be taken to the student masquerade view which should
  behave as it did before.

Change-Id: Iedecbc7967ae41eceb9375b3c5b1e35787639c09
Reviewed-on: https://gerrit.instructure.com/110070
Tested-by: Jenkins
Reviewed-by: Stephen Jensen <sejensen@instructure.com>
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
2017-04-28 16:25:04 +00:00
Brian Park 2f74402339 rewire gradezilla sis push/sync to action menu
closes: CNVS-33683

Test Plan:
1. Navigate to gradezilla as a teacher and open action menu
  - Observe LTI items appear when conditions are met
    * current user has permission to publish grades
    * LTI with the :post_grades extension is installed
  - Observe Plugin item appears when conditions are met
    * current user has permission to publish grades
    * feature flag is enabled
    * course has a sis id
    * there is at least one assignment grade to post
      - the assignment has sis posting enabled
      - the assignment has at least one graded submission
  - Observe Plugin item has label 'Sync to SIS'
    * label reads 'Sync to {sis_name}' when sis handle is set
  - Observe old button/menu placements are now gone
2. Select the new menu items
  - Observe the old behavior for that functionality is invoked
  - Observe that the expected element is focused
     - on open
     - on close

Change-Id: I442ae2fcd1e488908c354993a801398e1618fb60
Reviewed-on: https://gerrit.instructure.com/107077
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Christi Wruck
2017-04-27 21:10:41 +00:00
Felix Milea-Ciobanu 25f97d5620 split associations done + save states
fixes MC-163

test plan:
- nagivate to the home page of a blueprint course
- open the blueprint side bar and click on the associations link
- note that there is a "Done" button in the bottom right
- note that clicking the button closes the associations window and
  has no other side effects
- reopen the associations window and make changes to the associations
  (add or remove associations)
- note that the "done" button disappears and is replaced by "cancel"
  and "save" buttons
- note that "save" button works as expected and after it saves
  successfully the buttons return to "done"
- note that if you hit "cancel" and re-open the associations window
  it returns to the "done" button

Change-Id: Ie71fdd2e3678b10574d0c2e2c1310505f93c996c
Reviewed-on: https://gerrit.instructure.com/109388
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2017-04-25 20:31:21 +00:00
Clay Diffrient 3d4344a340 Make dashboard handle planner toggling
closes FALCOR-206

Test Plan:
  - Go to the dashboard
  - The dashboard options menu should function as before
  - Enable student planner feature flag
  - Back on the dashboard, you should now see:
      - Card View
      - List View
      - Recent Activity
  - Going to any of those should change the dashboard to the
    appropriate view
  - Selection should be persisted between refreshes
  - Turn off the feature flag
  - Things should still work properly

Change-Id: I6c1dd82eadccb008f19d7dbb40751419cc754d84
Reviewed-on: https://gerrit.instructure.com/109278
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Christi Wruck
2017-04-25 19:14:03 +00:00
Shahbaz Javeed 599df647fe view options menu now allows rearranging assignment columns
columns can be rearranged by name, due date or points

closes CNVS-36381

test plan:
* Create a course with at least two assignments and two students
  with the following criteria:
  - Assignments should have different names
  - Assignments should have different points possible
  - Assignments should have different due dates
* Open Gradezilla

* From the View menu, choose the first option in the "Arrange By"
  options group: (Assignment Name - A-Z).  This option should now
  get a checkmark against it.
* Reorder the columns by dragging them around
* Open the View menu again and notice the checkmark is gone from
  the "Assignment Name - A-Z" option.
* Reload Gradezilla and notice none of the "Arrange By" options
  are checked because the Gradebook is using a custom column
  order and not any of the pre-defined ones listed there.

* From the View menu, choose the first option in the "Arrange By"
  options group: (Assignment Name - A-Z)
* Verify that the assignment columns are sorted in alphabetical
  order.
* Open the View menu and verify there is a check mark next to the
  "Assignment Name - A-Z" option
* Reload the page and verify the columns' sort order persists

* Repeat the above with all the options in the "Arrange By"
  options group and verify the ordering of the assignment columns
  matches expectations.

Change-Id: I04d8e7b11e6381939eb2dd9472707dc3f0c9b1be
Reviewed-on: https://gerrit.instructure.com/108954
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Christi Wruck
2017-04-25 14:43:35 +00:00
Brian Park ea01fd3e3f use sis_name for student secondary info label when set
closes: CNVS-36142

Test Plan:
1. Navigate to root account settings
  - In section "SIS Integration Settings", give a value
    to the "SIS friendly name" field and save
2. Navigate to gradezilla and open student column
   header menu
  - Observe that the "SIS ID" menu item label now reads
    what was set in step 1.

Change-Id: Ic503ebf3de774c84e741b748458d024882a28783
Reviewed-on: https://gerrit.instructure.com/108947
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Christi Wruck
2017-04-22 01:03:44 +00:00
Stephen Jensen b384bdc98c New Masquerade Modal implementation
Closes: CNVS-36403

Test Plan:
- Navigate to the following places where masquerading
  occurs
  * Courses/People (Selecting 'Act as User' through Student
  	Context Tray)
  * Courses/People (Selecting User Details from the drop
  	down menu and selecting 'Act as User')
  * Admin/Users (Select the user then select 'Act as User')
  * Groups/People (Select the user, then select 'User Account
  	Details' then 'Act as User')
  * Any other obscure locations where you can masquerade
- In each above location, selecting 'Act as User' will open
  a modal with a panda/mask animation
- Within the modal, selecting 'Act as User' should cause
  a loading spinner to appear briefly. Then you should
  be taken to the student masquerade view which should
  behave as it did before.

Change-Id: Ib5c47b65dc30041a5c6cf8a5d99b131cea997a4e
Reviewed-on: https://gerrit.instructure.com/108292
Tested-by: Jenkins
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Reviewed-by: Pam Hiett <phiett@instructure.com>
Product-Review: Kyle Follett <kfollett@instructure.com>
2017-04-21 21:02:00 +00:00
Derek Bender b205368be4 follow up copyright headers and cleanup
No change in functionality should be present, this work was separated
out of ac9666a.

refs: CNVS-31606

test plan:
 - specs pass

Change-Id: I05787067c6596f1225f3c2196ad5807be14c8a95
Reviewed-on: https://gerrit.instructure.com/108465
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
2017-04-21 19:03:48 +00:00
Brian Park e4ddead63d fix i18n grade parsing and formatting
fixes: CNVS-35682

Test Plan:
1. Navigate to gradezilla
2. Edit some numeric grades (point/percentage)
  - Observe value is displayed with i18n in view mode
  - Observe value is displayed with i18n in edit mode
  - Observe correct value is displayed after editing
3. Switch to different locale and repeat #2
4. Repeat #2 with non-numeric grades
  - Observe non-numeric grades were not broken
5. As a student, go to student grades page
6. Enter a 'What-If' score for an assignment
  - Observe numbers are parsed correctly for locale
  - Observe numbers are displayed correctly for locale
7. Revert 'What-If' score
  - Observe that the original value is correctly restored

Change-Id: I6588849485e1241bcd1250d4a7d413b8d7a2606b
Reviewed-on: https://gerrit.instructure.com/106809
Tested-by: Jenkins
Reviewed-by: Sheldon Leibole <sheldon@siimpl.io>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-04-21 14:06:44 +00:00
Felix Milea-Ciobanu 54a5f75d71 sync button functionality
fixes MC-158

test plan:
- navigate to the course home of a blueprint course
- open the blueprint course sidebar
- click the sync button
- note that the sync button is replaced by a progress indicator and
  some text describing the syncing
- note that if you refresh the page in the middle of the sync and open
  the blueprint sidebar again, it still shows the progress indicator
  (this one might be tricky to test because the sync happens really
  fast sometimes)

Change-Id: I78cea6fd2c1ecb50e1c3c18281dfbacd83459893
Reviewed-on: https://gerrit.instructure.com/109028
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Kendall Chadwick <kchadwick@instructure.com>
2017-04-20 20:06:47 +00:00
Stephen Jensen 5351419f02 Allow user to take off “colorized” background on dashboard cards
Closes: CNVS-33354

Test Plan:
- Make sure you have
	- the course images feature turned on
	- multiple courses some with images, some not

- On the dashboard, click on the cog in the top
  right corner of the screen
- When 'Recent Activity' is checked/selected, the
  dropdown menu should only have two options
  	- Recent Activity, Course Cards
- When 'Course Cards' is checked/selected the
  dropdown menu should have three options
  	-Recent Activity, Course Cards, and Color Overlay
- Selecting the Color Overlay option should toggle
  the semi-transparent color overlays on the course
  cards that have images
- Also, when the color overlay is removed, there
  should now be a solid circle of color behind
  the icon button in the card's upper right
- The aesthetic should be in line with these
  screens, except the current compose icon will be
  replaced by the three circle icon in a separate
  commit
https://instructure.invisionapp.com/share/V57TR6CSU#/
screens/210837030

Change-Id: I2b3cb09479af937011c37342eec1883418720099
Reviewed-on: https://gerrit.instructure.com/99381
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2017-04-20 16:12:25 +00:00
Michael Brewer-Davis c5a66aa4ad mastery path breakdown a11y improvements
- remove redundant text
 - improve focus
 - hide sidebar from screenreaders on hide

closes CNVS-35365, CNVS-35369

Test plan:
- verify that sidebars are not keyboard focusable
  or screen-reader readable when not shown
  (before showing/after closing)
- verify that focus is changed correctly
  - on sidebar open, to close button
  - on sidebar close, to button that was clicked
    to launch sidebar (i.e., one of the "3 of 7
    students" type buttons
- verify that "Send Message" and "View submission" links
  in student details do not have redundant title/mouseover
  text

Change-Id: I2fd4c59405647dfb5611b3bc6652b679e21ea041
Reviewed-on: https://gerrit.instructure.com/106350
Reviewed-by: Matt Berns <mberns@instructure.com>
Tested-by: Jenkins
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2017-04-19 21:44:48 +00:00
Matt Taylor b9c68e1ffe show grading period weights on student grades page
When viewing a student's grade summary in a course with weighted
grading periods, and when all grading periods are selected for
viewing, show weights of the grading periods instead of assignment
groups weights.

fixes CNVS-36114

Test Plan:
  Create courses with each of the configurations A-F.  For each
  course, test the views listed below it.  The "grade summary"
  refers to grades for a student who has completed assignments
  in at least two grading periods.  Expectations for the tests
  are indicated with one or more of these codes:
     (G) assignment group rows in grade summary
     (P) grading period rows in grade summary
     (T) total in grade summary
     (g) assignment group rows in sidebar
     (p) grading period rows in sidebar
     (t) total in sidebar
     (n) 'assignments are not weighted' in sidebar
  Course Configurations:
  A. Unweighted assignment groups, No grading periods
     1. Syllabus page (n)
     2. Grade summary (n)
  B. Weighted assignment groups, No grading periods
     1. Syllabus page (gt)
     2. Grade summary (GTgt)
  C. Unweighted assignment groups, Unweighted grading periods
     Current date is within a specific grading period
     1. Syllabus page (n)
     2. Grade summary, default view (GTn)
        the default view is the specific grading period
     3. Grade summary, all grading periods view (GTn)
  D. Weighted assignment groups, Unweighted grading periods
     Current date is not within any grading period
     1. Syllabus page (gt)
     2. Grade summary, default view (GTgt)
        the default view is all grading periods
     3. Grade summary, specific grading period view (GTgt)
  E. Unweighted assignment groups, Weighted grading periods
     Current date is within a specific grading period
     1. Syllabus page (p)
     2. Grade summary, default view (GTn)
        the default view is the specific grading period
     3. Grade summary, all grading periods view (PTp)
  F. Weighted assignment groups, Weighted grading periods
     Current date is not within any grading period
     1. Syllabus page (p)
     2. Grade summary, default view (PTp)
        the default view is all grading periods
     3. Grade summary, specific grading period view (GTgt)

Change-Id: I2e46039dd50d38b29b1ba0305644c4ab75ade57c
Reviewed-on: https://gerrit.instructure.com/107977
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2017-04-17 23:08:29 +00:00
Jennifer Stern 930745fe7e Bump instructure-icons and instructure-ui
closes: CNVS-35498, CNVS-36371

- New icon
- Better SVG support
- PopoverMenu bug fixes

Test Plan:
- Make sure icons show up
- Make sure icon-external-link works (you can do this by
just changing a class name on any icon in inspector)
- Regression test areas that use instructure-ui

Change-Id: Ib43d0698571f8e22a2977cde5e9bbdfc1e6acf40
Reviewed-on: https://gerrit.instructure.com/108745
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Pam Hiett <phiett@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki <dsasaki@instructure.com>
2017-04-17 20:39:38 +00:00
Derek Bender ac9666a362 add unpublished assignments to gradezilla
fixes: CNVS-31606

test plan:
 - Given gradezilla enabled
 - Given at least one unpublished assignment

 - When on the gradebook for the first time
 - Then the unpublished assignment column cells are shown
   grayed out and grades in cells are hidden

 - When the View menu has been opened
 - Then the "Unpublished Assignments" menu item is selected

 - When deselecting the "Unpublished Assignments" menu item
 - Then the unpublished assignment is hidden without a page load

 - When reloading the gradebook
 - Then the unpublished assignment is still hidden
 - Then the menu item for "Unpublished Assignments" is still
   not selected

 - When selecting the "Unpublished Assignments" menu item and
   reloading the gradebook
 - Then the unpublished assignment is still present
 - Then the menu item for "Unpublished Assignments" is still
   selected

Change-Id: Ie3a12b5411a8022b8119a6d7afbada767b51cdfa
Reviewed-on: https://gerrit.instructure.com/107013
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Christi Wruck
2017-04-17 16:10:46 +00:00
Shahbaz Javeed e8af60fdd8 total grade column can now be moved to the front or end
refs CNVS-34243

test plan:
* Create a course with 2 assignment groups with 1 assignment each
  and 2 students
* Go to Gradezilla

* Open the Total column's options.  You should see
  a menu item that says "Move to Front"
* Click on this and it should move the Total column
  to the front of the table next to Student Name.
* Verify that the Total column is now frozen and can only be
  moved within the frozen columns
* Verify that any other columns you might have moved around
  stay in their position even as the total grade column
  moves
* Open the Total column's options again and notice
  the menu item that says "Move to End"
* Clicking this should take the column to the end
  of the table
* Verify that the Total column is now freely movable as
  before
* Verify that any other columns you might have moved around
  stay in their position even as the total grade column
  moves
* Manually drag the Total column to the middle of
  the table and notice that now both "Move to Front"
  and "Move to End" are available in the options
  and they both work as described above

Change-Id: I1a1fbca6c593d8d576ca57bd7ac6968e114a7cc1
Reviewed-on: https://gerrit.instructure.com/108181
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Keith T. Garner <kgarner@instructure.com>
Product-Review: Christi Wruck
2017-04-14 21:46:51 +00:00
Spencer Olson e55d439a09 add notes option to view menu
Adds the 'Notes' option to the 'View' menu in Gradezilla.
Removes that option from the Gradebook Settings cog.

closes CNVS-31605

Test Plan 1: Updating Teacher Notes
1. Open Gradezilla.
2. Verify the 'View' menu has a 'Notes' option.
3. Verify the Gradebook Settings cog does not have a 'Show Notes'/
   'Hides Notes' option.
4. Click the 'Notes' option. Verify in the brief moment that the
   notes are being fetched, the 'Notes' option is disabled.
5. Verify the notes column is visible and notes cells have the notes
   content in them.
6. Verify the 'Notes' option has a checkmark next to it.
7. Reload the page. Verify the 'Notes' option has a checkmark
   next to it and the notes column is visible.
7. Click the 'Notes' option. Verify in the brief moment that the
   request to hide the notes is in process, the 'Notes' option is
   disabled.
8. Verify the notes column is hidden.
9. Verify the 'Notes' option does not have a checkmark next to it.
10. Reload the page. Verify the 'Notes' option does not have a
    checkmark next to it and the notes column is hidden.

Test Plan 2: Creating Teacher Notes
* If a course does not have any teacher notes, clicking the 'Notes'
  option should create a teacher notes column in which teacher notes
  will be stored.
1. Enter a rails console and get the teacher note column for a course.

  teacher_note_column = Course.find(2).
    custom_gradebook_columns.find_by(teacher_notes: true)

2. Destroy the teacher note column.

  teacher_note_column.destroy

3. Open Gradezilla and open the Developer Tools in your browser.
4. Click the 'Notes' option. Verify in the brief moment that the
   notes are being fetched, the 'Notes' option is disabled.
5. Verify the notes column is visible.
6. Check the Network Tab in your Developer Tools and find the request
   that was sent when you clicked the 'Notes' option. The request
   should be to api/v1/courses/:course_id/custom_gradebook_columns.
7. Verify the request succeeded (response 200) and the form data
   includes the key/val "_method: POST"

Change-Id: Ib199b636ba67070878cde2939795247c6e45f5ae
Reviewed-on: https://gerrit.instructure.com/106700
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Christi Wruck
2017-04-12 18:15:00 +00:00
Keith Garner d462b47b59 persist custom column order including totals
This updates the custom column order persistance to include all
non-frozen columns including the total grade and assignment group
totals columns.

fixes CNVS-35814

test plan:
 - Create a class with at least one student and 3 assignments.
 - Load the gradezilla gradebook and drag and drop the columns,
   including assignments, assignment groups, and total grade.
 - Reload the page, note that the custom order was preserved

Change-Id: If7b901758428203291e487259b2a24897dc0e2dd
Reviewed-on: https://gerrit.instructure.com/107573
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2017-04-12 14:37:36 +00:00
Shahbaz Javeed 4a12787b76 total grade can now be displayed as points or percentage
refs CNVS-34243

test plan:
* Create a course with 2 assignment groups with 1 assignment each
  and 2 students
* Ensure the assignment groups are not weighted at all
* Enter grades for :allthethings:
* Go to Gradezilla

* Open the Total column's options.  You should see
  a menu item that says "Display as Percentage"
* Click on this.  You should see a dialog warning
  you that students will see final grades in the
  format you choose.
* Click continue and notice that the Total column
  now shows the final grade as a percentage
* Click on the Total column's options again and
  you should see the menu item changed to say
  "Display as Points"
* Click this and you should see the warning dialog
  again.
* Check the box that says "Don't warn me again"
* Click continue and notice that the Total column
  now shows the final grade as points
* Try switching to percentage one more time and
  notice that the warning dialog is not shown any
  more

* Now add weights to the assignment groups
* Go to Gradezilla
* Open the Total column's options.  You should not see the menu
  item to change the display of the total column

Change-Id: I5f837e68b2c0383208f2507e334478b58012ab29
Reviewed-on: https://gerrit.instructure.com/107527
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Christi Wruck
2017-04-11 13:48:24 +00:00
Jeremy Neander 826f435b36 exclude empty weighted grading periods from current course score
fixes CNVS-36163

test plan:
  A. select or create
    1. an account
    2. a course for the account
    3. an enrollment term for the course
    4. a grading period set for the enrollment term
      a. with grading period weighting enabled
      b. with a grading period 'GP1'
        * with a weight of 50%
      c. with a grading period 'GP2'
        * with a weight of 50%
    5. a teacher for the course
    6. a student enrolled in the course
    7. an assignment group 'AG1'
      a. with a weight of 60
      b. with an assignment 'A1'
        i.  due in GP1
        ii. worth 10 points
      c. with an assignment 'A2'
        i.  due in GP1
        ii. worth 10 points

  B. set scores
    1. score A1 with 5 points
    2. score A2 with 10 points

  C. verify calculations
    1. visit Gradebook
    2. select "All Grading Periods"
    3. disable "Trade ungraded as 0"
    4. confirm course grade is 75%
    5. enable "Trade ungraded as 0"
    6. confirm course grade is 37.5%

Change-Id: Ibe2e340222b00899d51f3ca9d4f7232ced1e0891
Reviewed-on: https://gerrit.instructure.com/107873
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-04-11 00:56:04 +00:00
Felix Milea-Ciobanu 5a9b1f321d move blueprint course associations into blueprint sidebar
fixes MC-146

test plan:
- navigate to any page of a blueprint course
- open the blueprint course sidebar
- note that the text "Associations" and the number of associations
  for the master course appears in the sidebar
- click on the blue "Associations" text
- a full screen modal appears displaying the associations settings
  which was previously on its own page
- note that the associations settings work as expected (no
  functionality changes since it was on its own page)
- note that the save button works properly
- note that the close button and the modal X button close the
  associations and also clear any unsaved changes when the modal is
  reopened
- note that if you change the number of associations in the modal and
  save, the associations count in the sidebar is updated when you
  close the modal

Change-Id: I64b7f6e18a73ed2cdb5fcb11f8e0827e3d2038ce
Reviewed-on: https://gerrit.instructure.com/107644
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2017-04-08 01:06:34 +00:00
Felix Milea-Ciobanu 0d7898fe11 setup blueprint course sidebar
refs MC-145

test plan:
- navigate to a blueprint course
- note the blue line / bar and button on the right side
- click the button
- a tray sidebar should open from the right side of the screen
- click the close button on the tray
- note that the tray closes
- note that the sidebar shows up on every page in a blueprint course
- note that the sidebar does not show up in non-blueprint course pages
  or any other pages throughout canvas

Change-Id: I4dcadb82e32bf2af01b25ed3b6167ecffc594dd8
Reviewed-on: https://gerrit.instructure.com/107373
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2017-04-08 01:06:19 +00:00
Felix Milea-Ciobanu 1dadf133c5 upgrade course user search page to react 15
fixes CNVS-34306

test plan:
- enable the feature flag for the new course user search page
- checkout the page and all functionality and ensure nothing is broken

Change-Id: Id0d5f878e6d47da93310a30a937d8cff53eca54a
Reviewed-on: https://gerrit.instructure.com/106876
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2017-04-07 15:49:31 +00:00
Ed Schiebel 4930907263 Update tutorial trays with images
Fixes: FALCOR-176

Test Plan:
- Turn on the New User Tutorial feature for your
  institution
- In a course, confirm that the following pages' tutorial trays
  have images:
  - Announcements
  - Assignments
  - Collaborations
  - Conferences
  - Discussions
  - Files
  - Grades
  - Import
  - Modules
  - Pages
  - People
  - Quizzes
  - Settings
  - Syllabus

- Confirm the images look ok in every supported browser

Change-Id: I5035f6bc88d8ed4557e1e76c7707aba69a40e3f7
Reviewed-on: https://gerrit.instructure.com/106002
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2017-04-06 17:28:20 +00:00
Jon Jensen 99938e6e09 don't import :allthethings: instructure-*, fixes SD-2345
import just the particular instructure-ui / instructure-icon modules we
need, so that we don't get everything in the webpack bundle. also tweak
webpack config so people can't make this mistake again.

67d7ec7197 caused several bundles to balloon in size by a couple MB. this
gets us back down to sane levels (and many bundles are now smaller)

test plan:
specs? ¯\_(ツ)_/¯

Change-Id: I92b859063f56c672b85ec63f5c61ffd17735ced4
Reviewed-on: https://gerrit.instructure.com/107504
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-05 13:45:13 +00:00
Shahbaz Javeed a3564f6f17 removed redundant GradeDisplayWarningDialog and refactored to ES6
refs CNVS-34243

test plan:
* Ensure specs pass
* Create a course with 2 assignments and 2 students
* Enter grades for :allthethings:
* Go to original gradebook (not Gradezilla)

* Open the Total column's options.  You should see
  a menu item that says "Display as Percentage"
* Click on this.  You should see a dialog warning
  you that students will see final grades in the
  format you choose.
* Click continue and notice that the Total column
  now shows the final grade as a percentage
* Click on the Total column's options again and
  you should see the menu item changed to say
  "Display as Points"
* Click this and you should see the warning dialog
  again.
* Check the box that says "Don't warn me again"
* Click continue and notice that the Total column
  now shows the final grade as points
* Try switching to percentage one more time and
  notice that the warning dialog is not shown any
  more

Change-Id: Ice4dae05c093e6ba2689b923164a7f0f3d4af173
Reviewed-on: https://gerrit.instructure.com/107450
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Tested-by: Jenkins
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-04-05 00:38:42 +00:00
Brian Park 7661b83afb add enrollment filters to gradezilla student column header
closes: CNVS-32363

Test Plan:
1. As teacher/admin navigate to gradezilla
2. Expand student column header menu
  - Observe 'Show' menu item group is present
  - Observe 'inactive' and 'concluded' menu items are present
3. Toggle a menu item
  - Observe that the page reloads
  - Observe that upon reload, the toggled item state is applied
  - Observe that upon reload, the student rows are filtered as
     appropriate for the filter settings
* Changing Gradezilla so that page reloads aren't necessary
  is not performed in this changeset
4. Expand settings cog menu
  - Observe enrollment option items are gone

Change-Id: If308a255ba12ec71c0b6e9c1a5d6c17c8587a229
Reviewed-on: https://gerrit.instructure.com/105219
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2017-04-04 22:10:22 +00:00
Brian Park 040f576084 use account settings for 'login id' secondary info label
closes: CNVS-35936

Test Plan:
1. Navigate to account settings and update 'Login Label'
2. Navigate to gradezilla and expand student column header
 - Observe that 'Login ID' is replaced with settings value
3. Update 'Login Label' to be empty string and reload gradezilla
 - Observe that 'Login ID' label is restored

Change-Id: I744a3f87bfde9ca5bb534cb02d18acae7d0369f4
Reviewed-on: https://gerrit.instructure.com/105548
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Christi Wruck
2017-04-04 18:30:13 +00:00
Felix Milea-Ciobanu 67d7ec7197 refactor blueprint course code for eslint / es6 imports
test plan:
- tests still pass

Change-Id: I9d0df26d53ef2840b2ad09af779b264da009db5f
Reviewed-on: https://gerrit.instructure.com/107374
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
QA-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2017-04-04 15:53:43 +00:00
Felix Milea-Ciobanu 876e6a8e33 implement blueprint lock manager to load lock UI into item pages
refs MC-127

test plan:
- ensure you have a master course with one of each items (discussion,
  assignment, quiz, page), that has an associated course that it's
  synced up with
- as a valid admin of the master course:
  - on the show pages of each of the items, check the following:
    - there is a button next to the published button that toggles the
      item from locked to unlocked
    - the text + icon of the button changes back and forth when you
      toggle it
    - set the state to locked
    - when the state is locked, a banner shows at the top listing the
      attributes that are locked for that item
      (example: "Locked: Content & Points")
    - leave the state to locked for all items
  - on the edit pages of each of the four items, after locking them
    from the show page, the same banner should be present stating the
    attributes that are locked for that item (same banner as before)
- make sure to sync the locks with the child course
- as a valid teacher of the child course:
  - on the show pages of each of the items, check the following:
    - there is a transparent locked button that cannot be clicked
    - if the item is locked, the exact same banner describing what
      attributes are locked should be present at the top
  - on the edit pages of the same four items, all locked items should
    have the same banner describing what is locked

Change-Id: Ifa96ab98b24b8eb2b0d3e8ccf898df020a3c01e3
Reviewed-on: https://gerrit.instructure.com/105371
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Kendall Chadwick <kchadwick@instructure.com>
2017-04-04 14:11:53 +00:00
Shahbaz Javeed c2e56e4a2c moderate grades now uses a table instead of divs and spans
closes CNVS-35390

test plan:
* Create a course with a at least two students and two teachers
* Create an assignment for this course which is moderated
* Go to the moderation page and verify the layout looks the same
  as before
* Verify that navigation using the keyboard allows you to
  properly identify the row and column heading for any cell
* Add a second reviewer to the assignment and verify the layout
  looks the same as before
* Verify that navigation using the keyboard allows you to
  properly identify the row and column heading for any cell
* Verify that when you're on the "Select all" checkbox in the top
  left corner of the table, it reads out "Select all students"
* Verify that when you navigate to any other checkbox from the
  right-most column (using Ctrl-Opt-Right to wrap around) it does
  not read out "Select all students" as the heading of that
  column
* Add scores for the assignment using SpeedGrader while logged
  in as the two teachers and then reload the moderation page
* Verify the layout looks the same as before
* Verify that navigation using the keyboard allows you to
  properly identify the row and column heading for any cell
* Verify that VoiceOver (or JAWS) speaks appropriate labels for
  each cell.  Some labels have changed e.g. SpeedGrader now just
  says "SpeedGrader" and an absence of grades is read out as
  "dash" or "none"

Change-Id: Ic041af90dd758145fffd539f55636030e0f7b29a
Reviewed-on: https://gerrit.instructure.com/105516
Tested-by: Jenkins
Reviewed-by: Sheldon Leibole <sheldon@siimpl.io>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Christi Wruck
2017-04-03 23:45:45 +00:00
Jeremy Neander 2b2b222097 create a custom column header component
closes CNVS-35992

test plan:
* visit Gradezilla
* show the notes column
* ensure the notes column displays correctly
* hide the notes column
* ensure the notes column hides without issue
* repeat ad nauseum

Change-Id: Iea87b5b42b47c4ef27abdaa1b2bd1897c1c4a0ef
Reviewed-on: https://gerrit.instructure.com/107012
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2017-04-03 22:27:14 +00:00
Shahbaz Javeed 9ca8888e52 assignment option dialogs are now focused on display
closes CNVS-35491

test plan:
* Create a course with at least one assignment and one student
* Go to Gradezilla
* From the options menu of the assignment try opening each dialog
* Verify that once the dialog opens the closing X on the visible
  dialog is focused

Change-Id: I21aeecaee7fcf81fe5de54f65e87bdc377b29b01
Reviewed-on: https://gerrit.instructure.com/106750
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Christi Wruck
2017-04-03 22:20:11 +00:00
Derek Bender fadf1a8419 cleanup two spec files that pollute the DOM
Change-Id: Id18b3552962644d802add6776feea15e8e5170cd
Reviewed-on: https://gerrit.instructure.com/107245
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-04-03 14:38:39 +00:00
Jeremy Neander f87a1909e9 spec: clean console output from some specs
This modernizes one file, removes lint from it, and cleans up
dirty console logs within it.

This also updates a deprecated sinon stub in another file and
removes a stray asterisk.

test plan:
* ensure Jenkins passes

Change-Id: I7f4d88056b3efefb747b89cd7d66982e9ae6c3cd
Reviewed-on: https://gerrit.instructure.com/107239
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
2017-04-03 13:33:24 +00:00
Derek Bender ab1da9bb22 sort by missing and late
closes: CNVS-32446

test plan:
 - Given gradezilla gradebook enabled
 - Given submissions where some are missing and some are late
 - When clicking on the assignment's options in the column header
 - When clicking on "Sort by - Missing"
 - Then assignments that are missing are shown at the top
 - When clicking on "Sort by - Late"
 - Then assignments that are late are shown at the top

Change-Id: I8e9c23d43949b23c2db5f762afe98c3869778b80
Reviewed-on: https://gerrit.instructure.com/105910
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Christi Wruck
2017-03-31 21:33:22 +00:00
Spencer Olson e5354a580c truncate seconds before comparing grading periods
closes CNVS-35768

test plan:

1. Create a course with grading periods.
2. Create an assignment from the assignment group using the "+" button.
3. Make the due date for the assignment end on a grading period end
   date (it is important to not copy and paste the due date in but type
   it in manually).
5. Go to the gradebook and select the grading period whose end date
   matches the assignment's due date.
6. Verify the assignment is visible.

Change-Id: Iddbcd4c790223e66f17db9f8676733c4306723d4
Reviewed-on: https://gerrit.instructure.com/106314
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Christi Wruck
2017-03-31 21:22:22 +00:00
Jon Jensen 0939898e56 fetch all pages of students for adhoc override
fixes CNVS-28479

when a course has more than 200 students (so not all are prefetched) and
an adhoc assignment override specifies more than a page size (default
10) of students, it's possible for some students in the override to be
neither prefetched nor in the first page of results when fetched by ID.
make sure to fetch all pages of results when fetched by ID.

also make the 4 prefetch requests happen serially, and only once the user
begins interacting with the component (hover or focus). this way we don't
fetch more than we need to in small courses, and we don't fetch anything
if the teacher isn't using this part of the UI (generally the case). this
has the added benefit of speeding up selenium specs, as it has only one
server thread and the `get` waits for all ajax requests to complete

test-plan:
  part 1:
   - have a course with at least 201 students
   - have an assignment in that course with an override that specifies 11
     students
   - have the 11th student specified for the override be the 201st student
     in the course
   - edit the assignment
   - confirm you see the name for the 201st student (11th in override)
     instead of "Loading..."
  part 2:
   - have a course with 51 students
   - go to edit a new assignment
   - confirm no /users ajax requests happen initially
   - focus the "Assign to" widget so you can manage overrides
   - confirm there are 2 ajax requests for /users
   - confirm you see 7 students in the dropdown (either immediately or
     with a very slight delay, depending on whether you clicked or
     tabbed into the widget)
   - confirm you can search for any of them without additional ajax
     requests

Change-Id: I47ed202eb0d8ac1ad9e4ad21e50ceae930a6f3fe
Reviewed-on: https://gerrit.instructure.com/106693
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
2017-03-31 18:58:45 +00:00
Clay Diffrient 9bec9774c4 Add toggling between planner screen and card screen
closes FALCOR-173

Test Plan:
  - Enable student planner feature flag
  - Go to the dashboard
  - The dashboard options dropdown should have Planner as an option
  - Changing to planner should show a "Planner placeholder"
    message
  - Refreshing the page should persist the setting

Change-Id: I9062961327e03e750883246d94acd5da3283fcce
Reviewed-on: https://gerrit.instructure.com/105430
Tested-by: Jenkins
Reviewed-by: Stephen Jensen <sejensen@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Colleen Palmer <colleen@instructure.com>
2017-03-30 20:18:11 +00:00
Jeremy Neander 62db47a269 freeze only student, secondary id, custom, and total columns
fixes CNVS-35751

test plan reference:

Four types of columns can appear in the frozen column section:
  1. Student Name (always visible)
  2. Secondary ID (always visible, only in Gradebook)
  3. Total
  4. Custom Columns (includes Teacher Notes)

Three features affect placement and visibility of columns
within (or outside of) the frozen column section in Gradebook:
  1. "Display Totals for All Grading Periods"
    * when enabled, the total grade column is visible
    * available on the Grading Period Set
  2. "Show/Hide Notes Column"
    * when enabled, displays Teacher Notes as the last frozen
      column in Gradebook
    * when disabled, does not affect the visibility of other
      custom columns
  3. "Move to front/end"
    * when "front," moves the Total column to the end of the
      frozen columns section
    * when "end," move the Total column to the end of all columns

test plan:
* ensure Gradebook freezes only the above columns when the
  settings and actions above are changed in any combination
* repeat for Gradezilla

Change-Id: Ic857b310bacfc5cbd67af1f01c413200d0add879
Reviewed-on: https://gerrit.instructure.com/106598
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2017-03-30 20:04:11 +00:00
Cameron Matheson 686e47fb5c New "choose home page" dialog / home page prompt
Test plan:
  * Try choosing a new home page with the "Choose a home page" button.
  * In a new (unpublished) course:
    * Select modules as the home page.  Do not make any modules.
    * Try to publish the course, it should prompt you to choose another
      homepage.
    * make some modules, it should now allow you to publish.

Change-Id: I7ef6f92cb95b443d6ba596d5ff6c9499fa943162
Reviewed-on: https://gerrit.instructure.com/102955
Tested-by: Jenkins
QA-Review: Dan Sasaki
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-03-28 18:44:10 +00:00
Jeremy Neander 89bb41389d add sort by total grade
closes CNVS-35854

test plan:
A. visit Gradezilla Gradebook
B. open the options menu on the total grade column
C. verify presence of "Sort by" settings
   1. Menu will include a "Sort by" group label
   2. Menu will include settings:
      a. "Grade - Low to High"
      b. "Grade - High to Low"
D. verify sorting behavior
   1. click on 'Sort by > Grade - Low to High'
   2. verify grades are sorted in ascending order
   3. verify the option is selected in the options menu
   4. click on 'Sort by > Grade - High to Low'
   5. verify grades are sorted in descending order
   6. verify the option is selected in the options menu
   7. verify the previous sort setting is no longer selected
   8. sort by a different column
   9. verify grades are sorted by that column
  10. verify that column's sort setting is selected
  11. verify the total grade sort setting is no longer selected
E. verify that settings are enabled after assignments, students,
   and submissions are all loaded

Change-Id: Id9e12def7072c627416c1f9da2c1ff6e2534a2da
Reviewed-on: https://gerrit.instructure.com/106259
Tested-by: Jenkins
Reviewed-by: Sheldon Leibole <sheldon@siimpl.io>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Christi Wruck
2017-03-28 18:32:15 +00:00
Spencer Olson f47c90f81e add sort by student name
closes CNVS-31611

test plan:
A. visit Gradezilla Gradebook
B. open the options menu on the student column
C. verify presence of "Sort by" settings
   1. Menu will include a "Sort by" group label
   2. Menu will include settings:
      a. "A-Z"
      b. "Z-A"
D. verify sorting behavior
   1. click on 'Sort by > A-Z'
   2. verify _sortable_ student names are sorted in ascending order
   3. verify the option is selected in the options menu
   4. click on 'Sort by > Z-A'
   5. verify _sortable_ student names are sorted in descending order
   6. verify the option is selected in the options menu
   7. verify the previous sort setting is no longer selected
   8. sort by grade on an assignment column header
  10. verify that assignment's sort setting is selected
  11. verify the student column sort setting is no longer selected
E. verify that settings are enabled after students are loaded

Change-Id: I3cd994ee0830fe4eb20bf5dc502054379fc5cb44
Reviewed-on: https://gerrit.instructure.com/105978
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Christi Wruck
2017-03-28 18:32:04 +00:00
Jeremy Neander 9ceb8f1bfe use the current grading period for grade calculations
When no grading period is explicitly given with the
`grading_period_id` query parameter, the current grading period
is used as the initial grading period on the student course
grades page. The grade calculations currently depend on the query
parameter, which means no grading period will appear to be
selected, even though the page is rendered within the context of
the actual current grading period.

This commit make the grade calculations use the selected grading
period id of the grading period select element, which is rendered
using the correct information.

closes CNVS-35903

test plan:
A. select or create
  1. an account with grading periods enabled
  2. an enrollment term for the course
  3. a grading period set for the enrollment term
    * with grading period weighting enabled
    * with 'Display Totals for All Grading Periods' enabled
    * with a grading period 'GP1'
      * closed
      * with a weight of 30%
    * with one grading period 'GP2'
      * open
      * with a weight of 70%
  4. a course with assignment group weighting enabled
  5. a teacher for the course
  6. a student enrolled in the course
  7. an assignment group 'AG1'
    a. with a weight of 60%
    b. with an assignment 'A1'
      i.  due in GP1
      ii. worth 10 points
    c. with an assignment 'A2'
      i.  due in GP1
      ii. worth 10 points
  8. an assignment group 'AG2'
    a. with a weight of 20%
    b. with an assignment 'A3'
      i.  due in GP2
      ii. worth 20 points
  9. an assignment group 'AG3'
    a. with a weight of 20%
    b. with an assignment 'A4'
      i.  due in GP2
      ii. worth 40 points

B. set scores
  1. score A1 with 5 points
  2. score A2 with 10 points
  3. score A3 with 12 points
  4. score A4 with 16 points

C. verify calculations
  1. masquerade or log in as the student
  2. visit the student course grades page without using the
    `grading_period_id` query parameter
  3. ensure the final grade is 50%
  * NOTE: The grading period select element will use the current
    grading period when none is explicitly set using the
    `grading_period_id` query parameter.

Change-Id: I7d47fff90d12a25f9f0d1e113b4e1d7330e6d988
Reviewed-on: https://gerrit.instructure.com/106479
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2017-03-28 17:34:46 +00:00
Brent Burgoyne d225415e9f update rcs token refresh to use new endpoint
added a higher order function for generating a refresh function with
and initial jwt. this was moved from the serviceRCELoader to its own
module since it could be used by other modules in the future. i also
made some other improvements like returning a promise to make error
handleing possible (while keeping the existing callback
functionality), and not making extra api requests if the function is
called multiple times before the the api responds.

closes CNVS-35199

test plan:
- edit a wiki page with rcs enabled
- wait an hour
  - or - temporariy change the expiration of jwts in canvas
    - open lib/canvas/security/services_jwt.rb
    - change the 3600 in the create_payload class method to 30
    - reload the edit page
    - wait 30 seconds instead
- make sure you can still make api requests
  - click load more on something, upload a file, etc

Change-Id: I21c89bfc82d4bf1ae3ff25b467b5f6d1e674cfac
Reviewed-on: https://gerrit.instructure.com/103303
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2017-03-24 17:07:02 +00:00