Commit Graph

48 Commits

Author SHA1 Message Date
Pablo Marti 2e5377ac94 change order of outcomes report
on Learning Mastery Gradebook outcomes report the sorting was
changed to sort by student name

fixes OUT-226
flag=none

test plan:
- create a course and add in 3 outcomes with default settings
- add in 4 students enrollments to the course
- create an assignment and attach a rubric with 3 outcomes
- go into speedgrader for the assignment and use the rubric on
every student and give them different assessments
- go to course settings and turn on Learning Mastery Gradebook
- go to Grades and select Learning Mastery
- click export on the right
- open the csv, the order of students should be by student name

Change-Id: I6dbf00d32eeaf7a9866a9475bf497dc0eed770ed
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248571
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Jody Sailor
2020-10-05 14:53:12 +00:00
Evan Francis c22c71c585 apply current proficiency calculation
closes: OUT-3769

flag=account_level_mastery_scales

Test Plan: 1. Create a course in local Canvas with two students,
assignments and an outcome attached with rubrics.
2. Create scores for each assignment high scores for the first assignment
and low scores for the second assignment scores
3. Will call this endpoint locally /api/v1/courses/1/outcome_rollups
?rating_percents=true&per_page=20&include[]=outcomes&include[]=users
&include[]=outcome_paths&page=1&sort_by=student
expecting to see the highest scores recorded
4. Next turn on the FF listed above
5. Call this endpoint locally /api/v1/courses/1/outcome_rollups?rating_percents=true
&per_page=20&include[]=outcomes&include[]=users&include[]=outcome_paths
&page=1&sort_by=student
expecting to see the latest/low scores recorded

Change-Id: I03bc06044632513b576a35ac18a92381211938e0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243686
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2020-08-19 14:07:54 +00:00
Michael Brewer-Davis 4198952be4 collapse AcademicBenchmark columns
refs OUT-1107

flag = none

Test plan:
Check the following operations in canvas:
- manually create outcomes, groups
- import outcomes, groups from csv
- import outcomes, groups from Academic Benchmarks
- course copy with outcomes, groups, and rubrics
- account reports with outcomes export and outcome
  results reports

Change-Id: I15d20d216515d0a29d6a5812ac153dd65a15569b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221528
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2020-01-16 19:54:58 +00:00
Michael Brewer-Davis 17eaae6e8d fix moving outcomes via csv import
closes OUT-3426

flag = none

Test plan:
- save the sample data at the bottom of
  http://canvas.docker/doc/api/file.outcomes_csv.html
  to a csv file
- on the account outcomes page, import
  the file's outcomes into the account
- update the file with a second group
  d,group,Child group 2,child group description,G-1.2,,,active,a,
- update the outcome to belong to the new group
  c,outcome,...,active,d,3,...
- verify that update completes successfully
  and outcome has moved to theh newly
  created "Child group 2"

Change-Id: Ie8f26497bb58bf513b2fc6734be213601e2442b4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221207
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
QA-Review: Pat Renner <prenner@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2019-12-18 23:13:36 +00:00
Augusto Callejas d584db8924 Restore outcomes when workflow_state not present
fixes OUT-3344

test plan:
  - qa-cr

Change-Id: Ia3172b9349a60da2daa93727c7e01b8633795b4e
Reviewed-on: https://gerrit.instructure.com/213213
Reviewed-by: Patrick Renner <prenner@instructure.com>
Reviewed-by: Frank Murphy III <fmurphy@instructure.com>
Tested-by: Jenkins
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2019-10-16 16:53:53 +00:00
Pat Renner 6121e6f4db Ensure outcome imports update active records over deleted records
It is possible for multiple outcomes/outcome groups with the same
`vendor_guid` to be present in a given context.
When updating an outcome/group via CSV, we should
always prefer to update an active outcome to restoring a deleted outcome.

fixes OUT-3138

test plan:
- For both an outcome/outcome group, create two records
 with identical `vendor_guid's`. To do this, create two records via CSV
with guids that you define. After importing the CSV, manually update both
records to have the same `vendor_guid`.
- Mark one record as deleted and delete (via CSV)
- When updating a record, ensure only
 the active record is updated

Change-Id: I420a2435255af4bfb807be7d5dd761456151a016
Reviewed-on: https://gerrit.instructure.com/204087
Tested-by: Jenkins
Reviewed-by: Frank Murphy III <fmurphy@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2019-08-12 13:55:01 +00:00
Augusto Callejas 299535a962 Further specify order of outcome results
closes OUT-2899

test plan:
  - in a course, create an outcome
  - create 5 assignments aligned to that outcome
  - as a student, submit to all the assignments
  - as a teacher, provide a rubric assessment to all submissions
  - in a separate browser tab, confirm that 5 results show up
    (so no skipped results and no repeating results), in result id
    order, using two different pagination approaches (replace
    "1" with the actual course id and prefix each call with
    the domain being tested, like http://canvas.docker):

   * 2 results per page
   /api/v1/courses/1/outcome_results/?per_page=2&page=1
   /api/v1/courses/1/outcome_results/?per_page=2&page=2
   /api/v1/courses/1/outcome_results/?per_page=2&page=3

   * 10 results per page
   /api/v1/courses/1/outcome_results/?per_page=10

Change-Id: I963c6c89e395e2a9de9914152cbd92f375ce8b4d
Reviewed-on: https://gerrit.instructure.com/176507
Tested-by: Jenkins
Reviewed-by: Matthew Berns <mberns@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2019-01-02 17:27:42 +00:00
Augusto Callejas 4d2bedefb3 LMGB outcome details includes all results
closes OUT-2550

test plan:
  - create more than 20 student users in a course.
    you can bulk create users by modifying the sample
    file of 10 users under "users.csv" on
    https://community.canvaslms.com/docs/DOC-12585-4214164118
    and then importing them through an account's SIS Import
    page (you may need to enable "SIS imports" on the account
    features section on its settings page).
    afterwards, add the students to a course
  - create a course outcome
  - create an assignment, aligned to the outcome using a rubric
  - as all the students, submit to the assignment
  - as a teacher, in SpeedGrader, create rubric assessments for
    all submissions, selecting different criterion ratings
  - load the LMGB page
  - hover over the outcome header, and confirm the outcome details
    summarize the correct percentages based on the outcome scores
  - navigate to the 2nd page of results
  - hover over the outcome header, and confirm the outcomes details,
    like described two steps above
  - enable the New Gradebook
  - repeat the steps above, starting at loading the LMGB page

Change-Id: I52815eb2e05a04a0ad70c9c53e13726dbc626b64
Reviewed-on: https://gerrit.instructure.com/173291
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Frank Murphy III <fmurphy@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2018-11-28 18:02:57 +00:00
Augusto Callejas ef0101285e Allow read_grades permission to view alignments
closes OUT-2558

test plan:
  - create an assignment with aligned outcomes
  - as a student, submit to the assignment
  - as a teacher, assess the assignment's rubric
  - as a student, confirm the results appear under sLMGB
  - an an observer to the student, confirm the results
    appear under sLMGB

Change-Id: I66118a01822be921e2fd44187143a12c7c13cd6c
Reviewed-on: https://gerrit.instructure.com/169132
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Frank Murphy III <fmurphy@instructure.com>
Tested-by: Jenkins
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>
2018-10-26 00:01:13 +00:00
Frank Murphy 87d6183c6e Fix validations, don't hide database errors.
Fixes OUT-2525

Test Plan:
- Import a CSV with a long (>255 character) vendor_guid.
- Verify that on import, you get an email with an error referencing
  the specific line that failed.

Change-Id: I9b71e937666e404ac70d9ff0014d0f81ce541657
Reviewed-on: https://gerrit.instructure.com/168903
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2018-10-22 17:59:55 +00:00
Neil Gupta 32b784da82 change outcomes default calc method and int to decaying_average and 65
fixes OUT-2542

test plan:
1. Create an outcome CSV where calculation_method is omitted
2. Import into a course or account
3. Ensure outcome is created with a "decaying_average" calculation method

Change-Id: I77af71ad0c7b91628e85a0cfa40eb1bb4c383614
Reviewed-on: https://gerrit.instructure.com/167131
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2018-10-17 19:27:57 +00:00
Frank Murphy a7ac7a8a16 Tweak import error wording
Fixes OUT-2439

Test Plan:
- with mail catcher configured to catch email errors
- create two different courses in an account
- create a CSV with a single outcome and fixed guid
- import the outcome into one course
- import it into a different course
- verify the error that you receive matches what's in the PS

Change-Id: I25c031531e959560246d72469f8eb3c942315d08
Reviewed-on: https://gerrit.instructure.com/161531
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Frank Murphy <fmurphy@instructure.com>
2018-09-05 20:44:58 +00:00
Augusto Callejas dd867b5c6d Allow excluding users with no results
closes OUT-1859

test plan:
  - in a course, create about 10 outcomes and 10 student users
  - create an assignment, aligned to an outcome
  - submit to the assignment with two student users
  - assess the rubrics for each submission in speed grader
  - load LMGB, confirm that all students and outcomes appear,
    with the results of the two students
  - using a tool like Postman, perform an API call with an
    access to the following endpoint:

    http://canvas.docker/api/v1/courses/<course id>/outcome_rollups

  - confirm that a rollup appears for each student, and only scores
    appear for students whose assignments were assessed
  - append "?exclude[]=missing_user_rollups" to the request above
    and resubmit
  - confirm that only rollups with scores appears (should be two)
  - append "&include[]=outcomes" to the request above and resubmit
  - confirm that under the "linked" section, that "outcomes" contains
    all outcomes in the course

Change-Id: I399715093943455659ed5a05c39befca8dc2e801
Reviewed-on: https://gerrit.instructure.com/156247
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2018-07-11 19:20:58 +00:00
Augusto Callejas c47fb7a26f Exclude outcome results from muted asgmts/quizzes
closes OUT-2304

performance:
Indices are used throughout the scoped query.

Shard.current.id => 1773

base query:
LearningOutcomeResult.active.where(context_code:'course_1079845',user_id:3306819,learning_outcome_id:1397026)

without scope:
----------------------------------------------------------------------------------------------------------------------------------
 Nested Loop  (cost=4.86..8.20 rows=1 width=268)
   ->  Bitmap Heap Scan on learning_outcome_results  (cost=4.42..5.54 rows=1 width=268)
         Recheck Cond: ((user_id = 3306819) AND (learning_outcome_id = 1397026))
         Filter: ((context_code)::text = 'course_1079845'::text)
         ->  BitmapAnd  (cost=4.42..4.42 rows=1 width=0)
               ->  Bitmap Index Scan on index_learning_outcome_results_association  (cost=0.00..1.73 rows=27 width=0)
                     Index Cond: (user_id = 3306819)
               ->  Bitmap Index Scan on index_learning_outcome_results_on_learning_outcome_id  (cost=0.00..2.44 rows=123 width=0)
                     Index Cond: (learning_outcome_id = 1397026)
   ->  Index Scan using content_tags_pkey on content_tags  (cost=0.43..2.66 rows=1 width=8)
         Index Cond: (id = learning_outcome_results.content_tag_id)
         Filter: ((workflow_state)::text <> 'deleted'::text)

with scope (`exclude_muted_associations`):
----------------------------------------------------------------------------------------------------------------------------------------------------------
 Nested Loop Left Join  (cost=6.99..20.54 rows=1 width=268)
   Join Filter: ((learning_outcome_results.association_type)::text = 'Assignment'::text)
   Filter: (((ra.muted IS NULL) AND (qa.muted IS NULL) AND (sa.muted IS NULL)) OR (ra.muted IS FALSE) OR (qa.muted IS FALSE) OR (sa.muted IS FALSE))
   ->  Nested Loop Left Join  (cost=6.56..17.88 rows=1 width=270)
         ->  Nested Loop Left Join  (cost=6.13..15.72 rows=1 width=277)
               Join Filter: ((learning_outcome_results.association_type)::text = 'Quizzes::Quiz'::text)
               ->  Nested Loop Left Join  (cost=5.71..13.06 rows=1 width=269)
                     Join Filter: (((rassoc.association_type)::text = 'Assignment'::text) AND ((rassoc.purpose)::text = 'grading'::text))
                     ->  Nested Loop Left Join  (cost=5.28..10.85 rows=1 width=293)
                           Join Filter: ((learning_outcome_results.association_type)::text = 'RubricAssociation'::text)
                           ->  Nested Loop  (cost=4.86..8.20 rows=1 width=268)
                                 ->  Bitmap Heap Scan on learning_outcome_results  (cost=4.42..5.54 rows=1 width=268)
                                       Recheck Cond: ((user_id = 3306819) AND (learning_outcome_id = 1397026))
                                       Filter: ((context_code)::text = 'course_1079845'::text)
                                       ->  BitmapAnd  (cost=4.42..4.42 rows=1 width=0)
                                             ->  Bitmap Index Scan on index_learning_outcome_results_association  (cost=0.00..1.73 rows=27 width=0)
                                                   Index Cond: (user_id = 3306819)
                                             ->  Bitmap Index Scan on index_learning_outcome_results_on_learning_outcome_id  (cost=0.00..2.44 rows=123 width=0)
                                                   Index Cond: (learning_outcome_id = 1397026)
                                 ->  Index Scan using content_tags_pkey on content_tags  (cost=0.43..2.66 rows=1 width=8)
                                       Index Cond: (id = learning_outcome_results.content_tag_id)
                                       Filter: ((workflow_state)::text <> 'deleted'::text)
                           ->  Index Scan using rubric_associations_pkey on rubric_associations rassoc  (cost=0.42..2.64 rows=1 width=33)
                                 Index Cond: (id = learning_outcome_results.association_id)
                     ->  Index Scan using assignments_pkey on assignments ra  (cost=0.43..2.19 rows=1 width=9)
                           Index Cond: (id = rassoc.association_id)
               ->  Index Scan using quizzes_pkey on quizzes  (cost=0.43..2.65 rows=1 width=16)
                     Index Cond: (id = learning_outcome_results.association_id)
         ->  Index Scan using assignments_pkey on assignments qa  (cost=0.43..2.15 rows=1 width=9)
               Index Cond: (id = quizzes.assignment_id)
   ->  Index Scan using assignments_pkey on assignments sa  (cost=0.43..2.65 rows=1 width=9)
         Index Cond: (id = learning_outcome_results.association_id)

test plan:
  - create two course-level outcomes
  - create an assignment with a single question, and align the 1st outcome via a rubric
  - create a quiz bank with a single auto-gradeable question (e.g. true/false), and
    align the 2nd outcome to it
  - create a quiz that pulls the single question from the quiz bank above
  - as a student, submit to the assignment and the quiz
  - as a teacher, assess the assignment, providing a score to the rubric
  - as a teacher, confirm:
    * both outcomes have results in the LMGB
    * both outcomes have results in the sLMGB
  - as a student, confirm:
    * both outcomes have results in the sLMGB
  - as a teacher, mute the assignment in the gradebook:
    https://community.canvaslms.com/docs/DOC-12961-4152724339
  - as a teacher, confirm:
    * both outcomes have results in the LMGB
    * both outcomes have results in the sLMGB
  - as a student, confirm:
    * only the outcome associated with the quiz bank has results in the sLMGB
  - as a teacher, mute the quiz in the gradebook
  - as a teacher, confirm:
    * both outcomes have results in the LMGB
    * both outcomes have results in the sLMGB
  - as a student, confirm:
    * no outcomes should have results in the sLMGB
  - as a teacher, unmute the assignment in the gradebook
  - as a teacher, confirm:
    * both outcomes have results in the LMGB
    * both outcomes have results in the sLMGB
  - as a student, confirm:
    * only the outcome associated with the assignment has results in the sLMGB

Change-Id: I0ea05eedd29383501cc9306bcedcfa67aee4cd67
Reviewed-on: https://gerrit.instructure.com/155210
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
2018-07-10 20:18:30 +00:00
Augusto Callejas 9c73b7e21b Add median aggregate rollups
closes OUT-2144

test plan:
  - create a course-level outcome with default rubric criterion
  - create an assignment that is aligned to that outcome
  - create two sections in a course (in Settings)
  - create 6 student users, split evenly between the two sections
  - masquerade as each student and submit to the assignment
  - in speedgrader, assess the rubrics with the following scores:
    1st section students: 5, 3, 0
    2nd section students: 4, 2, 1
  - perform an authenticated API call using a tool like Postman
    to fetch the average aggregate score:
    > /api/v1/courses/<course id>/outcome_rollups?aggregate=course
  - confirm the average score is 2.5
  - perform the same call again, but fetch the median aggregate score:
    > /api/v1/courses/<course id>/outcome_rollups?aggregate=course&aggregate_stat=median
  - confirm the median score is 2.5
  - determine the "section_id" values for each of the two sections above
    by running this in a Rails console:
    > CourseSection.last(2).map(&:id)
  - append "&section=<section id>" to the average aggregate score call
    above, and confirm the average scores:
    1st section: 2.67
    2nd section: 2.33
  - append ""&section=<section id>" to the median aggregate score call
    above, and confirm the median scores:
    1st section: 3
    2nd section: 2

Change-Id: I5701fd3edc1ff423caf4735406ee1bc3b5b1b011
Reviewed-on: https://gerrit.instructure.com/156486
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>
2018-07-09 23:06:02 +00:00
Michael Brewer-Davis 8fa3360f89 do not include hidden results in rollups
closes OUT-1846

Test plan:
- create an outcome
- create two assignments with rubrics including
  the outcome
- set one of the rubrics to "Don't post results to LMGB"
- assess a student using both rubrics with different scores
- visit the LMGB
- verify that only the non-hidden score is reflected
  in the LMGB
- visit the student LMGB
- verify that only the non-hidden alignment is shown
  in the student lmgb
- visit
    http://canvas.docker/api/v1/courses/COURSE_ID/outcome_results?user_ids[]=USER_ID&outcome_ids[]=OUTCOME_ID
  (replacing COURSE_ID, USER_ID and OUTCOME_ID)
- verify that hidden alignment is not shown
- add
    &include_hidden=true
  to the above URL
- verify that hidden alignment is now shown

Change-Id: Ie08c63f32686ffc42394e926c22eac773799d616
Reviewed-on: https://gerrit.instructure.com/154464
Tested-by: Jenkins
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-06-21 16:39:27 +00:00
Matthew Berns e924133cb8 add hide_points to json response on lmgb
closes OUT-2300

test plan (dev-qa):
- create a new outcome
- create a new rubric and align the outcome
- align the rubric to a new assignment, ensure you
  choose the box to remove points from rubric
- assess a student
- go to the LMGB
- the outcome_rollups response should include a
  hide_points field in the json
- hide_points should be 'true' on the rollup for the new outcome
  with the newly created outcome
- attach the newly create outcome to a different assignment, one
  that doesn't have its points hidden on the rubric association
- assess the student
- return to lmgb
- hide_points should be 'false' for the rollup on the new outcome

Change-Id: I0f9accb4ff0cc76f40c08ce08e21091e35df6af8
Reviewed-on: https://gerrit.instructure.com/153547
Tested-by: Jenkins
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Michael Brewer-Davis <mbd@instructure.com>
2018-06-13 21:58:49 +00:00
Michael Brewer-Davis 834d967ee7 resolve outcome import/export errors
closes OUT-2219

Test plan:
- Verify that the CSV files included in the ticket
  import without error
- Verify that the account outcomes export correctly
  after the files included in the ticket have been
  imported
- Create a valid outcomes CSV file with only the following
  fields: vendor_guid, object_type, title
  and verify that it imports correctly
- Verify that account outcomes export correctly
  after the minimal file has been imported

Change-Id: I94d48be26bb12930c9355ebfc38f928860249ba9
Reviewed-on: https://gerrit.instructure.com/151822
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Reviewed-by: Matt Berns <mberns@instructure.com>
Tested-by: Jenkins
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-06-05 13:30:48 +00:00
Augusto Callejas 41ad4a0d33 Distinguish between outcome import errors/failures
closes OUT-2012

test plan
  - add `docker-compose/mailcatcher.override.yml` to your
    COMPOSE_FILE env variable
  - start up canvas
  - create or confirm you have at least two account-level outcome
  - under account settings, export outcomes for the given account
  - on the export file, remove one outcome's title by blanking out
    the value, and change the title of another outcome to a valid
    value
  - import the modified exported file
  - confirm that a warning alert appears, saying "a problem importing some
    of the outcomes"
  - confirm that the 2nd outcome's title did change, but not the 1st, since
    the title was blank
  - in mail.canvas.docker, confirm that a successful message appears,
    but with the warning issues listed
  - create an empty csv file
  - import the emtpy csv file
  - confirm that an error alert appears
  - in mail.canvas.docker, confirm that a failed message appears

Change-Id: If9296338a5667e2a4795888d5627a37a1ddcb82a
Reviewed-on: https://gerrit.instructure.com/147994
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-05-07 20:55:45 +00:00
Frank Murphy 0063a5d065 Allow linking of outcomes with nil values.
Fixes OUT-2170

Test Plan:
- Create an account-level outcome and an API $TOKEN for your account.
- Find the $ID of the outcome via the UI or rails console.
- Fetch the outcome data:
  curl "https://web.canvas.docker/api/v1/outcomes/$ID.json" \
     -H "Authorization: Bearer $TOKEN" | jq . > outcome.json
- Edit outcome.json so that "description": null
- PUT the edited outcome back:
  curl "https://web.canvas.docker/api/v1/outcomes/$ID.json" \
     -H "Authorization: Bearer $TOKEN" \
     -X PUT \
     --data-binary @outcome.json \
     -H "Content-Type: application/json"
- Export outcomes from the account.
- Create a course under the prior account.
- Import the exported CSV into the course
- Verify that there are no errors and the outcome is properly imported.

Change-Id: If21a7d1068d5bf1ea7aa1de520df229a1688e691
Reviewed-on: https://gerrit.instructure.com/147995
Tested-by: Jenkins
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2018-04-30 15:20:22 +00:00
Frank Murphy 72b791a739 Use vendor_guid_2 when locating outcomes using ABv3
Fixes OUT-2099

Test Plan
- Install this plugin:
  https://gerrit.instructure.com/#/admin/projects/instructure_misc_plugin
  under gems/plugins
- Run `bundle update`, `bundle install`
- Run `bundle exec rake db:migrate`
- Open a rails console, and run:

  DataFixup::AbGuidUpdater.enable_new_cols

- Create a new account
- Create a new outcome from that account.
- Using the outcomes API:

  https://canvas.instructure.com/doc/api/outcomes.html

  Update the outcomes so that its vendor_guid is a known value.
- Verify that the vendor_guid_2 field in the database is set
  to that value on the rails console:

  LearningOutcome.find(id).vendor_guid_2

- Export outcomes from the account
- Modify one of the outcomes in the CSV file
- Re-import the CSV, verify that the outcome changes in Canvas.

Change-Id: I33b8eb9375d94616c677d45194953a81ccd36a15
Reviewed-on: https://gerrit.instructure.com/145694
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Tested-by: Jenkins
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-04-20 18:01:52 +00:00
Augusto Callejas 8e17fcd6c6 Allow references to outcomes in a visible context
closes OUT-2124

test plan:
  - create an account-level outcome
  - export account outcomes
  - import the exported outcomes into a course under the account
  - confirm no error occurs and the account-level outcome appears
    at the course-level

Change-Id: I1e20604c06ce2f6353378aea0d20df195cd8305b
Reviewed-on: https://gerrit.instructure.com/146190
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Matt Berns <mberns@instructure.com>
Tested-by: Jenkins
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-04-11 16:48:50 +00:00
Frank Murphy 5ae9ab5600 Allow outcomes CSVs with no workflow_state column.
Fixes OUT-2104

Test Plan:
- Create a CSV file (possibly from spec/lib/outcomes/fixtures)
  with no workflow_state header / column.
- Import, verify that the outcomes and groups are properly imported.

Change-Id: I2175c974085045c9b6263588ab903ab4729b4072
Reviewed-on: https://gerrit.instructure.com/145553
Tested-by: Jenkins
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-04-04 15:42:01 +00:00
Frank Murphy 58a97f5e15 fix for rails 5.2
Change-Id: I8a5b241e74e39521227de1e96f53235147321d3f
Reviewed-on: https://gerrit.instructure.com/144715
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Tested-by: Jenkins
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Frank Murphy <fmurphy@instructure.com>
2018-04-03 16:55:26 +00:00
Frank Murphy 2233d6f347 Remove canvas_id from export, use vendor_guid on import
Fixes OUT-2052

Test Plan:
- Create an outcomes tree under an account, with nested outcomes.
- Export the account outcomes.
- Create a new course under the prior account.
- Import outcomes into that account.
- The outcome tree should be fully imported.

Change-Id: Ifbf886a65a307b4c45f9c28ca92c19f0bcb16c06
Reviewed-on: https://gerrit.instructure.com/145408
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-04-02 15:33:34 +00:00
Frank Murphy 3fb0633a29 Reactivate dead parent links
Fixes OUT-2062

Test Plan:
- Import or create some outcomes.
- Export those outcomes.
- Delete one of those outcomes.
- Re-import the outcomes from the prior export.
- The outcomes should be visible again under their prior parent.

Change-Id: I5ea9bb19f4bd1559e0dfabf4922b17c1c6a55346
Reviewed-on: https://gerrit.instructure.com/144709
Tested-by: Jenkins
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-03-27 16:19:58 +00:00
Michael Brewer-Davis 3522092362 raise errors on empty outcomes import files
closes OUT-2037

Test plan:
Submit empty file for outcomes import
Verify that error says 'There was an error uploading your file'
Submit file with only whitespace
Verify that error says 'Missing required fields'
Submit file with only valid headers for outcomes import
Verify that error says 'File has no outcomes data'
Submit file with data rows
Verify that import completes as expected

Change-Id: I3a98af3c8001c79c0cf3a1bf7d477c9de898754b
Reviewed-on: https://gerrit.instructure.com/143883
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Tested-by: Jenkins
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-03-26 20:44:03 +00:00
Michael Brewer-Davis 21d2e5c3c2 raise error on duplicate outcomes in import
closes OUT-2038

Test plan:
Create an outcome import csv that includes
duplicate vendor guids.
Import file into a context
Verify that import is successful for the first
row using a vendor guid, and fails for any
subsequent rows.

Change-Id: Ia3925b16d32e31d522431bfe07154cddf88af862
Reviewed-on: https://gerrit.instructure.com/143879
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Tested-by: Jenkins
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-03-22 17:30:59 +00:00
Michael Brewer-Davis b2fcca7de8 add context information to outcome import error
closes OUT-1976

Test plan:
Import outcomes into an account
Import the same outcomes into a subaccount or course
  Verify that import was successful
Make changes to the outcomes in the CSV
Re-import the outcomes into the subaccount or course
  Verify that modified outcomes were not imported

Change-Id: Ib7d16cbb5b79b894dff571b6afeacc7af2c6a7b6
Reviewed-on: https://gerrit.instructure.com/143876
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-03-20 15:43:47 +00:00
Frank Murphy aaff60425d Use separator / delimiter from rails locale
Fixes OUT-2049

Test Plan:
- Create an outcome.
- Change the rubric on the outcome to have a large number with
  fractional points, i.e. 1,234.567
- Go to account settings.
- Change the language to French.
- Go to "Reports" ("Rapports")
- Generate the outcomes report ("Export de résultats")
- Download the resulting file.
- Change to another large number using the same format
  in the file, i.e. 2 000,42
- Re-import the downloaded file ("Acquis" > "Importer")
- Verify the outcome tier threshold has changed to the
  value you specified before.
- (optional) change your language back under "Paramètres"

Change-Id: I11b45d210b1a09cc16c6b5d6589e869fce08242e
Reviewed-on: https://gerrit.instructure.com/143505
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-03-16 14:20:49 +00:00
Frank Murphy e99ef6e856 i18n tweaks for outcome import
Fixes OUT-2010

Test Plan
- Save an .xlsx version of demo.csv:

  $ open spec/lib/outcomes/fixtures

  A finder window will open. Right click "demo.csv", and select
  "Open With..." > "Excel"

  Then "Save As" and specify the format as ".xslx". Remember
  where you saved this file. I recommend you save it to
  "Downloads"

- Change your system language to Norwegian:
  - on OSX, go to "Language & Region" in System Preferences
  - click the '+' below "Preferred Languages"
  - Choose "Norsk bokmål"
  - Click "Add"
  - When it asks if you want to use it as a primary language,
    click "Use Norwegian Bokmål"
  - Keep the preferences window open so you can switch back.
  - Click the back button on the top left.
  - Don't restart your system when prompted.
  - Don't close the settings window, it should still remain in
    English so you can switch back at the end.

- **Google Translate is now your best friend.**

- Make sure that Excel is not running.
- Open your previously saved file.
- The excel window should have all menu options in Norwegian.
- Choose Fil > Lagre Sum... to save as
- Click the arrow next to "Arkiver som" to select a file path.
- Choose the "Nedlastinger" (Downloads) directory, and set the
  name under "Arkiver som" to "norwegian"
- Under "Filformat", select "Kommadelte verdier (.csv)"
- Save by clicking "Arkiver"
- Quit excel. You will see a dialog that says:
  "Vil du lagre endringene i dokumentet norwegian.csv?"
  Click:
  "Ikke lagre"
- Change your system language back to English (optional, don't
  switch back for hard-mode test plan):
  - Go back to "Language & Region" in System Preferences
  - Click "Norsk bokmål"
  - Click the minus button.
- Check that the file in "Downloads" is semicolon-separated.
- Attempt to import "norwegian.csv" in "Downloads" via the
  canvas UI.
- It should work!

Change-Id: I0ed4b6d7547b605712278a08dadbd6f41b86376b
Reviewed-on: https://gerrit.instructure.com/143007
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-03-12 15:43:13 +00:00
Michael Brewer-Davis 54e84ea19e allow updating outcomes via csv
closes OUT-1555

Test plan:
Basic behavior:
- follow instructions in g/140107 to
  do basic import of outcomes into a context
- make changes to the csv file:
  - change titles/descriptions/ratings/etc.
  - change parents of groups and of outcomes
- re-run the import command with the updated
  csv file
- verify that changes can be seen in the
  console or in the canvas UI

Subcontext behavior:
- check LearningOutcome.count and LearningOutcomeGroup.count
  in the rails console
- import the csv into a subaccount or course
  under the account used above
- verify that the outcomes and groups are
  imported
- verify that outcomes are re-used and groups
  are re-created by viewing LearningOutcome.count and
  LearningOutcomeGroup.count again; the former should be
  unchanged and the latter increased by the # of groups
  in the csv file

Export/Import behavior:
- generate a csv file using Account Settings/Reports/Outcome Export
- make changes to the csv file, including updating
  vendor_guids for outcomes/groups in the file
- import the csv and verify that changes are
  made using the UI and console (you can check vendor_guid
  changes by looking at LearningOutcome.find($canvas_id)

Error behavior
- Attempt to import the exported csv into the
  subcontext account or course from the second set
  of steps, verifying
  - groups cannot be imported or updated, with error that
    group was found in a different context
  - properties of outcomes cannot be updated, with error
    that fields for outcome from another context cannot
    be updated
  - non-existent canvas ids lead to errors

Change-Id: Iceca02ec5157a4d187a2b9fd11b3415c84613ffa
Reviewed-on: https://gerrit.instructure.com/141836
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-03-09 20:17:43 +00:00
Frank Murphy 052c7480e6 Outcomes import job runner with status and errors
Fixes OUT-1997

Test Plan:
- On an account with no outcomes,
- In the rails console, run the following:
  Attachment.skip_3rd_party_submits(true)
  a = Attachment.new
  a.context = Account.first
  path = 'spec/lib/outcomes/fixtures/demo.csv'
  a.uploaded_data = File.open(path,'rb')
  a.display_name = 'qa-test-outcomes-import'
  a.save!
  i = OutcomeImport.create!(
    context: Account.first,
    workflow_state: :created,
    attachment: a
  )
  i.run
- You should see a bunch of sql commands. Now run:
  i.reload
  i.progress # should be 100
  i.workflow_state # should be "succeeded"

Change-Id: I90a2e7808fcf1baf662832e5955a41c3b36e3add
Reviewed-on: https://gerrit.instructure.com/142220
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Tested-by: Jenkins
Product-Review: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
2018-03-06 16:30:48 +00:00
Frank Murphy 8ee874ef3a Friendly error messages on outcomes CSV import
Fixes OUT-1885

Test Plan:
- Find your canvas account id.
- Create an invalid CSV import file by copying:

  spec/lib/outcomes/fixtures/demo.csv

  to, for example, error.csv. Delete one of the outcome groups in this
  file, which will invalidate the `parent_guid` references to it.

- Run (if you have sharding enabled, add `switch_to_shard ... ; ` before
  the Outcomes::CsvImporter command):
  dc run --rm web bundle exec rails r \
    "puts Outcomes::CsvImporter.new('error.csv', Account.find_by(id: $ID)).run"
- Verify that an error for the missing parent reference has been
  generated.

Change-Id: I252c97281121aee597464a4417a6e0657fba03a8
Reviewed-on: https://gerrit.instructure.com/141670
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-02-27 21:55:37 +00:00
Frank Murphy 113a6b4a11 Basic bulk outcome import
Fixes OUT-1887

Test Plan:
- Find your canvas account id.
- Run (if you have sharding enabled, add `switch_to_shard ... ; ` before
  the Outcomes::CsvImporter command):
  dc run --rm web bundle exec rails r \
    "Outcomes::CsvImporter.new('spec/lib/outcomes/fixtures/demo.csv', Account.find_by(id: $ID)).run"
- Open account outcomes in canvas, verify they look ok.

Change-Id: I3631866d5b0a89df2b494f67edb6c63585699c75
Reviewed-on: https://gerrit.instructure.com/140107
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-02-14 23:07:18 +00:00
Landon Wilkins 5ba312a04d da licença part 32
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: Ibb971e1256b9ebf4ed4b50efac991472abba82fc
Reviewed-on: https://gerrit.instructure.com/110058
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-27 22:00:01 +00:00
Matthew Berns af6758bb94 fix outcome calcs for mix of assignments & quizzes
fixes OUT-460

test plan:
- create 2 outcomes, one with decaying average and one w/ n_mastery
- attach each outcome to an assignment and a quiz
- it's not reccomended to use exactly 5 questions for quiz testing
  since this has the potential to obfuscate possible calc errors
- log in as a student and submit to the assignment/take the quiz
- as the teacher/admin, asses the outcome on the assignment in
  speedgrader. It's reccomended to get a high score on at least
  one quiz that's being tested, in order to ensure the mastery
  score on the result does not exceed the max possible score
  for the outcome
- view the students outcome scores in the lmgb and student lmgb
  to confirm the score's accuracy

try various scores, but here's an initial example assuming
Outcome A is decaying avg, and Outcome B is n_mastery

Outcome A
- Attach Outcome A to two assignments and two quizzes
- Submit as the student, first to the two assignments,
  scoring a 3.0 and a 2.0, then on a quiz in which you
  get 90% on the aligned bank
- on the final/most recent bank, score a 40%
- the score for the Outcome should be 2.41

Outcome B
- Attach Outcome B to two assignments and three quizzes
- Submit as the student. Order does not matter, but ensure
  scores of 3.0 and 3.5 on the assignments, and 20%, 50%,
  and 80% on the quizzes.
- the score for the Outcome should be 3.5

Change-Id: If99d8ab6a3791137e407ab43fd8af2c0d69058d5
Reviewed-on: https://gerrit.instructure.com/93333
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Tested-by: Jenkins
QA-Review: Cemal Aktas <caktas@instructure.com>
Product-Review: McCall Smith <mcsmith@instructure.com>
2016-11-02 17:36:19 +00:00
James Williams c23210564c use rails 4.2 preloader format
closes #CNVS-26031

Change-Id: I2e0351fb62e5a06b47fe8c6c3dd503318d29a7ad
Reviewed-on: https://gerrit.instructure.com/69228
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-12-30 14:58:10 +00:00
Ryan Taylor e27c2d3f7b Don't show outcomes from deleted rubrics.
Closes CNVS-13587

Test Plan:
  - Create an outcome.
  - Enable the Learning Mastery Gradebook (LMG)
  - Create an assignment
  - Add a rubric to that assignment
  - Add an outcome to that Rubric
  - Submit that assignment as a student
  - Give a student a point value on that outcome.
  - Verify their information now shows in LMG
  - Remove the Outcome from the Rubric
  - Check LMG, outcome info should be gone
  - Delete the rubric
  - Check LMG, outcome info should be gone
  - QA: be sure to check outcomes that use averaging as part of their mastery
  evaluation (n_mastery and decaying average), just to make sure the math
  still works as expected.
  - Confirm the same behaviors when attaching/removing an outcome from a
    quiz. (Bonus, unreported bug, I think).

Change-Id: Icdcf674a669165200150f84eb3d943863e09a49d
Reviewed-on: https://gerrit.instructure.com/62055
Reviewed-by: Brian Finney <bfinney@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
2015-10-12 21:00:43 +00:00
Michael Nomitch 66fa28fa47 outcomes speed improvements
refs CNVS-12716

test plan:
  - make course with many assessed outcomes
  - load the mastery gradebook
  - it should load relatively fast

Change-Id: I81a91d58d37e5ae3d5399d59f6e3626af53496ea
Reviewed-on: https://gerrit.instructure.com/53493
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Tested-by: Jenkins
Product-Review: Hilary Scharton <hilary@instructure.com>
2015-05-29 15:20:28 +00:00
Matthew Berns 0902330cd5 allow deletion of rubric scores in speedgrader
fixes CNVS-19658

test plan:
- go to a course with at least one student and assignment
- create a rubric with at least 2 criterion and attach it to the assignment
- pull up the assignment in speedgrader
- enter points for the first criteria and save
- reopen the rubric, points for the first criteria should persist, the second
  criteria score should still be empty(it should not show '0')
- refresh the page, the state of criteria scores should persist
- change the score of the first criteria to 0.
- repeat prior two steps, the score of 0 for the first criteria should persist
- remove score entirely for first criteria
- repeat the re-open rubric and refresh page steps, the field for the first
  criteria being empty should persist, it should not change to '0'
- change the score for a criteria to something with letters and save
- re-open the rubric, the score field should empty (repeat prior reopen and
  refresh steps)

Change-Id: I20fca1894598269b1f34c2090d36a6bb4ff586dd
Reviewed-on: https://gerrit.instructure.com/52948
Product-Review: Hilary Scharton <hilary@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Matt Berns <mberns@instructure.com>
Tested-by: Jenkins
2015-05-06 15:09:09 +00:00
Matthew Berns aa8b5f6dc8 Updates teacher learning mastery gradebook for fancy math
fixes CNVS-11656

test plan:
- enable the teacher and student learning mastery gradebook feature flags
- go to gradebook and select the Learning Mastery tab
- outcome scores per student and aggregate totals should appear the same as
  they do on master
- hover mouse over outcome title to trigger popover
- popover should include a path to the outcome, as well as a pie graph with a
  key to the right of it that shows colors for 'exceeds expectations',
  'meets expectation', and 'does not meet expectations'
- popver should then show mastery points needed, outcome description,
  then a content box that includes the calculation method, along with
  method description/example.
- click a student name to go to student learning mastery gradebook
- all things should appear the same was as they did on
  https://gerrit.instructure.com/#/c/45777/ excluding a minor change to
  the wording for most recent assessment
- masquerade as a student and go to /grades in a course
- all popover content should still be the same as when viewing this page as a
  teacher

Change-Id: Ibe4214a4217c4fb42824e66934b49dccff13fe17
Reviewed-on: https://gerrit.instructure.com/48004
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
Tested-by: Jenkins
2015-02-28 00:56:25 +00:00
Matthew Berns 5373969293 adds ui hover to student learning mastery gradebook
fixes CNVS-12924

test plan:
- enable student learning mastery gradebook and go to its page
- the arrow on the left hand side of outcome groups should properly toggle when
  expanding and collapsing
- the pill on the right hand side should properly show the amount of outcomes
  attached to it(grey), and those that the student has mastered(green)
- expand a set of outcomes and hover over the icon on the right side
- a hover should appear showing specific details for the outcome including:
  - a check mark, yellow plus, or red x for mastery, near-mastery, and remedial
  - the last assignment and the date it was submitted (note: you will need to submit
    and grade a new assignment to see this info. Outcomes prior to this update will
    not have a submission time available and should display "N/A")
  - what the current mastery evaluation method is. Methods should show as:
    "Latest Score", "Highest Score", "Acheive Mastery (x) number of times", or
    "(split) Decaying Average".
    note: (x) should indicate number of times, (split) should indicate split
    (e.g. 75/25, 65/35)
  - Decaying Mastery and x number of times methods should also provide additional
    example text of how the evaluation method works
- hover should disappear and reappear appropriate on mouse enter and leave
- check other locations where pills appear to ensure no unexpected
  formatting changes

accessibility test plan:
- use keyboard navigation to get to the icon that creates the hover
- icon should prompt user to press space for more info
- the hover should expand and automatically set the focus to the content on the
  top portion of the hover
- all fields should properly read out their information
- pressing escape should collapse the hover and return focus to the icon

Change-Id: Iaedc67794d2aceb681f5c2895684797f45be8c62
Reviewed-on: https://gerrit.instructure.com/45777
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2015-02-18 20:07:21 +00:00
Matthew Berns d5ad3f6e5b updated learning outcome to retain eval method and info for weighted methods
fixes CNVS-16915

(all mentions of 'gradebook' refer to learning mastery gradebook)
test plan:
- go to gradebook
- all existing mastery scores should still default to highest score to retain
  accuracy of existing calculations
- in rails console, set 'calculation_method' to 'latest' for an outcome
- all results for that outcome should now show student's latest score on gradebook
- in rails console, set method to 'highest'
- all results for that outcome should now show student's highest score on gradebook
- in rails console, set method to 'n_mastery' and set 'calculation_int' to a number
  between two and 5
- all results for that outcome should now show avg of student's higest n# of scores
  (#n being the number set for the outcome's 'calculation_int')
- in rails console, set method to 'decaying_average' and set 'calculation_int' to 75
- scores should now appear as they did first time gradebook was viewed on step #2
- in rails console, set 'calculation_int' to 65
- scores for that outcome should now reflect decaying average with 65% weight given to
  most recent score, and 35% weight for avg of all prior scores
- have a student make a new submission to an old assignment and give it a score
- the re-submission should now be most recent score for 'latest' and
  'decaying_average' methods
- amend a score for an old submission without a new submission from the student
- the amended score should not become the most recent, but still be accurately
  reflected in the 25%/35% part of the 'decaying_average' method

Change-Id: I330c47cb2288d99e589deca00ddb5a8ee8103a91
Reviewed-on: https://gerrit.instructure.com/44935
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
2014-12-16 01:04:28 +00:00
Braden Anderson d84c628ca8 outcome results API: include result count on rollups
fixes CNVS-13365

test plan:
  * open /api/v1/courses/1/outcome_rollups
  * verify that each score includes a count
  * verify that counts match the number of results for that
      combination of outcome and student

Change-Id: I0cbbab7d2c1ebb6574e090046c52b7a4159bb9b9
Reviewed-on: https://gerrit.instructure.com/35708
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Drew Bowman <dbowman@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
2014-06-04 16:59:06 +00:00
Jon Willesen f9e3d2ae98 add aggregate parameter to outcome results rollup api
also replaces raw hashes in outcome result analytics with
structs to improve error detection and possibly support active
model serialization in the future.

fixes CNVS-10037

test plan:
 - check the outcome results api documentation for the new
   aggregate parameter.
 - call the outcome rollup api with the aggregate=course
   parameter.
 - verify the result in this case is one rollup that contains
   an accurate average of the user rollups for each outcome.

Change-Id: I635cf5e28f5de73e44b63ac6234971657728d035
Reviewed-on: https://gerrit.instructure.com/28103
Reviewed-by: Joel Hough <joel@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
QA-Review: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-01-07 22:09:45 +00:00
Joel Hough 0d1c04cbf1 jsonapi-ify outcome results api
fixes CNVS-10198, CNVS-10201

test plan
- test outcome result api as in c/27631
- ensure that jsonapi paging metadata is returned

- fetch outcome results for a course that includes students
 without outcome results (i.e. haven't submitted anything)
- ensure that the student is listed in the returned results
 with an empty scores array

Change-Id: I00d8e9de241a243fb6ac1aa9f55150b8955a2452
Reviewed-on: https://gerrit.instructure.com/28015
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2014-01-06 20:08:01 +00:00
Jon Willesen f8042f63cc start of new outcome results api
fixes CNVS-10034

test plan:
 - check the new outcome results api documentation.
 - generate some outcome results:
   - create assignments with rubrics that have linked outcomes.
   - grade those assignments with the rubric.
 - call the /api/v1/outcome_results api endpoint.
 - make sure the returned student scores contain the maxiumum
   score achieved for each outcome.
 - students should not be able to access the api.

Change-Id: Icddec2aa9000c01f3b05c1c3c21260f7c15f7f7e
Reviewed-on: https://gerrit.instructure.com/27631
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-01-02 22:35:02 +00:00