Commit Graph

5877 Commits

Author SHA1 Message Date
Jeremy Stanley 4e928c7757 per-environment overrides for feature definitions
this is a more flexible replacement for `development` and
`hidden_in_prod` - any feature registration option can be
customized based on the environment

test plan:
 - this feature replaces "hidden_in_prod" and "development"
   and these changes are covered in specs
 - experiment with other customizations to feature
   definitions in the YAML

closes ADMIN-2760

Change-Id: Ie2c76f4b7da2ccc43bb244000dc0a490d78de9de
Reviewed-on: https://gerrit.instructure.com/202933
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2019-08-02 21:59:44 +00:00
Michael Brewer-Davis 398ca11a8c add i18n to outcome reports, lmgb export
closes OUT-3197

Test plan:
With permutations of the following feature flags
 - Account:
   Enable i18n features in outcomes exports
 - User:
   Include BOM in compatible exports
   Use semicolons in compatible exports
   Autodetect separators in compatible exports

Test that the following reports obey the
requested settings:
 - Account reports
   - Outcome Results
   - Student Competency
 - Learning Mastery Gradebook
   - Export report
   
See g/199468 for details on how reports should respond
to each setting

Change-Id: Iea942bdbc6d1efc560b0c4fc422c7c14a8fd90c4
Reviewed-on: https://gerrit.instructure.com/203101
Tested-by: Jenkins
Reviewed-by: Nathan Prabhu <nprabhu@instructure.com>
Reviewed-by: Frank Murphy III <fmurphy@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2019-08-02 21:42:51 +00:00
Cody Cutrer a127528a6f drop rails 5.1
add flags for 6.0, even though it doesn't actually do anything yet

Change-Id: If8aba4d9f92e8a8ec890deadba7a94e21e01a804
Reviewed-on: https://gerrit.instructure.com/202686
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-08-01 14:09:31 +00:00
James Williams e30f505827 fix file deletion and replacement for inst-fs
test plan:
* with inst-fs enabled, should be able to
 run `attachment.destroy_content_and_replace` in a
 rails console successfully
* it should replace the file with the tumbleweed doc
* should be able to run `attachment.resurrect_from_purgatory`
 in a rails console
* the file should be restored

closes #CORE-3166

Change-Id: If12f4e3d7db0ef5a019bcd251c45b91579857521
Reviewed-on: https://gerrit.instructure.com/200098
Tested-by: Jenkins
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
2019-08-01 12:30:48 +00:00
James Williams c0eccb61a2 redirect back to original file url on expired file token
send them back to hopefully get a new fresh verifier

test plan:
* have an environment with a files domain
* using a developer console preserving logs, download a file,
and note the initial redirect url to the files domain
(should include a "sf_verifier" parameter)
* wait 5 minutes for the verifier to expire and then directly
 access that files domain url
* it should still work (after redirecting back to original
 domain and getting a new sf_verifier)

closes #CORE-3196

Change-Id: I1dafa045acb3be95ce55863fdd72c70adcdb6fe8
Reviewed-on: https://gerrit.instructure.com/203244
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-08-01 12:29:51 +00:00
James Williams 2521226b54 use subject user for courses API is_favorite value
test plan:
* as an account admin, calling
/api/v1/users/X/courses?include[]=favorites
for a student should return whether the student
has favorited the course, not the admin

closes #ADMIN-2763

Change-Id: If52ce5c9405bc2895fbdf6fb456cfca8f4163fbf
Reviewed-on: https://gerrit.instructure.com/201520
Tested-by: Jenkins
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
2019-07-31 19:49:15 +00:00
Nathan Prabhu d5fe2754f0 Expose rub. assessment's assessor user & avatar in submiss. api
closes OUT-3168

Test plan:
* Create an assignment submission with a rubric
* Log in as an assessor with an avatar and make a rubric assessment
* Hit the following endpoint: /api/v1/courses/:course_id
    /assignments/:assignment_id/submissions/:user_id
    ?include[]=full_rubric_assessment
* Verify you see something along these lines:
    {
        ...
        "full_rubric_assessment": {
                "id": 1,
                "rubric_id": 1,
                "rubric_association_id": 1,
                "score": 33,
                "artifact_id": 8,
                "artifact_type": "Submission",
                "assessment_type": "grading",
                "assessor_id": 1,
                "artifact_attempt": 2,
                "data": [
                    {
                        "id": "blank_2",
                        "points": 0,
                        "criterion_id": "_3856",
                        "learning_outcome_id": null,
                        "description": "No Marks",
                        "comments_enabled": true,
                        "comments": "Comment",
                        "comments_html": "Comment"
                    },
                    {
                        "id": "1_3114",
                        "points": 30,
                        "criterion_id": "1_2790",
                        "learning_outcome_id": null,
                        "description": "Full Marks",
                        "comments_enabled": true,
                        "comments": ""
                    }
                ],
                "rubric_association": {
                    ...
                },
                "assessor_name": "nprabhu@instructure.com",
                "assessor_avatar": null
            }
    }
* Data should only be accessible to assessor, teacher/moderator, &
  student owning the assignment. Same visib. rules as any submission.
* If no rubric assessment was done, response should still succeed but
  not contain the "full_rubric_assessment" field

Change-Id: Ic6586b11eb6205311e15c7ce733bb394328dfac2
Reviewed-on: https://gerrit.instructure.com/202280
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Frank Murphy III <fmurphy@instructure.com>
Tested-by: Jenkins
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2019-07-30 18:52:42 +00:00
Ryan Shaw bced49e475 mv some js_bundle and css_bundle’s to controller
by moving these js_bundles and css_bundles to the controllers instead
Of the views, once we actually start streaming these pages, they will
end up in the <head> and so the browser will find out about them faster
than if they were left in the view.html.erb files

Test plan:
* nothing should change
* as in, in code review, you should be able to statically analyze these
  Changes and see that each of these new things in a controller action
  Was just cut/pasted from the view erb file for that action

Change-Id: I78817c12c02d41f9c9e7651cfc8352993e98382b
Reviewed-on: https://gerrit.instructure.com/202773
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
2019-07-29 16:55:37 +00:00
James Williams 2b82831efe drop unused columns from submissions
Change-Id: I5f11f902ff7c7a155956b2cf4d6d8dcb275d3f7a
Reviewed-on: https://gerrit.instructure.com/202806
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2019-07-26 15:23:59 +00:00
Nathan Prabhu 7510bc181a Implement I18N support for Canvas outcomes exports
closes OUT-3166

test plan:
* Create gradebook exports and outcomes exports w/these feature flags:
- Byte-Order Mark (user)
- Semicolon separator (user)
- Autodetect field separators (user)
- Enable i18n features in outcomes exports (account)

* Verify the results in the tables s.t.
1) it accurately represents gradebook exports
2) it accurately represents outcomes exports *only if* its FF is on
- if the FF is off, expect no BOMs and expect delims to always be ','
  in all testcases

  byte-order-mark | present? (most editors will say if so)
  ----------------+--------------------------------------+
       no         |      no                              |
       yes        |      yes                             |

  semicolons | Autodetection | Language | CSV separators
  -----------+---------------+----------+----------------
       no    |      no       |    en    |       ','
       no    |      no       |    is    |       ','
       no    |     yes       |    en    |       ','
       no    |     yes       |    is    |       ';'
      yes    |      no       |    en    |       ';'
      yes    |      no       |    is    |       ';'

- is = icelandic

* Open exports in excel versions/language combos that Gradebook used
- Just verify that they open correctly (smoke test is sufficient)

Change-Id: Id3357d37342b98d8a8582e5a7de3c418acaa0e5e
Reviewed-on: https://gerrit.instructure.com/199468
Tested-by: Jenkins
Product-Review: Jonathan Fenton <jfenton@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
2019-07-24 22:19:22 +00:00
Adrian Packel c4813ed94c Have conditional release use posted not muted
When post policies is enabled, pass the current submission's
posted/hidden status in the "muted" field so that it accurately reflects
the state of the submission. When post policies is disabled, pass the
assignment's muted status as before. Also, update some queries in the
conditional release service to check the submission's posted status if
post policies is enabled.

fixes GRADE-2316

Test plan:
- Have Canvas and conditional release set up
- In Canvas, enable new gradebook for a course and flip on the post
  policies setting:
  > PostPolicy.enable_feature!
- Create two assignments
  - In the gradebook, change the grade posting policy of one of the
    assignments to "Manually"
  - Leave the other as "Automatically"
- Assign grades to students in each assignment
  - For the auto-posted assignment, grade change events should be
    emitted with muted = false
  - For the manual-posted assignment, grade change events should be
    emitted with muted = true
  - Post grades for the manual-posted assignment
    - Grade change events should now be emitted with muted = false
- Confirm that mastery paths are generally doing the right thing

Change-Id: I7af38836ebd9b3361526a4c03565694ae0770f88
Reviewed-on: https://gerrit.instructure.com/202283
Tested-by: Jenkins
QA-Review: Michael Brewer-Davis <mbd@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
2019-07-24 20:55:32 +00:00
Gary Mei 2019a545b1 calculate scores when re-enrolling into course
This occurs when a student was previously enrolled in a course, had
grades, removed from the course, and then enrolled into a section of
the course that they were not previously enrolled in. The grade
calculator was not running as they re-enrolled, despite having prior
graded submissions.

fixes GRADE-2193

Test Plan
- Enroll a student in a course.
- Create an assignment.
- Grade the student.
- Delete the enrollment, and any other enrollments the student may
  have in the course.
- Create a new section.
- Enroll the student in the new section.
- Do not accept the invitation yet.
- Hit the enrollments endpoint and verify that it returns non-null
  scores for the student:

  GET `api/v1/users/6/enrollments`

Change-Id: Ib12ee4a99eff4db7951b216abd1bed2bb4690990
Reviewed-on: https://gerrit.instructure.com/200124
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: KC Naegle <knaegle@instructure.com>
2019-07-24 20:41:12 +00:00
James Williams 2ca5530ff7 only sleep on backfill nulls if updates are made
Change-Id: Ia7183a8de2aae2c8e3992d1378efc2861b41ea9d
Reviewed-on: https://gerrit.instructure.com/202452
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2019-07-24 19:42:21 +00:00
Cody Cutrer ef80d4fce3 setting to control sleep during backfill nulls
because it's a setting, we can update while the fixup is running

Change-Id: I911d8e9e65bc9446986f653fb89eb3a9a542ecd8
Reviewed-on: https://gerrit.instructure.com/202326
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
2019-07-23 20:57:51 +00:00
Matt Sessions cf51fa972b Add fields and filter for mobile submission list to graphql
Test Plan:
 - late, missing and gradeMatchesCurrentSubmission should all be
   available on a submission in graphql
 - Filtering the submission connection by late should work in graphql

Change-Id: I603b81964ad57833009e741f47cca1023eac370e
refs: MBL-12809
Reviewed-on: https://gerrit.instructure.com/201349
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Matt Sessions <msessions@instructure.com>
Product-Review: Matt Sessions <msessions@instructure.com>
2019-07-19 19:56:06 +00:00
Marc Phillips 408b3feee9 Add course_progress event
closes PLAT-4680

Test Plan:
 n/a

Change-Id: I729d5f08d17185a3b287123a4bfa01f7aa02ab9c
Reviewed-on: https://gerrit.instructure.com/201655
Tested-by: Jenkins
Reviewed-by: Clint Furse <cfurse@instructure.com>
QA-Review: Marc Phillips <mphillips@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
2019-07-19 16:45:42 +00:00
Gary Mei 9098cf88b7 display annotations when assignment auto posts
fixes GRADE-2307

Test Plan
- Create an assignment of type file upload.
- Submit to the assignment with a document.
- As the teacher, annotate the submission.
- As the student, verify that annotations appear when viewing the
  submission.

Change-Id: Iec89ed52b44c9ed2e7db52a8c6df03e52e23ca55
Reviewed-on: https://gerrit.instructure.com/201817
Reviewed-by: Keith Garner <kgarner@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
Tested-by: Jenkins
2019-07-19 15:03:51 +00:00
Michelle Simmons 0e3f7f6630 allow sending messages to group members from other sections
fixes COMMS-1308

When students are restricted to viewing only members of their own
section, and a group contains students from different sections,
students cannot send a message in Conversations to their group
members in a different section when the class is selected as the
context rather than the group itself. This commit allows students
to send a message to a group member in a different section when a
class is selected as a context.

Test Plan:
* Create a course with two sections; select the option that
  prevents students from communicating with students in a section
  other than their own.
* Create a group that contains students from both sections.
* Masquerade as a student that belongs to the group; compose a
  message in Conversations. In the "course" form, choose the course
  that you just created. In the "To" form, click on the address
  book icon; select Groups; select the group that the student
  belongs to; and select a student in the group that belongs to a
  different section than the student you're masquerading as
* Fill in subject & content; send the message
* The message should send with no errors

Change-Id: I0c0ab55d37b2c01d9dfa3a71d1f8940e565df600
Reviewed-on: https://gerrit.instructure.com/200187
Tested-by: Jenkins
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: Ryan Norton <rnorton@instructure.com>
Product-Review: Michelle Simmons <misimmons@instructure.com>
2019-07-18 22:00:38 +00:00
Marc Phillips 66c9533992 Add events to learningoutcomeresults
closes PLAT-4639

Test Plan:
 - tests pass

Change-Id: I5f9258f7e14ce9ed07e871b79e99e169359bc23d
Reviewed-on: https://gerrit.instructure.com/201433
Tested-by: Jenkins
Reviewed-by: Clint Furse <cfurse@instructure.com>
QA-Review: Marc Phillips <mphillips@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
2019-07-18 21:04:47 +00:00
Keith T. Garner 11cf6e9caf revert to old style upsert for duedatecacher
Errors of 'ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR:
duplicate key value violates unique constraint
"index_submissions_on_assignment_id_and_anonymous_id"' were found in
Sentry. Unfortunately, the postgres ON CONFLICT upsert will only allow
a single constraint to check against. In this patchset we revert to
the old style that will handle both issues. While this is prone to
intermittent failures, DueDateCacher jobs have a max_attempts of 10 so
the on later runs the content will be updated.

fixes GRADE-2313

test plan:
 - specs pass

Change-Id: I76d3f0084e258007245378533ae0ecf69bd51994
Reviewed-on: https://gerrit.instructure.com/201693
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Tested-by: Jenkins
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-07-18 14:08:55 +00:00
Mysti Lilla 0352326afa Scope account/course user search better
fixes ADMIN-751

Test plan
- Specs pass
- Do smoke test on account and course
  search functions

Change-Id: I2c7e32c32bc52c1a364ed40a89db0b7dc9557ffb
Reviewed-on: https://gerrit.instructure.com/200682
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2019-07-17 21:23:51 +00:00
Ryan Shaw 148d1c009f add mobile-global-nav logo brand variable
This will be used by the mobile responsive nav stuff but I made it’s
Own commit so the brand_config migrations can be dealt with in a small
Change.


Test plan:
* go to the theme editor, 
* there should be a new spot to upload a logo for 
  “mobile-global-nav-logo”
* upload something to it
* when the page reloads the new image you uploaded should show up
  In that square where the “Canvas” logo default was.

Change-Id: I28a98e16b14ef9d0711543de7326650e5a47251e
Reviewed-on: https://gerrit.instructure.com/201427
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-07-17 19:06:06 +00:00
Adrian Packel 9972fe7428 Fix read-only error on posting submissions
With post policies active, we update an assignment's muted status
dynamically based on whether it has any remaining unposted submissions.
When the last student in a course took a quiz, we were attempting to set
the assignment's muted status to false, but another piece of code
attempted to save changes to the associated quiz, resulting in an error
to the effect that the quiz was marked as read-only. When we're only
muting/unmuting by way of posting/hiding submissions, don't attempt to
save changes to the quiz.

fixes GRADE-2306

Test plan:
- Have new gradebook/post policies enabled
- Have a course with a small number of students
- Create a quiz
  - Take the quiz with all but one student
  - As the last student, take the quiz (to switch the assignment's muted
    from true to false)
  - It should complete successfully and not cause an error

Change-Id: I8c97d02033f86158d66ce98b7ad9b32ce8edb43c
Reviewed-on: https://gerrit.instructure.com/201553
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Jenkins
Product-Review: Keith Garner <kgarner@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
2019-07-17 18:23:12 +00:00
Marc Phillips 218a72485b Add submission_types on event
fixes PLAT-4643

Test Plan:
 n/a

Change-Id: If52c8372817d8b85514cae47dc8ce6fa434244f5
Reviewed-on: https://gerrit.instructure.com/201419
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Clint Furse <cfurse@instructure.com>
QA-Review: Marc Phillips <mphillips@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
2019-07-17 16:27:28 +00:00
wdransfield 601494014b Allow canvas.instructure.com aud in LTI Advantage
Closes PLAT-4633

Test Plan:
Verify you can fetch and use access tokens from
https://canvas.instructure.com/login/oauth2/token
in LTI services

For local testing you may create a new account
domain and temporarily change the
UNIVERSAL_GRANT_HOST constant

This is just one approach we could take. In my testing this is the
only change required to use AGS and NRPS

Change-Id: I50fb6da85ed91bd19b8d8b2b8afe4b5d48a120dc
Reviewed-on: https://gerrit.instructure.com/200059
Tested-by: Jenkins
Reviewed-by: Clint Furse <cfurse@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2019-07-17 16:12:04 +00:00
Keith T. Garner d0de7c172d fix yaml serialization issue with a set in duedatecacher
When a Set is serialized via YAML and reconstituted, its internal Hash
loses its default value of false. This is ruby bug
https://bugs.ruby-lang.org/issues/11059 In this particular case, we
were always expecting a bool and breaking when we were writing an
empty string to the database.

fixes GRADE-2302

test plan:
 - Specs pass

Change-Id: I2d876688914dc361bb1b93939349e2bfc63a3098
Reviewed-on: https://gerrit.instructure.com/201408
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Tested-by: Jenkins
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-07-17 14:23:35 +00:00
James Williams f0ce4f9996 reset default hash value in sets after yaml deserialization
Change-Id: Iea5625cd6a98082af65a045b63045c36af874c15
Reviewed-on: https://gerrit.instructure.com/201413
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
2019-07-17 12:26:28 +00:00
Ryan Shaw d4b60a752a Generate right ENV.context_asset_string on eportfolios
Because we were calling rce_js_env before @context was set, and
rce_js_env calls js_env. We were not setting an
ENV.context_context_asset_string on the /dashboard/eportfolios page

Test plan:
* go to /dashboard/eportfolios
* in a browser console type: window.ENV.context_context_asset_string
* it should say “user_3” or something like that

Change-Id: Ica3e2d008d23a8d009e42f0e5dc114a38d66916a
Reviewed-on: https://gerrit.instructure.com/200929
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-07-16 20:31:29 +00:00
Brent Burgoyne 09f4640395 include user nav lti in global nav fly out
closes PLAT-3271

test plan:
- install an lti tool with a user nav placement
- click on the user button in the global nav
- the fly out menu should have the placement

Change-Id: Ia08cec7d236e3b3d63f0b866675509574f229f0e
Reviewed-on: https://gerrit.instructure.com/200532
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-07-16 20:23:56 +00:00
Clint Furse 5a65b09720 change discussion_entry_submitted event body to use local ids
closes PLAT-4632

Test Plan:
- Create a new comment on a submission
- verify the body of the live event includes local ids opposed to
  global ids

Change-Id: I82a595d0207e4a134d9960bdc93c62a3c81fb9b2
Reviewed-on: https://gerrit.instructure.com/200290
Tested-by: Jenkins
Product-Review: Oxana Jurosevic
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
2019-07-16 17:25:14 +00:00
Adrian Packel 66cd71eb75 Post submissions in missing policy applicator
fixes GRADE-2297

Test plan:
- Have a course with new gradebook
- Enable post policies:
  > PostPolicy.enable_feature!

- Set up a missing policy for the course that applies a deduction
- Set up two assignments accepting online submissions with a due date in
  the very near future
  - Set one assignment to manually post, keep the other auto-post
- Allow a submission to pass the due date unsubmitted
- Run the missing policy applicator or let it run
- The score on the auto-posted assignment should be posted to the
  student
- The score on the manual assignment should *not* be posted

Change-Id: If3942f6c01042b07c5d5d752dd2819e3222f101d
Reviewed-on: https://gerrit.instructure.com/201238
Reviewed-by: Keith Garner <kgarner@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-07-16 15:53:08 +00:00
Rob Orton 700333ca7a add grade_passback_setting to course
fixes CORE-3156

test plan
 - specs should pass

Change-Id: I3e90d4c8ad9aa022c6fa2257c85d9b656e005010
Reviewed-on: https://gerrit.instructure.com/200364
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-07-16 15:11:34 +00:00
wdransfield a9103ea4ac Remove editor button default parameters
Closes PLAT-4660

Test Plan:
- Install an LTI 1 tool that uses
  com.instructure.Editor.contents and
  com.instructure.Editor.selection
- Launch the tool from an RCE that has content and
  a selection
- Verify the custom fields are sent
- Verify the custom fields are not duplicated
  in the launch without the "custom_" prefix

Change-Id: Ie77e2479f29c89ec8331f2cbf68bbdeb2de96168
Reviewed-on: https://gerrit.instructure.com/201204
Tested-by: Jenkins
Reviewed-by: Clint Furse <cfurse@instructure.com>
QA-Review: Clint Furse <cfurse@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2019-07-16 14:30:19 +00:00
Adrian Packel 72a317f751 Post grades on q.n submission
fixes GRADE-2296

Test plan:
- Have a course with new gradebook
- Enable post policies:
  > PostPolicy.enable_feature!
- Check that taking a quiz via Q.N (and getting a grade):
  - Posts the submission to the student if the assignment is set to
    automatically posted
  - Does not post if the assignment is manually-posted

Change-Id: I0ac35dac972a4ff374b58a6a1fe38f7fb138728a
Reviewed-on: https://gerrit.instructure.com/201218
Reviewed-by: Keith Garner <kgarner@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Jenkins
Product-Review: Keith Garner <kgarner@instructure.com>
2019-07-15 22:00:15 +00:00
Jacob Burroughs fd7c50352d Fix master-slave edge case for FF
Change-Id: I88d3414508343ef67931330c257a80414988ad97
Reviewed-on: https://gerrit.instructure.com/200769
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2019-07-11 20:31:41 +00:00
James Williams 4fad68a03b grab attachments from correct shard for submission downloads
closes #ADMIN-2751

Change-Id: Ic78a59b5a5cc0b8bae11c19e2b2188d99664db5f
Reviewed-on: https://gerrit.instructure.com/200859
Tested-by: Jenkins
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-07-11 19:21:20 +00:00
Keith T. Garner 6cbc442a04 support missing for quiz_lti assignments
This broadens the view of missing submissions to include Quizzes.Next
submissions.

fixes GRADE-1287

test plan:
 - Have a course with a student and a Quizzes.Next assignment with the
   due date set to a day in the past and one set to the future.
 - Load the new gradebook. Note that past due quiz is colored for
   missing and the grade details trail also reports missing. Confirm
   the future quiz is neither missing nor late.
 - As a student submit the past due quiz.
 - Load the new gradebook. Note that the past due quiz is no longer
   missing but is now late.

Change-Id: Ie78b24e6882759ff2d30bf17816be08a501198eb
Reviewed-on: https://gerrit.instructure.com/200413
Tested-by: Jenkins
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
2019-07-11 17:35:39 +00:00
Drake Harper 7f06be5d9c Fix json parse error in using jwk via url
refs PLAT-4494

Test Plan:
-make a request that goes through the client credentials flow
-validate that it works

Change-Id: Ic008485f1a286b9923e514abeda17f88b9d39a5c
Reviewed-on: https://gerrit.instructure.com/200219
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Marc Phillips <mphillips@instructure.com>
QA-Review: Drake Harper <dharper@instructure.com>
Product-Review: Drake Harper <dharper@instructure.com>
Tested-by: Jenkins
2019-07-05 13:53:39 +00:00
Drake Harper 0447600a63 Use public jwk url in oauth 2 flow
refs PLAT-4494

Test Plan:
-using create and edit devloper key
	-use public jwk url to set public jwk

Change-Id: Iaa80a89dd37052ffd6866ad8d019e8779eaa67b3
Reviewed-on: https://gerrit.instructure.com/198518
Tested-by: Jenkins
Reviewed-by: Marc Phillips <mphillips@instructure.com>
Product-Review: Drake Harper <dharper@instructure.com>
QA-Review: Drake Harper <dharper@instructure.com>
2019-07-03 21:40:54 +00:00
Derek Bender 531e5dbc58 Scope speed grader to new setting
Closes: GRADE-2245

Test Plan:
- Given a course with new gradebook enabled
- Given Filter by Student Group is enabled
- Given at least two groups with students in each
- Given the new gradebook has "Group Filters" selected in the
  View -> Filters menu

- When the new filter has the first group selected
- Then the Speed Grader page for any assignment will only display
  students from the first group

- When the second group filter is selected
- Then the Speed Grader page for any assignment will only display
  students from the second group

- When the filter is changed to "All Student Groups"
- Then the Speed Grader page for any assignment will display all
  students like when this feature is disabled

- Given a course with new gradebook enabled
- Given Filter by Student Group is disabled
- Given at least two groups with students in each
- Given the new gradebook has "Group Filters" selected in the
  View -> Filters menu

- When the filter is changed to the first group
- Then the Speed Grader page for any assignment will display
  all students

- When the filter is changed to the second group
- Then the Speed Grader page for any assignment will display
  all students

- When the filter is changed to "All Student Groups"
- Then the Speed Grader page for any assignment will display
  all students

Change-Id: I530f12bbef0cdd799c15f159366cbae3d9b0eb1e
Reviewed-on: https://gerrit.instructure.com/198809
Tested-by: Jenkins
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-07-03 20:08:00 +00:00
Marc Phillips cbccd7faa8 Send LiveEvents using PutRecords
closes PLAT-4549

Test Plan:
 - Live events should only be sent in batches

Change-Id: I72f8e210ae74b32b09e16a8d4fb515e0c4f699fc
Reviewed-on: https://gerrit.instructure.com/197993
Tested-by: Jenkins
Reviewed-by: Clint Furse <cfurse@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
2019-07-03 20:03:16 +00:00
Clint Furse 056712562a Add new LiveEvent for Submission Comment Created
closes PLAT-3929

Test Plan:
- Create a new comment on a submission
- verify that the live event is created

Change-Id: I8ebdeda24f356ddf51d2f90cb9ad8ae2effc3e31
Reviewed-on: https://gerrit.instructure.com/199520
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Jenkins
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2019-07-03 19:50:55 +00:00
Clint Furse e03ccf44c6 Add new LiveEvent for Discussion Event Submit
Closes PLAT-4457

Test Plan:
- Create a new entry/reply on a discussion
- a new event should be created: discussion_entry_submitted
- If discussion is graded, the submission and assignment
  ids should be included in the LiveEvent payload

Change-Id: I5c6a6ea7c7df7fd1e6ff92d941c1b993b452bc0c
Reviewed-on: https://gerrit.instructure.com/199449
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Jenkins
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2019-07-03 19:50:43 +00:00
Boudewijn van Groos 2d210624e3 Include missing scopes in error message
refs: GH-1466

Test Plan:
- Set up a developer key with scopes enabled.
- Using a tool like oauth2-client-shell request access at
  https://<canvas-install-url>/login/oauth2/auth with at least a
  single scope which is not enabled on the developer key.
- Observe the error message (it should contain the requested scope
  which is missing, but none of the scopes which are requested, but
  not enabled).

Change-Id: I66789f556f7105377459a34fddd43ffdb6e6f93e
Reviewed-on: https://gerrit.instructure.com/198402
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Bryan Petty <bpetty@instructure.com>
Product-Review: Bryan Petty <bpetty@instructure.com>
2019-07-03 14:55:09 +00:00
wdransfield 8baec61228 Extend valid 'iat' window for client credential tokens
Closes PLAT-4604

Test Plan:
- Install a 1.3 tool and retrieve an access token using
  the client credentials grant type
- Validate the token may be used with LTI services after
  5 minutes have passed
- Validate the token may not be used with LTI services
  after an hour has passed

Change-Id: Icad60c80f9926bf5801fb124f334adc3d2301fe1
Reviewed-on: https://gerrit.instructure.com/199914
Tested-by: Jenkins
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Clint Furse <cfurse@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2019-07-03 14:18:27 +00:00
Rob Orton ac733ee807 allow for creating logins through sis importer
fixes PFS-13047

test plan
 - check documentation for login importer
 - import a login
 - it should work
 - user importer should work

Change-Id: I0e72aa75d1abd26b7b00a1d416401bc1cbc8732a
Reviewed-on: https://gerrit.instructure.com/198678
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-07-02 23:22:09 +00:00
Christine Yan 44298af864 Excuse submissions labeled EX in pass-fail in importer
fixes GRADE-2251

Test Plan:
- Create a course, teacher, and assignment with pass-fail grading
- From gradebook, export the CSV
- In the CSV, change the assignment's grade to 'EX'
- Import CSV back to gradebook
- Assignment's grade should now be excused

Change-Id: I58b5f57da774e262d8176f2369f2b74ff0b3f100
Reviewed-on: https://gerrit.instructure.com/198757
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-07-02 21:14:07 +00:00
Dan d7df40acd9 Add `created_at` to group categories API
closes gh-1380

Test Plan:
* Group category APIs should return their respective
  object's `created_at` field

Change-Id: I04d872e7ee9e08c9b0c563dcdb145f16cdbf283f
Reviewed-on: https://gerrit.instructure.com/199747
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Bryan Petty <bpetty@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2019-07-02 20:14:06 +00:00
James Williams 8241b4ebaf don't cache context on feature flag
sometimes can't be marshalled

Change-Id: I10e7f2211272ecc575a0a805e7e8b271b984434d
Reviewed-on: https://gerrit.instructure.com/199499
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2019-06-28 16:27:11 +00:00
James Williams 16ddde6b26 add course copy spec for tool migration hook settings
also a _tiny_ tweak to the original pr

refs ADMIN-2746

Change-Id: If434eb88d426d8b938c730eaa7a368a95405434d
Reviewed-on: https://gerrit.instructure.com/199505
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2019-06-28 15:31:16 +00:00