closes EVAL-1314
flag=none
Test Plan:
1. Create an anonymous assignment. Grade a few students anonymously in
SpeedGrader. Don't post grades yet.
2. Export the Gradebook.
3. Open the exported CSV. Verify that all scores for the anonymous
assignment show as "N/A" and the header shows "Manual Posting (scores
hidden from instructors)".
4. Make some changes to scores in the CSV, making sure to change at
least one score for the anonymous unposted assignment, and one score
for an active, non-anonymous assignment.
5. Import the changed CSV. Verify the changes to the anonymous
assignment are ignored, and the changes to the non-anonymous
assignment are not ignored.
6. Post grades for the anonymous assignment.
7. Re-export the Gradebook.
8. Open the exported CSV. Verify that all scores for the anonymous
assignment are now shown.
9. Make some changes to scores in the CSV for the anonymous assignment.
10. Import the changed CSV. Verify the changes to the anonymous
assignment are no longer ignored.
* Edge case: try steps 1-10 but with your locale set to anything other
than English. This will ensure the Gradebook Importer logic can
handle and identify headers such as, "Manual Posting (scores cachés
aux instructeurs)". Note that "Manual Posting" will never be
translated (always English), but the content in parentheses will be
translated. This is expected.
Change-Id: Ief17a06bd97c15b4138531030ed50ba19f2e03fa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253151
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
closes EVAL-1333
flag=grade_calc_ignore_unposted_anonymous
Test Plan:
1. Enable the 'Ignore Unposted Anonymous Assignments in Grade
Calculation' release flag. Create an anonymous assignment and
grade some students.
2. Before posting the assignment, export the gradebook. Verify:
- The CSV includes a column for the anonymous assignment.
- The CSV totals (assignment group and final grade) exclude the
scores for the anonymous assignment in their calculations.
3. Disable the 'Ignore Unposted Anonymous Assignments in Grade
Calculation' release flag.
4. Re-export the gradebook. Verify:
- The CSV includes a column for the anonymous assignment.
- The CSV totals (assignment group and final grade) include the
scores for the anonymous assignment in their calculations.
5. Post the assignment to students. Then export the gradebook again and
verify the exported CSV includes a column for the anonymous
assigment the totals include the scores for the anonymous
assignment.
6. Re-enable the 'Ignore Unposted Anonymous Assignments in Grade
Calculation' release flag and re-export the Gradebook. Verify the
exported CSV includes a column for the anonymous assigment the
totals include the scores for the anonymous assignment.
Change-Id: If83237344ee16c9f6621c5d58cfb49e2da099f7b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254081
Product-Review: Syed Hussain <shussain@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
closes EVAL-671
flag=post_policies_enabled
Test Plan:
- General smoke test of post policies
Change-Id: I618ade57dca203e5500d882f29a9494253839319
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251977
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
If exporting grade for a grading period and the relevant feature flag is
enabled, append the title of the grading period to all aggregate and
override columns.
closes EVAL-1313
flag=gradebook_csv_headers_include_grading_period
Test plan:
- Have a course with some grading periods and assignment groups
- With the "Gradebook CSV Headers Include Grading Period" flag ON:
- Export grades for a specific grading period
- In the resulting CSV, headers for the following columns should
include the title of the selected grading period in parentheses:
- All "Current/Final" columns, for both individual assignment
groups and the course as a whole
- Override Score and Override Grade columns
- Export grades with no grading period selected
- Column headers should just contain the column name, as before
- With the flag OFF:
- Column headers should just contain the column name, even if
exporting for a specific grading period
Change-Id: I30c60e799b5736ccc54f6b6b2755dcc439c4d53a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252784
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
If the "Import Override Scores in Gradebook" feature flag is enabled, do
not mark the Override Score column as read-only since the importer will
be able to recognize changes to scores. (This is purely cosmetic and
does not affect the importer's ability to handle override scores either
way.)
closes EVAL-1292
flag=import_override_scores_in_gradebook
Test plan:
- Have a course with final grade override enabled
- With the "Import Override Scores in Gradebook" site-admin flag ON:
- In any CSV export, the Override Score column should *not* be marked
as read-only in the second row
- Override Grade, on the other hand, still should be
- With the flag OFF:
- Both columns should be marked as read-only as before
Change-Id: Ifb00bb1cbf5cbaeb0c638342b03ec14b3eacc6fa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252515
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
closes EVAL-1246
flag=none
Test Plan:
1. Create a course that uses grading periods. Have at least 2 grading
periods.
2. Create an assignment. Assign it to one student in the first grading
period, and the rest of the students ("Everyone Else") in the second
grading period.
3. Sign in as the "one student" from the previous step. Click on
"Grades". Select the first grading period from the Grading Period
dropdown and click "Apply". You should see the assignment show up.
Then, select the second grading period from the Grading Period
dropdown and click "Apply". You should no longer see the assignment
listed.
Change-Id: I69d4b8369784086034a7883460e63f4f259a79ca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248932
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Jody Sailor
This patchset changes the sorting priority of assignments in the
gradebook exporter to first sort by assignment group position rather
than its ID.
fixes TALLY-219
flag=gradebook_export_sort_order_bugfix
test plan:
- Have an a course with a student
- On the Assignments page:
- Create a second assignment group and name it "last assignments"
- Create a third assignment group and name it "second assignments"
- Create an arbitrary number of assignments in all three assignment
groups
- Reorder the assignments groups to have the second assignment group
be ahead of the last assignments group
- Go to the gradebook and export the gradebook
- Ensure the general order of the assignments in the gradebook follow
the UI order of the assignment groups
Change-Id: I6d7807c67ad7c4622057e0321c99c00d59677dcf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223418
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
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>
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>
fixes GRADE-2229
test plan
- export gradebook
- it should work
- set root_account to include integration_ids in gradebook
- export gradebook
- it should include integration_id
- account grade export reports should also use account setting
- import grade export that includes integration_id
- it should import with out error
Change-Id: I7b5eb980492c3ee657e87df27217263c36615cb4
Reviewed-on: https://gerrit.instructure.com/196982
Tested-by: Jenkins
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Convert post policies from a garden-variety feature flag into a global
setting and remove the old feature flag. Add some helper methods to
handle enabling and disabling, and have everywhere in the code that
references the feature use the new helper methods instead. Also, have
the activation of post policies for a given course depend on whether new
gradebook is active for that course.
closes GRADE-1974
Test plan:
Note that the Post Policies feature flag no longer exists, and instead
there's a setting you'll need to turn on. You can do so in the console
using:
> PostPolicy.enable_feature!
To disable it:
> PostPolicy.disabled_feature!
Note that, even when enabled, it should only apply to courses that have
new gradebook turned on.
- With the new setting ENABLED:
- Courses with new gradebook behave as though post policies is enabled
- Do a bit of smoke testing to see if stuff like posting/hiding and
changing assignment posting policies hasn't broken
- Courses with old gradebook do not
- For example, calling a mutation like postAssignmentGrades on an OG
course should return an error indicating the feature isn't enabled
- With the new setting DISABLED:
- Courses with new gradebook behave as though post policies is
disabled (e.g., old-style muting is active)
- Calling a mutation, as described above, should return an error
Change-Id: I5e223d2c4ca4202cce0641f316ecaa505a66298c
Reviewed-on: https://gerrit.instructure.com/196062
Tested-by: Jenkins
Reviewed-by: Keith Garner <kgarner@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
If post policies is enabled, have the grade calculator, rather than
ignoring all submissions for muted assignments, ignore submissions that
have not been posted. Also make sure we recalculate grades when
posting/hiding submissions.
closes GRADE-36
Test plan:
- Enable post policies
- Create some assignments, make at least one manually-posted
- Assign some scores
- When you post or hide submissions, the Score objects associated
with the students/enrollments should be updated
- The computed_ values should not reflect unposted submissions
- The unposted_ values should reflect them
- In a course with post policies disabled
- Make sure muting/unmuting assignments kicks off the grade
calculator (and it calculates as expected)
Change-Id: If08fbfa090cf0174f9f6ee306a3d5ecec81351fc
Reviewed-on: https://gerrit.instructure.com/192075
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
closes GRADE-1859
Test plan:
- Set up a course with Post Policies enabled
- Ensure at least one assignment is manually-posted
- (i.e., `assignment.post_mnually?` returns true)
- (can be set at the assignment level or via the default course policy)
- Export grades to CSV
- In place of the previous "muted" row, there should be a row
containing "Manual Posting" for manually-posted assignments
and no value for other assignments
- Turn manual posting off for all assignments in the course
- Re-export to CSV
- This time, the "Manual Posting" line should be absent
- Set up a course with Post Policies disabled
- Check that exporting behaves as it did previously
- (i.e., it should check for muted assignments and include a "muted"
row if there are any)
Change-Id: I4d52b28acf910b0a9acb652cbb10686c44075689
Reviewed-on: https://gerrit.instructure.com/190389
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
closes GRADE-1952
test plan:
A. Setup
1. Select or create a course
2. Ensure the course has at least one assignment
3. Enable the "Final Grade Override" feature flag
4. Enroll at least one student
5. Visit New Gradebook as the teacher
6. Open the Gradebook Settings Modal
7. In the 'Advanced' tab, check "Allow final grade override"
* If already checked, uncheck and save first
8. Override the grade for the student
B. Verify with Overrides Enabled and Allowed
* The following behavior is expected when the "Final Grade
Overrides" feature flag is enabled and the "Allow final grade
override" setting is enabled in New Gradebook. In the interest of
brevity, specific steps for driving the behavior have been elided.
1. In New Gradebook
a. the Overrides column is present
b. overrides can be applied, changed, and removed
2. Publishing grades via Grade Sync
* correct configuration assumed
* overrides will be included
3. Courses API Index
* /api/v1/courses.json
a. computed_current_score is the override score
b. computed_current_grade is the override grade
c. computed_final_score is the override score
d. computed_final_grade is the override grade
4. Gradebook Exports
* overrides will be included
5. User Enrollments API
* /api/v1/users/[user_id]/enrollments
a. current_score is the override score
b. current_grade is the override grade
6. Course Enrollments API (as a teacher)
* /api/v1/courses/[course_id]/enrollments
a. current_score is the computed score
b. current_grade is the computed grade
c. override_score is present
d. override_grade is present
7. Grades Endpoint
* /grades
* grade is the override score
8. Grades for Student Endpoint
* /grades_for_student?course_id=[course_id]&enrollment_id=[…]
* grade is the override score
C. Verify with Overrides Enabled and Not Allowed
1. Visit New Gradebook as the teacher
2. Open the Gradebook Settings Modal
3. In the 'Advanced' tab, uncheck "Allow final grade override"
4. Repeat Step B, with this caveat:
* When verifying, note that override scores/grades will not be
present in addition to computed scores/grades. Also, the scores
and grades present will be their computed versions, not the
overrides.
Change-Id: Ida1fb7ccefdc20de1447130812fe779514a897d1
Reviewed-on: https://gerrit.instructure.com/184442
Tested-by: Jenkins
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
closes GRADE-1998
Test plan:
- Have a course with Final Grade Override enabled
- Set up at least one grading period and some assignments
- Enable "show totals for all grading periods" option for the
grading period set
- In new Gradebook, turn on the "Allow final grade override" setting
- (Note this does *not* affect whether the new columns are
included; it's just to let you enter values)
- Leave some assignment grades and some override grades
- Export to CSV for the following scenarios:
- With a grading standard enabled for the course
- With a grading period selected
- CSV should include override score/grade for the period
- With no grading period selected
- CSV should include override score/grade for the whole course
- With no grading standard enabled for the course
- With a grading period selected
- CSV should include override score for the period
- With no grading period selected
- CSV should include override score for the whole course
- Re-import one of the above CSVs
- The import should ignore the above columns, even if changed
- Disable the Final Grade Override feature flag
- Export to CSV
- The CSV file should NOT contain either override column
Change-Id: Ic352bb508007f13d6025390460e411aac512ccbb
Reviewed-on: https://gerrit.instructure.com/181265
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Matthew Goodwin <mattg@instructure.com>
Export scores in CSV files with 2 digits of precision to match what is
shown in Gradebook, and compare against existing scores at that same
precision when importing. Do not include thousands separators.
fixes GRADE-871
Test plan:
- Have a course with some students and a points-based assignment
- Enter a score greater than one thousand
- Enter a score with three decimals of precision that rounds up
(e.g., 123.456); this will display as 123.46
- Export the CSV file
- In the CSV:
- Scores greater than one thousand should *not* include any
thousands separators
- All scores should appear with a precision of two decimal places
(even if there is no decimal component), with whatever rounding
that entails
- Re-import the CSV without modifying it
- You should be told that no changes were found (i.e., the lack of
a thousands separator and the rounding should not cause false
positives)
- Make some changes to those values and reimport the CSV
- The import page should identify your changes as expected
Change-Id: Ia88d257b4ea57bf72ac25773fdd1ccdbd0ee605b
Reviewed-on: https://gerrit.instructure.com/173856
Tested-by: Jenkins
Reviewed-by: Keith Garner <kgarner@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
When “show inactive enrollments” is turned on, the csv export
includes assignment scores for inactive students
fixes GRADE-1415
Test Plan
1. Create a course with inactive enrollments
2. Make sure “show inactive enrollments” is toggled On,
you can find this setting under students in the new gradebook
3. Export the gradebook to csv
4. In the csv, under the assignments columns, the inactive students’
actual assignment scores will appear. The scores previously
showed up as ‘N/A
Change-Id: Iaa2897b96e40ef9cc466505440608955359a788c
Reviewed-on: https://gerrit.instructure.com/160938
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
closes: GRADE-1312
test plan: specs pass
Change-Id: I274ae211ab55d7c0a135c609f9917df5ccc2c716
Reviewed-on: https://gerrit.instructure.com/157760
Tested-by: Jenkins
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
When exporting a gradebook,
the csv should include custom columns listed at the final columns.
fixes GRADE-1275
Test Plan (Exporting)
-Create a course
-Use the public api to add custom columns, 1 read only and 2 writable
(POST /api/v1/courses/:course_id/custom_gradebook_columns)
-Use the public api to add data into those custom columns
(PUT /api/v1/courses/:course_id/custom_gradebook_columns/:id/data/:user_id)
-Navigate to the gradebook for the course and inspect the columns
-Export to csv
-Check if the csv has the proper columns as the gradebook, the read only column
should not have changed, while the writable columns should display the changes
Test Plan (Importing)
-Follow the steps above to export to csv
-Change any data in an assignment column
-Make sure the column changed is not (read only)
-Save the csv and upload into gradebook
-Check if the assignment changes appear in the gradebook
Change-Id: I36a7d53af7b86ffcb6cdfbc4f78effcb0df9a3fe
Reviewed-on: https://gerrit.instructure.com/155027
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Keith T. Garner <kgarner@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
closes GRADE-1113
test plan:
* Create a course with at least one assignment and one student
* There are three settings you will be testing all combinations of:
- The feature labelled "Use semicolons to separate fields..."
- The feature labelled "Autodetect field separators..."
- The language of your user
* Verify that the semicolons feature and the autodetection feature are
mutually exclusive. Specifically:
- when you enable semicolons and attempt to enable autodetection
without reloading the page, verify that it generates an error
message
- after reloading the page, verify that autodetection can no longer
be enabled
- when you disable semicolons and reload the page, verify that
autodetection can now be enabled
- verify the above steps also work in the reverse direction when you
enable autodetection
* Verify the following results:
semicolons | Autodetection | Language | CSV separators | number format
-----------+---------------+----------+----------------+--------------
no | no | en | ',' | 8.5
no | no | is | ',' | 8,5
no | yes | en | ',' | 8.5
no | yes | is | ';' | 8,5
yes | no | en | ';' | 8.5
yes | no | is | ';' | 8,5
* Specifically, verify that when you set the features and language as
in each row, the CSV file generated as a Gradebook export has the
field separator as described in the fourth column and the number
format as in the fifth column
* Note that since semicolons and autodetection cannot both be enabled at
the same time, that case isn't part of the truth table above.
Change-Id: I688cc44bd78e08c8ab3b1d49601f72990361505d
Reviewed-on: https://gerrit.instructure.com/148715
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
closes GRADE-821
test plan:
1. Visit your User profile
2. Verify a feature flag exists with the name:
Include Byte-Order Mark in Gradebook Exports
3. Select or create a course with:
a. at least one Assignment
b. at least one Student
4. Export the Gradebook
5. Verify the exported gradebook does not include a byte-order mark
6. Enable the aforementioned feature flag
7. Export the Gradebook
8. Verify the exported gradebook includes the byte-order mark
Change-Id: Ie41eb800498d74b3a244e7d14bb8b7088fb9bff8
Reviewed-on: https://gerrit.instructure.com/145904
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
QA-Review: Keith T. Garner <kgarner@instructure.com>
Export the proper number of "(read only)" filler values for Gradebook
CSV export when weighted assignment groups are enabled for the course.
The previous change to display unposted grades/scores did not use the
right number of filler values.
fixes GRADE-991
Test plan:
* Set up a course with some students and at least one assignment.
* Enable weighted assignment groups for the course.
* From Gradebook (old or new), export the grades as a CSV.
* Attempt to import the resulting file. Rather than receiving an error,
you should get the usual "no changes were detected" method.
(Alternatively, you can open the CSV in a spreadsheet or similar and
make sure the two header rows are of the same length.)
* Mute the assignment, run the export again, and make sure the resulting
file is valid.
* Disable weighted assignment groups, run the export again, and make sure
the resulting file is valid.
Change-Id: Ief84340cc326c586ae155746fa0c67ee31530f42
Reviewed-on: https://gerrit.instructure.com/144649
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
Fixes two offset issues with the Gradebook Export CSV. One was caused
when a course had muted assignments, and one was caused when a course
had a Grading Scheme enabled.
closes GRADE-752
Test Plan 1: Muted Assignments
* Prequisites: Have a course in a trust account, with at least one
assignment. Sign in as a user that has permission to manage SIS.
1. Mute the assignment.
2. Export the gradebook.
3. Notice that the "Muted" value shows below the muted assignment's
name, and not below the "Section" column.
Test Plan 2: Course Grading Scheme
1. Go to the course settings page (courses/:course_id/settings). Check
the checkbox next to 'Enable course grading scheme' and select a
grading scheme. Click 'Update Course Details' at the bottom of the
page.
2. Export the gradebook.
3. Notice that all total fields have the text '(read only)' under them.
Change-Id: I7178cf0202d8fb2279006ebdea63436436a47c88
Reviewed-on: https://gerrit.instructure.com/138262
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
Include unposted scores and grades for assignment groups as well as
current/final scores in the Gradebook CSV export.
closes GRADE-762
Test plan:
- Set up a course with some students and one or more assignment groups.
- Add some assignments and record some grades. Mute at least one of the
assignments.
- Export the grades from the course. Check that the resulting CSV file
includes columns for unposted scores for each assignment group you
exported and that they correctly reflect the values for unposted
scores.
- Also check that the CSV includes corresponding unposted columns for
each summary column (current score, final score, and so on) and that
each new column's value takes into account the scores of unposted
assignments.
- Finally, import the CSV file you just exported and make sure there
are no errors due to the addition of the new columns (as with the
rest of the summary columns, they should be ignored by the importer).
Change-Id: I3bbbe6b5ad93816d929fa72b48a6006271825ed4
Reviewed-on: https://gerrit.instructure.com/138047
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
fixes CORE-667
fixes GRADE-250
fixes GRADE-251
test plan
- have a user with multiple sis pseudonyms
- enroll user into courses through sis import
using both sis_ids for different enrollments
- each enrollment should return the correct
pseudonym in grade export, Enrollment API,
Section API, Submission API
Change-Id: I2693851b6b65fe8266b3a4e6e8cefc30e3d6f214
Reviewed-on: https://gerrit.instructure.com/136804
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes GRADE-271
Test Plan:
1. Modify a local copy of config/locales/is.yml, adding
the following translation key:
csv:
column_delimiter: ";"
2. Change Canvas settings to Íslenska (Icelandic):
- root account settings
- user profile
- course settings
3. Create at least two students and at least two
assignments for a course.
- name at least one assignment with non-ASCII
Icelandic characters such as "ð"
- name at least one assignment with multi-byte
Unicode characters, such as "文章"
4. Grade the assignments, covering the following:
- decimal grade (with comma as decimal separator)
- integer grade
- empty grade
5. Go to (old) gradebook, export grades and download it
6. Configure Microsoft Excel for Icelandic language
7. Open the download in Excel. Verify that rows and
columns are interpreted correctly, and that non-
ASCII characters are displayed correctly.
8. Import the download in Google Sheets, specifying
semicolon as the custom delmiter. Repeat the
verification from (7)
9. Repeat steps 3-8 using new gradebook.
10. Repeat steps 3-8 using US English for all
language settings.
11. Copy the Icelandic and English grade exports and
modify some student grades
12. Import the modified Icelandic export file, while
configured for US English. Verify that student
grades are updated.
13. Import the modified English export file. Verify
that student grades are updated.
Change-Id: Icf7fcdadae5b22fad524a224d956fd93c2438b57
Reviewed-on: https://gerrit.instructure.com/128786
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
When calculating final scores for a course with grading period
periods, a student with no cached scores would cause the grade
calculator to error out. This patchset fixes the error condition and
changes the grading period to only consider grading period
score objects what have an active workflow state.
fixes GRADE-663
test plan:
- Have a course in a term with weighted grading period
- Add a student to the course
- Confirm no entries in the scores table. If you find entries in the
scores table, destroy them via the rails console
- As a teacher, in the new gradebook, export the gradebook
- Observe it completes without error
Change-Id: I1f6679ba1cc1d9e96cf535ed3d7ed68dc67a4e3c
Reviewed-on: https://gerrit.instructure.com/132854
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
fixes CNVS-35919
also, prefer SIS pseudonyms over non-SIS pseudonyms from any given
account
test plan:
* have a non-SIS pseudonym and a SIS pseudonym on a user
* do an LTI launch
* the LTI tool should get the info from the SIS pseudonym
Change-Id: I60a3c48a32eae94db93b0e72f1f0f6c5b6a5f5c2
Reviewed-on: https://gerrit.instructure.com/107785
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
Stop using the grade calculator to get grading period scores and
instead fetch the values from the scores table.
closes CNVS-35213
test plan:
1. Verify the "Multiple Grading Periods" account report runs and
returns accurate student scores.
2. Verify the courses API returns accurate scores when you
request 'current_grading_period_scores' as a student. Create an API
key for a student and then make the following request:
api/v1/courses/:course_id/?include[]=enrollments&include[]=
current_grading_period_scores&include[]=total_scores
Change-Id: Ifdb8cd602935d1d0d97f301233a185024e6882a2
Reviewed-on: https://gerrit.instructure.com/104776
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
The feature flag "Display Totals for All Grading Periods"
is removed and now lives as an option on grading period
sets. All courses using a given grading period set will
display or hide 'All Grading Periods' totals according to
the set's configuration.
closes CNVS-26713
test plan:
1. Verify the feature flag for 'Display Totals for All Grading Periods'
is gone.
2. Verify the 'Display Totals for All Grading Periods' feature behaves
the same way it always has, except for the fact that the feature is
now a setting on grading period sets, meaning a course should show
or hide 'All Grading Periods' totals based on the setting of its
associated grading period set.
Change-Id: Ia445c4a66f98587b556fbdb8ce94b4b8b0d03187
Reviewed-on: https://gerrit.instructure.com/104191
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
Fixes CNVS-27109
Test plan:
Regression test everything related to multiple grading periods.
In particular, make sure:
* there is no mention of the multiple grading periods feature flag on
the account or course features pages
* make sure grading periods UI always shows up on the account grading
standards page
* make sure the grading periods UI only shows on the course grading
standards page if legacy course grading periods exist for that course
(see below)
* grading period dropdowns only show up everywhere else if there are
grading periods to show. Otherwise, it should behave as if MGP is
"disabled"
* Grade calculation should work as expected with and without grading
periods
To create legacy course grading periods, you have to use rails console:
1. Find your course:
course = Course.find(<id>)
2. Create a grading period group:
group = course.grading_period_groups.create!(title: "2017")
2. Create a grading period:
group.grading_periods.create!(
weight: 1,
title: 'Fall',
start_date: 5.days.ago,
end_date: 10.days.from_now
)
Here's the list of known places grading periods can be seen in the UI:
Instructor Assignments page
(https://community.canvaslms.com/docs/DOC-2615)
Student Assignments page
(https://community.canvaslms.com/docs/DOC-3123)
Gradebook (https://community.canvaslms.com/docs/DOC-2785)
Gradebook Individual View
(https://community.canvaslms.com/docs/DOC-2788)
Course Settings grading schemes page
(https://community.canvaslms.com/docs/DOC-4042)
Student Grades page (https://community.canvaslms.com/docs/DOC-1291)
Dashboard global Grades page
(https://community.canvaslms.com/docs/DOC-5464)
Change-Id: Iefac4b08120bd1699d4ed98bcb418089eec9b3b8
Reviewed-on: https://gerrit.instructure.com/99744
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
fixes CNVS-30548
fixes CNVS-30739
test plan:
- create a course with a teacher and enable multiple grading periods
- create a grading period set and three grading periods in the
browser, called 'Account Period 1', 'Account Period 2', and
'Account Period 3'
course index:
- hit GET /api/v1/courses/<Course ID>/grading_periods
- ensure that the request succeeds
- ensure that all three account periods are returned
course show:
- hit GET /api/v1/courses/<Course ID>/grading_periods/
<Grading Period ID>, where the grading period is any of
the three account periods
- ensure that the request succeeds
- create a grading period group off the course by using
course.grading_period_groups.create!()
- create a grading period by using group.grading_periods.create!(
title: 'Course Period 1', start_date: Time.now, end_date: Time.now,
close_date: Time.now)
- create two more grading periods called 'Course Period 2' and
'Course Period 3'
course index:
- hit GET /api/v1/courses/<Course ID>/grading_periods
- ensure that the request succeeds
- ensure that only all three of the course grading periods
are returned
course show:
- hit GET /api/v1/courses/<Course ID>/grading_periods/
<Grading Period ID>, where the grading period is a
course grading period
- ensure the request succeeds
- hit it again with an account grading period
- ensure the request fails
course update:
- hit PUT /api/v1/courses/<Course ID>/grading_periods/
<Grading Period ID>, where the grading period is a
course grading period
- include the argument
{ grading_periods: [{ title: 'New Title' }] }
- ensure the request succeeds
- ensure the title of the grading period is changed in the
console
- hit it again with an account grading period with the
same arguments
- ensure the request fails
course delete:
- hit DELETE /api/v1/courses/<Course ID>/grading_periods/
<Grading Period ID>, where the grading period is a
course grading period
- ensure the request succeeds
- ensure the period has its workflow state set to deleted
in the console
- hit it again with an account grading period
- ensure the request fails
account index:
- hit GET /api/v1/accounts/<Account ID>/grading_periods
- ensure the request succeeds
- ensure that only all three of the account grading periods
are returned
account delete:
- hit DELETE /api/v1/accounts/<Account ID>/grading_periods/
<Grading Period ID>, where the grading period is an
account grading period
- ensure the request succeeds
- ensure the period has its workflow state set to deleted
in the console
- hit it again with a course grading period
- ensure the request fails
Change-Id: I34e43e10aadb30a349e1932c132554c44f7ec24a
Reviewed-on: https://gerrit.instructure.com/86961
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
Gradebook export now honors the settings from gradebook related to
showing active and inactive enrollments.
fixes CNVS-30640
test plan:
- Create a course with an assignment, and three
students, one active, one inactive, and one concluded.
- In gradebook turn off show inactive and show concluded.
- Export the gradebook and note that only the active student shows.
- In gradebook turn on show inactive.
- Export the gradebook and note that both the active and inactive
students show.
- In gradebook turn off show inactive and turn on show concluded.
- Export the gradebook and note that both the active and concluded
students show.
- In gradebook turn on show inactive and turn on show concluded.
- Export the gradebook and note that all the students show
- Edit the export and change the grade for all students.
- Upload the export and note that only the active and inactive students
are graded
Change-Id: I40dfe08991049f0689e05588f189b33a59cf9813
Reviewed-on: https://gerrit.instructure.com/86570
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
closes CNVS-27730
test plan:
- From the browser create a Course with two assignments
- From the console update one assignment's position field to be nil
- From the browser go to the course's gradebook and attempt to
export it.
- The export should work
Change-Id: Idc83bb6ec8af409c18b8b053be6c8ffc5be55ce2
Reviewed-on: https://gerrit.instructure.com/75824
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
refs CNVS-26685
While investigating CNVS-26685, I discovered that
GradeCalculator#compute_scores returns an array of arrays
with arrays in them with values. This nested structure hid
the implicit meaning of the data, which maps to the current,
final, current group, and final group for the computed scores.
This more human-readable data structure improves the ability of
developers to reason about the returned values.
Test plan:
- Run regression tests on the user, course, and enrollment APIs.
Change-Id: I58c8572f94863e47be5d67e6d50fe795d42f1856
Reviewed-on: https://gerrit.instructure.com/74093
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
test plan:
* basic regression test of assignment overrides
closes #CNVS-27549
Change-Id: Ie463848b3831087efb3f9ec762dca6264055ee76
Reviewed-on: https://gerrit.instructure.com/73139
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
When exporting to a CSV when a student name beings with an equals, the
gradebook exporter will set the name to be a forumula that explicity
sets the cell to name. This will allow a teacher using Excel to be
safe from potential security issues caused by a student changing their
student name name to a function or macro.
This commit also contains a fix to an existing spec that didn't test
what it was intending to.
fixes CNVS-25317
test plan:
- Have a course and gradebook that has a student with the name of
=sum(A)
- Export the gradebook to a CSV.
- Open the CSV in a text file and note that the name looks like
="=sum(A)"
- Open the CSV in excel and note the student name is properly
displayed in the grid as =sum(A)
Change-Id: I1ff77f1c49f93d997cb5dcde8ad0d2239edbc4c7
Reviewed-on: https://gerrit.instructure.com/72914
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
test plan:
* create an assignment in a course
* add a student to the course
* grade the student on the gradebook
* make the student inactive on the people page
* go back to the gradebook and export grades
* it should list the student's grade in the csv file
closes #CNVS-27254
Change-Id: I79f580b5068ea7d3699ff5918409d381dd0f5647
Reviewed-on: https://gerrit.instructure.com/72465
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
the sis login id is now always included in the
gradebook export, even if the teacher does not
have 'read sis' privileges.
closes CNVS-24913
test plan:
* disable "Read SIS Data” permission for
Teacher role
* enroll teacher in a course with students
and assignment items
* download the Gradebook as the teacher
* verify the “SIS Login ID” column is
included in the CSV
* enable "Read SIS Data" for Teacher role
* download the Gradebook as the teacher
* verify the "SIS Login ID" column is
included in the CSV
* in the examples above, verify that you
can import the CSVs that were exported
without any errors
* verify that you can import a CSV that
was exported before this change was made
by a teacher without 'read sis data'
permissions (a CSV without the 'SIS Login ID'
column).
Change-Id: I4668e9aca30f3b3e271713280cd1e9c915d5b240
Reviewed-on: https://gerrit.instructure.com/67749
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
fixes CNVS-22054 (frd)
Test plan:
* enable multiple grading periods
* download the gradebook csv, make sure totals are correct
Change-Id: I24c50f47f112551a56da7cbcecc92acf5996ff48
Reviewed-on: https://gerrit.instructure.com/66342
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
this commit also adds support for the
'Display Totals for "All Grading Periods' feature
flag for exported gradebooks.
closes CNVS-24001
test plan:
- navigate to a gradebook with multiple
grading periods
- select all grading periods via the
grading period dropdown
- export the gradebook
- verify the exported gradebook has all
the assignments
- select the first grading period
- export the gradebook
- ensure only assignments in that
grading period have been exported
- ensure assignments without due dates
have not been exported
- select the last grading period
- export the gradebook
- ensure only assignments in that
grading period have been exported
- ensure assignments without due dates
have been exported
- create an assignment that is due after
all the grading periods
- ensure the assignment is not included when
exporting all grading periods
- ensure the assignment is not included when
exporting an individual graidng period
- export all grading periods and ensure the
assignment group current and final columns
as well as the total column is not included
in the csv
- enable 'Display Totals for "All Grading Periods'
and export all grading periods again. ensure
assignment group current and final, as well as
the total column are exported
Change-Id: If9f6a41704f6cdb1cd09d08b5f467cd0ea395ed3
Reviewed-on: https://gerrit.instructure.com/65362
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
also refactor enrollments_visible_to away because it is bad
test plan:
* add people to a course
* remove them
* calls to /api/v1/courses/X/enrollments?state[]=deleted
and /api/v1/sections/Y/enrollments?state[]=deleted
should include the deleted enrollments
closes #CNVS-23729
Change-Id: I29d6995064dc6cf79af44b940f55dc0269c2a891
Reviewed-on: https://gerrit.instructure.com/65756
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>