Commit Graph

8052 Commits

Author SHA1 Message Date
Clay Diffrient 2a104c9f10 Disable folder previews
This essentially reverts the behavior in e8eefad3.

fixes CNVS-23838

Test Plan:
  - Got to the files page with at least one folder
  - The toolbar preview button should be disabled
    when you have the folder selected
  - When you have a file preview open, it should
    navigate to all the files and not show folders
    at all

Change-Id: I2dc411d5c81970cba1986abae7b5f0c73af6cfc6
Reviewed-on: https://gerrit.instructure.com/66138
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-11-02 21:42:58 +00:00
Heath Hales 941547671d Spec: 117958 - Compose new message to single user
Change-Id: Ibf81ef67c4fcb30536c3dc31f101d44d36619193
Reviewed-on: https://gerrit.instructure.com/66205
Tested-by: Jenkins
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
2015-11-02 20:39:50 +00:00
Strand McCutchen 0e84683ec3 disable SRGB's assignment editing for past grading periods
Fixes CNVS-22398

CNVS-22398 was previously fixed with c428f832, however,
that commit created issues in Continious Integration, with
failures which only happened when the tests were run in
parallel. c428f832 was reverted in f566717b.

This commit differs from the c428f832 by avoiding
using fakeENV to manage creating an ENV for testing
purposes. The function isInPastGradingPeriodAndNotAdmin
is not as well tested as it was in c428f832, but this is
preferable to having intermittent spec failures in CI.

Test Plan:

1. As an admin, create an account-level grading period
    which ends in the past.
2. Create an assignment that is due within that grading
    period.
3. As a teacher, go to Gradebook, click on the grades for
    that assignment.
4. Observe that they are not editable.
5. Navigate to Individual View. Select the past grading
    period.
6. Select the assignment and a student in the Content
    Selection section.
7. Verify that you are unable to edit this grade.
8. Click "Submission Details."
9. Verify that you are unable to edit this grade.

Change-Id: I381c3d3c78f00eabc7a685ef3a0e8fea0f886ac2
Reviewed-on: https://gerrit.instructure.com/65417
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Christi Wruck
2015-11-02 19:30:23 +00:00
Joel Hough 23aef7cbd4 more accurate contextless send permission in conversations ui
fixes CNVS-23104

test plan
- as an account admin (not site admin), ensure that you can send
 a conversation message without specifying a context
- disable the "See the list of users" permission for the Account
 Admin role on the user's root account
- as the account admin, ensure that you now cannot send a
 conversation message without specifying a context

Change-Id: I25d6bacae1b213d6fa5caf7813de6d979282411b
Reviewed-on: https://gerrit.instructure.com/66155
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-11-02 18:44:08 +00:00
Amber Taniuchi b48b5a52cc spec: speedgrader alert for non-autograde questions
Test Plan:
- pass Jenkins
- check for syntax errors
- make sure new test_ids match up to an existing test case in TestRails

Change-Id: Id0477279c50cb9a5b32283ac0b564849cf2848f3
Reviewed-on: https://gerrit.instructure.com/65934
Tested-by: Jenkins
Reviewed-by: Adam Phillipps <adam@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Michael Hargiss <mhargiss@instructure.com>
2015-11-02 18:13:56 +00:00
Jermey Putnam fe8e6d226e spec: add tiny-mce underline button check
Change-Id: I8bf91f8ca21626da55514630b639e07ceaa87066
Reviewed-on: https://gerrit.instructure.com/66232
Tested-by: Jenkins
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
2015-11-02 18:12:47 +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
gbeckmann 134b20d5f2 Spec: skip fragile agenda view spec
Add a skip line to spec 420724 which is failing intermittently

Test plan:
Verify code change

Change-Id: I468ba72cb88ce6be42e59fde638dfc371660bfa3
Reviewed-on: https://gerrit.instructure.com/66278
Tested-by: Jenkins
Reviewed-by: Derek Hansen <dhansen@instructure.com>
Product-Review: Derek Hansen <dhansen@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
2015-11-02 15:35:03 +00:00
Ethan Vizitei 976c2ea904 make sure you can view all wiki pages from wiki front_page
closes CNVS-24707

TEST PLAN:
1) go to a course as a student with pages nav enabled and with a wiki
    with a "front_page"
2) go to the wiki front-page
3) you should see the "View All Pages" button

Change-Id: I289d959befb187ffa56f86ff3f5101ad1164bb3d
Reviewed-on: https://gerrit.instructure.com/66256
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
2015-10-31 20:14:50 +00:00
Ethan Vizitei a540c66024 Make button display an option property
fixes CNVS-24706

when not an option property, the value doesn't actually
get set.

TEST PLAN:
1) go to course with pages as a student and pages enabled
2) view a page
3) you should see "View All Pages"

Change-Id: I6a0dc50b750c10d553030c71d25ae19b3cac4350
Reviewed-on: https://gerrit.instructure.com/66255
QA-Review: Pedro Fajardo <pfajardo@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
2015-10-31 17:44:15 +00:00
Ethan Vizitei 9835f67c1a Use json-jwt instead of ruby-jwt
closes CNVS-24284

json-jwt has encryption built into the library.

Also replace all bare uses of JWT library
with Canvas::Security so we use a consistent
interface throughout the app.

TEST PLAN:
1) no behavior changes
2) regression test Oauth logins
3) regression test LTI tool launches

Change-Id: If1a98cc9fbaf9f77631b730a5afe0951347743ab
Reviewed-on: https://gerrit.instructure.com/65774
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
2015-10-31 13:05:59 +00:00
MFairbourn 1ff725ad1a spec: add p2 tag to should check all popular tags
test plan:
-test should pass
-code review

*Slow running spec

Change-Id: I284745eb214d14a7b8c0d84c4f5d3f79904b12e4
Reviewed-on: https://gerrit.instructure.com/66130
Tested-by: Jenkins
Product-Review: Derek Hansen <dhansen@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
Tested-by: Derek Hansen <dhansen@instructure.com>
Reviewed-by: Derek Hansen <dhansen@instructure.com>
2015-10-31 01:29:50 +00:00
Michael Hargiss ae496391dd spec: add selective release module and context
Test Plan:
- pass Jenkins
- check for syntax errors

Change-Id: I7b2edb3201796efb8f5c4e5c7961c2ee506dc839
Reviewed-on: https://gerrit.instructure.com/66051
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2015-10-30 21:44:18 +00:00
gbeckmann 469797cd16 Spec: Add conversations ui specs
Changes:
- Create "conversations ui" context
- Create spec 117960
- Create spec 446594
- Create spec 446595
- Create spec 446596
- Create spec 456175

Test Plan:
- Run specs

Change-Id: Ic4705e1b53cb3dab98c23b4b89078b08e27dc6b2
Reviewed-on: https://gerrit.instructure.com/66152
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Jenkins
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
2015-10-30 20:43:44 +00:00
gbeckmann cdb904eb9c Spec: Add specs for editing graded discussions
Changes:
- Create context "a graded discussion created"
- Move spec 138859 into context
- Create spec 138855
- Create spec 420724
- Remove erroneous white space from 138850

Test Plan:
-Run specs

Change-Id: I92d01fa68a4be3400a0c6efd55fc4c1b8ecaabff
Reviewed-on: https://gerrit.instructure.com/66091
Tested-by: Jenkins
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
2015-10-30 20:19:07 +00:00
Clay Diffrient 0062871d45 Make the select all checkbox work with moderated grading
This commit also does a little refactor of the tests for the
column header to avoid missing prop warnings.

fixes CNVS-24640

Test Plan:
  - Go to the moderation screen
  - Click the select all checkbox
  - It should select all the students
  - Click it again, all the students should be unchecked
    - Other than the ones that were previously added to the
      moderation set, because those boxes are disabled.

Change-Id: I19c0832087eae1d279586a4aa9da10a62002affb
Reviewed-on: https://gerrit.instructure.com/66077
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-10-30 17:23:09 +00:00
Alex Boyd 8dab220b69 Store transient bounces as well as permanent bounces
Fixes CNVS-22956

Test plan:
 - Amazon's documentation is ambiguous about whether
   ooto@simulator.amazonses.com will actually generate a
   transient failure, so this may not actually work.
 - Set up outgoing email through the Amazon SES test account
 - Set up bounce_notifications.yml with the SQS test creds
 - Set a user's email address to ooto@simulator.amazonses.com
 - Cause a message to be sent to that user
 - Wait for the bounce notification processor to run (~5 minutes)
 - At a Rails console, check the CommunicationChannel's
   last_transient_bounce_at and verify that it roughly corresponds
   to when the initial message was sent
 - Check the CommunicationChannel's last_transient_bounce_details and
   ensure that they have been filled in

Change-Id: Ic3a4110319673d6ec6f0789885c760faec4775b3
Reviewed-on: https://gerrit.instructure.com/62562
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Alex Boyd <aboyd@instructure.com>
2015-10-30 16:04:22 +00:00
Sterling Cobb 760ea68d8b convert ShowFolder to jsx
refs CNVS-22335

There are no automated test around this conversion so needs a well done
QA.

Test Plan
- Go to files section
- Ensure everything to do with showing folder and file previewws is
  working

Change-Id: If10fcaf992dcb80ded031dcaddf41a347a6acceb
Reviewed-on: https://gerrit.instructure.com/61762
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
2015-10-30 15:56:02 +00:00
Brian Finney aea17c6a87 Fix practice quiz creation
Fixes CNVS-24606

Test plan:
 - Create practice quizzes

Change-Id: Ic52cdb7530be6c0dd96ad9aecb67d65799f50eee
Reviewed-on: https://gerrit.instructure.com/65940
Tested-by: Jenkins
Reviewed-by: Davis McClellan <dmcclellan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Brian Finney <bfinney@instructure.com>
2015-10-29 23:20:00 +00:00
John Corrigan 8d4d967341 add zip_attachment to EpubExport
fixes CNVS-24178

- Updates FilesConverter so that it returns both files that will be
  displayed in the ePub and the files that are unsupported.
- Adds CC::Exporters::Epub::FilesDirectory class, which accepts a
  collection of file objects and adds them to a zip file.
- Updates UI so that a separate download link is present for the zip of
  unsupported files.
- Adds support to MIME::Types library to be able identify ePubs.
- Updates EpubExport to have many attachments; one epub & one zip.
- Updates process of creating attachments related to EpubExports so that
  the content_type value is properly set.

test plan:
- Have a course that contains files that are not supported by ePub, such
  as pdf, doc or xls.
- Navigate to `/epub_exports`.
- Click the button to generate an ePub for the given course.
- Observe that, after the successful generation of the course, two
  download links appear: one for the ePub, one for additional files.

Change-Id: I2f321362bc5ed23f8b28334395f8969c9d90a5de
Reviewed-on: https://gerrit.instructure.com/65753
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-29 20:23:00 +00:00
MFairbourn 56c815e9d2 spec: change should test SIS Agent Token Authentication to P2
Test Plan:
_ Tests should pass
_ Code review

* note this is a slow running spec and can be a P2

Change-Id: I9186089c94860c4d2402c9f12b6eec20f6cc7925
Reviewed-on: https://gerrit.instructure.com/66090
Reviewed-by: Derek Hansen <dhansen@instructure.com>
Tested-by: Jenkins
Product-Review: Derek Hansen <dhansen@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
2015-10-29 19:39:29 +00:00
gbeckmann d583a8ac57 Spec: Add spec to test agenda view assignment dates per section
Add a spec to test that assignment due dates appear correctly
for different sections in the calendar agenda view.

Spec for test case C138848

Test Plan:
Run specs

Change-Id: Ib47890d4c92417da451aa6a1f8a94e44a480c523
Reviewed-on: https://gerrit.instructure.com/65949
Tested-by: Jenkins
Reviewed-by: Adam Phillipps <adam@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
2015-10-29 19:24:59 +00:00
Simon Williams 59183acae8 spec: fix spec for date fudging
Change-Id: I3eb761f5ca80e1f59520ba63747e17189109d0e2
Reviewed-on: https://gerrit.instructure.com/66034
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2015-10-29 19:08:28 +00:00
Jeremy Stanley 0714db64dd include assignments for graded topics/quizzes on import
test plan:
 - create a course with an assignment group containing a graded
   discussion topic and a quiz (but no assignments as such)
 - export the course to a common cartridge file
 - selectively import the course:
   * you should see the quiz and the discussion topic listed
     under "Assignments" and your assignment group in the
     select-content dialog
   * checking the assignment should check the associated
     quiz or topic and vice versa
   * if the (entire) assignment group is selected, it should be
     imported in a selected import
   * if individual items (but not the entire assignment group)
     are selected, they should be imported into an
     "Imported Assignments" group

fixes CNVS-23017

Change-Id: I2553cbf87209ea89b01325da855f3bfd12aa31aa
Reviewed-on: https://gerrit.instructure.com/66023
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-29 19:08:09 +00:00
James Williams 654a3d1dae don't potentially resave every quiz submission in transaction
test plan:
* regression test quiz editing

closes #CNVS-24587

Change-Id: I5078eb48e14ad5d7ac4bc70bda043f2eb305e4ed
Reviewed-on: https://gerrit.instructure.com/66007
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-10-29 18:41:38 +00:00
James Williams 37234f5989 allow teachers to unlink imported outcomes if unused
also don't show the delete button if it isn't going to work

test plan:
* create an account level outcome
* import it into a course
* as a teacher, link it to a assignment's rubric
* visit the outcomes page
* should not be able to delete the outcome
* delete the assignment
* should be able to delete the outcome

closes #CNVS-24106

Change-Id: Idd38d9e6fa69e3dd7d7c48b4056d6c13fa57753a
Reviewed-on: https://gerrit.instructure.com/65898
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-10-29 18:41:33 +00:00
James Williams 6062491d31 return deleted enrollments if requested in enrollments index
also refactor enrollments_visible_to away because it is bad

test plan:
* add people to a course
* remove them
* calls to /api/v1/courses/X/enrollments?state[]=deleted
 and /api/v1/sections/Y/enrollments?state[]=deleted
 should include the deleted enrollments

closes #CNVS-23729

Change-Id: I29d6995064dc6cf79af44b940f55dc0269c2a891
Reviewed-on: https://gerrit.instructure.com/65756
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-10-29 18:41:27 +00:00
James Williams 12a7c4220e accepting future enrollments should retain readonly access
test plan:
* create a course set to begin in the future with dates
 restricted to those dates, but making sure students
 are not restricted from viewing future courses
* invite a student into the course
* they should be able to view the course as before
* accept the enrollment
* they should now still be able to view the course
 as though they were invited

closes #CNVS-23683

Change-Id: Ib7a58d0c587b10b7aaa8c8b7c10a56e547029533
Reviewed-on: https://gerrit.instructure.com/65553
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-10-29 16:29:02 +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
MFairbourn 746f54003a spec: add spec for removing user from course with sis_id
test_id: 336018

test plan:
-Specs pass
-code review

Change-Id: I79b177ccc27b5b4db210d698ec5cf0cbbbf6b523
Reviewed-on: https://gerrit.instructure.com/65987
Tested-by: Jenkins
Reviewed-by: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2015-10-28 23:04:17 +00:00
Nathan Mills 2bceb54da7 start expiring access tokens created by new dev keys
add warning message to the api docs about expiring access tokens

fixes PLAT-1263 PLAT-1243

test plan:
*create a developer key before cherry picking change set
*cherry-pick change set
*generate an Access Token using the old dev key
*it should not have an expiration

*create a new developer key
*create an access token with the new dev key
*it should have an expiration

*check the api doc on the oauth page for the warning message

Change-Id: Id53d9b7fab4b8b308a0abbae0268c1c25a2d4c6f
Reviewed-on: https://gerrit.instructure.com/64881
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2015-10-28 22:00:55 +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
James Williams ae73f86187 spec: fix discussions_show_page_any_user_spec
Change-Id: I65a8442d479b2bfd05f19f141a99842477c46435
Reviewed-on: https://gerrit.instructure.com/65991
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-10-28 19:22:03 +00:00
Simon Williams d59a97d63a handle focus when adding/removing due date sets
when adding, focus goes to the input field of the new set.  when
removing, focus goes to the input field of the set that "slides in" to
the place of the removed set (so with 4 sets, deleting the original
first set, focus goes to the new first set), or if there is no new set
(when you delete the last set), focus goes to the previous set.

fixes CNVS-23043

test plan:
- on the assignment new/edit page
- add and remove due date sets with the keyboard / screenreader
- it should handle focus well, see above for the logic
- try lots of combinations, like deleting the first, last, and middle
  sets

Change-Id: Id1b7da84fddea1fe3f87d0874acf61a4978d73e0
Reviewed-on: https://gerrit.instructure.com/64837
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Landon Holmstead <lholmstead@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-10-28 18:29:34 +00:00
Matthew Berns 5510947248 separate module ePub generation into separate xhtml files
refs CNVS-21803

this is primarily an organization change on the back end, there is
very little change to how it should look/work for end users.

test plan:
- generate an ePub using content type sorting and module sorting
  to ensure no regressions
- content type sorting should look exactly the same
- for module sorting, instead of having a "Course Modules" page at the
  beginning with links to the modules, the titles of the modules
  should just be on the spine/navigation of the ePub

Change-Id: I177691f3435440e9d2b5f8ef3185af941059b809
Reviewed-on: https://gerrit.instructure.com/65650
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Matt Berns <mberns@instructure.com>
2015-10-28 17:39:21 +00:00
Matthew Berns 024e4ab472 add syllabus to ePub
closes CNVS-23623

- adds a syllabus to the beginning of the ePub

test plan:
- generate two ePubs for a course that has items in modules, one using the
  default module sorting, the other using content type sorting
- the syllabus should contain the title and due date of graded assignments
  and quizzes in chronological order
- items with no due dates should appear last
- when sorting by module, only graded assignments and quizzes that are in
  modules should show up
- syllabus entries should link to their respective assignment or quiz

Change-Id: I9f9fb97f03e9bcaaa874681ab289ba9c70a1f4ac
Reviewed-on: https://gerrit.instructure.com/64552
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Tested-by: Jenkins
QA-Review: Landon Holmstead <lholmstead@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-28 17:39:12 +00:00
Adrian Russell d17f455275 Spec: Check a teacher can get to /user_notes page.
Test plan:
- run spec

Change-Id: I04cbdd04e4de3cacc112f90a55637d224efb2f93
Reviewed-on: https://gerrit.instructure.com/65973
Tested-by: Jenkins
Reviewed-by: Derek Hansen <dhansen@instructure.com>
Product-Review: Derek Hansen <dhansen@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
2015-10-28 17:33:04 +00:00
Spencer Olson 05f776837c react gb: implement 'message students who'
closes CNVS-22024

test plan:

verify the 'Message Students Who...' dialog
works in the react gradebook AND in the normal
gradebook

Change-Id: Iec1201cc0a95816b9b9497a53a3d0c2c1406cacc
Reviewed-on: https://gerrit.instructure.com/64376
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-10-28 16:16:27 +00:00
Jacob Fugal da6bcd1019 include observer in ENV.current_user_roles
test-plan:
 - log into canvas as a user with an observer enrollment
 - check ENV.current_user_roles in the browser javascript console
 - should include 'observer'
 - log in as a user without an observer enrollment
 - ENV.current_user_roles should not include 'observer'

Change-Id: I80fa42153229a1e9c1debe9d5daf85bfa8c52254
Reviewed-on: https://gerrit.instructure.com/65954
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2015-10-28 16:15:22 +00:00
Spencer Olson 2517a4775a implement notes column for react-gb
clicking on a teacher note in the react gradebook
will now open up a modal where the teacher can
edit their note.

closes CNVS-22029

test plan:

go to course settings and enable 'Gradebook
Performance'. then go to the gradebook and
select 'Show Notes' from the settings cog.
try clicking on a note cell for a student
and verify that a modal pops up and allows
you to enter in a note. clicking 'Save' should
close the modal and save the note. clicking the
'x' or 'Cancel' should close the modal without
saving the note.

edge case: try entering a really really long
note (> 255 characters). you should see an error
message that says note length cannot exceed
255 characters, and it should not let you continue
to type a note longer than 255 characters.

Change-Id: Ie04fa96255ebb5cc6dd92f8460c50c32e5cf6c9c
Reviewed-on: https://gerrit.instructure.com/64203
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-10-28 14:39:22 +00:00
MFairbourn 5d8799802f spec: test page refresh does not change module item publish state
Test Plan
- Specs Pass
- Code Review

Change-Id: I228a35216e59697e43815f3595cbc37ae43d93b0
Reviewed-on: https://gerrit.instructure.com/65895
Tested-by: Jenkins
Reviewed-by: Derek Hansen <dhansen@instructure.com>
Product-Review: Derek Hansen <dhansen@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
2015-10-28 13:40:19 +00:00
Simon Williams 2661b3001f add date format tooltip back to DA date fields
fixes CNVS-22206

test plan:
- go to the assignment new page
- focus the due/lock/unlock fields
- they should have a date format tooltip

Change-Id: I7c9245320cdb4e7aebd9b9763580230c66b4429d
Reviewed-on: https://gerrit.instructure.com/65000
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-27 22:54:10 +00:00
gbeckmann 9bea92cae6 Spec: Add spec for drag-and-drop in week view
Changes:
- Create spec 138866 "should make event all day..."
- Fix spec 138864 which broke with recent calendar updates
- Remove two skipped specs that have been replaced

Test Plan:
- Run specs

Change-Id: I0eb7d8c0fa2caed155f79cff26a8aef6d5b8e01b
Reviewed-on: https://gerrit.instructure.com/65778
Tested-by: Jenkins
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
2015-10-27 22:51:28 +00:00
Michael Hargiss 62957a422c spec: add quiz availability specs
Test Plan:
- pass Jenkins
- check for syntax errors
- make sure new test_ids match up to existing test cases in TestRails

Change-Id: Ibe574f61b39e39c031897a7e3ea08271e999301c
Reviewed-on: https://gerrit.instructure.com/65701
Tested-by: Jenkins
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2015-10-27 22:48:13 +00:00
Amber Taniuchi 9317cd1ea2 spec: Add spec to verify pass-fail grading type in speedgrader/GB2
Test Plan:
- pass Jenkins
- check for syntax errors
- make sure new test_ids match up to an existing test case in TestRails

Change-Id: I8e738d044eec52ad9380441b1101f7424195c4b0
Reviewed-on: https://gerrit.instructure.com/65862
Tested-by: Jenkins
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
2015-10-27 21:40:21 +00:00
Davis McClellan 03d7a8ceae fix filename manipulation upload problem
fixes CNVS-23728

test plan:
- Create New Assignment with File Upload Submission Type
- As a student, submit a file to the assignment
- As a teacher, Download Submissions from the assignment page
- Unzip file
- Note that file names use the following format
  lastname--firstname_CanvasUserID_CanvasFileID_filename.extension
- Rename one of the files, but change only the CanvasFileID part
- Zip file
- Re-Upload Submissions from the assignment page

Change-Id: Ia533d60b0c8a80b82e3328cc0dff08a859dd91f2
Reviewed-on: https://gerrit.instructure.com/65575
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Landon Holmstead <lholmstead@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-27 21:21:06 +00:00
Sterling Cobb adc8b4a05e add info message when grades are posted
fixes CNVS-23904

Test Plan

As a user moderating grades
And I'm viewing the moderation page
When I post grades for students
And I refresh the page
Then I should see a blue info message telling me why I can't modify
anything on the page

Change-Id: Ie669ec03e10126f8ad03ccabacc46cedca0bf1c7
Reviewed-on: https://gerrit.instructure.com/64890
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-27 20:27:48 +00:00
Jeremy Stanley 9aff943389 use course nicknames in notifications
test plan:
 - set up multiple users in a course
 - give some of these users different nicknames for the course
 - set up and confirm communication channels for these users
 - do things that cause notification messages to be dispatched
   to the users
 - ensure each user sees the correct course name in his/her
   notification messages

closes CNVS-24168

Change-Id: Ic49c888ae86b40ba42004e3c2dbc205e49480b79
Reviewed-on: https://gerrit.instructure.com/65544
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-27 20:04:25 +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
Nathan Mills 2028f03b79 add feature flag for lti2 reregistartion
refs: PLAT-1247

test plan:
the feature flag for reregistration should only show for site admins
at the root account level

the api for api/v1/#{context}s/:#{context}_id/lti_apps should have
reregistraation equal true for lti2 tools when the feature flag is enabled

Change-Id: I6a4c2f1deaa4ef8a2448dde374b93b79289ab96c
Reviewed-on: https://gerrit.instructure.com/65739
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-27 19:10:05 +00:00