Test info:
This commit adds a graded_at column that should be updated whenever
the grades for an enrollment change
Change-Id: If1fa48cb9f15a8a5b8c651b1124db111d355d6c1
Reviewed-on: https://gerrit.instructure.com/49513
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
Add grading period dropdowns on the 'grades' page,
and add a "Display Totals for 'All Grading Periods'"
feature flag. By default, the feature will be turned
'off'.
When the feature is 'off':
- Totals will not display in the gradebook
or the 'student grades' page when the 'All
Grading Periods' option is selected.
- The grading period dropdowns on the 'grades'
page will not have an 'All Grading Periods'
option.
When the feature is 'on':
- Totals will display in the gradebook and the
'student grades' page when the 'All Grading
Periods' option is selected.
- The grading period dropdowns on the 'grades'
page will have an 'All Grading Periods' option.
closes CNVS-23995
test plan:
1) as a teacher, enable the 'multiple grading
periods' feature (do not enable the 'display
totals for all grading periods' feature yet).
a) verify the gradebook does not show totals
when the 'All Grading Periods' option is
selected.
b) verify the 'student grades page'
(courses/4/grades/9#tab-assignments) does
not show totals, and the calculation of
'what-if' grades is disabled when the
'All Grading Periods' option is selected.
c) turn on the 'display totals for all
grading periods' feature. repeat steps
a & b and verify that the totals now
show up (and you can calculate what-if
grades on the student grades page when
'All Grading Periods is selected')
2) sign in as a student that is enrolled in
3 courses: 1 course with MGP disabled, 1
course with MGP enabled and 'display all
grading periods totals' (DAGPT) disabled,
and 1 course with MGP enabled and DAGPT
enabled. go the the 'grades' page (/grades).
a) verify there is a grading period dropdown
next to the totals for courses that have
MGP enabled. verify there is not a grading
period dropdown next to the total for the
course with MGP disabled.
b) verify that the current grading period is
selected by default, if one exists. if a
current grading period does not exist, then:
- the dropdown next to the total for the
course with DAGPT disabled should show
'Select a grading period' and the total
grade should show as '--'.
- the dropdown next to the total for the
course with DAGPT enabled should show
'All Grading Periods' and the total grade
should be displayed.
c) verify clicking a grading period in the
dropdown changes the total, and shows
the correct total for that grading period.
3) repeat steps 2a-c, but sign in as an observer that
is observing at least 3 students in 3 different
courses(1 course with MGP disabled, 1 with MGP
enabled and DAGPT disabled, and 1 course with
MGP enabled + DAGPT enabled).
4) verify that the grading period dropdowns that were
added are accessible.
Note: The 'grades' page (/grades) will _always_
display the total for 'All Grading Periods' when
signed in as a teacher. We are aware of this
existing bug and we're working on a solution.
Change-Id: If501b47aa57121d17d4e6629d1dcdbc8676971a2
Reviewed-on: https://gerrit.instructure.com/65847
Tested-by: Jenkins
Reviewed-by: Strand McCutchen <smccutchen@instructure.com>
Reviewed-by: Dylan Ross <dross@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
refs #CNVS-21596
Change-Id: I5dedaab90a2abe6bf288ff30401c9b31629b45b2
Reviewed-on: https://gerrit.instructure.com/59220
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
closes CNVS-17549
closes CNVS-17553
Test plan:
* excuse and unexcuse assignments from the api
* student grades should be correct
Change-Id: Id8e0fa9edb404bdf65bff0bfc4c79c6f33e8a7e4
Reviewed-on: https://gerrit.instructure.com/53409
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Adrian Foong <afoong@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
The total grade column is now rounded to two
decimal places in the gradebook and the
exported csv of the gradebook
fixes CNVS-14989
- the gradebook and exported csv column should
round the total grade to two decimal places
- if a student has a total grade of 99.567,
before it would be displayed as '99.6%'.
Now it will be displayed as '99.57%'
Change-Id: Ifcb45226c7c6c9ae6874b8895707c060998c7b3c
Reviewed-on: https://gerrit.instructure.com/49623
QA-Review: Robert Lamb <rlamb@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Product-Review: Dylan Ross <dross@instructure.com>
Tested-by: Shawn Meredith <shawn@instructure.com>
Tested-by: Josh Simpson <jsimpson@instructure.com>
closes CNVS-17105
Test plan:
(This has to be done at the rails console)
* enable multiple grading periods
* set up assignments in all the grading periods
* grade the assignments for a student
* run the grade calculator for a grade period. make sure the grade
only considers assignments in the grading period:
gc = GradeCalculator.new([student_id], course, grading_period)
pp gc.compute_scores.first.first
Change-Id: I3b87eb7ec08fedebaab4f7a2fc83e68d4d4d5c7e
Reviewed-on: https://gerrit.instructure.com/45753
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
closes CNVS-17254
Test plan:
* the gradebook should not show unpublished assignments
* grades from the enrollment csv should be correct (they should not
consider unpublished assignments)
Change-Id: I5a5405ff33146beeeba5453eff388d2bf806b427
Reviewed-on: https://gerrit.instructure.com/45250
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
fixes CNVS-16452
test plan:
- regression test of the following
- GB csv download/upload
- assignments index
- assignments api index
- submissions api call to for_students
- as teacher/observer/student
- score calculation in GB
- score calculation on individual grades page
Change-Id: Ifaa0c7580535c2c5d4e218508ef00c1b6007770b
Reviewed-on: https://gerrit.instructure.com/43361
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-14865
test plan:
- with a large class
- with DA on and off
- check that the gradebook csv download works
(grades can be wrong when DA is on)
- check that gradebook2 & srgb work
- check that student grade summary pages work
Change-Id: I7a7b4ffe302d912aa2877106295a78ab662868f1
Reviewed-on: https://gerrit.instructure.com/39470
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
this reverts part of b4840c75cc
fixes CNVS-14840
test plan:
- with differentiated assignments off, grading should work correctly
- in a course with many assignments, you should be able to download the
gradebook csv
- with differentiated assignments on, grading will not work correctly, this is
intentional.
Change-Id: Id910ff28763ba13c529a21d4c125a164e094aeac
Reviewed-on: https://gerrit.instructure.com/39436
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-13715
test plan:
- create a student who is in one group and not another
- create an assignment only visible to each group
- grade the student for both assignments
- turn DA on
- as the student and teacher, go to the student grades page
- both of the assignments should be visible
- final grade should be correct (factoring in both)
* final grade = ungraded assignments count too
- delete one of the grades and return
- only one of the assignments should be visible
- final grade should be correct (using just one assignment)
- turn DA off
- as the student and teacher, go to the student grades page
- both assignments are visible
- final grade should factor in both assignments
- with DA on and off, ensure that the following work:
- drop rules
- never drop rules
- assignment stats (mean median etc)
- what if scores
Change-Id: I727aff943b14c91089ccffa6d3b63ba026abbeec
Reviewed-on: https://gerrit.instructure.com/36762
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
fixes CNVS-13708
test plan:
- create a student who is in one section and not another
- create an assignment only visible to each section
(1 section => 1 assignment)
- grade the student for both assignments
- turn DA on
- as the student, go to the assignment index page
- both assignments should be visible initially
- delete the grades for both assignments and return
- only the overridden assignment should be visible
- only one of the assignments should be visible
- as the student, go to the grades page
- only the overridden assignment should be visible
- regrade the assignment whose grade you had deleted
- both assignments should be visible now
- (fyi: final grade wont be correct)
- turn DA off
- as the student, go to the assignment index page
- both assignments are visible
- as the student, go to the grades page
- both assignments are visible
- final grade should factor in both assignments
Change-Id: I32e3fea4d6fd3db9a512e0d170779b48418f90cf
Reviewed-on: https://gerrit.instructure.com/36728
Reviewed-by: Liz Abinante <labinante@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
also only send user_ids one time per course
and don't run if there are no user_ids
test plan
- specs should pass
Change-Id: I168758ff00413380b1bf1b2729488a7f95a4a9b1
Reviewed-on: https://gerrit.instructure.com/31985
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
fixes CNVS-9933
test plan:
- basic regression on the following:
- teacher activity pages
- gradebook pages
- grades page
- gradebook upload
- changing due dates on assignments
- submissions api
- assignments api
- sorry
Change-Id: I7bb4c32a74b159565772da8ee1d5a43e27369ca0
Reviewed-on: https://gerrit.instructure.com/30367
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Change-Id: I45709bd6dc2fd91bc8d178a38eaab6e088100445
Reviewed-on: https://gerrit.instructure.com/29011
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
closes CNVS-9968
Test plan:
Download gradebook.csv, it should include grades for each assignment
group. Points will be included for courses with unweighted
assignment groups (just like for current/final grades)
Change-Id: Ic47a4cd6cfb62726d3ec6e015b1d3ecfd71f79cc
Reviewed-on: https://gerrit.instructure.com/28579
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
fixes CNVS-10244
test plan:
- create a new course with a teacher and student
- create two assignments, and publish them
- grade them both
- unpublish one of them
- look at all the places you can see grades, and make sure they all
consistently show only the grades for the published assignment (the
unpublished assignment should be completely ignored)
* GB2 with and without 'treat ungraded as 0'
* GB1 with and without 'incluce ungraded'
* GB csv download
* student grades summary page with and without what-if scores
* /grades page as a student and as a teacher
Change-Id: I32aca28fe377e59cb2e0c6278b59eb74c87c73b4
Reviewed-on: https://gerrit.instructure.com/28047
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* sanity check on final grades when grades are changed
Change-Id: I1c40eaec666426a4a200ebb9de7aa1f3c96e9ba2
Reviewed-on: https://gerrit.instructure.com/27280
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
instead of fulling in some possibly large columns that we ignore
also, we don't care about the order, so don't make the db sort
them
test plan:
* change some scores
* final scores as shown on csv exports or other places should
reflect said changes
Change-Id: Ic5c8876aab3d3eed261d9b4714642302f25e0f3e
Reviewed-on: https://gerrit.instructure.com/21153
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
closes CNVS-2049
Test plan:
* download the gradebook csv in a course with unweighted assignment
groups. you should see "Current Points" and "Final Points" columns
* download the gradebook csv in a course with weighted assignment
* groups. there should not be any points columns
Change-Id: If795ab3dc0ae8a4fb84f29c9e759b463b7a14d04
Reviewed-on: https://gerrit.instructure.com/20189
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
fixes CNVS-5492
test plan (external):
- download the gradebook csv with and without sis ids
- it should still work
test plan (internal):
- run gradebook csv with sis ids from the console and watch the db queries
- it should not load quiz submissions
- it should not load the account once per student
Change-Id: I2665041d8733856d8b32547b49d5af5b69292076
Reviewed-on: https://gerrit.instructure.com/20007
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Test plan:
* make an assignment in an assignment_group with grade_dropping rules
that has some stupid number of points possible (like
100000000000000000000000000000000000000000000000000)
* make sure the gradebook and api can both return grades for that
course
Change-Id: I89ea9ce504392a0f2f95b412089e636629dff501
Reviewed-on: https://gerrit.instructure.com/17810
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
refs CNVS-3606
this commit also removes the unused assignment_id option
Test plan:
download some gradebook csv, make sure the column order is the same as
gb2
Change-Id: I8dde6122805498a4513126bf288f93713b745c58
Reviewed-on: https://gerrit.instructure.com/17620
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
fixes CNVS-3606
Test plan:
* download some gradebook csv in a large class
* experience euphoria and surprise as your gradebook csv is quickly
delivered
Change-Id: I44e5fe14d73993d669eb6600072d6e2d125ad3cc
Reviewed-on: https://gerrit.instructure.com/17593
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
closes CNVS-3096
This doesn't affect grades, but it does prevent confusion if a different
assignment is dropped on the student grades page vs gradebook.
Test plan:
* set up an assignment group with grade drop rules that multiple
submissions satisfy (for example, all assignments are 10/10)
* make sure the same submission is dropped in the gradebooks and student
grades page
Change-Id: I1567460c3d107934fb32670eddda95bc18786d9a
Reviewed-on: https://gerrit.instructure.com/16789
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
refs #CNVS-1924
* If a course uses weighted assignment groups, assignment groups with 0
points possible are always ignored.
* If the sum of assignment group weights in a course is less than 100%,
scale the grade up to 100%
Test plan:
Set up assignment groups to that match the above scenarios and make
sure the totals are good.
Change-Id: I81ed523df79a863ba234c66cde367d2fb7def323
Reviewed-on: https://gerrit.instructure.com/16735
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
fixes #CNVS-2649
Test plan:
* set up some non-trivial assortment of assignments in a
assignment group with drop rules and never_drop rules
* make sure the never_drop assignments are never dropped, and that the
kept assignments result in the highest possible grade
Change-Id: Ia1963812d74cd547e9859dda78e1d8dacb4e9223
Reviewed-on: https://gerrit.instructure.com/16618
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
fixes #CNVS-2475
* these assignments were previously being ignored in ruby-land
* caused an infinite loop in the js grade-dropper
Test plan:
* make an assignment with 0 points possible in an assignment group
with grade dropping rules
* make sure the grades in js and ruby are correct
Change-Id: Id9f478f79ea83c7382b2fa5dbca8c0b45dbb6fc4
Reviewed-on: https://gerrit.instructure.com/16417
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
closes #CNVS-2397
Test plan:
- set up a course with assignments
- mute some assignments
- set grades for students
- make sure the gradebook csv totals and the gradebooks match
- the student's grade page (when masquerading) should *not* match
(it should ignore muted assignments)
Change-Id: Iebe15c5d108dcfa899bd501cc6dd45ceb688fa25
Reviewed-on: https://gerrit.instructure.com/16197
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Tested-by: Simon Williams <simon@instructure.com>
fixes #CNVS-1546
Test plan:
* set up some assignments in an assignment group with grade-dropping
rules configured
* use the courses api to check the current and final scores in the
course, and compare those to the values in the gradebook
- note that computed_final_score is equivalent to the score in
gradebook when 'Treat ungraded as 0s' is enabled.
Change-Id: Icdd67d18ab0f00d9b333d523752ebe1f489a9917
Reviewed-on: https://gerrit.instructure.com/16141
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
fixes#9577
Test plan:
* set up some assignments in an assignment group with grade-dropping
rules configured
* use the courses api to check the current and final scores in the
course, and compare those to the values in the gradebook
- note that computed_final_score is equivalent to the score in
gradebook when 'Treat ungraded as 0s' is enabled.
Change-Id: I2f60f26ae849caf5325466171639274148d6bc56
Reviewed-on: https://gerrit.instructure.com/12416
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
fixes#6576, #6577
* don't recompute grades every time
* when recomputing grades, don't do a separate query per user
* when recomputing grades, only grab submissions pertinent to
the course
* don't load a bunch of data that's used for the html when
generating the csv
* preload pseudonyms instead of a doing a query per user
* use the correct sis pseudonym
test plan:
* merge sis users (with different sis ids) from different accounts
together
* add the user to courses in both accounts
* download the gradebook csv for both courses
* the sis id should be the correct one for each course
Change-Id: I0b2b5b26f3167da7de176270bf93a89e7f6f6437
Reviewed-on: https://gerrit.instructure.com/8960
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Test Plan:
* Have canvas and delayed jobs running
* Create a course with some assignments
* Give scores to some students
* Before muting an assignment download the CSV and make sure it's same as UI
* Mute an assignment
* Download CSV again and the final/current scores should be different than UI
* In gradebook UI remove grades from muted assignment (so it's as if they weren't graded)
* The UI grades should now be the same as the CSV grades
closes#6578
Change-Id: I5774ecb899318278a02e1bc12caaa9d02fa3dac0
Reviewed-on: https://gerrit.instructure.com/7379
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
update_all's update hash doesn't have any magic performed on bare Time
objects; it assumes any Time object it's given is already in UTC. using
a TimeWithZone object (regardless of timezone), which Fixnum#ago and
friends happen to return, is still fine.
Change-Id: I297b2a3211b896b5225ebcfaaee3c1eb56e55fb6
Reviewed-on: https://gerrit.instructure.com/5351
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
This was already a small issue if the job queue was on a different
database driver than the main database, and it'll become more important
as more AR connections are introduced.
Change-Id: I204becadd32bb935df096e8c937a04bb6962f0b2
Reviewed-on: https://gerrit.instructure.com/4601
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
An assignment can have a submission but no score, if that
happened the calculator dropped those submissions for
the final_grade instead of using a score of 0
closes#4491
Change-Id: Ic49816c887aec001ecdd9d99412dc588e2c891e6
Reviewed-on: https://gerrit.instructure.com/3552
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
This was causing all students in the course to have final grades of null
(NaN).
Change-Id: I2bc268926579ce8c129a8c997f683a9e9097bffc
Reviewed-on: https://gerrit.instructure.com/3016
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>