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>
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>
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-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 importing a gradebook CSV and and analyzing what changes have been
made, map changes to custom columns properly and do not attempt to
include deleted or hidden columns.
fixes GRADE-1616
Test plan:
- In a course with some students, set up four custom columns
(referred to as C1 through C4); for now, don't change any
settings on them
- In new Gradebook, set some values for the columns
- Adjust them as follows:
- C1: deleted
- C2: hidden
- C3: read-only
- C4: [leave as is]
- Export a CSV
- The CSV should contain C3 and C4 but not the other two
columns (this behavior has not changed)
- Twiddle some assignment scores and custom-column values in the CSV
- Import the edited CSV and check the following on the proposed
changes screen:
- Changes to C4 are shown as expected
- Any changes to assignment scores are shown as expected
- Changes to C3 are *not* shown, and the warning message about
preventing changing read-only columns is shown at the bottom
- Otherwise, everything is as you'd expect: the importer isn't
attempting to replace a custom column with the section name
or perpetrate any similar skulduggery
Change-Id: Ib1ebcec6820120288e67c1652cb5496a8b8240a7
Reviewed-on: https://gerrit.instructure.com/167149
Reviewed-by: Keith Garner <kgarner@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
Tested-by: Jenkins
When importing a gradebook, the csv import can include custom columns
closes GRADE-1315
Test Plan
- Create a course with (not read_only) custom columns in the gradebook
- Export the gradebook to csv
- Make changes to the data in the writable custom columns in the csv
- Import the csv into gradebook
- Run the delayed jobs server
- The gradebook will make changes in writable custom columns with
or without additional changes in assignment columns
- If no changes are made, or changes in non writable columns are made,
the importer will skip these changes
Change-Id: I0a529ea8727be864f6105b9e6b256f75e1c8c471
Reviewed-on: https://gerrit.instructure.com/156068
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
Uploading a csv with moderated assignments would fail because
the attributes that would be checked weren't previously loaded in.
fixes GRADE-1374
Test Plan
- Create a moderated assignment.
- Export the gradebook.
- Modify the grade for the moderated assignment.
- If you are the final grader, uploading should work.
- If you are not the final grader, uploading should have no effect.
Change-Id: If0cef730e3b22cd9b049a9c44133cb7a389a6e85
Reviewed-on: https://gerrit.instructure.com/157526
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
fixes GRADE-1324
Test Plan
- Have DelayedJobs running.
- Create a course with one teacher and at least one student.
- Create an assignment for that course.
- Go to the User settings of the teacher and turn on the option to
use semicolons in Gradebook Export.
- Go to the Gradebook as the teacher and export the Gradebook.
- Open the csv file and change the grade a bit.
- Verify that the csv did indeed use semicolons rather than commas.
- Import that csv file back into the Gradebook.
- Verify that the import worked successfully.
- Turn off the option for using semicolons and instead use commas.
- Verify that export/import works with commas using the same above
steps.
Change-Id: I42870aeb3ff4064f3db39ed1b67681e2acc4ed8e
Reviewed-on: https://gerrit.instructure.com/156648
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@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>
fixes GRADE-976
test plan:
* Make sure the AMM flag is off
* All AMM features should be visible and work
* The Anonymous Marking and Moderated feature flags should be visible
* Toggling the AMM feature flag should do nothing
Change-Id: Ie0c52c23748389c6f5df5b85e8580bdf474c0a52
Reviewed-on: https://gerrit.instructure.com/152067
Reviewed-by: Adrian Packel <apackel@instructure.com>
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: James Butters <jbutters@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>
test plan
- specs should pass
Change-Id: Iafc7c9b8ca64f32568e658b600e19c2e6f9045ca
Reviewed-on: https://gerrit.instructure.com/138026
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-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>
closes CNVS-39159
test plan:
- upload a gradebook import with an invalid header row
- it should behave the same as previously, from the user perspective
- check failed jobs, the jobs should not be listed there
Change-Id: I9a0c1fa61e6b3e105fe01398331c5dd8b37c705b
Reviewed-on: https://gerrit.instructure.com/125356
Reviewed-by: Matt Taylor <mtaylor@instructure.com>
Tested-by: Jenkins
QA-Review: Neil Gupta <ngupta@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-36866
test plan:
* Create a course with a student
* Create an assignment with a past due date
* Add a missing policy on the course
* The student's score for the missing submission should reflect your
policy
Change-Id: I005cd64945e882c1ca9ebfc8cb70360640f24876
Reviewed-on: https://gerrit.instructure.com/113601
Tested-by: Jenkins
Reviewed-by: Matt Taylor <mtaylor@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
Fixes CNVS-35631
Test plan:
* Create a course with an assignment and a student
* Create another course with another student
* In rails console:
edd = EffectiveDueDates.for_course(course1)
edd.in_closed_grading_period?(assignment, student_in_other_course)
This should return false, rather than crash.
Change-Id: I6facdf0643b2eabc557ff2fc651534d5572bfc0b
Reviewed-on: https://gerrit.instructure.com/104965
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
This switches the gradebook import process to using EffectiveDueDates
to find student specific due dates. This avoids the N+1's that
calling Submission#cache_due_date can create.
closes CNVS-35366
test plan:
- Smoketest that gradebook importer still works, especially with a
few assignments overrides
- Speed test the gradebook on a large course
Change-Id: Ib669fbede2c50e78a53420868492342109df5b13
Reviewed-on: https://gerrit.instructure.com/103937
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
Fix an N+1 when processing existing submissions in the gradebook
importer. Prior to the N+1 fix, for each submission it would load the
assignment, the course, and the account.
fixes CNVS-35243
test plan:
- Smoketest that gradebook importer still works
- If possible, performance test with and without this fix
Change-Id: I0948a92d47e37c445ed7582d1f7bb39905837984
Reviewed-on: https://gerrit.instructure.com/103299
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@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>
An assignment's context was being loaded once per assignment per
student. This eliminates the N+1 by preloading the context with the
assignments.
closes CNVS-32664
test plan:
- verify gradebook import still imports
Change-Id: I024b6022dc3dc4279ce3d168da9ae15489e6274f
Reviewed-on: https://gerrit.instructure.com/97031
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
closes CNVS-32229
closes CNVS-32232
test plan:
* Create a course with MGP enabled and two grading periods in
the default term
* Create two assignments for this course, one in a closed GP and
one in an open GP
* To test overrides, create the following as well:
* For one of the students, make the open assignment due in the
closed grading period
* For another student, make the closed assignment due in the
open grading period
* Ensure the following steps work for all assignment/student
combos due in a closed grading period.
** CNVS-32229 **
* Login as a teacher
* Go to speedgrader for the assignment in the closed GP
* Notice that the grade input is locked down
* Right click on the locked-down input and select 'Inspect'
* Remove the 'ui-state-disabled' class and remove
readonly="readonly" from the input field's HTML
* Notice the input is no longer grayed out and you can enter
a grade
* Enter a grade and tab out of the input
* You should see an error message that says something went wrong
and notice in the Network tab of your dev tools that the AJAX
post failed, meaning the submission was not gradeable
* Refresh the page and notice the grade is not there.
* Verify it isn't there in Gradebook either
* Login as an admin
* Go to speedgrader for the assignment in the closed GP
* Notice that the grade input is *not* locked down
* Enter a grade and tab out of the input
* You should *not* see an error message that says something went
wrong meaning the submission was graded successfully
* Refresh the page and notice the grade is there.
* Verify it is also present in Gradebook
** CNVS-32232 **
* Login as a teacher
* Go into a gradebook that has an assignment that is
locked down because it is in a closed grading period
* Notice that the grade cells for the assignment are locked
down (because the submissions fall in a closed grading period)
* Right-click on one of the locked-down cells and select 'Inspect'
* Remove the 'grayed-out' and 'cannot_edit_in_closed_grading_period'
classes
* Notice the cell is no longer grayed out and you can enter a grade.
* Enter a grade
* Click on another cell.
* You should see an error message that says something went wrong
and in the Network tab of your dev tools verify the AJAX post
failed, meaning the submission was not gradeable
* Refresh the page and notice the grade is not there
* Login as an admin
* Login as a teacher
* Go into a gradebook that has an assignment that is
in a closed grading period
* Enter a grade in a cell that should be due in a closed grading
period
* Click on another cell
* You should *not* see an error message that says something went
wrong meaning the submission was graded successfully
* Refresh the page and notice the grade is there.
* Verify it is also present in Gradebook
Change-Id: Ia80e4de626616309c5e9dffb78ed0f9671ad1076
Reviewed-on: https://gerrit.instructure.com/95687
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
the implementation was actually true if the user was an admin of any
account or sub-account in the given institution.
closes CNVS-32901
test plan:
- test multiple grading period restrictions for admins
Change-Id: Ib0a52da45d1bdf4b05dadd85003782db3bef9851
Reviewed-on: https://gerrit.instructure.com/93472
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
This removes N+1 from the importer by preloading grading
periods and admin_of_root_account?.
Fix imports so that submissions with no due date fall
into the last period for the course.
closes: CNVS-26720
test plan:
1. Test that a gradebook upload can update a submission's
grade in a grading period where it is the last grading
period for the term (course) and the due date is nil
2. Test that an update fails if the above conditions are met
and the grading period is closed
3. Finally test for no N+1s during the import:
- have a course with grading periods and assignments
- import a gradebook csv as a basic teacher enrollment
- notice in the logs that there are not several (1 per
submission) N+1s for Grading Periods during import parsing
Change-Id: Ia595eaa50e44a2813727803aa13b897ee29fbd00
Reviewed-on: https://gerrit.instructure.com/91623
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
close date will now be respected when uploading a gradebook CSV.
this means a) grades cannot be changed if they fall in a closed
grading period, and b) assignments cannot be created via upload
if they would fall in a closed grading period.
closes CNVS-26720
test plan:
1. turn multiple grading periods on
for a course, go to the gradebook
and click 'import'.
2. log in as a non-admin teacher and verify via
CSV upload:
a) trying to change the grade for a submission
that falls in a closed grading period does
not change the grade and displays a message
before uploading that says some submissions
were skipped because they were not gradeable.
b) changing the grade for a submission with a due
date that does not fall in a closed grading period
is allowed.
c) trying to create a new assignment (by adding
a new assignment column in the CSV) does not
succeed if the last grading period in the course
is closed. also verify a message is displayed
saying new assignments could not be created
because they would fall in a closed grading period.
d) creating a new assignment (by adding a new assignment
column in the CSV) succeeds if the last grading period
in the course is not closed.
3. log in as a root account admin and verify step 2a allows
the user to change a submission's grade and step 2c allows
the user to create a new assignment.
4. turn off multiple grading periods and verify gradebook upload
behaves normally.
Change-Id: Ic4e9e1b08d7910cf99b5c4cff57d921e80af9e19
Reviewed-on: https://gerrit.instructure.com/88540
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
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
used to turn 1.0.to_s to "1"
closes #CNVS-28310
Change-Id: I79106a4c0b42fe9b6d96097aaf9dd28a43024373
Reviewed-on: https://gerrit.instructure.com/75194
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: James Williams <jamesw@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>
refs CNVS-27034
also refs gerrit c/71414/
this takes out the old "pass text" path that shouldn't be used
anymore for processing gradebook uploads. No active code paths
are being changed.
TEST PLAN:
1) gradebook imports still work
Change-Id: I3e0840c86ad7d0441164dcf6202932fc319d80e7
Reviewed-on: https://gerrit.instructure.com/71528
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
closes CNVS-27034
stops dumping the file to the delayed job parameter, which was never a
good idea. This sends it to S3 or file storage and streams it from
there on import. With the current setup, way more memory than necessary
is consumed while the job is running, and this is the way we process
large files in places like SIS anyway so this makes it more consistent.
TEST PLAN:
1) gradebook imports should still work
2) gradebook import jobs should not eat memory like popcorn
Change-Id: If5bc1aab2eba01c617d6c37480fe777000d80165
Reviewed-on: https://gerrit.instructure.com/71414
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
When the GradebookImporter receives data which would create
a new assignment, but there exists a future grading period,
the new assignment is not creatable due to MGP logic. This
change makes assignment creation and editing of assignments
without due dates possible through the GradebookImporter.
fixes CNVS-25380
Test plan:
0. In a course with a student…
1. Create a grading period in the present and another in
the future.
2. Export the gradebook.
3. Open the exported file and add a new assignment column
to the gradebook.csv, putting the name in row 1 and
possible points in row 2.
4. Import the gradebook.
5. Verify that the gradebook is imported and a new
assignment is created.
Change-Id: I8f88547582c1a632c7129eac72a4ba4e7f12a624
Reviewed-on: https://gerrit.instructure.com/68498
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Christi Wruck
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>
During Gradebook imports with pass_fail scores, points possible as
well as partial points in the CSV are considered passing. 0 will be
considered as failing. (The words "complete" and "incomplete" can
still be passed.) Furthermore, the confirmation screen now reports
"complete" or "incomplete" instead of the points being imported For
the canvas user, this will result in a clearer understanding of the
grade changes happening as a result of the import.
fixes CNVS-21255
fixes gh-624
test plan:
- Create a course with a student and 5 pass_fail assignments with 4
points possible
- In the gradebook:
- Leave three assignment as null
- Set one assignment to complete
- Set one assignment to incomplete
- Export the current gradebook to CSV
- Edit the CSV to:
- Set the first null assignment to 4 points
- Set the second null assignment to 1 point
- Set the third null assignment to 0 points
- Set the complete assignment to 0 points
- Set the incomplete assignment to 1 point
- Import the CSV back into the gradebook
- Observe:
- On the confirmation screen the words "complete" and "incomplete"
are used
- The first null assignment shows as complete
- The second null assignment shows as complete
- The third null assignment shows as incomplete
- The complete assignment now shows as incomplete
- The incomplete assignment now shows as complete
Change-Id: I92921a3d88ad64f069573a2b27c41936151cec3c
Reviewed-on: https://gerrit.instructure.com/62206
Reviewed-by: Cody Poll <cpoll@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Tested-by: Jenkins
Product-Review: Keith T. Garner <kgarner@instructure.com>
fixes CNVS-22054
Test plan:
1. Create a course with assignments in past grading periods,
future grading periods, current grading periods, and
assignments without due dates.
2. Export the gradebook from that course.
3. Confirm that assignments in the current grading period
are exported.
4. Confirm that assignments without due dates are exported.
5. Confirm that assignments in past grading periods
are NOT exported.
6. Confirm that assignments in future grading periods
are NOT exported.
Change-Id: Ie2dde8673196d53fc7d7fd41ae3d833b4ab50cd9
Reviewed-on: https://gerrit.instructure.com/59804
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Strand McCutchen <smccutchen@instructure.com>
gradebook importer now handles all case variations of 'EX' as excused. Because
of this, case variations are not considered changes to grades on import.
fixes CNVS-21909
test plan:
- Go to Gradebook.
- Excuse a few assignments
- Export Grades.
- Change an 'EX' grade to a different case, i.e. 'ex', 'eX', 'Ex', then import
the same CSV file.
- Note that 'no changes made' page is displayed
Change-Id: I97bf28d2c9a333cd38f9890b10df1d41a6db322e
Reviewed-on: https://gerrit.instructure.com/59920
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
fixes CNVS-19924
When a teacher uploads a CSV with assignments in past
grading periods then they are not able to change grades.
Test plan
1. As an admin, create an account level grading period in
the past.
2. Create assignments due during the past grading period.
3. Login as a teacher.
4. Navigate to the gradebook
5. Click export to download a CSV
6. Change the grade for the assignment in the past grading
period.
7. Click the export button and use the wizard to upload
your modified CSV.
8. You should receive a message telling you you are not
allowed to edit the assignment in the past.
Change-Id: Ia8701c3504b03bd6ed35d0da1fe56cd8330ace79
Reviewed-on: https://gerrit.instructure.com/55297
Reviewed-by: Dylan Ross <dross@instructure.com>
Tested-by: Jenkins
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Strand McCutchen <smccutchen@instructure.com>
closes CNVS-21267
Test plan:
* excuse some assignments in a course
* download the gradebook
* excuse/unexcuse students in the gradebook
* upload the gradebook
Change-Id: I624f48415f0be524da70d0ea41ccd6216e06ed68
Reviewed-on: https://gerrit.instructure.com/57158
QA-Review: Adam Stone <astone@instructure.com>
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
when a gradebook is successfully uploaded, a
green success banner will show.
closes CNVS-20359
test plan:
import a Gradebook CSV (with changes made to scores).
verify that after the gradebook is done uploading,
you are redirected to the Gradebook and there is a
green banner at the top of the page that says
'Upload successful'. refresh the page and verify that
a green banner does _not_ appear with the success
message.
Change-Id: I29346498a3c1ae7158e7ac2f11de3f7ca5b8d806
Reviewed-on: https://gerrit.instructure.com/57062
Tested-by: Jenkins
Reviewed-by: Cody Poll <cpoll@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
fixes CNVS-18853
When a gradebook with a custom grading scheme was exported, some extra readonly
columns are inserted. When imported, the importer did not check for
readonly-ness, and so these columns that shouldn't have been looked at were
construed as extra assignments.
After this commit, those extra columns should no longer be considered
assignments, but should be left alone.
Test plan:
1. In a course without a custom grading scheme, export grades.
2. Without changing anything, import the exported CSV.
3. Verify that nothing has changed.
4. Enable a custom grading scheme.
5. Export the gradebook again.
6. Import the new gradebook CSV.
7. Verify again that nothing has changed.
Change-Id: I4b43cfd8ef390a4dc6e5393f243f1b98e922cd4a
Reviewed-on: https://gerrit.instructure.com/54882
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Adrian Foong <afoong@instructure.com>
Product-Review: Cody Poll <cpoll@instructure.com>
Test plan:
* uploading the gradebook should work like it used to (except it will
even work for ridiculous-large courses)
* try to break it by running multiple uploads in parallel / etc
Change-Id: I80dfe7babe320a1cee4021c59c5691d1df5382dd
Reviewed-on: https://gerrit.instructure.com/51499
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
we missed this s/active/published during draft state. unpublished
assignments aren't gradeable.
Test plan:
* make an unpublished assignment in a course
* add a new assignment to a gradebook.csv
* import the csv
* the new assignment shouldn't let you change it to the unpublished
assignment
Change-Id: I4056afcf0317b1d9004df5c26357759203471c27
Reviewed-on: https://gerrit.instructure.com/51445
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
fixes CNVS-18185
test plan:
- turn DA on
- upload a GB csv with a new assignment
that has student grades
- the assignment and grades are
properly uploaded
- on a DA'd assignment, try to assign a grade
to a students that can and cannot see it
- students who cant see dont get a grade
- students who can see do get a grade
Change-Id: I71fe1630c9d7eca3888550439782da24065f833c
Reviewed-on: https://gerrit.instructure.com/49401
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-16025
test plan:
- load gradebook with DA on and off
- both work properly
- upload && download gradebook csv
- both work properly
- check for extra "N/A"s showing up
where they aren't supposed to
- assignment index page works with DA on/off
(as student and teacher)
- single student grades page as student and teacher works
- with DA on and off
Change-Id: I826d42ae78cbe70f15672e065acc546e51f0b7f4
Reviewed-on: https://gerrit.instructure.com/42360
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
refs CNVS-15830
test plan:
* download the gradebook, change a grade, and upload it again
* it should work
Change-Id: I0fe245b23aa24152a2a62ad919cf045120ae1c47
Reviewed-on: https://gerrit.instructure.com/41974
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>