fixes CNVS-4734
test plan:
* in gradebook 2
* change a grade in the gradebook cell
* click the submission comments dialog box for a submission
* for a graded submission: verify that it is displayed in the grading box
* for an ungraded submission: verify that the grading box is empty
* change the grade (for all grading types) and hit 'Update Grade'
* verify that the grade is updated in the cell
* verify that the assignment group grades are recalculated
* verify that all members of a group have their grades updated for group assignments
* verify that the set default grades dialog works correctly for all grading types
Change-Id: Id6d117c9f126136a358f975604e973fe1ad36bb1
Reviewed-on: https://gerrit.instructure.com/32960
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Liz Abinante <labinante@instructure.com>
fixes CNVS-12386
test plan:
- setup some assignment with submissions in different combinations of:
- late / on-time
- single submission / multiple submissions
- make sure that GB2 correctly differentiates between late and on time in the
submission details dialog (that pops up when you click in the top right
corner of a cell)
- it will be text for a single submission and dropdown for multiple
Change-Id: Ib5f62dd95b073461cfcbea85b1ed8e0805f2a57f
Reviewed-on: https://gerrit.instructure.com/33263
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
fixes CNVS-3111
test plan:
* enable the 'large_roster' flag on a course and verify
that, in that course, links to the speedgrader are
hidden in the following places:
- graded discussion topic gear menu;
- graded discussion entry gear menu
- quiz show page (right side bar);
- assignment show page (right side bar);
- gradebook1 assignment header dropdown;
- gradebook1 grade cell popup;
- gradebook2 assignment header dropdown;
- gradebook2 grade cell popup;
* also verify that attempting to navigate to the
speedgrader directly via /courses/:id/gradebook path
displays a message that the speedgrader is disabled
for that course.
Change-Id: Iab82bd7281208f6e2d3745bb3184c90068090535
Reviewed-on: https://gerrit.instructure.com/17710
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
Tested-by: Eric Berry <ericb@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
show appropriate icon in each cell (if any), fix gradebook1 state logic
(show worst state, not average), show turnitin icon/link for text entry
submissions in the submission dialog
1. set up turnitin on the account
2. create an assignment that accepts text entries and uploads
3. enable turnitin on the assignment
4. as a student, upload a file submission (e.g. .doc or something turnitin
likes)
5. as a different student, submit it via text entry
6. as a teacher, confirm that the turnitin icons now show up in gradebook2
7. click on each submission in gradebook2 to open the comment dialog
8. confirm that the turnitin icon is present, shows the score, and links
to the originality report
9. go to gradebook1
10. confirm that the turnitin icons still display correctly
Change-Id: If6db3bd5b627b7dd4d306b89f9d0f71acf41b22e
Reviewed-on: https://gerrit.instructure.com/12522
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
add more structure to the turnitin_data hash on a submission to keep track of
what state things are in, so that we can present errors to the user as they
happen and provide a way to resubmit. there are three states: 'pending',
'error', and 'scored'.
submissions start out as 'pending', and can move to 'error' if anything goes
wrong in the submission process (either in creating the assignment, enrolling
the user, or actually submitting the paper). there are built in retrys, and the
error state only gets set if there is still an error after the retry limit. if
this succeeds, we stay pending until the score is successfully retrieved from
turnitin, at which point it is marked 'scored'.
this change is primarily in speed grader, although icons have been updated in
the gradebooks and submission pages as well. in the 'scored' state, (or without
a state) things should work exactly as they have previously - display a score,
which can be clicked to see the full report. in the 'error' state (indicated
with an exclaimation point icon), clicking the icon gives you more details
about the error and the option to resubmit. in the 'pending' state (indicated
by a clock icon), clicking the icon just explains that the submission is
pending.
test-plan:
- locate some submissions that were scored with turnitin before this change was
applied and verify that they still work as expected
- submit something new that will get sent to turnitin. verify that it initially
gets marked as pending, and then after 5-10 minutes has a score.
- submit something that will result in a turnitin error (eg: < 20 words,
password protected pdf). verify that it initially gets marked as pending,
then after ~30 minutes (to account for retries) is marked as an error.
- click the icon, and click the resubmit button. verify that it goes back to
pending.
- verify that the new turnitin icons for these submission in gradebooks 1 and
2 look correct and don't mess up the layout.
Change-Id: Ia5e1b04842de16aaa44d498eefe59ddb716dc014
Reviewed-on: https://gerrit.instructure.com/10125
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
when the submission of a paper to turnitin fails, this change will store the
error code and message in the hash on the submission or assignment object so
that we can start to get a sense of what our most common error messages are.
test-plan: (note: there is no UI for this commit; it is coming soon)
- in an account with turnitin enabled
- submit an assignment and make sure it still works
- submit an assignment where you've changed a .txt to a .doc or something, and
then check the submission object in the console to see if the error is stored
in the turnitin_data hash
Change-Id: I17c98f6aaefa092f65a931a9c53d3daa0542f6f6
Reviewed-on: https://gerrit.instructure.com/9984
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
when you require ['jquery'] you are now getting the
version of jquery that has our patches applied to it
you should not need to think about the patching as
you write code.
this also applies to jqueryui/dialog, that will return
the patched version of it.
test plan:
make sure javascript still works on our site ;)
Change-Id: I237fa8da5f93167140c4d42b80eb3ef17d95c1e6
Reviewed-on: https://gerrit.instructure.com/9878
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
"Trivial" JavaScript / CoffeeScript changes
--------------------------------------------------
For the most part, all javascript was simply
wrapped in `require` or `define`. The dependencies
were found with a script that matched regexes in
the files, it errs on the side of listing too many
dependencies, so its worth double checking each
file's dependencies (over time, anyway).
i18n API changes
--------------------------------------------------
No longer have to do I18n.scoped calls, just
list i18n as a dependency with the scope and it's
imported already scoped
require ['i18n!some_scope'], (I18n) ->
I18n.t 'im_scoped', 'I'm scoped!'
JS bundling now done with r.js, not Jammit
--------------------------------------------------
We don't use jammit to bundle JS anymore. Simply
list dependencies for your JS modules in the file
and RequireJS handles the rest.
To optimize the JavaScript, first make sure you
have node.js 0.4.12+ installed and then run:
$ rake js:build
The app defaults to the optimized build in
production. You can use non-optimized in
production by putting ?debug_assets=true in the
url just like before.
You can also test the optimized JavaScript in
development with ?optimized_js=true.
Significant changes
--------------------------------------------------
These files have "real" changes to them (unlike
the JavaScript that is simply wrapped in require
and define). Worth taking a really close look at:
- app/helpers/application_helper.rb
- app/views/layouts/application.html.erb
- config/assets.yml
- config/build.js
- lib/handlebars/handlebars.rb
- lib/i18n_extraction/js_extractor.rb
- lib/tasks/canvas.rake
- lib/tasks/i18n.rake
- lib/tasks/js.rake
Change-Id: I4bc5ecb1231f331aaded0fef2bcc1f3a9fe482a7
Reviewed-on: https://gerrit.instructure.com/6986
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>