Commit Graph

24 Commits

Author SHA1 Message Date
Josh Simpson 6821dfe030 gradebook csv upload: make parsing step async
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>
2015-04-03 06:52:25 +00:00
Cameron Matheson 34a716b554 handle gradebook uploads in the background
closes CNVS-4238
fixes CNVS-3718

Test plan:
  Gradebook uploads should work in large courses (and small courses)

Change-Id: I9b8bb2d859ca1545d382679cc39788246006e4d4
Reviewed-on: https://gerrit.instructure.com/50590
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
2015-04-01 21:46:13 +00:00
Cody Cutrer 9c1e2a539c clean up render :action/:template calls
specific forms of :template were deprecated, and you don't even
need to specify that as the option (it's the default first
argument)

Change-Id: I8db2860cdaf46b105b2f981ed3e0bd923af4ef89
Reviewed-on: https://gerrit.instructure.com/51389
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-04-01 20:27:50 +00:00
Cameron Matheson 2dfcf3955a bulk submissions api: support multiple assignments
refs CNVS-4238

The bulk submissions api update endpoint can now be used at
/api/v1/courses/:id/submissions/update_grades to update multiple
assignments at once.

When hitting the multiple assignments bulk update endpoint, the format
of grade_data becomes grade_data[<assignment_id>][<student_id>][...]

Change-Id: Id87b8395bc97b5a8e4ee4ecaf125b5cb9c9cc507
Reviewed-on: https://gerrit.instructure.com/50444
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2015-03-23 23:47:02 +00:00
Cameron Matheson e4ed017e9a gradebook csv: show gpa_scale grade instead of points
refs CNVS-4238

Points don't make sense for GPA Scale assignments.  Downloading and
uploading the gradebook should still work.

Change-Id: I8030bb91f660e482c1251a70fb61c338414846bd
Reviewed-on: https://gerrit.instructure.com/50591
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-03-23 21:19:16 +00:00
Cameron Matheson 0313c94ba0 remove js_block in gradebook_uploads/show
Test plan:
  gradebook upload should still work

Change-Id: Ifc9ec49c40f76a9a0b5f0ec32b43497c26cf26ad
Reviewed-on: https://gerrit.instructure.com/50589
Tested-by: Jenkins
Reviewed-by: Strand McCutchen <smccutchen@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-03-21 05:15:00 +00:00
Spencer Olson cdfb81312c fix CSV uploading GPA scores issue
CSV uploads for GPA Assignments now work correctly,
and update the assignment score and grade.

test plan:

1. Create a GPA Scale Assignment, and assign it a custom grading scheme
   for GPA Grading, such as 4.0 => 100% - 90%, 3.5 => <90% - 80%, etc.
2. Publish the assignment and take it with a few students
3. Score each submission in speedgrader, giving them valid scores (either
    give the assignments valid 'GPA' scores, such as 3.5 or 4.0, or
    give a percentage, such as 70% or 100%)
4. Download the CSV. Notice that the scores are in points
5. Do not touch anything and re-upload the CSV. Notice you get a message saying
   no changes were made, and nothing will be updated (as is expected)
6. Now change the scores on the CSV for the GPA Scale Assignment, entering
   valid scores (If the assignment is out of 5 points, maybe enter 2.0 and 1.0
    as new scores)
7. Upload the CSV. Note that the GPAs reflected in the gradebook are accurate. For instance,
   let's say you created an Assignment that was worth 5 points, and the grading scheme
   stated 4.0 => 100% - 80%. If you entered a 4.5/5 for a student on the CSV and then
   uploaded the CSV, you should now see the student's grade reflected as 4.0 in the
   Gradebook (since 4.5/5.0 points is 90%, which corresponds to a GPA of 4.0).

closes CNVS-12841

Change-Id: Ic8634516a87fe231d1f0990f49063b06fc78641a
Reviewed-on: https://gerrit.instructure.com/43866
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Christi Wruck
2014-11-07 23:30:33 +00:00
Michael Nomitch 386a8d15e8 DA - split large hashes
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>
2014-11-03 19:35:09 +00:00
Michael Nomitch a52b85ee8b DA - remove N+1 from assignment groups controller
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>
2014-10-10 21:44:06 +00:00
Cameron Sutter 0425b8652b DA - gradebook csv
fixes CNVS-14085

test plan:
 * enable DA
 - download gb csv
 > assignments without visibility should have "N/A" in the cell
 - upload gb csv
 > assignments without visibility should be ignored even if the "N/A"
   was replaced with a score in the cell
 > non-DA assignments can be changed like normal

 * without DA
 - download/upload csv
 > it should work like normal

Change-Id: I05984b4feb9046bc8de43bcf67aa46f2f751cafc
Reviewed-on: https://gerrit.instructure.com/40517
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
2014-09-18 15:49:31 +00:00
Cameron Sutter c36566b5de rip out gb1 and srgb feature flag
fixes CNVS-13293

test plan:
 - regression on gb2 and srgb
   to make sure they both still work properly

Change-Id: I4ec554589b6a77a113d2faf46e7b530faa2d535f
Reviewed-on: https://gerrit.instructure.com/35501
Product-Review: Dana Danger <dana@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2014-06-13 20:16:16 +00:00
Cameron Sutter 78a7d26d91 remove :includes => :quiz_submission
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>
2014-03-01 01:46:22 +00:00
James Williams 5b20c6077c replace original_id attr_accessor with previous_id
in preparation for rails 3

Change-Id: I048e4f8db97dacf64616ad52ec075516b55f3c0f
Reviewed-on: https://gerrit.instructure.com/26966
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2013-12-10 21:33:24 +00:00
Cody Cutrer e149fae7bc arel-ify controllers
closes CNVS-4706

Change-Id: I694a06a0d1d5ea83cc1b742e46e7ddfdcba6915a
Reviewed-on: https://gerrit.instructure.com/18672
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-03-22 20:12:59 +00:00
Cameron Matheson 39a547aa88 respect people's gradebook preference in csv upload
fixes CNVS-1826

Test plan:
  after uploading gradebook csv, make sure you are redirected back to
  the gradebook you last visited

Change-Id: I2062548241da32885de277a3eb2926c92f9a0849
Reviewed-on: https://gerrit.instructure.com/17830
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Stanley Stuart <stanley@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-02-18 17:06:59 -07:00
Simon Williams dc8d35802b set graded_at when grading from csv upload
fixes #CNVS-2003

test plan:
- upload a csv to the gradebook that changes some grades
- go to the grading history
- the grading changes should show up correctly

Change-Id: I28ededf74b57286c5a85786e041781d714c665fe
Reviewed-on: https://gerrit.instructure.com/16315
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2012-12-21 17:18:29 -07:00
Simon Williams 12b2ee19d4 save new submission version for more actions that can change grades
fixes #11002
fixes #11903

the two cases that can change grades are:
- for gradebook csv uploads
- an assignment value (like points possible) changes

now in both of these cases, a new version of the submission will be saved so
that we have grading history for these changes.  Also, in the case of gradebook
csv upload we are now setting the grader_id to be the user doing the upload.

test plan:
- grade a set of submissions normally
- change the points_possible of the assignment
- look at grading history, it should look right
- now change grades through a csv upload
- look at the grading history, it should look right

Change-Id: I187c8edf74dc9cff83b30d17f1409e92cee359bd
Reviewed-on: https://gerrit.instructure.com/15471
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
Reviewed-by: Amber Taniuchi <amber@instructure.com>
2012-11-20 17:13:14 -07:00
Cody Cutrer 88adc8df95 do gradebook upload diffing server side
close #6088, fixes #7244

test plan:
 * upload a gradebook with no changes; should show no changes
 * upload a gradebook changing a single score; should only show
   the assignment with the score that changed
 * upload a gradebook with a new assignment; that assignment should
   show
 * upload a gradebook with a changed assignment name, but no score
   changes; should show no changes
 * upload a gradebook with a changed assignment name, and one score
   change; should show assignment
 * upload a gradebook with a name changed, and ids nulled out; once
   matched with the correct user, it should show no changes
 * upload a gradebook with a name changed, and ids nulled out, with
   one score changed; once matched with the correct user, it should
   show only the assignment with the changed score
 * in a course with > 100 students, upload a gradebook with a new
   assignment; it should upload correctly, and only create a single
   new assignment

Change-Id: Id8167a106c302b486c9f5043693975b2d413cc3a
Reviewed-on: https://gerrit.instructure.com/7372
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-05 13:32:46 -07:00
Simon Williams ce0bd8924a remove require_user_for_context from lib/authentication_methods
this method was a thin wrapper around get_context that redirected to the root
page if a context didn't exist.  Ostensibly it also showed the http error as in
flash message if a context did exist but the user didn't, or didn't belong to
the context, but this branch of code never worked due to a state vs
workflow_state bug that rendered the if statement always false.

Change-Id: I5a7353ddf3e1fc082324384a5ea3d3b6196c0dfd
Reviewed-on: https://gerrit.instructure.com/8499
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-02-06 13:27:41 -07:00
Jacob Fugal ba1d7c02cb localize gradebook
Change-Id: Ib00906b0ab7e2faa1df89e109d92ea6c66857c32
Reviewed-on: https://gerrit.instructure.com/4253
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-06-27 16:06:33 -06:00
Brian Whitmer 70e984bff6 grading standards improvements
- can attach a grading standard to a course
- interface for managing standards at the course
  and account level
- added final grade to gradebook page
- added final grade to student grades page
- added final grade to gradebook csv export

fixes #3868

Change-Id: I555b9f66b621d8967e893e50a671748267da9373
Reviewed-on: https://gerrit.instructure.com/3025
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-05-21 19:20:34 -06:00
Zach Wily a57614c543 be sure to skip submissions for skipped assignments; fixes #4163
Previously we were not skipping submissions for assignments that the user had
chosen to ignore. This change also makes sure that grade is set on the
submission as well as score. (Grade is usually set when score is, but not in
all cases.)

Also got rid of the "lookup assignment by name" fallback in the importer. This
could cause weirdness when a teacher had a deleted assignment in the
downloaded gradebook that they'd recreated with the same name. We are more
strict now about matching the assignments to what's in the course.

Change-Id: I980db994f5df77104a07e81c629a5800f3b40972
Reviewed-on: https://gerrit.instructure.com/2992
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-04-13 21:26:11 -06:00
Zach Wily 6fdea80b52 gradebook importer: handle "Points Possible" row being anywhere; #fixed #4162
Also added an explicit parse! method and made the processing of the CSV single
pass.

Change-Id: I0fdfefa5bae1c864d35da1c7975aa7691770a3e2
Reviewed-on: https://gerrit.instructure.com/2991
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-04-09 09:41:29 -06:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00