Commit Graph

20 Commits

Author SHA1 Message Date
James Williams 43592c1f59 translate "complete" and "incomplete" grades for pass/fail
test plan:
* create a pass/fail assignment
* submit to the assignment
* the "Complete" and "Incomplete" in the sidebar
 should be lolcalized

closes #CNVS-44743

Change-Id: I03d7e87f8b63b5bde31a5bbe3516a6a38c6098c8
Reviewed-on: https://gerrit.instructure.com/176352
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-01-07 13:07:45 +00:00
Adrian Packel 6a5a916e45 pass user-related params to docviewer
When talking to DocViewer, include relevant data for the current user as
well as the filter of users whose comments should be shown. This commit
enables functionality for anonymous annotations.

closes GRADE-1427
closes GRADE-1456

Test Plan 1: Moderated Assignments
1. Create a moderated assignment and allow for at least two provisional
   graders in addition to the final grader. Then, leave at least one
   annotation and one comment per provisional grader, final grader, and
   the student.
2. When "Graders cannot view student names" is checked, verify that
   no instructor or admin can see the students identity on annotaions.
   Instead, the student's name should show up simply as 'Student'.
3. When "Graders cannot view each other's names" is checked, verify that
   non-admin, non-final-grader provisional graders cannot see each
   other's names on annotations. Instead, they should see a generic
   grader name such as "Grader 1".
4. When "Final grader can view other grader names" is unchecked, verify
   the final grader cannot view the other graders' names on annotations.
   Instead, they should see a generic grader name such as "Grader 1".
5. Smoke test the settings listed in steps 2, 3, and 4 in various
   combinations of being on or off.
6. While the assignment is still in moderation, verify the student can
   only see their own annotations.
7. When grades are published for the assignment, verify the assignment
   no longer shows any anonymous annotations.

Test Plan 2: Anonymous, Not Moderated Assignments
1. Create an anonymous assignment. Submit to the assignment as a student
   and leave some annotations as the student and as an instructor.
2. Verify the student can only see their own annotations while the
   assignment is still muted.
3. An instructor *should* be able to see any annotations made by an
   instructor, but DocViewer has not implemented this functionality
   on their side yet. As a result, just verify that an instructor
   can see the student's annotations but they are anonymized while
   the assignment is muted.
4. Unmute the assignment and verify the annotations are no longer
   anonymized, and the student can now see annotations from instructors.

Test Plan 3: Normal, Not Anonymous Assignments
1. Do a general smoke test of not anonymous, not moderated assignments
   to verify annotations still show up as expected.

Change-Id: I181a6ace3c00ca93ab8e6c7608a034b521ed78b7
Reviewed-on: https://gerrit.instructure.com/161486
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2018-08-24 18:55:06 +00:00
Keith Garner 7686d87cdb fix missing enrollment type and admin access for docviewer
This patchset fixes two issues related to passing the enrollment type
to docviewer.

The first issue is that since admins are not enrolled in
a course, they had no enrollment to share. We now look to see if the
user is an admin. Other enrollment types are now checked as well.

The second issue is that mobile speedgrader currently isn't passing
along the enrollment_type parameter. Temporarily we'll try to look up
which course an attachment is part of and guess the role. (This may
change as we coordinate with mobile to get better behaviour.)

fixes GRADE-1364
fixes GRADE-1365

test plan:
 - As an admin, view a student's submission in speedgrader, ensure
   DocViewer launches.
 - Ensure mobile speedgrader can launch DocViewer

Change-Id: I4512d99ccecd3b38bd57ab9d4c803084b053bc8c
Reviewed-on: https://gerrit.instructure.com/157025
Reviewed-by: Adrian Packel <apackel@instructure.com>
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2018-07-11 23:26:01 +00:00
James Williams 7423e4fb94 rails 5.2
closes #CORE-1301 #CORE-1302

Change-Id: I687132b066d12cf35e3c7a593dff9b2a91337f33
Reviewed-on: https://gerrit.instructure.com/147220
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2018-04-25 19:15:20 +00:00
Rob Orton 7c0042d20f handle empty grading types
fixes CORE-621
fixes CANVAS-3ETQ

test plan
 - specs should pass

Change-Id: I52265a1257c066a4eb0e1133bea61f7f087dea24
Reviewed-on: https://gerrit.instructure.com/132185
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2017-11-08 21:40:39 +00:00
Cody Cutrer 8fc3413234 spec: mocha => rspec-mocks for helpers
Change-Id: I1666114ca3fca4346d1c4faddf59d59f4355e391
Reviewed-on: https://gerrit.instructure.com/120502
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-07-26 00:18:45 +00:00
Landon Wilkins 0ce4a23f58 da licença part 46
add consistent license headers to all source files

Change-Id: If9d3b01addc4fd9c2977bf2402dda57ec622e72f
Reviewed-on: https://gerrit.instructure.com/110151
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-28 17:56:22 +00:00
Michael Brewer-Davis 14b18c137f i18n numbers for assignments, cyoe
closes: OUT-1062, OUT-1110

Test plan:
Assignments:
Verify that i18n has been completed on assignments
related pages, including but not limited to:
Assignment list page (teacher and student)
Assignment show page (teacher and student)
Assignment edit page

CYOE:
Test alongside g/103353

Test plan:
Test that all numbers are properly internationalized
within:
Teacher pages:
- mastery paths edit page
- assignment list page (mastery path ranges)
- assignment view page (mastery path breakdown)
Student pages;
- choose mastery path page (accessed from modules for OR
  assignments)

Change-Id: I226c27dca870dde4801b5e09ab9f6ee5b000bbb0
Reviewed-on: https://gerrit.instructure.com/103354
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2017-03-13 20:53:29 +00:00
Jon Jensen 613b8c262d spec: de-dup spec descriptions, fixes SD-2181
also prevent them in the future. our test-queue fork currently has a bug
where only the last duplicate spec will run, but this is a good idea anyway

most of these are just rewordings, but in some cases delete redundant/
identical specs

test plan: specs

Change-Id: I8f51be55e750cf87ffa8150822f4b80dc99e1eb4
Reviewed-on: https://gerrit.instructure.com/103993
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-03-03 22:52:02 +00:00
Shahbaz Javeed 95283746ea prevent grading if submission is due in closed grading period
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>
2016-12-08 21:01:07 +00:00
Andrew Butterfield f8220767c1 Fix icon accessibility issue in To Do list
fixes CNVS-23619

It will probably be a good idea to make sure that the color that is
being used now is not an accessibility issue with Nathan. The
green check icon next to recent feedback items will always be green
now and is not meant to convey additional information.

Previously, To Do and Coming Up items had check marks next to them that
were gray and because of this a correlation existed among the three
lists that allowed color to convery additional information that
screenreader users did not have access to.

Test plan:
* Ensure the following for both a student and a teacher
* Ensure that in the To Do and Coming Up lists if the assignment is:
  a quiz: a quiz icon is shown
  a graded discussion: a graded discusion icon is shown
  an assignment: an assignment icon is shown
* Ensure that in the Coming Up list if an event is there a calendar icon
  is shown
* Ensure that in the Recent Feedback list the icon shown next to every
  item is a green checkmark
* Ensure that for each calendar event, quiz, discussion, and assignment
  icon a screen reader reads that the assignment is of that type

Change-Id: I12c435a2694921c1ade775a935105cf813e08c3d
Reviewed-on: https://gerrit.instructure.com/65690
Tested-by: Jenkins
QA-Review: Adrian Russell <arussell@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
2015-11-03 15:17:30 +00:00
Joel Hough f0d3a3d6d7 don't show todo item from soft concluded courses
fixes CNVS-19768
fixes CNVS-15371

test plan
- follow the repro steps in the jira tickets (note that instead of
 waiting for changes to appear, you can just clear the cache from
 the rails console)
- ensure that the todo items do not appear

Change-Id: I3cdee5300a8991ee20aed99bd37d6e92dccf36c4
Reviewed-on: https://gerrit.instructure.com/53714
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-05-14 21:50:12 +00:00
Cody Cutrer 5a810afcef rspec 3-ify spec/helpers
refs CNVS-16239

Change-Id: I00fa05dd66222d592d629612e8a1cdf8572191d7
Reviewed-on: https://gerrit.instructure.com/42665
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Paul Hinze <paulh@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
QA-Review: Braden Anderson <braden@instructure.com>
2014-10-13 23:11:54 +00:00
Jon Jensen a34f35c285 spec: once-ler spec/helper
in rails3, reduce runtime by >50% (0:43 -> 0:20 locally)

Change-Id: I4fb9bcb346e688606107eb7af0f17e2ab28110ea
Reviewed-on: https://gerrit.instructure.com/37606
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2014-07-14 18:34:57 +00:00
Duane Johnson 9dd3830253 Refactor "score out of points possible" for quizzes and curb unrestrained high precision quiz scores.
E.g. There's no need for "5.2333333333333 out of 10".
- Now uses render_score in Activity stream, as well as quiz question partial.
- Fixed that recent_feedback and quiz history did not use render_score.
- Refactored readable_grade into helper method; now uses I18n
- Recent Feedback stream now uses render_score via readable_grade

Test Plan:
* Take a quiz that allows for fractional scores
* Answer the quiz in such a way that you get a fraction for a score e.g. 1/3 out of 1
* Check that the quiz total score has reasonable precision (2 decimals): 6.33 out of 10
* Check that individual questions with fractional scores have reasonable precision

Fixes #11159

Change-Id: Icea14042bf8d33d7f6f91fe9086c232216ef0838
Reviewed-on: https://gerrit.instructure.com/14250
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2012-10-16 10:15:13 -06:00
Simon Williams ee53a5c9a8 pending_review show as 'submitted' in event list; fixes #7840
submissions that are pending_review, which right now is just quiz submissions
with essay questions, were improperly being shown as 'not submitted' in the
coming-up events list on the dashboard and course home page. this correctly
marks them as submitted.

test-plan:
- create a quiz with an essay question and a due date in the next week
- as a student verify it shows in coming up as 'not submitted' on the dashboard
- take the quiz
- it should now show as 'submitted'
- make sure other events in the coming up list show correct states.

Change-Id: I3ad8d208f6b1d3a9366e68e869652c22ab2702d6
Reviewed-on: https://gerrit.instructure.com/9948
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-04-18 15:02:35 -06:00
Cameron Matheson 1b42bcd1f5 Fix "needs grading" count for assignments
fixes #5968

test plan:
  - create a homework assignment with online text entry (or file upload)
  - as a student, comment on the homework assignment (don't answer it
    though)
  - the teacher should not see a todo item for grading the homework
  - the assignment page should not show a submission needing grading

Change-Id: Ibfd35b41ced27e59d865f42e823a0d9d46d25dac
Reviewed-on: https://gerrit.instructure.com/8273
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Zach Pendleton <zachp@instructure.com>
2012-01-27 10:09:16 -07:00
JT Olds 28c7973b01 simplifying and correcting the stats library
testplan:
  * make a quiz and have a few students take it. check the
    quiz stats and make sure the average, max, min, and standard
    deviation are right.
  * make a quiz with no submissions and make sure the statistics
    aren't rendered where it makes no sense

Change-Id: I4dae0beaa85f606e22ba6d7e43787fe0922372e3
Reviewed-on: https://gerrit.instructure.com/7101
Reviewed-by: John Harrison <john@instructure.com>
Tested-by: JT Olds <jt@instructure.com>
2011-11-29 13:22:59 -07:00
Brian Palmer 20a2376fe0 switch to mocha mock framework for specs
Change-Id: Iae9689d00d71b684048a9fecfa0eb60794943ed7
Reviewed-on: https://gerrit.instructure.com/6462
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-10-27 08:37:13 -06:00
Zach Pendleton 5554bc0e91 conditional tooltips for grading progress. fixes #5791
Tooltips for teachers in "Coming Up" sidebar are now conditional
and exist for the following scenarios:

  * no submissions have been uploaded;
  * all received submissions have been graded (but not all
    submissions have been made);
  * all submissions turned in and graded;
  * some submissions need grading.

Previously there were two tooltips: "all graded" and "needs
grading."

Change-Id: If3c54cce9e98169511fc68cc2de405c47c130629
Reviewed-on: https://gerrit.instructure.com/6262
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-10-19 10:30:38 -06:00