Commit Graph

8052 Commits

Author SHA1 Message Date
James Williams 15a53801db reflect correct user counts in sis import
test plan:
* run a sis import that changes a user but does not
 update their email address
* the imported items count should include a User

closes #CNVS-14648

Change-Id: I67dfdf167c8eed77d3b4839fed5dbf905bcf513a
Reviewed-on: https://gerrit.instructure.com/65222
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-20 16:38:15 +00:00
Ryan Taylor 16f73a12e8 Prevents context_module linked permissions bug for quizzes
Closes CNVS-23870

Test Plan:
  - Confirm that module locked quizzes aren't accessible from API.

Change-Id: I4f33c99cd677972ed7592507e256378b7b1500d7
Reviewed-on: https://gerrit.instructure.com/64856
Tested-by: Jenkins
Reviewed-by: Brian Finney <bfinney@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2015-10-20 15:50:53 +00:00
James Williams 500c5d4e12 let account admins with view_all_grades see all user grades
test plan:
* create an account admin role with "View all grades" enabled

* create a student in multiple courses
* as the admin, should be able to visit "/users/X/grades"
to see all the grades for that student

closes #CNVS-23973

Change-Id: I32d6ba76c4056a280ea0db2dbb40e544ee3a8c41
Reviewed-on: https://gerrit.instructure.com/65182
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-20 15:07:06 +00:00
James Williams 29b8574fc9 quiz submission history should always show latest submission
test plan:
* create a quiz with limited attempts
* attempt the quiz as a student
* moderate the quiz to give the student extra attempts
* through the api, visiting the quiz submissions index
 (e.g. /courses/X/quizzes/Y/submissions)
 should return the correct "attempts_left" value

closes #CNVS-23744

Change-Id: I5cd5a135536826dfbb94dae61eadf0c256181731
Reviewed-on: https://gerrit.instructure.com/64931
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-20 13:24:30 +00:00
James Williams 6139e19318 update user account associations after course deletion
test plan:
* enroll a user in a course in a subaccount
* delete the course
* the user should not appear in the list of users for the
 subaccount (once jobs run)

closes #CNVS-24002

Change-Id: I4f761b19750e564b779b9a6e3657f0124c9a7741
Reviewed-on: https://gerrit.instructure.com/65173
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-20 13:24:05 +00:00
Cameron Sutter 5935a81e21 hide ungraded survey points
fixes CNVS-9746

test plan:
  * create an ungraded survey with questions that have points
    note: you must create the questions before you save the ungraded survey for the first time
  * navigate to the show page
  * points possible should be blank
  * navigate to the quizzes index
  * points possible for this survey should not show up

Change-Id: Ic34d55640ba7a0c1972cf26ad080a8adfee7dd8b
Reviewed-on: https://gerrit.instructure.com/62568
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Tested-by: Jenkins
QA-Review: Derek Hansen <dhansen@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-19 22:12:26 +00:00
Cody Poll 1413fb2d97 Filter react gradebook by course section.
fixes: CNVS-22021

Test plan:
  Have a course with multiple sections. Verify it
  	filters correctly.
  Have a course with no sections. Verify the dropdown
  	doesn't show up.
  Have a course with multiple sections. Search for a
  	name, and switch sections. Verify that the
        filter remains applied in the new section.

Change-Id: I6d3bb2db7320f00449eab9368f3381e77595d1d6
Reviewed-on: https://gerrit.instructure.com/63596
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cody Poll <cpoll@instructure.com>
Tested-by: Cody Poll <cpoll@instructure.com>
2015-10-19 21:48:25 +00:00
gbeckmann 9b9b94bf7d Spec: Tag agenda view spec with test_id and improve comment
Test Plan:
Run Spec

Change-Id: I34aa34b5a5e23ec64b8d756dde0291a3bd64467a
Reviewed-on: https://gerrit.instructure.com/65314
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-19 20:50:40 +00:00
James Williams c0e13b7361 improve automatic peer assignment
test plan:
* automatically assign peer reviews for an assignment
 to several students
* it should never mismatch the number of reviews for
 a student (e.g. for a peer review count of 3 it shouldn't
 ever assign 2 reviewers for one student and 4 to another)
* it should keep cycles (e.g. students reviewing
 their reviewer) to a minimum (1 or 2 pairs)

* due to the random nature of this feature,
 this should be attempted multiple times

 it will be easier to clear out all the peer reviews
 in the console with

 AssessmentRequest.for_assignment(assignment_id).destroy_all

 and then automatically assign again

closes #CNVS-15994

Change-Id: Ic7b7a5be4bc2edb6548f81ac9432d55d32d217fa
Reviewed-on: https://gerrit.instructure.com/65025
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-19 19:54:46 +00:00
Tyler Pickett 143f0bcf3e Update account associations when SIS imports fail
Change-Id: Icaabc5a02b2648f7c6e51c68c976c03904bead2e
Fixes: SIS-1406
Reviewed-on: https://gerrit.instructure.com/65304
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
2015-10-19 19:52:16 +00:00
Michael Hargiss 8684db80f9 spec: add quiz unpublish specs, fix frail spec
Test Plan:
- pass Jenkins
- check for syntax errors
- make sure new test_ids match up to existing test cases in TestRails

Change-Id: I03bdf2e20ca05ec6e8be6abadcdbc40931129442
Reviewed-on: https://gerrit.instructure.com/65188
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Jenkins
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2015-10-19 18:51:40 +00:00
James Williams 97221956a8 don't send group discussion notifications in unpublished courses
test plan:
* create an unpublished course with a group
* add a user to a group
* create a discussion topic in the group
* it should not notify the group user

closes #CNVS-24074

Change-Id: Ic22900035dac06b103fee6819164de916bcc7e8f
Reviewed-on: https://gerrit.instructure.com/65272
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-19 18:29:30 +00:00
Deepeeca Soundarrajan 4f0ddab561 spec:Dashcards spec - Add specs for dashcard functionality
Change-Id: I5ea7a3f9f7ecbaa6a9cf856b102151c308b00a4b
Reviewed-on: https://gerrit.instructure.com/65299
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-19 16:39:05 +00:00
James Williams a0b637d973 fix quiz question api content translation
should translate the html not the text

also shouldn't api format the output for create/update

test plan:
* edit a quiz and create a multiple choice question,
 giving one of the answers a "&", "<", or ">" character
* save the question, and without refreshing or saving the quiz,
 click to edit the question again
* the answers should not be malformed

* edit a quiz and upload a media comment into a quiz question
* save the question and without refreshing or saving the quiz,
 click to edit the question again
* save it again and save the quiz
* the media comment should be preserved

closes #CNVS-21976 #CNVS-21791

Change-Id: I5a00b4d3bdfab90f441421f158782a2472c2999d
Reviewed-on: https://gerrit.instructure.com/65088
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-19 15:53:29 +00:00
James Williams d8c2410d8a don't update badge counts for teachers after taking a quiz
test plan:
* take a quiz as a teacher
* it should not have a "1" mark in the "Grades" section
 in the course navigation

closes #CNVS-4227

Change-Id: I30c58aab7d54b21b917e9cabb405adaf7ef46384
Reviewed-on: https://gerrit.instructure.com/65169
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-19 15:29:38 +00:00
James Williams 499a082ec2 only show moderation todo list items to moderators
test plan:
* enroll a ta in a course with a moderated assignment
 needing moderation
* the todo item list should not show up on their dashboard

Change-Id: Ifbe9d17f546b8fb8f205522d0f8ff59fd5e83e82
Reviewed-on: https://gerrit.instructure.com/64995
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-19 15:15:49 +00:00
James Williams b83ba0c2ff allow restricted admins with :manage_content to edit syllabus
test plan:
* create an account admin role with "Manage all other course
 content" enabled but not "Manage courses"
* they should be able to edit a course syllabus

closes #CNVS-23982

Change-Id: I359e89383d32746062cf192faae1c70d09fb7163
Reviewed-on: https://gerrit.instructure.com/65194
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-19 15:10:38 +00:00
James Williams 67fc813508 fix locale and time zone settings when masquerading
turns out we actually do want to use the masqueree's time zone
 and locale, but only if they're not a fake student

test plan:
* masquerade as a user
* should have their timezone and locale

* enter student view
* should have your original user's timezone and locale

closes #CNVS-22800

Change-Id: I9115ae2054a7aaf8ba2d1a160b040c05039f9440
Reviewed-on: https://gerrit.instructure.com/65119
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-19 14:50:11 +00:00
Jermey Putnam 95019c5b4d spec: add tiny-mce italic button check
Change-Id: I901246674e3b1b95aecbdaf01a28c147b3fe8d97
Reviewed-on: https://gerrit.instructure.com/65277
Tested-by: Jenkins
Product-Review: Jeremy Putnam <jeremyp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
2015-10-16 23:18:39 +00:00
Jeremy Stanley f566717b58 Revert "disable SRGB's assignment editing for past grading periods"
This reverts commit c428f832f2.

Change-Id: Icf3fe526b3656fea90fa06e38c62cf3ec7df14e4
Reviewed-on: https://gerrit.instructure.com/65273
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2015-10-16 21:24:36 +00:00
Adrian Russell fc4cf725e0 Adds spec for checking allow group members to delete their own announcements
Test Plan:
 - Run specs

Change-Id: I3ca821e540618fa94d78009a9dc2c6d1a7002de6
Reviewed-on: https://gerrit.instructure.com/65238
Reviewed-by: Steven Shepherd <sshepherd@instructure.com>
Tested-by: Jenkins
Product-Review: Steven Shepherd <sshepherd@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2015-10-16 18:18:49 +00:00
Jeremy Stanley c5724fd4d5 spec: fix timed quiz selenium spec
fixes CNVS-23941

Change-Id: Ic8f539be5092f1780acbd39ca256b83c82bf512a
Reviewed-on: https://gerrit.instructure.com/64952
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2015-10-16 02:02:15 +00:00
Keith Garner 1d190418f8 observers using the api can see observees grades
API users enrolled in courses as observers can retrieve the grades of
observed users via the API for calls to course and assignments apis
when includes[]=observed_users is added to the call.

Summary of changes to the API:
1) for course enrollments:
    o new data elements passed back in enrollment records
      * user_id is added as a data element
      * associated_user_id is added if the enrollment type is
        ObserverEnrollment
    o if include[]=observed_users is added enrollment records for
      observees are passed back along with Observers enrollments

2) For assignment data:
    o submission is returned as an array when include[]=observed_users
    o submission may have multiple values if you are an Observer with
       multiple observees and include[]=observed_users is included

fixes CNVS-13310

test plan:
 - Create a course with two users besides the teacher: one student and
   one observer.
 - Set the observer to be an observer of the student
 - Create an assignment and create a submission for the assignment from the
   student

 - Call the API at /api/v1/courses/<course_id>?include[]=term&include[]=permissions&include[]=license&include[]=is_public&include[]=needs_grading_count&include[]=total_scores (substituting the proper course_id)
 - Observe in the enrollments section of the return there is no data
   for the observed student
 - Call the API at /api/v1/courses/<course_id>?include[]=observed_users&include[]=term&include[]=permissions&include[]=license&include[]=is_public&include[]=needs_grading_count&include[]=total_scores (substituting the proper course_id)
 - Observe in the enrollments section of the return there is data
   for the observed student including the grades

 - Call the API at /api/v1/courses/<course_id>/assignments?include[]=submission (substituting the proper course_id)
 - Observe that for the created assignment there is no submission information
   for the observed student.
 - Call the API at /api/v1/courses/<course_id>/assignments?include[]=observed_users&include[]=submission (substituting the proper course_id)
 - Observe that for the assignment there is submission information
   for the observed student.

 - Call the API at /api/v1/courses/6/assignments/36?include[]=submission&include[]=rubric_assessment&needs_grading_count_by_section=true&include[]=all_dates
 - Observe that for the assignment there is no submission information
   for the observed student.
- Call the API at /api/v1/courses/6/assignments/36?include[]=observed_users&include[]=submission&include[]=rubric_assessment&needs_grading_count_by_section=true&include[]=all_dates
 - Observe that for the assignment there is submission information
   for the observed student.

Change-Id: I53f6ff0e797d9248f78b33980af138b021547992
Reviewed-on: https://gerrit.instructure.com/64229
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Strand McCutchen <smccutchen@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2015-10-15 23:09:02 +00:00
Jermey Putnam 261867b255 spec: add tiny-mce bold button check
Change-Id: I3f82e9a59985084457464b88db065764067268dc
Reviewed-on: https://gerrit.instructure.com/65204
Tested-by: Jenkins
Reviewed-by: August Thornton <august@instructure.com>
Product-Review: Jeremy Putnam <jeremyp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2015-10-15 22:21:19 +00:00
Strand McCutchen c428f832f2 disable SRGB's assignment editing for past grading periods
Fixes CNVS-22398

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: Ide8194c8c3e0153a537908dce39330c79593cbdb
Reviewed-on: https://gerrit.instructure.com/63823
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Christi Wruck
2015-10-15 20:59:15 +00:00
Deepeeca Soundarrajan ec5f815e17 Quiz Taking - Specs for taking quiz, with and without restrictions
Change-Id: I7711d276007c7a8baee68839fc10f9c01654a502
Reviewed-on: https://gerrit.instructure.com/65191
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-15 18:51:03 +00:00
James Williams 02b3b2ee2b Revert "fix oauth_requests user foreign key violations"
This reverts commit c45101365b.

Change-Id: Icc49193ef99948a66ff83f7fc54f5bc596b82188
Reviewed-on: https://gerrit.instructure.com/65086
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-15 15:51:12 +00:00
Ryan Shaw 77978d9bd9 fix css/js includes in when new_styles is turned on
fixes: CNVS-23763

test plan:

* upload a custom css & js file in them editor
* you should see those files loaded on pages for 
  your account.

Change-Id: I85aac2b60da25694748f93b0dfd5aea57d3a09c1
Reviewed-on: https://gerrit.instructure.com/65033
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2015-10-14 15:37:17 +00:00
Graham Ballantyne 4bee429702 Properly escape filenames with slashes on local storage
When using local storage instead of S3, having a course short name with
a slash in it will cause an error (No such file or directory @
rb_sysopen) when trying to export the Gradebook as a CSV. attachment_fu
is receiving the slash as part of the file path, and erroring out
because it can't find the file.

This change moves the sanitize_filename method out of the attachment
model and into s3_backend. It also addes a different, local-storage
specific sanitize_filename method to file_system_backend.

This change also reverts cf341a4, which fixed this bug in
gradebook_csvs_controller (#640).

A CLA is on file under my employer, Simon Fraser University
(github.com/sfu).

Test plan:

enable local storage for canvas
create a course with a slash in the short name (e.g. CHEM 121 / CHEM
122)
attempt to export the gradebook
ensure the gradebook file was exported and downlaoded correctly

revert cf341a4 replace slashes with underscores in gradebook export filename

Reverts cf341a4 to previous behaviour, in prep for a proper fix in AttachmentFu itself.

remove sanitize_filename from attachment model

move original sanitize_filename to s3_backend

add local storage-specific sanitize_filename to file_system_backend

add tests for new sanitize_filename methods

force file_in_context_spec to use s3_storage

refactor file_system_backend#filename=

always pass `value` (the string being set as the filename) through `sanitize_filename`
2015-10-13 15:11:51 -07:00
Adrian Russell eda85f30b7 Adds spec for checking error messages on conversation compose modal.
Test Plan:
 - Run specs

Change-Id: If938051371bd09b52c18b75d83a12004e5c1beed
Reviewed-on: https://gerrit.instructure.com/65100
Reviewed-by: Derek Hansen <dhansen@instructure.com>
Product-Review: Steven Shepherd <sshepherd@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Tested-by: Jenkins
2015-10-13 19:53:27 +00:00
John Corrigan adad2fc64f exportable considers sort setting; EpubExport hooked up to Exportable
refs CNVS-21794
closes CNVS-21802

- Adds CC::Exporter::Epub::Exportable#sort_by_content_type?, which can
  be overridden by classes that `include` the module to point to where
  the setting can be found.
- Update CC::Exporter::Epub::Exportable#convert_to_epub to pass
  `sort_by_content_type?` to CC::Exporter::Epub::Exporter.new.
- Update EpubExport to include CC::Exporter::Epub::Exportable, and
  override / add to instance methods.

test plan:
- Navigate to `/epub_exports`.
- Observe a list of courses that are active & user is enrolled in.
- Click on the Generate button.
- Observe that info about the state of the export and the timestamp are
  added to the middle of the row.
- Observe that a progress bar is displayed while the export is in
  progress.
- Observe that upon completion, the progress bar is replaced by two
  button / links: Download & Regenerate.
- Click on the download link.
- Observe that an epub file is downloaded and can be opened in an
  eReader.
- Observe that the Regenerate button triggers the process all over
  again.

Change-Id: Ib42c2d2623c3ccd394105cdf0e3809b96c8a2e60
Reviewed-on: https://gerrit.instructure.com/63469
Reviewed-by: Matt Berns <mberns@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-13 16:52:38 +00:00
Andrew Butterfield 008c9fd2be SIS Import validates email address
refs CNVS-22801

Test plan:
* Create a csv file with the following contents

user_id,login_id,first_name,last_name,email,status
user_1,user1,User,Uno,BAD_EMAIL_ADDRESS,active

* Try to import this csv file
* Ensure that the import succeeds (i.e. the user is created)
* Ensure there is an import warning due to "BAD_EMAIL_ADDRESS"
  not being a valid email address

Change-Id: Iac85a894bbbbdd69cd4f88f6f893975f6c6436c5
Reviewed-on: https://gerrit.instructure.com/63990
Reviewed-by: Mark Severson <markse@instructure.com>
Tested-by: Jenkins
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Linda Feng <lfeng@instructure.com>
2015-10-13 14:51:50 +00:00
Steven Shepherd 0f2e2c13d6 Add specs for testing appointment group notifications
Test Plan:
  - Run specs

Change-Id: I3df01166308c7ce30fa6f690ecb209e936144b22
Reviewed-on: https://gerrit.instructure.com/63439
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Steven Shepherd <sshepherd@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2015-10-12 22:45:02 +00:00
Ryan Taylor e27c2d3f7b Don't show outcomes from deleted rubrics.
Closes CNVS-13587

Test Plan:
  - Create an outcome.
  - Enable the Learning Mastery Gradebook (LMG)
  - Create an assignment
  - Add a rubric to that assignment
  - Add an outcome to that Rubric
  - Submit that assignment as a student
  - Give a student a point value on that outcome.
  - Verify their information now shows in LMG
  - Remove the Outcome from the Rubric
  - Check LMG, outcome info should be gone
  - Delete the rubric
  - Check LMG, outcome info should be gone
  - QA: be sure to check outcomes that use averaging as part of their mastery
  evaluation (n_mastery and decaying average), just to make sure the math
  still works as expected.
  - Confirm the same behaviors when attaching/removing an outcome from a
    quiz. (Bonus, unreported bug, I think).

Change-Id: Icdcf674a669165200150f84eb3d943863e09a49d
Reviewed-on: https://gerrit.instructure.com/62055
Reviewed-by: Brian Finney <bfinney@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
2015-10-12 21:00:43 +00:00
James Williams 08c1b19cca change wording for moderated grading moderator tabs + dropdown
closes #CNVS-23927

Change-Id: I43d6ea74fcc676808c06b49067b7c21c0e7fc7d9
Reviewed-on: https://gerrit.instructure.com/64917
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-10-12 19:36:47 +00:00
James Williams c45101365b fix oauth_requests user foreign key violations
closes #CNVS-9599

Change-Id: I0d34bb01dfdfbbbef9ba574ffa3eecb1b3e36f42
Reviewed-on: https://gerrit.instructure.com/64988
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-12 19:34:57 +00:00
Jeremy Stanley 3fcd66df42 Edit Sections: gray out sections the user can't remove
test plan:
 1. enroll a user in a course via a SIS import
    (or just set a sis_source_id on the enrollment via console)
 2. as a teacher who is not an account admin, go to the People page
    and click the gear menu and Edit Sections
 3. the SIS enrollment should be grayed out, with no X button,
    and hover text stating "You cannot remove this enrollment."
 4. you should be able to add/remove other non-SIS enrollments
    (with and without refreshing the people page)
 5. "Remove From Course" should not appear in the gear menu if
    any non-deleteable enrollments exist
 6. a teacher who *is* an account admin should be able to delete
    the SIS enrollment

fixes CNVS-23009

Change-Id: I203286c537f7a2aede8d12b039ee47ec86a36a9b
Reviewed-on: https://gerrit.instructure.com/64771
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-12 19:32:23 +00:00
Jeremy Stanley 2a39e94425 spec: remove reset_ungraded_counts_spec.rb
because it's failing intermittently and it's long since
served its purpose

Change-Id: I0a2fa42b47d58bd249b090805f5c82d5280949c9
Reviewed-on: https://gerrit.instructure.com/64962
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2015-10-12 18:26:43 +00:00
James Williams 087fa77c63 don't show quiz answers to observers until after last attempt
test plan:
* create a quiz that allows multiple attempts and
shows correct answers after the last attempt

* attempt once as a student

* as an observer, visit the grades section and click on the
 quiz to see the student's quiz submission
* should not be shown the correct answers

closes #CNVS-22950

Change-Id: I237c4ee82b125b150c4983501e1d07f05a3f9f69
Reviewed-on: https://gerrit.instructure.com/64913
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-12 17:53:56 +00:00
James Williams 682b89d253 allow teachers to add calendar events to a group
test plan:
* as a teacher, create a group for a course
* navigate to the group page
* click on "View Calendar" on the right sidebar
* should be able to add a calendar event for the group

close #CNVS-23605

Change-Id: Id76b4a2bee878e00b19a34d4bd73c49ebb80b51e
Reviewed-on: https://gerrit.instructure.com/64899
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-12 16:27:15 +00:00
Simon Williams 92246c3e10 fix collaboration permission error
refs CNVS-23084

test plan:
- create a collaboration and invite someone to it
- copy the link to the collaboration from the email
- load it in a logged-out browser
- it should redirect you to login (not error)

Change-Id: Iac598dca52076cd4fb1593c2a056bb52099f4cb7
Reviewed-on: https://gerrit.instructure.com/64645
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-10-12 15:35:26 +00:00
Cameron Matheson c3a05c03e4 remove buggy whitelisting
fixes CNVS-23945

Test plan:
  * teachers can annotate student submissions
  * students can see teacher annotatoins
  * teachers can see student annotations

Change-Id: I2f85edd5b6100107c5a636de004561111a5430a3
Reviewed-on: https://gerrit.instructure.com/64965
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-10-11 23:06:02 +00:00
Rob Orton f1c10202cd when deleting a user through sis also delete group memberships
fixes CNVS-12892

test plan
 - enroll a user in a course
 - add them in a group in the course
 - delete user through sis
 - the group_membership should also be deleted

Change-Id: I86065eaaebb271594f16f3b60a586f42c897158c
Reviewed-on: https://gerrit.instructure.com/64854
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2015-10-10 05:15:38 +00:00
Sterling Cobb 13c9bcf2fe only show speedgrader link for moderated students
fixes CNVS-23900

  As a user moderating grades
  And I'm viewing the moderation page
  When I have not added anyone to the moderation set
  And a user does not have a grade
  Then I should not see the SpeedGrader link
  And I should just see a dash in that column

Change-Id: Ia9499cef3bcd12f3bd97e780dea9cd735078797d
Reviewed-on: https://gerrit.instructure.com/64887
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-10-09 22:52:53 +00:00
Spencer Olson 01aab7b64f final scores stay with students switching sections
When a student is moved from one section to another
on the same course, their current score and final score
will follow them and their grades will show up correctly
on the account level Grade Export report.

closes CNVS-19777

test plan:

* Create a course with 2 sections and some published
  assignments.
* Add students to the first section of the course.
* Grade those students on the assignments.
* At the account level, run the Grade Export for the term
* Notice everything looks fine.
* Move a student to the second section in the course.
* Run the grade export again
* Notice the grades look the same on the new report
  (before this bugfix, the grades would be blank on
   this new report)

Change-Id: Ic9135a6bb5bd778221db344f1b36a41b65ff7093
Reviewed-on: https://gerrit.instructure.com/64876
Reviewed-by: Strand McCutchen <smccutchen@instructure.com>
Tested-by: Jenkins
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2015-10-09 20:38:16 +00:00
Davis McClellan 55a0e5f907 ensures that no submitted files can be deleted
fixes CNVS-22117

test plan:
Prerequisites: A course that is not concluded in any way,
with a student enrolled and an online submission assignment
that is available for submission.
- As the student - submit a file for the assignment.
- Go to your personal files page (click on name or settings
  in the global nav - top right, then files)
- Try to delete the file you submitted
- Observe that you receive an "Unauthorized" message.
- As the teacher, view the student's submission in SpeedGrader
  and click on the download icon for the submitted file
- Should be able to download still

Change-Id: I313c5ba5504bc2bff81d42ee1c8593ced206b216
Reviewed-on: https://gerrit.instructure.com/63779
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-09 20:01:18 +00:00
Cody Cutrer 1bd856cffc make google drive timeout configurable
Change-Id: I52b46c71fe9a0c4c7d272b67658909e53902b383
Reviewed-on: https://gerrit.instructure.com/64921
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2015-10-09 19:32:39 +00:00
James Williams 5cd6b71839 use .json endpoint for grading standards
test plan:
* visit the grading standards page for an account
 e.g. "accounts/1/grading_standards"
* visit another page
* click the back button in the browser
* should load the page correctly

closes #CNVS-23912

Change-Id: Ia437383e3e2c981260db331d3514b26be554e918
Reviewed-on: https://gerrit.instructure.com/64843
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-09 16:49:13 +00:00
James Williams 8b0d764cae moderated grading speedgrader refreshing on changes
test plan:
* as a moderator, changes to a student's provisional grades
 or provisional grade selection made after loading speedgrader
 should be loaded when switching students

closes #CNVS-23274 #CNVS-23321

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

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

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

Refs CNVS-10866

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

Change-Id: Idc117a61040a43b038272afec9319bada43e5f54
Reviewed-on: https://gerrit.instructure.com/64068
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Tested-by: Jenkins
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-08 22:48:10 +00:00
John Corrigan 3889ab2b67 render inline media in player
refs CNVS-21798

Audio & video content that is uploaded and displayed as part of the body
of an assignment, discussion topic, wiki page or quiz description is now
viewable in an ePub.

test plan:
- For an existing course, uploaded and display inline audio or video
  content (mp3 or mp4) in assignment descriptions, discussion topic
  descriptions, wiki page bodies, and quiz descriptions.
- Export the content as an epub.
- Observe that inline audio & video is playable in the epub.

Change-Id: Ia5e1a892615152205dfebf1a7a397e602cfab9d5
Reviewed-on: https://gerrit.instructure.com/64234
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-08 22:34:32 +00:00
Brad Horrocks 63fb5ab470 Generate a access token with the refresh token
Added grant_type request param. It will default to authorization_code if
its not set AND the code param is supplied.

Updated errors to be OAuth2 compliant. At some point we should remove
the legacy keys from Canvas::Oauth::RequestError.ERROR_MAP

Fixes PLAT-1219

Test Plan:
You MUST have a developer key
You MUST have a valid refresh_token
See test plan if you need the above: https://gerrit.instructure.com/#/c/63256/

Sample curl (plz change refresh_token, client_id, and client_secret):
curl 'http://blackmesa.canvas.dev/login/oauth2/token' --data
'refresh_token=1c8d2ff5498eb879db9737d494a4bbd64810c84cf7e1776d1f4cebdb9699244c6209add4838d02f0d67b969a599cee589fecbeef5f84ababb1ef6e4cb9099b68&client_id=30000000000001&client_secret=AHv7hXoImZdplvbTEcZaJ9zJF51F7ny82iHz0dCnmbIdqndA2cGU75iJnrezH5QB&grant_type=refresh_token'

Change-Id: I02d3f9c7dd01f26076720d74dea61a8c682b8f9a
Reviewed-on: https://gerrit.instructure.com/64433
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2015-10-08 21:53:53 +00:00
Jeremy Stanley 7ade330309 investigate plugins failure
Change-Id: Id75796c371b41d233a2368bc99aa073f62bbcf67
Reviewed-on: https://gerrit.instructure.com/64779
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2015-10-08 21:14:35 +00:00
Cody Cutrer f3ae13a1d6 fix case sensitivey of sis_login_id lookups in the API
fixes CNVS-23835

test plan:
 * use any API endpoint that takes a user id (and thus sis_login_id)
 * change the case of the login id (all uppercase, etc.) in the URL
 * it should still find the user

Change-Id: I0821b5d7213142aefa7e26699c26b981845a220b
Reviewed-on: https://gerrit.instructure.com/64586
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-10-08 19:25:51 +00:00
James Williams 6cf008fd48 moderated grading todo items for moderators
test plan:
* create a moderated assignment
* make a provisional grade
* the assignment should show up in the
todo list for the moderator
 to "Moderate X" and take them to the
 assignment moderation page
* the todo item should be ignoreable
 (either permanently or until a mark is created/changes)

closes #CNVS-23307

Change-Id: I7007ba948e688ca5864a0d851c153a288bef4233
Reviewed-on: https://gerrit.instructure.com/64734
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-08 16:26:27 +00:00
Jeremy Stanley 2e84b4dec2 respect section limitations when resending invitations
test plan:
 - set up a course with two sections
 - create a TA in one section, with privileges limited to
   that section
 - enroll students in both sections, but do not
   accept the invitations
 - as a TA, look at the course people page. you should
   see only students in your section
 - click the "resend invitations" link. only students in your
   section should receive invitations

fixes CNVS-23593

Change-Id: Id3d1aef61c8ded1c81effa97e18687b4df5ac906
Reviewed-on: https://gerrit.instructure.com/64616
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-10-08 14:29:46 +00:00
Jeremy Stanley 59ed78773a ensure locked-file permission isn't cached beyond unlock_at
test plan:
 - as a teacher, upload a file and set it to be available in the
   near future (say, a few minutes from now)
 - as a student, attempt to view or download the file prior to
   its availability date.  you should be told it's not available yet.
 - wait for the file's unlock time
 - as the student, attempt to view the file immediately after its
   scheduled availability. you should be able to do so.

fixes CNVS-23620

Change-Id: I37f8af448be042e0e1806eee22b8d2665d066a25
Reviewed-on: https://gerrit.instructure.com/64592
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-10-08 14:03:03 +00:00
Jeremy Stanley 8ca368c6c0 fix server error with modules api+inline items as observer
also add test coverage for list modules/include items/
differentiated assignments

test plan:
 - use the list modules API with include[]=items as an observer
 - you should not get a server error

fixes CNVS-22967

Change-Id: I53db1f4c0e01e8c9acd765aa315e662f3f72992d
Reviewed-on: https://gerrit.instructure.com/64436
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-10-08 14:02:25 +00:00
Nathan Mills 7e4ffb6ffc remove expiration code for oauth tokens
test-plan:
when you get an access via oauth2 token you shouldn't get an expiration, and it shouldn't be set in the db

Change-Id: Ie0b15b54ef789b9a94b726026c09fe9497f0adc5
Reviewed-on: https://gerrit.instructure.com/64749
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-07 21:59:34 +00:00
Dan Minkevitch 731ee214da Allow admins to change users' default emails
fixes CNVS-23604

Test Plan:
1. As an Administrator, create a user (Users > Add a New User)
2. Add an email address and save the user
3. Edit the User (Users > click on name > click Edit link in Name and Email section
4. Administrator should be able to edit the email address field
5. Upon saving the updated email address, the change should be reflected in the UI

Change-Id: Iaba72fb5bd8bd75697f3d2e3c869a75b0686310f
Reviewed-on: https://gerrit.instructure.com/64466
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-07 21:30:37 +00:00
Cameron Matheson 189ce7e3f2 make Turnitin::Client#id shard aware
refs CNVS-17473
fixes CNVS-21075

Test plan:
  turnitin still works

Change-Id: I36c34b2a4be67e4d0348dba2de43880ce4a8520a
Reviewed-on: https://gerrit.instructure.com/56782
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-10-07 20:57:02 +00:00
Heath Hales 9cbd561007 Adding specs for 69159, 403055, and 403056 - Profile Pics - From Gravatar - Gravatar Link
Change-Id: I64cc0e6c9a7333870d1a48b4f23873c55a98daf1
Reviewed-on: https://gerrit.instructure.com/64636
Tested-by: Jenkins
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Heath Hales <hhales@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
2015-10-07 20:29:13 +00:00
Michael Hargiss 6a86debd14 add quiz specs, move quiz vdd specs into their own directory
Test Plan:
- pass Jenkins
- check for syntax errors
- make sure new test_ids match up to an existing test case in TestRails

Change-Id: Ie24fd14f94249cd433f7d315a2637e1e767eae6d
Reviewed-on: https://gerrit.instructure.com/64434
Tested-by: Jenkins
Reviewed-by: Heath Hales <hhales@instructure.com>
Product-Review: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
2015-10-07 19:16:30 +00:00
Clay Diffrient 6b05a64715 Makes the moderation page load all students
This will make the page load all the students in batches of 50.
It will continuously load them all until they are all loaded.
Understandably this isn't the best for the DB, but it works well
in the context of accessibility (which lazy load on scroll) doesn't.

Once a load more button or the like is clarified for UX and/or we
see what impact this has in production we can make adjustments
to not auto-load if needed.

closes CNVS-23839

Test Plan:
  - Set up a moderated grading environment
  - Make sure you have > 50 students (200+ would be a great test)
  - You should go to the moderation page and see all the students
    listed.

Change-Id: Ia55b75bffc4f44325cb62064bc9cb6b7a239b655
Reviewed-on: https://gerrit.instructure.com/64612
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-10-07 18:16:13 +00:00
John Corrigan c825ffc544 render images, audio and video in epubs
fixes CNVS-21798

Summary of changes:
- Add files to epub as it's being built.
- Update links to image files to be path specific to epub.
- Update links to audio files to be epub-compatible `<audio>` tags.
- Update links to video files to be epub-compatible `<video>` tags.

test plan (requires console access):
- Prereq: have a course with uploaded images, audio and video files, and
  reference that media in assignment bodies.
- Make sure you have at least one completed content export in the db
  (can be triggered via console or via the content export UI).
- open rails console
- run the following commands:
- - `ContentExport.include(CC::Exporter::Epub::Exportable)`
- - `ContentExport.last.convert_to_epub`
- This will output a path to the generated epub, something like:
"/var/folders/7g/w8y0n7_j18v65h93xhmm9z4hxzj3r2/T/2052fbd0-860d-4114-9969-0adc7f5ecb79.Name
of Course.epub"
- Open up the folder of the file (assuming you're on Mac OSX) like so:
`open -a finder /var/folders/7g/w8y0n7_j18v65h93xhmm9z4hxzj3r2/T`.
- Find the file in that directory (in this case the file name is
  2052fbd0-860d-4114-9969-0adc7f5ecb79.Name of Course.epub
- Observe that images displayed inline work.
- Observe that links to images work.
- Observe that links to audio have been converted to audio players, and
  that the controls work.
- Observe that links to video have been converted to video players, and
  that the controls work.
- Repeat steps for discussion topics, wiki pages & quiz descriptions.

Change-Id: I5a48c3300ccffc00230d94137a93731394ef0ebb
Reviewed-on: https://gerrit.instructure.com/62842
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-07 17:20:28 +00:00
Sterling Cobb be50c31162 add persistent mark radio buttons
fixes CNVS-23034

Test Plan
- Go to the moderated page
- Add a reviewer so you can select multiple marks
- Select a mark
- Close the page then navigate back to the page
- You're mark selection should still be there

Change-Id: Iee873e6563844f7f1afc01bc817834bc18146717
Reviewed-on: https://gerrit.instructure.com/64550
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-10-07 16:13:31 +00:00
Dylan Ross 9702a270de don't show mute icon for non graded assignments
don't show the mute icon in the total cell of the
gradebook for assignments that are not graded

closes CNVS-23411

test plan:
  - create an assignment and change the "Display Grade as"
    option to "Not Graded"
  - mute the assignment through the speedgrader
  - create one more assignment, this one with a point value
    and "Display Grade as" to "Points", so that you don't
    get a warning in the Gradebook that there are no
    assignments worth any points.
  - ensure there isn't a warning icon in the total column
    of the gradebook

Change-Id: I4f8b49f827e3dbcc41e2375b785a198cf4ccf4f9
Reviewed-on: https://gerrit.instructure.com/64416
Tested-by: Jenkins
Reviewed-by: Cody Poll <cpoll@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Dylan Ross <dross@instructure.com>
2015-10-07 15:42:07 +00:00
Benjamin Porter bce1c3fd3f Outcomes Import API: Expose ISTE standards
Expose ISTE standards as available standards when clients request the
list of standards available to import

Fixes CNVS-23789

Test Plan:

    - Make an API request to the "available" action of the
      OutcomesImportController:

      curl -H "Authorization: Bearer <your-key>"
      http://<canvas-domain>/api/v1/outcomes_import/available

    - Observe that the ISTE standards are in the list.  There should be
      three: "NETS for Administrators, NETS for Teachers, NETS for
      Students"

Change-Id: I07597719596269e06eb6773ba298c453b6626e0b
Reviewed-on: https://gerrit.instructure.com/64481
Tested-by: Jenkins
Reviewed-by: Brian Finney <bfinney@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
QA-Review: Benjamin Porter <bporter@instructure.com>
2015-10-07 05:13:49 +00:00
Clay Diffrient 60d3834e9d [a11y] Adds context to module level buttons
Makes it so that screenreaders are given specific module context
i.e., the module name, whenever they navigation to a module
level button

fixes CNVS-22866

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

Change-Id: I1ba3f5e5c09e8186667af38eb19852295d5f01e2
Reviewed-on: https://gerrit.instructure.com/63049
Product-Review: Aaron Cannon <acannon@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
2015-10-06 20:30:45 +00:00
Jeremy Stanley f53907c0dd fix lock-by-date modules in public courses
test plan:
 - create a public course
 - add some modules
 - set one or more modules to unlock in the future
 - ensure that both logged-in students and non-logged-in users
   see that modules that are locked by date appear as such
   in the modules UI

fixes CNVS-15095

Change-Id: Id32d8af9cacf9412d3fbc6eed9da8171bf36194b
Reviewed-on: https://gerrit.instructure.com/64329
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-10-06 19:03:40 +00:00
James Williams 2b72c8141e fix assignments on syllabus page
test plan:
* create a course with assignments with due dates
 and calendar events
* the syllabus page should differentiate between
 the assignments and regular events with bold text
 and also say "due by X"

closes #CNVS-22502

Change-Id: I7032c6af99482beda4a15a0d511b2d205af442b2
Reviewed-on: https://gerrit.instructure.com/64573
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-06 18:18:56 +00:00
James Williams 2ba3c0b17b fix permissions for admin users without :manage_courses
also add a read-only view for course settings

test plan:
* create an account role with permissions to do everything
 except "Manage Courses" and
 log in as an account admin with that role:

* they should be able to view unpublished items
 (modules, assignments, etc)

* they should be able to get to the course settings page
but they should not be able to edit the settings
 (or try to, unsuccessfully)

* they should not be shown options on the course home
 they don't have the rights to edit, such as
 "Choose Home Page"

* also to be safe, make sure all the course settings are
editable for a full admin

closes #CNVS-22594

Change-Id: I57a7fe9dd04b6ec35fd6e2b311e02b9e43d82929
Reviewed-on: https://gerrit.instructure.com/63064
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-06 17:15:38 +00:00
Jon Willesen 8dd8e03623 record anonymous grading in grade change audit log
anonymous grading is currently only possible from speedgrader.
when a grade is changed in speedgrader, it now sends in a
parameter that indicates whether the "hide student names" flag
was on (by any means).

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

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

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

closes CNVS-21537

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

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

closes #CNVS-23264

Change-Id: Ia7e75e30220ef115ff634c16ad6a360efb2a9fe4
Reviewed-on: https://gerrit.instructure.com/64404
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-06 16:17:37 +00:00
Alex Boyd bb8e93481f Use short message ids in reply to addresses
Fixes CNVS-22730

Test plan:
 - Set up sharding
 - Set up incoming and outgoing mail
 - Create two students
 - Ensure that student 1's notification preferences are set to
   send email immediately after receiving a conversation message
 - Enroll student 1 and student 2 in a common course
 - As student 2, send a conversation message to student 1
 - Open the email sent to student 1
 - Ensure that the reply-to address of the email looks like this:
     ...+5fd8e496846e6bf20f1d2f7cf62812670154be03-1~2@...
   rather than this:
     ...+5fd8e496846e6bf20f1d2f7cf62812670154be03-10000000000002@...
 - Reply to the email
 - Ensure that the reply was posted as a response to the
   conversation message on student 1's behalf

Change-Id: I7f515056d92a2a3ead96bc4baabdd22ec4dd1130
Reviewed-on: https://gerrit.instructure.com/63814
Tested-by: Jenkins
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Alex Boyd <aboyd@instructure.com>
2015-10-06 15:18:19 +00:00
Dylan Ross 05a9d01ca3 fixes react gradebook js test failures
test plan
  ensure `bundle exec rake js:dev` tests pass

Change-Id: Ifcc54fb52e603251cb9ca4d923d395a3cad5fff1
Reviewed-on: https://gerrit.instructure.com/64605
Reviewed-by: Cody Poll <cpoll@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-10-06 13:13:02 +00:00
Simon Williams 39818ea9e2 lock announcements after CC based on setting
fixes CNVS-23357

test plan:
- run course copies with announcements with and without the course
  setting "Disable Comments on Announcements" being set.
- settings should be correct on copy
- announcement should be appropriately locked/unlocked on copy

Change-Id: Ib75af5ffbdbd4a181d021706139d56ccc8c82214
Reviewed-on: https://gerrit.instructure.com/64126
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-10-05 22:45:01 +00:00
Cameron Matheson 4084f05ae6 more logging around "error establishing firefox connection"
refs CNVS-23355

Test plan:
  * selenium tests should still pass

Change-Id: Ia9cd42a41916c695f68f9823c9b4916ac588a971
Reviewed-on: https://gerrit.instructure.com/64476
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2015-10-05 20:33:33 +00:00
Jennifer Stern 6992b7ea71 (NUI) Highlight Commons menu item in global nav when it's opened
fixes CNVS-22876

Test plan:
This refactors the logic to determine whether a nav item should be
highlighted, so we should test all of the nav items.

Change-Id: I4b60d662b498ae0ee31663b123465e602643d690
Reviewed-on: https://gerrit.instructure.com/64372
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2015-10-05 19:04:36 +00:00
Cody Poll 6c30ea57cf Fixing react scrolling issue
Scrolling performance was pretty horrendous. Now it's not.

Test plan:
  This commit touched a lot of different parts of the react gradebook, so it
  basically needs a regression test against how the gradebook was before. Some
  examples include:
    - Column ordering
    - Search for a student functionality
    - Filter by grading periods
    - Adding new grades
    - Editing old grades

fixes CNVS-23053

Change-Id: I0360704f9581775471fc1c0864b7ae863e7a1355
Reviewed-on: https://gerrit.instructure.com/63307
Tested-by: Jenkins
Reviewed-by: Dylan Ross <dross@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cody Poll <cpoll@instructure.com>
2015-10-05 18:26:12 +00:00
James Williams fa2ccc3970 improve moderated grading needs_grading_count with null scores
test plan:
* as a provisional grader for a moderated assignment,
 merely adding a comment (and not giving a grade)
 should not decrement the
 "needs grading" count on the course dashboard sidebar

 closes #CNVS-23758

Change-Id: Ie6fa807f468a58d5429f0c93c360dc4095cd759d
Reviewed-on: https://gerrit.instructure.com/64389
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-05 17:21:43 +00:00
Brad Horrocks d1efaa4004 Dev keys created from site admin shouldnt have an account id
Fixes PLAT-1258

Test Plan:
Go to '/developer_keys' create a dev key.
Make sure it doesn't have an account id associated with it

Change-Id: I8c104e4b1a7b7fe01d4a4d4757e8b3b451775ddd
Reviewed-on: https://gerrit.instructure.com/64236
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2015-10-05 16:06:36 +00:00
Matthew Berns c3c899112a do not validate allowed extensions if file upload is not a submission option
fixes CNVS-23019

test plan:
- create an assignment and select file upload as a submission type
- enable option to restrict file types and leave field empty
- disable file upload as a submission option
- assignment should let you save without validating for restricted file types

Change-Id: I2c84e4e0261a7ae4176960e004ba1baded6752bc
Reviewed-on: https://gerrit.instructure.com/62867
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-05 15:36:05 +00:00
Spencer Olson b57ce34ef6 grading period filtering respects overrides
the grading periods filter in the gradebook and
on the student grades page should now respect
overrides.

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

test plan:

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

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

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

closes CNVS-21404

Change-Id: I19bd5c48f1d2d7fa3eca52c97476367b5165c1fa
Reviewed-on: https://gerrit.instructure.com/63975
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Reviewed-by: Davis McClellan <dmcclellan@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-05 14:57:57 +00:00
James Williams dbe56e5233 add requirement_count to course copy
test plan:
* create a module with some required module items
* set it so students only need to "Complete One Item"
* copy the course
* the "Complete One Item" setting should be retained

closes #CNVS-23713

Change-Id: I7f113d34b2247c13c9984124c2364a6fece878b6
Reviewed-on: https://gerrit.instructure.com/64496
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Charles Kimball <ckimball@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-05 13:00:10 +00:00
Dylan Ross c953e011ea fixes set group weights regression
this commit also adds title attribute to assignment
groups cell

closes CNVS-23746

test plan
  - open set weights dialog
  - change some assignment weights or toggle
    the 'weight final grade based on groups toggle'
  - save
  - ensure grades are reflected in the gradebook

  - ensure hovering over an assignment
    group shows the score of the assignment group
    divided by the points possible. For example,
    "10 / 15"

Change-Id: Iad384fd0be0a424c3bf779a650f559f621402b5f
Reviewed-on: https://gerrit.instructure.com/64317
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Dylan Ross <dross@instructure.com>
2015-10-02 20:57:08 +00:00
Simon Williams 5b9497d77a re-include session_id in logs
Rack generates a session_id internally which we like to include in logs
for tracking requests. This session_id wasn't getting picked up by out
log wrapper because of interdependencies in the middleware call stack
and bugs in rack/rails. Read on for details:

See the order of the middleware stack by running: `rake middleware`

The main players in this saga are:
- RequestContextGenerate middleware
- session store middleware:
    ActionDispatch::Session::EncryptedCookieStore <
    ActionDispatch::Session::CookieStore <
    Rack::Session::Cookie <
    Rack::Session::Abstract::ID
- Rack::Session::Abstract::SessionHash

How to intercept the session_id:

The Rack session_id is generated lazily the first time the SessionHash
(which is a thin wrapper around a ruby hash) is read from or written to.
This needs to happen after the session has been loaded out of the cookie
by the session store middleware, which happens after our
RequestContextGenerate middleware.  We don't just want to move the
generation of the request id later, because then the first couple log
lines will not tagged with a request id.

So our idea was to capture the session_id in an un-encrypted cookie that
could be read early in the middleware call stack (which is fine to be
public, and only used for logs to not a big deal if it's tampered with).
Again, this happens lazily on first access, so our best bet is to catch
it on the way out of the middleware stack.  But when
RequestContextGenerator returns it's already too late, because cookies
have already been written to the header.  So we introduce a new
middleware that captures the session_id, writes it to a cookie, and then
modify RequestContextGenerator to read from the cookie.

This works great except that with this setup, after a log in attempt the
redirect after login would still be logged with the old "unknown"
session_id and not the new, logged-in session_id.  When a session is
cleared (what happens at log in time), ActionDispatch implements
a `reset_session` that we call, which calls session.destroy, but rack
had not implemented session.destroy, so rails patched it, but then after
calling destroy, they reset the session to a plain hash (not
a SessionHash), so an id isn't generated until the plain-hash session is
written to the cookie, which happens AFTER our new middleware finishes
in the stack (and never sets it in the place we look for it).

Rails 4:

Rack internals changed somewhat between rack-1.4 and rack-1.5 and the id
moves from being stored in the session options hash to the main session
hash.  We'll need to fix this for rails 4.

A better way:

It may be better to try to keep a handle on the actual SessionHash so
that we can dynamically load the id for log lines, and pick up id
changes immediately as they happen, mid-request. We'd have to make sure
the lookups weren't too expensive though, vs just saving a string.

fixes CNVS-15259

Test plan:
- start a server, make a request
- you should see log lines start with [session_id, request_id] and
  session_id should be present, not just "-"

Change-Id: I0289db255b2b0bc3b118e32fc1d0d9381455b1ec
Reviewed-on: https://gerrit.instructure.com/64092
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-10-02 19:33:50 +00:00
James Williams 1df0ef3bd1 add "access_restricted_by_date" field to courses api
test plan:
* restrict a student from viewing a course using
 course dates
* the courses api should return "access_restricted_by_date"
 for that course

closes #CNVS-22905

Change-Id: I5d5eada2e685ed18fd9ecbe474493c01818297ee
Reviewed-on: https://gerrit.instructure.com/63074
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Charles Kimball <ckimball@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-02 19:20:49 +00:00
Ryan Taylor 955f9097c8 Closes N+1 query dependency for quiz submissions
Excludes a particularly expensive calculated attribute from the
calculations required for API index operations.  No known conflict here,
as this functionality was originally added when EMBER quizzes was being
built.

Closes CNVS-23388

Test Plan:
  - Confirm that all quiz submission API and UI interactions are
    unaffected.

Change-Id: Ic71c46fcf377ebc935dbc827dd1cf3be6726f0c0
Reviewed-on: https://gerrit.instructure.com/63776
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2015-10-02 18:40:07 +00:00
Clay Diffrient 4f3dd64ffe Make grade column reflect the selected provisional grade
closes CNVS-23035
closes CNVS-22917

Test Plan:
  - Set up a moderated grading environment
  - Make sure there are at least 2 provisional grades for a student
  - Selecting between the radio buttons for that student should
    update the grade column

Change-Id: I9af9ee94cc0815a350b883c5618b63034500f950
Reviewed-on: https://gerrit.instructure.com/64284
Tested-by: Jenkins
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-10-02 18:07:47 +00:00
James Williams 34cbc4cd43 moderated grading speedgrader final mark drop-down
test plan:
* create a moderated assignment with student submissions
* add the students to the moderation set

* as a moderator (teacher) go to speedgrader

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

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

closes #CNVS-23262

Change-Id: Ie51f378a8665ba78204ca65bb65f4286ada5337d
Reviewed-on: https://gerrit.instructure.com/64105
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-02 15:58:52 +00:00
Jennifer Stern a401d84e31 Fix fragile dashboard card spec
The tests were clicking on the icon element, whereas clicking
on the link element should be more stable. The changes in this
commit were required to add unique css classes to the link elements
to use as hooks in the selenium test.

fixes CNVS-23725

Change-Id: I581554f32a700d918454b76a78f8ab5b4c48d5d5
Reviewed-on: https://gerrit.instructure.com/64235
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Tested-by: Jenkins
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
2015-10-01 21:52:38 +00:00
Matthew Berns bb7d6557eb add module sorting to epub
closes CNVS-21801

this adds module sorting functionality to ePub generation

to generate via console
- already have an .imscc file from an exported course
- in rails console
  ContentExport.include(CC::Exporter::Epub::Exportable)
  ContentExport.last.convert_to_epub  (for module sorting)
  ContentExport.last.convert_to_epub({sort_by_content: true}) (for content sorting)

Change-Id: Ie82db12a551ff338d616162211fa7bafcd9f29fe
Reviewed-on: https://gerrit.instructure.com/62681
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-01 19:59:17 +00:00
Jeremy Stanley 94eda6a3f9 spec: fix fragile "should validate numerical input" spec
Change-Id: Ic0a99893c9ba0d3afdb685d1bdd3cb89fb5d7ef4
Reviewed-on: https://gerrit.instructure.com/64408
Reviewed-by: Brian Finney <bfinney@instructure.com>
Tested-by: Jenkins
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2015-10-01 18:27:14 +00:00
Josh Orr ad78d4c94e Enable self registration through api without a bearer token
Adds the following endpoint:
	POST api/v1/accounts/1/self_registration

Fixes MBL-4838

Test Plan:
1.  Enable self-registration on the test domain
2.  Call the above endpoints with all of the params necessary to create a user but without any bearer token.
3.  Ensure that user was created properly

Change-Id: Ia768516fec4f1dc8c55222375c9e26c9905e1ad8
Reviewed-on: https://gerrit.instructure.com/64064
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Josh Orr <jgorr@instructure.com>
2015-10-01 17:35:44 +00:00
James Williams 4ff8b7368e spec: fix gradebook_history_api_spec fragile failures
`date_string` collides with a method in text_helper

Change-Id: If7ab88a2abe5a0d890ae0b04059e92ad67b3be4c
Reviewed-on: https://gerrit.instructure.com/64319
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-01 16:07:53 +00:00
James Williams b68d3ca458 always allow students to progress in unlocked modules
even if they no longer have fulfilled the modules
 prerequisites (i.e. a requirement was added after
 the fact but the user was not relocked)

test plan:
* create two modules
* make the first a prerequisite for the second
* add a required module item to each

* as a student, complete the first module to unlock
 the second module
* as the teacher, add another required item to the first module
 but do not re-lock the modules (so module 2 should stay unlocked
 for the student)

* as the student, should be able to complete the second module
 even though the first one is now no longer complete

closes #CNVS-23640

Change-Id: Ic0c4c744d446ed0487172f819beafd186d335a09
Reviewed-on: https://gerrit.instructure.com/64316
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-01 12:42:25 +00:00
Michael Hargiss 3902bac824 refactor quiz creation specs, add new ones
Test Plan:
- pass Jenkins
- check for syntax errors
- make sure new test_ids match up to an existing test case in TestRails

Change-Id: I45ddc0957149dbde4075f90ded79ffc6e755b1b0
Reviewed-on: https://gerrit.instructure.com/64065
Tested-by: Jenkins
Reviewed-by: Adam Phillipps <adam@instructure.com>
Reviewed-by: Derek Hansen <dhansen@instructure.com>
Product-Review: Derek Hansen <dhansen@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
2015-09-30 21:59:21 +00:00
Clay Diffrient dcae1b8d58 Convert FlashMessageHolder to a dumb component with tests
closes CNVS-23614

Test Plan:
  - Setup a moderated grading environment
  - Use the + Reviewers button
  - You should see the flash message show
  - Use the publish button
  - You should also see that flash message

Change-Id: I350fba7bc0dd964f35df9aaf5f51224424182bb8
Reviewed-on: https://gerrit.instructure.com/64104
Tested-by: Jenkins
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-09-30 21:32:14 +00:00
Joel Hough 4e6ce06247 don't send to notification endpoints whose token has changed
fixes CNVS-22551

test plan
- see repro step on the ticket
- ensure multiple notifications aren't sent

Change-Id: Ia3e3b5623cd4c8bd78961e1857a045d81b0bc91f
Reviewed-on: https://gerrit.instructure.com/64174
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-09-30 19:54:14 +00:00
Sterling Cobb 746f5a2c7d refactor store structure
fixes CNVS-23636
fixes CNVS-23690

This touches almost every part of the moderated grading page so needs a
full regression test.

Change-Id: I86cfc5052bd554c4add61337f0e08e091b1b4c7c
Reviewed-on: https://gerrit.instructure.com/63989
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-09-30 19:07:11 +00:00
Abhishek Singh 4ba84e29a4 adds UI & backend for offline content
fixes CNVS-21793, CNVS-21794, CNVS-21795

- Adds EpubExport model to manage state of generated epubs.
- Adds controller to list, create & show epub exports.
- Adds a mini react app to manage UI for creating epub exports.
- Adds shared ApiProgressBar react comoponent to diplay a progress bar
  that polls the progress API.
- Updates ContentExport to have a relationship with EpubExport.

test plan:
- Navigate to `/epub_exports`.
- Observe a list of courses that are active & user is enrolled in.
- Click on the Generate button.
- Observe that info about the state of the export and the timestamp are
  added to the middle of the row.
- Observe that a progress bar is displayed while the export is in
  progress.
- Observe that upon completion, the progress bar is replaced by two
  button / links: Download & Regenerate.
- Observe that Download at the moment does nothing... this is because
  the backend is not yet hooked up to generate the epub.
- Observe that the Regenerate button triggers the process all over
  again.

Change-Id: I6cd844baa06db0c6648ad19389d235b89659919c
Reviewed-on: https://gerrit.instructure.com/62135
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-09-30 16:22:18 +00:00
Jeremy Stanley 857db08135 publish files when publishing module
test plan:
 1. add an unpublished file to an unupblished module
 2. publish the module
 3. the file's module item should appear published
 4. a student should be able to click on the module item
    and get to the actual file, instead of an error message

fixes CNVS-22955

Change-Id: I5c5736afc7e4b984f7aed56df3b0cc278b4bb467
Reviewed-on: https://gerrit.instructure.com/63905
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-09-30 00:09:42 +00:00
Clay Diffrient 64e654097a Make moderation screen header a dumb component
This removes the smarts from it and makes the component a pure
component.  It also adds tests.

closes CNVS-23615
closes CNVS-23637

Test Plan:
  - Set up a moderated grading environment
  - The buttons in the header should work as previously expected
    - The + reviewers button should add people to the moderation
      set
    - The publish buttons should first confirm the choice, then
      publish everything (and make the page read only)

Change-Id: I15e5c7b7dedec12224ba8ee6f270c32988547364
Reviewed-on: https://gerrit.instructure.com/64131
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-09-29 20:49:50 +00:00
Jeremy Stanley 622c56c5a1 fix provisional rubric assessments not updating in speedgrader
test plan:
 - enable moderated grading for a course and create a moderated
   assignment
 - associate the assignment with a rubric
 - submit the assignment
 - as a TA, mark the assignment's rubric in speedgrader
   (click View Rubric, enter a score and comments, click
   Save)
 - the score and comments should be immediately visible in
   speedgrader
 - if you click View Rubric again, the score and comments
   entered previously should remain visible

fixes CNVS-23686

Change-Id: I01f22c957bc092b58d0d095a779247d77f9006d3
Reviewed-on: https://gerrit.instructure.com/64185
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-09-29 18:48:04 +00:00
Clay Diffrient 1d35d05060 [spec] Add spec to ModerationApp component
closes CNVS-23616

Test Plan:
  - Automated tests pass

Change-Id: I1d09653eefd17fae807849248feeb7ef28ec04fa
Reviewed-on: https://gerrit.instructure.com/64216
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-09-29 18:27:34 +00:00
Brad Horrocks 18e5369ef7 DRY Up LTI Tool links
We can now use context_external_tools_helper to update lti links inside
erbs

Fixes PLAT-1242

Test Plan:
Add an LTI tool using [this
xml](https://gist.github.com/defektive/dbd182cb04500e236bde) or use
[this
url](4a7939ccb4/canvas_icon_class-lti_test.xml)

check the following cog menus for functioning LTI links
- assignments
- quizzes
- modules
- discussions

Check the following right side menus for functioning LTI links
- Course Home
- Course Settings

Change-Id: I75f6cf7c5b3e73b25f8bd6c20404e7379bc46ce6
Reviewed-on: https://gerrit.instructure.com/63620
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2015-09-29 17:46:22 +00:00
Tyson Brown ab3c67a792 edit access restrictions from usage rights modal
refs PFS-2661

Test Plan

* Make sure Usage Rights is active in the account settings/Feature
* Options
* Go to http://localhost:3000/courses/<course_id>/files

* Open Manage Usage Rights  (both the Cog on the right and feature
* Buttons above)
* User should be able to edit publishing on the Usage Rights modal
* Publishing Radio button should display publishing icons next to radio
* buttons

* Go to http://localhost:3000/courses/<course_id>/modules and verify
* that
  the Publishing Modal also displays the icons next to the radio buttons

Change-Id: Ie7856d6fd53a2103d50c3ac415b7a81d94a2f9e4
Reviewed-on: https://gerrit.instructure.com/63195
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-09-29 17:27:45 +00:00
Cody Cutrer 946bb4a980 allow setting authentication provider for the initial login created with a user
test plan:
 * pass a valid value for pseudonym[authentication_provider_id] to create user
   API
 * the user's initial pseudonym should be associated with that auth provider

Change-Id: Ibfe78a2154b52afd4f98c62862d52365a54ec0d6
Reviewed-on: https://gerrit.instructure.com/62039
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-09-29 05:34:04 +00:00
Cody Cutrer 5fdfe00b88 improve name inference
* don't treat suffix-like-names as suffixes when they're more likely
   the given name
 * even more so when it should already be in last-name-first context

test plan:
 * have a user with the full name "Vi Duing", which should translate
   to a sortable name of "Duing, Vi"
 * do an LTI launch
 * first name should come through as Vi, last name as duing

Change-Id: I2d728614af8ff421a5e14e8c2d116d9f0d0a2499
Reviewed-on: https://gerrit.instructure.com/63139
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-09-29 05:33:42 +00:00
Cody Cutrer 72d8de6429 add sis user id support to group memberships API
fixes gh-695

test plan:
 * enroll a user with an SIS ID in a group
 * you should be able to use the API to do
   DELETE /api/v1/groups/<group_id>/users/sis_user_id:<sis id>
   (assuming proper permissions)

Change-Id: Idf07a28eabc53fbe604efac8f96b56ed8120ff57
Reviewed-on: https://gerrit.instructure.com/63681
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-09-29 05:32:53 +00:00
Joel Hough 77ec590589 don't check all shared contexts if one is specified in conversations api params
fixes CNVS-23342

test plan
- regression test creating conversations, adding messages, and
 adding recipients

Change-Id: I0fc3ed17089118806acbc5cc5e2bf31ccd6b9cbe
Reviewed-on: https://gerrit.instructure.com/63632
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-09-29 00:27:47 +00:00
Dan Minkevitch 446930d0e2 Import Canvas assignments into existing matching groups
fixes CNVS-23337

Test Plan:
* Import an assignment into a course from another
  canvas course, making sure that the assignment
  is marked as "Group Assignment" and the group
  that it belongs to exists in both the source and
  destination courses
* The imported assignment should be imported
  as part of the existing group of the same name
  from the source course

Change-Id: I32446e1c15d643d33e8a2bb49e6b9381afe85ebe
Reviewed-on: https://gerrit.instructure.com/63717
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2015-09-28 21:12:44 +00:00
Jeremy Stanley 3a67ed2ec0 move provisional grade endpoints to provisional_grades_controller
also add beta documentation for these endpoints and the
moderation set API endpoints

test plan:
 - specs cover the controller/route change
 - render documentation and sanity check the
   Moderated Grading page (noting the beta tag)

closes CNVS-23310

Change-Id: I64517184fc38d5af0cd7d088222fd5131534e448
Reviewed-on: https://gerrit.instructure.com/63682
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-09-28 21:05:39 +00:00
Amber Taniuchi bce6d0e47f spec: add validation to gb due date sorting with VDD
Test Plan:
- pass Jenkins
- check for syntax errors
- make sure new test_ids match up to an existing test case in TestRails

Change-Id: I8e6a31a2e0861c69c8bb3b71b3634026c653d98a
Reviewed-on: https://gerrit.instructure.com/63819
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-09-28 19:56:11 +00:00
Amber Taniuchi ee2eaa636c spec: add spec to validate decimal grade for quiz submission in speedgrader
Test Plan:
- pass Jenkins
- check for syntax errors
- make sure new test_ids match up to an existing test case in TestRails

Change-Id: I3cd6cc98c0b4dbf6ffa11193902ab0165209fbc3
Reviewed-on: https://gerrit.instructure.com/64080
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-09-28 19:27:40 +00:00
Rob Orton d252a7f2b4 mobile css and js overrides
closes CNVS-19900

test plan:
 - create a brand_config for an account
 - apply brand_config
 - add ?mobile=1 to an api request that returns a
   body (like a wiki page);
   observe no additional stylesheets in the body
 - go to /accounts/self/, and go to brand
   config and upload a mobile_css_override
 - add ?mobile=1 and check the api result again
   your stylesheet should be there appended to the
   body of the wiki page
 - back in brand_config, remove the uploaded file
 - check your source again - there should not be
   an empty stylesheet tag

Change-Id: Ief728a397d185282a57f8cede0916c7ffe4a2584
Reviewed-on: https://gerrit.instructure.com/61885
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2015-09-28 19:24:55 +00:00
Sterling Cobb 2c789a667d fix a few style issues with moderated grading
fixes CNVS-23423

Test Plan:
  - Go to a moderated assignment's moderation page
  - Styles should layout nicely in a grid

Change-Id: I20434e30c064994a709e2a2dca2cd6bf45d445ad
Reviewed-on: https://gerrit.instructure.com/63849
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-09-28 16:30:01 +00:00
Clay Diffrient cbc1a507da Make the moderated grading select all checkbox function
closes CNVS-22002

test plan:
  - Load up a moderated grading assignment
  - Click the checkbox at the top by the 'name' column
  - All students should be selected
  - Unselect it all students should be unselected
  - You should be able to click the + Reviewers button
    and they all get added to the moderation set.

Change-Id: I841b2edd4671e31051ca69d86e253da00fe92d00
Reviewed-on: https://gerrit.instructure.com/63846
Tested-by: Jenkins
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-09-28 16:29:47 +00:00
Sterling Cobb 7134c7c828 show radio buttons for moderation set grades
fixes CNVS-23417

This will show radio buttons next to grades for moderation sets. It
also adds urls for the speedgrader.

Test Plan
- Go to an assignment with students that are being moderated then.
- Make sure non of them are added to the moderation list
- there should only be one column represented
- add a student to the moderation set
- notice there are now 4 columns, 3 for the mark, 1 for the final mark
- you should also be able to click on on the speedgrader links

Change-Id: I1e0be0195ffa95d6b43d738178ffd0dcb75832bd
Reviewed-on: https://gerrit.instructure.com/63833
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-09-28 16:29:32 +00:00
Ryan Shaw 6f4d7ba64a have spec factories use new UI if ENV['CANVAS_FORCE_USE_NEW_STYLES']
closes: CNVS-23137

We have a new jenkins build "canvas-sel-r21-hourly-p2-new-styles"
that will will test everything against new UI. It sets the
CANVAS_FORCE_USE_NEW_STYLES environment variable which, with
this commit will make it so account factories have new_ui
turned on by default. Tests can still explicitly turn off new UI
so they can test something with it turned on and then off if they want.

Change-Id: I8f7384064aa6674c09abc02d712a048a726f76d9
Reviewed-on: https://gerrit.instructure.com/61888
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Derek Hansen <dhansen@instructure.com>
2015-09-28 16:28:56 +00:00
Mark Severson 3b4206eaa6 add code to sis assignments api errors
test plan:
 * manually exercise the sis assignments api (accounts & courses)
 * ensure that the errors produced include a code
   * gpb not configured & post grades tool not installed
   * unpublished course

fixes SKYW-56

Change-Id: I85873fbbe6e6a32f40a72657adedbb877e1672f9
Reviewed-on: https://gerrit.instructure.com/63503
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Mark Severson <markse@instructure.com>
2015-09-25 22:35:17 +00:00
Jeremy Stanley c9856738d8 copy to final provisional grade
test plan:
 1. create a moderated assignment
 2. associate a rubric with the assignment
 3. add a student to the moderation set, using g/63360, or if that's
    not available yet, the Rails console:

assignment.moderated_grading_selections.create! student: student

 4. submit to the assignment as a student
 5. grade the assignment as a TA in speedgrader, commenting and marking
    the rubric in the process
 6. as a teacher, view the submission using the "Get a single submission"
    API endpoint, including provisional_grades, submission_comments,
    and rubric_assessment

GET /api/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{user_id}?include[]=provisional_grades&include[]=submission_comments&include[]=rubric_assessment

 7. retrieve the provisional_grade_id from the above, to use in the next step
 8. as a teacher, call the copy_to_final_grade endpoint to copy the TA's
    provisional grade to the "final" provisional grade editable by
    moderators

POST /api/v1/courses/{course_id}/assignments/{assignment_id}/provisional_grades/{provisional_grade_id}/copy_to_final_mark

 9. as a teacher, repeat the GET from step 6 and ensure that the provisional
    grade appears twice, once with the TA as the scorer_id and once with the teacher
    - the teacher's entry should have final=true while the TA's is false
    - the comments and rubric assessment written by the TA should be included
      in the teacher's provisional grade, but still attributed to the TA's user id

closes CNVS-23300

Change-Id: Id09f828ddb4c262ef5452a62702a3a1828091486
Reviewed-on: https://gerrit.instructure.com/63563
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-09-25 22:24:23 +00:00
Keith Garner fb010d77cc fixing speedgrader student dropdown for accessibility
updated page so ui dropdown is invisible to screenreaders, and
original select menu that the ui is built on is screenreader acessible
so SR users will get the behavior they would expect from a dropdown.

fixes CNVS-15548

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

Change-Id: I5a3d2920595e254c45afefea5756f134dbd6231a
Reviewed-on: https://gerrit.instructure.com/62564
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
Reviewed-by: Dylan Ross <dross@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
2015-09-25 21:52:55 +00:00
James Williams 496b93e75a use global account ids when invalidating cached settings
test plan:
* with caching and sharding enabled, should be able to
 change the inheritable account settings
 "Restrict students from viewing courses before/after date"
 and have the changes persist / show up in sub-accounts

closes #CNVS-23134

Change-Id: I93b39d96e36040cbc522a21f05cf105128354065
Reviewed-on: https://gerrit.instructure.com/63880
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
QA-Review: Charles Kimball <ckimball@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-09-25 21:46:49 +00:00
Brad Humphrey 64ef3becc7 Allow LTI tools to submit scores for 0 point assignments
fixes PLAT-1238

Change-Id: I601a3c81b7b10c13467dca15b4fe251dd032be18
Reviewed-on: https://gerrit.instructure.com/64033
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2015-09-25 21:29:59 +00:00
Clay Diffrient f0c4a8610f Make + Reviewers operate on the moderation set
refs CNVS-22002

Test Plan:
  - Load up a moderated assignment's moderate page
  - Click a few of the checkboxes
  - Click the + Reviewer button
  - A success flash message should appear
  - The previously selected checkmarks should still be selected
    but should now be disabled.
  - Refresh the page, the same ones should be disabled still

Change-Id: Ia828ad7e28d692f93aa0c1404a53d293290fc083
Reviewed-on: https://gerrit.instructure.com/63275
Tested-by: Jenkins
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-09-25 19:36:50 +00:00
Andrew Butterfield 350a8a34e0 Submission api no longer causes 500 error
A regression happened that broke SIS grade pass back in the following
gerrit:

https://gerrit.instructure.com/#/c/62210/

fixes CNVS-23599

Test plan:
* Create a course
* Create an assignment
* Create a submission for that assignment
* Make an api call with:
   /api/v1/courses/<courseid>/assignments/<assignmentid>/submissions?include[]=user
* Ensure an internal server error does not occur and that the submission
  json includes a user for each submission.

Change-Id: I1c5bf4d88fe2e8ff8f9b73878e0860a06a566b7c
Reviewed-on: https://gerrit.instructure.com/63970
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2015-09-25 17:10:10 +00:00
Brad Horrocks a44a3ab9b9 Fix sad test http://firework.instructure.com/projects/canvas-lms/tests/197811
Fixes PLAT-1251

Test Plan:
run developer_keys_spec make sure they all pass

Change-Id: I237293d5cd578393b7eae743e4f573d4675d3ce8
Reviewed-on: https://gerrit.instructure.com/63903
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2015-09-25 16:39:15 +00:00
James Williams 9d9e91e137 show 2 marks to moderators in speedgrader
test plan:
* create a moderated assignment with some student submissions
* ta's should still only be able to see their own mark

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

* provisional grade switching should work with crocodoc annotations

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

Change-Id: I9314afff929aca58d6981dd2b9dc6724265409fb
Reviewed-on: https://gerrit.instructure.com/63698
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-09-25 15:07:30 +00:00
Kacey Roberts ff10b28e43 Added User List to responses on all questions for quiz statistics.
test case:
1. Create a Quiz with a question for each type.
2. Add at a few users to the course.
3. Create student submissions for the quiz with varying responses
4. When you log in as a teacher navigate to that quizzes statistics,
  and click on the expansion button for a question.
5. Click on the response ratio for that question and a modal will show
displaying all the users that have responded to that question.

Change-Id: I5e23b42f6982683902124d734c36eedb9c5da7f7
Fixes: PFS-2227
Reviewed-on: https://gerrit.instructure.com/59720
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-09-24 20:56:42 +00:00
Josh Orr 012e499bbe Add user_observees using authorization token
Adds the string param access_token to the POST users/self/observees endpoint.

Allows for adding cross shard and 3rd party authed observees.

Fixes PLAT-1233

Test Plan:

Create shard for parents
Create shard for students
Create student accounts
Create a course in students
Generate student keys
Self register a parent in parent shard
Observe a student through ui
generate parent key
Observe a student through api/key

Change-Id: I1436d3c713b7a569ae78251fd7efc57ef2d41088
Reviewed-on: https://gerrit.instructure.com/63556
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2015-09-24 19:03:38 +00:00
Chris Hart e459f3ea2b Dashboard badges: discussions and announcements
Fixes: CNVS-23106, CNVS-22192

Test plan:
- Make sure the new UI is on
- Go to a course and add a discussion or contribute
  to a discussion topic
- Log into Canvas as another user who is also
  enrolled in the course
- On the dashboard card, you should now see a badge
  next to the discussions icon (speech bubble), reflecting
  the new discussion activity:
  http://screencast.com/t/GfHbjMN6K1Y
- When you click through and view the new content, then
  return to the dashboard, the badge should be gone.
- Repeat the same for announcements
- Note that the badges are limited to 99. If the
  number of updates exceeds 99, the badge should
  display 99+.

Change-Id: I9b9d05d017506619fca25aae64c54c6defc4053f
Reviewed-on: https://gerrit.instructure.com/63683
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
Tested-by: Jenkins
QA-Review: Nathan Rogowski <nathan@instructure.com>
2015-09-24 18:39:45 +00:00
James Williams 5b35fc9246 set started_at and finished_at when running content migrations
test plan:
* run a content migration
* use the content migrations api to see the migration
* it should have 'started_at' and 'finished_at' attributes

closes #CNVS-22891

Change-Id: Ib4419531b91446e651ffc87d425a635162f03f42
Reviewed-on: https://gerrit.instructure.com/62992
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-09-24 17:04:32 +00:00
Derek Bender 6258bd46a6 ensure a user's enrollments api works when given a grading period
fixes CNVS-22526

Test plan:

1. Obtain an account-level grading period id. A list of all
    grading period ids can be accessed through:
      /api/v1/accounts/self/grading_periods
2. Create a course and enroll a student in it. Note the
    student's id from the course's people page.
3. Create an assignment in the course due during the
    grading period.
4. Navigate to the gradebook, set the account-level
    grading period, and verify the assignment is in it.
5. Give a grade to the student's assignments
6. Call the API and verify that it responds with data.
    The response will contain "grades" which should
    correspond exactly to the info for the student in the
    grading period.
    The API itself will look like:
    /api/v1/users/:student_id/enrollments?grading_period_id=:grading_period_id

Change-Id: I6c1080345a338750402e86194503f3b0911a4da9
Reviewed-on: https://gerrit.instructure.com/63215
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
2015-09-24 16:19:16 +00:00
Dan Minkevitch aa1a1d5ff3 Throw error message when submitting empty file
fixes CNVS-23389

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

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

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

Change-Id: Ibb84b05a96c61550c71da099a8f72cce9719a2c0
Reviewed-on: https://gerrit.instructure.com/63735
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-09-24 15:31:27 +00:00
Cody Cutrer 0f70995c3a don't show the delete auth provider button for your current login
to prevent locking yourself out

test plan:
 * have a multiple auth providers
 * add a login to an admin explicitly tied to one of the providers
 * log in with that login
 * you should not be able to delete the auth provider tied to the
   login you just used

Change-Id: I5d3a5e7ce0f33efee237e2b4764be50e72c792d9
Reviewed-on: https://gerrit.instructure.com/63259
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-09-24 15:08:49 +00:00
Jon Willesen 6d1583d535 record real user when error report is submitted in student view
It looks like the user data in the error report should propagate through the ticketing plugin to the ticketing system. Only do this for the student view; other masquerades should behave as before and report the target user because admins tend to use this to submit error reports on the behalf of users.

fixes CNVS-12708

test plan:
 - Submit an error report in stuent view of a course. It should record the real user in the created error_report and not the test student
 - Submit an error report while masqueraded as another user. It should record the target user's information in the error_report

Change-Id: I09c94c5ec753eb05f466a806f3967ea6712fff42
Reviewed-on: https://gerrit.instructure.com/62897
Reviewed-by: James Williams  <jamesw@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Charles Kimball <ckimball@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
2015-09-24 14:40:57 +00:00
Heath Hales 0508327ade Adding test for 68939, 372132, 372133 - Profile Pics - Cancel Button
Change-Id: I6916ebb65bff9d46bc1cb34a5a3cd76dd27a274a
Reviewed-on: https://gerrit.instructure.com/63678
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-09-24 14:15:54 +00:00
Sterling Cobb fefce0939f add columnheader for student list
fixes CNVS-23332

add column headers for student list
Change-Id: Ic87a9ae12b45018adbe902f8fab68d00c9ec486f
Reviewed-on: https://gerrit.instructure.com/62517
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-09-24 14:07:24 +00:00
Cody Tanner afd4fce104 adds ability to filter quiz statistics by section
closes PFS-2226
Tests:
1. Create a course with two or more sections
2. Create a Quiz with submissions.
3. with student A submit a submission to the quiz in the first section
4. With Student B submit a submittion to the quiz in the second section
5. As a teacher navigate to the quiz statistics section and view the
results
6. By default all submission will show, once you select a section only
that sections results will show.
Change-Id: Ifd32bbfb67068008f008b8323a10b9ea18a67468
Reviewed-on: https://gerrit.instructure.com/58962
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-09-23 23:54:28 +00:00
Jon Jensen 2db3a704df actually show email address in flash notice, fixes CNVS-23431
this broke in a ui refactor

test plan:
1. w/ new styles turned off, go to the login page
2. click "Forgot Password?"
3. put in a valid email and click "Request Password"
4. confirm the flash notice has email address as part of the text, rather
   than `[missing %{email_address}]`

Change-Id: If63b5f20b9cee334d91937d942e5b8c975d56d77
Reviewed-on: https://gerrit.instructure.com/63861
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
2015-09-23 22:29:36 +00:00
Dylan Ross d0f7e24a30 implement css for react gradebook
closes CNVS-19966

Change-Id: Ib859ee8875306ee796a7057a6ed7d8d53ae5e105
Reviewed-on: https://gerrit.instructure.com/63709
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Christi Wruck
2015-09-23 21:57:13 +00:00
Brad Horrocks 62eb09cdb6 As a OAuth consumer I want to get a refresh token during OAuth2 Registration
refresh token is now returned in oath registration

Fixes PLAT-1218

Test Plan:
Create a dev_key that has an invalid redirect_ur, this makes it easier
to subvert the oauth process later.

attempt to authorize your new key with a user. I used something like
blackmesa.canvas.dev/login/oauth2/auth?client_id=30000000000001&response_type=code&redirect_uri=http://blackmesa.dev/redirect&state=YYY

Sign in and authorize. You should be redirected to something similar to
http://blackmesa.dev/redirect?code=1c8d2ff5498eb879db9737d494a4bbd64810c84cf7e1776d1f4cebdb9699244c6209add4838d02f0d67b969a599cee589fecbeef5f84ababb1ef6e4cb9099b68&state=YYY

Take the code out of the url. open up
[postman](<https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en)
create a new post request with the following params
    code: #{code}
    client_id: #{your dev key's client id}
    client_secret: #{your dev key's client secret}

make sure the response includes a refresh_token property. A postman
request that can be imported [can be found
here](https://gist.github.com/defektive/f1cced73b08e5f6a2925)

 ________
< Thanks >
 --------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Change-Id: I8a8a8450825309232c903251231dec8c5d4e7463
Reviewed-on: https://gerrit.instructure.com/63256
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2015-09-23 20:59:34 +00:00
Michael Nomitch 995f829eb1 register users with active com channels
fixes CNVS-22713

test plan:
  - create user via API with params
    - pseudonym: {"send_confirmation": "0"}
    - user: {"terms_of_use": "1"}
    - communication_channel: {"skip_confirmation": "1"}
  (note: we recommend against this combo but allow it)
  - log in as them and go to /profile/settings
  - in a console -> change the user workflow_state to
    "pre_registered" and save
    (there may be an unrelated bug & you have to save twice)
  - there is a link to send an email confirming registration
  - click link to send
  - get the URL from the message and (without being logged
  in as another user) go to that url
  - you are redirected to the main page with a flash confirmation
  - if you go back to /profile/settings you dont see that message

Change-Id: I5121c1aef7034eb74ab42b86667858274f9e32e3
Reviewed-on: https://gerrit.instructure.com/62741
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2015-09-23 19:52:32 +00:00
James Williams 02f67869f4 fix media comment link replacement in imported questions
test plan:
* create a quiz with a question with a bunch of
 text and a media comment
* export the course to a file
* re-import the course
* the quiz and question should work as before

closes #CNVS-22857

Change-Id: I309a6bd39d55bbc6959c4e89bd4d6ea1f3220c55
Reviewed-on: https://gerrit.instructure.com/63777
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Charles Kimball <ckimball@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-09-23 19:35:01 +00:00
Ryan Taylor 809f85518e Prevents ungraded edge case for text-only questions
Updating scores from the speedgrader/quiz submission grading views no
longer set "pending_review" whenever a text_only_question is present.

Closes CNVS-23350

Test Plan:
  - Confirm that text-only questions to not ask for review once other
    essay/grading-required questions have been graded.
  - Confirm gradebook doesn't show the Q icon any longer.

Change-Id: Ie6e9134a749df2da1ec725eb8b34c6b315e68648
Reviewed-on: https://gerrit.instructure.com/63784
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2015-09-23 17:54:45 +00:00
Amber Taniuchi 8f99e1739d fix msg students dialog for unsubmitted but graded
Students who have not submitted but have been graded
will now show up when "Message students who have not
submitted" dialog is selected in gradebook.

closes CNVS-20005

Test Plan:
1. Submit as one student, but not the other
2. Grade the student that did not submit
3. Try and use the Message Students Who and
select the option "Haven't Submitted Yet"
4. Verify that both students are displayed

Change-Id: I8ee848727c69a3a7edcee03c4c4b0a60803b298e
Reviewed-on: https://gerrit.instructure.com/62664
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Christi Wruck
2015-09-23 17:00:15 +00:00