Commit Graph

19 Commits

Author SHA1 Message Date
Cody Cutrer a389fd18c1 rails 3 doesn't auto-require csv, so require it where necessary
Change-Id: Id76980c82024a082855f5b7b5b60cd7e760730a9
Reviewed-on: https://gerrit.instructure.com/30132
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-02-14 16:04:34 +00:00
Simon Williams c26f830416 ignore current/final points column in gb upload
fixes CNVS-10591

test plan:
- disable weighting by assignment group
- download the gradebook.csv
- you should have a Current Points and Final Points columns
- upload the csv
- it should say no changes, not offer to create assignments for those two
  columns

Change-Id: I4d4cc28b5b9de8ee6579c63dc11f791309d295e2
Reviewed-on: https://gerrit.instructure.com/28822
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-01-22 00:01:38 +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
Jacob Fugal f2a8d4fe6d replace to_json overrides with as_json overrides
refs CNVS-7597

given Object#to_json's default implementation, the old to_json
overrides follow from the new as_json overrides. and now we can also
call as_json and get the expected non-serialized data.

test-plan: N/A

Change-Id: Ia57562e0c73752a13023cad4ef6bae9435790bee
Reviewed-on: https://gerrit.instructure.com/23647
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2013-08-29 22:39:32 +00:00
Brian Palmer 31f33164b5 remove 1.8 compatibility shims
- update the Gemfile to be 1.9 only, and raise an exception on wrong
  ruby version
- remove RUBY_VERSION checks, replacing with the applicable code
- remove the FasterCSV compatibility shim, just use CSV now

test plan: trying to bundle install on ruby 1.8 or 2.0 should raise an
exception, specs should pass, canvas should work as normal on 1.9

Change-Id: I49088e9d227c59c6d5d5acb417c2df971129474a
Reviewed-on: https://gerrit.instructure.com/19806
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-05-03 01:43:52 +00:00
Cody Cutrer 5ffbcbeb05 arel-ify lib
excluding api_find, which needs more work

refs CNVS-4706

Change-Id: I013d0660ff2b8dbe2abf6a5c973bd1203f432f99
Reviewed-on: https://gerrit.instructure.com/18921
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-04-01 19:12:22 +00:00
Cameron Matheson 105a4ae0a9 don't ignore muted assignments in gradebook csv
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>
2012-12-26 10:11:50 -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
Rob Orton 669832c943 fixes gradebook csv with muted assignments fixes #6390
Test Plan:
     * create a course with assignment that is not muted
     * csv should not have muted line
     * create a course with a muted assignment
     * csv should have muted line
     * attempt import csv without muted assignments row to grades
     * attempt import csv with muted assignment row to grades
     * muted assignmet row should not impact grade import

    closes #6390

Change-Id: Iab7c1d9c93e15a15e0ef1797cceee536aa2447ab
Reviewed-on: https://gerrit.instructure.com/8308
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-02-16 14:21:05 -07:00
Cody Cutrer b15b7bfdcb optimize gradebook uploads refs #6088
use a constant number of db queries, rather than n queries for each
assignment and student

on a class with 900 students and a few assignments went from ~20s
to ~10s

test plan:
  * run existing gradebook importer specs

Change-Id: Ie67adb5e7018530e0b9b974684f08425f08afa8b
Reviewed-on: https://gerrit.instructure.com/7369
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-12-08 16:15:44 -07:00
Bracken Mosbacker cfa114a84c handle ids as strings on gradebook csv imports
also added a couple specs for grade importing

Test plan:
 * create a user with an sis-id of 01234 and a unique-id of 09876
 * add that user to a course with and assignment in it
 * download the gradebook csv
 * try uploading the csv with new scores when setting the "sis user id" and another when setting the "sis login id" to the values above. (make sure the "id" isn't set on that row)
 * verify that the new score is set for each type of id

closes #6005

Change-Id: Ia05fb44008fb3252305158a48ec134e292e3188d
Reviewed-on: https://gerrit.instructure.com/6804
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-11-10 10:49:17 -07:00
Cody Cutrer d2a5328993 drop Pseudonym#sis_source_id closes #5897
Change-Id: I81f2df5324ae7f9747f5d72ac1f8686932c815ff
Reviewed-on: https://gerrit.instructure.com/6093
Reviewed-by: JT Olds <jt@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-12 12:18:37 -06:00
Ryan Shaw 502fece07f allow uploading gradebook csv with just sis_id
you only need one of the following:
Student Name, ID, SIS User ID, SIS Login ID
per row in the gradebook csv uploads

fixes: #5725

Change-Id: Ic5785d14b146d68603654beba122ca1f73cd9c1e
Reviewed-on: https://gerrit.instructure.com/5771
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-09-23 10:22:53 -06:00
Brian Palmer 09d8f54763 handle the new sis id columns in gradebook csv uploads
fixes #5597

Change-Id: I9b817c2789db256c740ef9cab7538d0ac6d36a33
Reviewed-on: https://gerrit.instructure.com/5757
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-21 13:09:07 -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 20092fb2c9 fix more find_by_id cases where we could pass in an empty string
Change-Id: I6bd72dd78f739edac6377f863f298fa14283be38
Reviewed-on: https://gerrit.instructure.com/3299
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-04-27 10:45:09 -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