Commit Graph

100 Commits

Author SHA1 Message Date
Brian Palmer 6f7e610124 support cassandra 1.2+ consistency level usage
This changed from a part of the query string in cassandra 1.1 to a
separate parameter passed to execute in cassandra 1.2 and above.
Unfortunately we need to jump through some hoops to support both, until
we've fully upgraded to 1.2.

This commit adds a placeholder to the query string %CONSISTENCY% that
will be replaced with the chosen level in 1.1, and replaced with the
empty string in 1.2. Once we've upgraded to 1.2, we can remove all this
as it'll just be another option to the method.

closes CNVS-9273

test plan:

Using each of cassandra 1.1, 1.2, and 2.0:

* Clear out the consistency level Settings
  * Setting.connection.delete("DELETE FROM settings WHERE name LIKE 'event_stream.%_consistency%'")
  * Verify that page views and audit logs can be fetched, verify in the
    rails logs that no consistency level is given in the CQL query
    lines
* Set the consistency level
  * Setting.set('event_stream.read_consistency', 'ONE')
  * Verify that page views and audit logs can be fetched, verify in the
    rails logs that consistency level "ONE" is given in the CQL query
    lines. In 1.1, this will be in the query string, in 1.2 and 2.0 it
    will follow the query in an options hash

Change-Id: I3d007376d096e6ed31a40e699e77dca4cdd065a2
Reviewed-on: https://gerrit.instructure.com/35171
Tested-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-05-23 18:53:25 +00:00
Ahmad Amireh 076e541cdb Ember Quiz Stats - File Upload & Formula
Render question statistics for those question types similar to Essay.
File Upload should include a link to download all submissions too.

QuizSerializer was updated to include the submission ZIP download URL.

Closes CNVS-12988

TEST PLAN
---- ----

  - using your data set from https://gerrit.instructure.com/#/c/35112/
    - verify that the score chart renders with the student scores
    - verify that you get a link to Download All Files for FUpload
      questions
    - verify that the "Attempts: x out of Y" reads correctly based on
      the "responses" field and the total participant count,
      respectively
    - tooltips and chart interactivity like that for Essay

Change-Id: I4a77631491b169106e2eb677b21c1f30f3ca9440
Reviewed-on: https://gerrit.instructure.com/35113
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-05-22 15:56:45 +00:00
Ahmad Amireh ddcffe00ef Quiz Stats - File Upload & Formula
Add support for generating stats for File Upload and Formula questions.
Similar to Essay metrics but adjusted to calculate properly.

Closes CNVS-13169

TEST PLAN
---- ----

  - create a quiz with those question types
  - take the quiz:
    - answer both question types by at least one student, but leave it
      unanswered by another so we can test the "responses" metric
  - test the stats:
    GET /api/v1/courses/:course_id/quizzes/:quiz_id/statistics
    - the "responses" metric should count the number of students who
      provided an answer
    - the "graded" metric should read the number of students whose
      answers you've graded so far
    - the "full_credit" one should read 0 until you grade it and give
      them a score higher than, or equal to, the maximum points possible
    - "point_distribution" is similar to that of Essays; it is an array
      of objects that track every score you gave the students and the
      number of students who received those scores
  - grade the scores and re-test to verify the metrics update correctly
  - verify that the API documentation is updated to include those
    question types

PS: the "responses" field will read "the number of students who uploaded
a file" for File Upload, and "the number of students who wrote any
answer" for Formula.

Change-Id: I890eafe018e000eef88de782bd7e86b5259df5d5
Reviewed-on: https://gerrit.instructure.com/35112
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-05-22 15:56:29 +00:00
Cody Cutrer 8178266194 split yaml file loading out of Setting
refs CNVS-13024

Setting wasn't properly being initialized as unsharded because
it was loading before Switchman. The reason we need Setting before
switchman is just for yaml loading, so split that into its own
class.

Change-Id: I5456e103cb216dba2d5af4e9c20a697b468c923b
Reviewed-on: https://gerrit.instructure.com/35043
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-05-21 18:27:06 +00:00
Ahmad Amireh 32801bd45d Quiz Stats - Multiple Dropdowns
Closes CNVS-13161

TEST PLAN
---- ----
  - create a quiz with multiple-dropdown questions
  - take the quiz by a number of students and type in different answers
  - make an API request to stats:
    GET /api/v1/courses/:course_id/quizzes/:quiz_id/statistics
    - verify you get the documented metrics and they have the proper
      values
  - visit the ember quizzes page and verify that:
    - the charts are still working

Change-Id: I37ef48f22c3c16170034b6dd887b40ff20da4af5
Reviewed-on: https://gerrit.instructure.com/35104
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-05-21 16:37:11 +00:00
Ahmad Amireh 2e00d94732 Quiz Stats - FIMB
Support for FIMB question statistics in the CanvasQuizStatistics gem.

Closes CNVS-13160

TEST PLAN
---- ----

  - create a quiz with FIMB questions
  - take the quiz by a number of students and type in different answers
  - make an API request to stats:
    GET /api/v1/courses/:course_id/quizzes/:quiz_id/statistics
    - verify you get the documented metrics and they have the proper
      values
  - visit the ember quizzes page and verify that:
    - the charts are still working

Change-Id: I2d82c708614c41e222aa24d65de64555d8056a9a
Reviewed-on: https://gerrit.instructure.com/35101
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-05-21 16:36:58 +00:00
Ahmad Amireh 4b552c0022 Quiz Stats - Convert Essay to new DSL
Closes CNVS-13159

TEST PLAN
---- ----

Only code changes. Test plan would be the same as
https://gerrit.instructure.com/#/c/35096/

Change-Id: I0f26a3df1278d555237c803cebbe80cde1559065
Reviewed-on: https://gerrit.instructure.com/35097
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-05-21 16:36:45 +00:00
Nathan Mills 5010cdef69 refactor variable substitution out of the models
also adds some new substitutions

fixes PLAT-497 PLAT-496

test-plan:
all current variable substitutions should work
new substitition: '$Canvas.account.name'  should work as well

Change-Id: I9b4e71f816d777e17d3369bb907c7b72209da770
Reviewed-on: https://gerrit.instructure.com/34546
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-05-21 14:58:01 +00:00
Ahmad Amireh d7a23ea23d Quiz Stats - Normalize input
Ensure all input hashes are using symbol keys.

Closes CNVS-13158

TEST PLAN
---- ----

Code changes. Test plan is similar to
https://gerrit.instructure.com/#/c/35096/

Change-Id: Ie1db45e2a5875e410a758c0b2f14594345212b5d
Reviewed-on: https://gerrit.instructure.com/35098
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-05-21 13:03:55 +00:00
Ahmad Amireh 457e55d6a2 Quiz Stats - Refactor/get rid of QuestionAnalyzer
- removed the question analyzer
  - each answer analyzer is now expected to calculate its own
    "responses" field as opposed to doing it in a generic manner
  - made the Essay analyzer generate its "responses" field
  - a self-documenting DSL for defining analyzer output metrics

Closes CNVS-13157

TEST PLAN
---- ----

It's all code movement/refactor so nothing new to test. The plan is to
verify the Essay question stats are unaffected (which is basically all
the gem supports at this point:)

  - create a quiz with an essay question
  - take the quiz by a few students
  - grade a submission
  - retrieve the stats via the API:
    GET /api/v1/courses/:course_id/quizzes/:quiz_id/statistics
    - verify the essay stats in the API are still functional, the
      "responses" field in particular

Change-Id: I42b9552c60ccb56f7c6912fed7cc1173da71852d
Reviewed-on: https://gerrit.instructure.com/35096
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-05-21 13:03:40 +00:00
Anthus Williams 62ec134c92 active_polymorph
fixes CNVS-12143

allow polymorphic names in ActiveRecord has_many
associations; when retrieving association, use these
names to retrieve records with different (but synonymous)
foreign_types

currently this gem only addresses has_many relationships
to achieve feature-parity with the existing Quizzes
monkeypatching. A future commit will address adding
similar functionality to other types of associations

test plan:
1) Create a quiz with id Q
2) Attempt the quiz twice, so you can see
both attempts on submission_history/ gradebook
3) In the rails console, get the set of attempts:

versions = Quizzes::QuizSubmission.where(quiz_id: Q).first.versions

4) Change the versionable_type of one of the attempts, but not the other:  

versions.where(id: versions.first.id).update_all(versionable_type: 
"Quiz")

5) Check the submission_history/gradebook to verify
that you still see both attempts

Change-Id: Ia9611a35705ba2929a92757f586a916dce90a4ee
Reviewed-on: https://gerrit.instructure.com/33505
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Anthus Williams <awilliams@instructure.com>
2014-05-19 22:05:09 +00:00
Cody Cutrer 5d4d842ef2 send delayed jobs stats to statsd
closes CNVS-12739

log timing for pops, time spent in queue, time to perform job,
sliced by tag (where applicable), shard, and job shard.

test plan:
 * configure statsd.yml to go to 127.0.0.1 port 7856
 * nc -lu 127.0.0.1 7856
 * run jobs
 * you should see lots of job timings sent to netcat

Change-Id: I60a4b6b10d30edd96011e8e8bc8aa6104dfc6daa
Reviewed-on: https://gerrit.instructure.com/34724
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-05-15 21:16:14 +00:00
Ahmad Amireh 58eb918f97 Ember Quiz Stats - Essay Questions
Essay stats include a donut chart of the ratio of students who received
full-credit, as well as an area graph showing the score distribution.

Also, the serializer now prepares the data in a way for ED to properly
populate the questionStatistics association with quizStatistics, so we
got rid of the hack in the route's #afterModel hook, and exterminated
the bug that caused the question stats not to be updated when the quiz
changes (e.g, via the URL).

Closes CNVS-12466, CNVS-13009, CNVS-13021

TEST PLAN
---- ----

  - create a quiz with essay questions
  - take the quiz by a number of students
  - before grading, take a look at the stats page, make sure nothing
    funny happens
  - grade the responses with different scores
  - revisit the page, make sure the graphs are rendered appropriately
  - clicking the View in SpeedGrader link should open a new tab with the
    SpeedGrader for the quiz
  - hover over the circles and verify that you get tooltips similar to
    those for MChoice and T/F questions
  - verify that sorting by DI/Position is again functioning correctly

Change-Id: I3ab6818d86632720c6da2c37b2126b4abe63cefa
Reviewed-on: https://gerrit.instructure.com/33991
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2014-05-15 18:58:19 +00:00
Nick Cloward 96d14b8717 event stream is requiring a cassandra database to be configured.
fixes: CNVS-13056

Test Case:

  Make sure cassandra is not configured in cassandra.yml.
  Event stream should not complain about it not being configured.

Change-Id: If6a6583be355672f9a24769caf5e2da663a336a8
Reviewed-on: https://gerrit.instructure.com/34926
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
2014-05-15 15:04:44 +00:00
Nick Cloward 19ea2789dd canvas event stream
fixes: CNVS-10477

Test Plan:

Make sure auditing still works.

Change-Id: I021c0772ad0cf337d452b55bf690d15ce1a61a09
Reviewed-on: https://gerrit.instructure.com/31494
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
2014-05-14 19:09:24 +00:00
Ahmad Amireh 555e7b0e18 Quiz Stats [Backend] - Gem & Essays
Refactoring the generation of quiz question statistics into its own gem.
This patch adds support for Essay question statistics.

Closes CNVS-12725

TEST PLAN
---- ----

  - create a quiz with an essay question
  - perform an API request to retrieve the quiz statistics
  - ensure that the following metrics are generated and correct:
    - "graded": number of students whose answers have been graded by the
      teacher
    - "full_credit": number of students who received a full score
    - "point_distribution": a list of scores and the number of students
      who received them (so if 2 students got graded for 3 points, it
      should have a key of 2 and a value of 3), un-graded submissions
      should be keyed under null
    - "responses": number of students who answered the question
      (wrote anything)
    - "user_ids": IDs of those students
  - documentation for QuizStatistics -> Essay should be updated with the
    new stats

> Other things to test

  - verify that the old statistics page still renders:
    /courses/:course_id/quizzes/:quiz_id/statistics
  - verify that you can still generate both student and item analysis
    CSV reports

API endpoint for quiz stats:

  /api/v1/courses/:courseid/quizzes/:quiz_id/statistics [GET]

Change-Id: Ib15434ff4cef89ac211c1f4602d1ee609ef48ec4
Reviewed-on: https://gerrit.instructure.com/33990
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-05-12 15:02:45 +00:00
Braden Anderson b735558ff8 discussion topics: fix sorting nil positions
fixes CNVS-12774

test plan:
  * if you don't have legacy discussions with nil positions, run this:

Course.find(1).discussion_topics.where(pinned: true).update_all(position: nil)

  * open the discussions index page
  * move a discussion using the "Move To" gear menu option
  * verify that the discussion is moved
  * reload the page
  * verify that the change persists

Change-Id: Ibb3afc6a876f359cecba360792009b3db1793785
Reviewed-on: https://gerrit.instructure.com/34230
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
2014-05-08 21:17:21 +00:00
Joseph Rodriguez 7722732692 fix indentation and remove commented out code
fixes: CNVS-12670, CNVS-12677

test plan:
- formatting only, no qa needed

Change-Id: I2fa467873daf62182587f00f71a47b19dc073232
Reviewed-on: https://gerrit.instructure.com/33867
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2014-05-07 18:33:06 +00:00
Brian Palmer d9535621b2 don't require execjs until needed inside the task
test plan: rake canvas:compile_assets should still succeed

Change-Id: Id90e7cdc9e9989bc975a09fb34c944a611074aa0
Reviewed-on: https://gerrit.instructure.com/34309
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2014-05-06 15:41:43 +00:00
Joseph Rodriguez 860f39d7b8 fixed indentation
fixes: CNVS-12681

test plan:
- code formatting only, no qa needed

Change-Id: Ia209fb7d8012aa56f0904a1c9c30b129c8643a74
Reviewed-on: https://gerrit.instructure.com/33868
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2014-05-05 22:32:26 +00:00
Joseph Rodriguez 2d9cfc5ac4 moved Facebook code into gem
fixes: CNVS-12120

test plan:
- regression test facebook functionality

Change-Id: I041e726ee12f9eca8fc27ccdd049422073d1af15
Reviewed-on: https://gerrit.instructure.com/33595
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-05-05 22:32:15 +00:00
Joseph Rodriguez 302f2bd6b4 fixed code indentation
fixes: CNVS-12683

test plan:
- code formatting only, no qa needed

Change-Id: I9e52687c886c6ca3ff2e1f92ae3c9f0733375dd1
Reviewed-on: https://gerrit.instructure.com/33869
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2014-05-05 20:08:42 +00:00
Raphael Weiner a13f85e0ed move twitter to gem
fixes: CNVS-12492

test-plan:
* Test that all things Twitter related still work

Change-Id: Ib656c5bfcb2dc8490a6fa6f214b0f6dce25ad181
Reviewed-on: https://gerrit.instructure.com/33193
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-05-05 20:08:27 +00:00
James Williams 90afba09ae download formatted files from google doc when available
google docs allows you to specify the format in additional
parameters in the download url, so we can download .doc or
and .xlsx files instead of always plain 'text/html' content

test plan:
* enable the google docs and crocodoc plugins
* create a course with a file upload assignment
* as a student in the course, enable google docs
 integration in user settings
* submit a file to the assignment through the google
 docs tab
* the submitted file should open up in crocodoc

fixes #CNVS-1503

Change-Id: I00ad9ac25a0dd6c46e5b56d2e566ab88b6550054
Reviewed-on: https://gerrit.instructure.com/33994
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-05-05 19:21:51 +00:00
Derek DeVries 1168ed5ab4 make show/moderate/statistics actions redirect to fabulous quizzes when enabled
fixes CNVS-12752, CNVS-12753, CNVS-12754

test plan:
  - turn fabulous quizzes off
  - visit an individual quiz with fabulous quizzes turned off
  - switch fabulous quizzes on
  - refresh the page
  - it should redirect to the overview tab on fabulous quizzes
  - the url should be something like: /courses/1/quizzes/fabulous_quizzes#/437

  - turn fabulous quizzes off
  - visit the quiz moderate page for a quiz with fabulous quizzes turned off
  - switch fabulous quizzes on
  - refresh the page
  - it should redirect to the moderate tab on fabulous quizzes
  - the url should be something like: /courses/1/quizzes/fabulous_quizzes#/437/moderate

  - turn fabulous quizzes off
  - visit the quiz statistics page for a quiz with fabulous quizzes turned off
  - switch fabulous quizzes on
  - refresh the page
  - it should redirect to the statistics tab on fabulous quizzes (which is
    currently an empty page)
  - the url should be something like: /courses/1/quizzes/fabulous_quizzes#/437/statistics

  - turn fabulous quizzes on
  - edit a quiz
  - when you save the quiz, it should redirect to the overview tab

  - try other variations which should bring you back to the show/moderate/stats
    pages. They should all bring you to the correct tabs on fabulous now

Change-Id: I85e8b628c0562d72c72a30e4e8340dd2cc0adcac
Reviewed-on: https://gerrit.instructure.com/34112
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2014-05-03 18:18:56 +00:00
Nathan Mills 50aaedf38e make the resource_link_title for content_tag launched lti tools correct
fixes PLAT-324

test-plan:
  steps:
    *setup an lti tool as a module item changing the name to be different than the lti tools name
    *launch the lti tool
  result:
    *the resource_link_title value should match the name of the module item

Change-Id: Ifcfa695dd09f693cf4449869052349402168470b
Reviewed-on: https://gerrit.instructure.com/34030
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-05-01 21:29:42 +00:00
Ahmad Amireh e471722b26 Ember Quiz Statistics - Base/Skeleton
A starting point for the implementation of Ember quiz statistics that
includes a route with the required data properly loaded, the necessary
serializers and adapters, and base stylesheet/template to start from.

This patch also adds a new submission statistic called
"submission_scores" that's basically a map between a score percentile
and the count of students who received it.

Closes CNVS-12171

TEST PLAN
---- ----

  - with fabulous quizzes on, go to a quiz show page
  - click the Statistics tab
    - verify that you see the blank page, and the tab is activated
    - verify that no errors are thrown in the console

Testing the new metric:

  - create a quiz with a certain number of points possible
  - take it by a number of students and score diversely
    - also let more than one student have the same score
  - perform an API request to retrieve the statistics and:
    - verify you get the new score distribution statistic and that it is
      correct
    - the metric should contain an entry for each distinct percentile
    - the metric entry should really reflect how many students got that
      score
  - check out the Quiz Statistics API docs and:
    - verify the new "scores" statistic under SubmissionStatistics is
      documented
    - verify that the documentation is clear enough

Change-Id: I1f00bd4c18a0767d6a50767c5d8868f1d6e561ac
Reviewed-on: https://gerrit.instructure.com/32732
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2014-05-01 21:06:57 +00:00
Kenneth Romney 31361b5255 extract lib/text_helper to gems/canvas_text_helper
fixes: CNVS-12305

test plan:
summaries email should be formatted correctly with indentations.
twitter messages should not be longer than 140 characters.

Change-Id: I912a63b03c6c14de0c1d678063bb8fa33504d843
Reviewed-on: https://gerrit.instructure.com/33171
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-04-30 15:18:40 +00:00
Simon Williams dc3b16f9bf add gem names to gem script runners
Change-Id: I0dad5345aae75e552af97f5b54ded10bbfebbe37
Reviewed-on: https://gerrit.instructure.com/33925
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2014-04-28 15:51:28 +00:00
Raphael Weiner 5553f62357 extract incoming mail into gem
fixes CNVS-12182

test plan
- regression test on incoming mail
- use script/process_incoming_emails to manually trigger the processing
  of incoming mail

Change-Id: Iccd74d8fe2b5af3d5eefe25a2736273e3bf559b0
Reviewed-on: https://gerrit.instructure.com/32794
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2014-04-25 23:06:02 +00:00
Joel Hough b02a58e4ba remove rails dependency from html_text_helper
test plan
- ensure html text escaping still works

Change-Id: I2524f9df977a4139006030be33dc3be7db8d5f0f
Reviewed-on: https://gerrit.instructure.com/32973
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2014-04-25 23:03:47 +00:00
Raphael Weiner 8be0ae37d7 Move google_docs code into a gem
fixes: CNVS-12329

Change-Id: I044725c93582cbca39a61e036bb5f0385e069c1e
Reviewed-on: https://gerrit.instructure.com/32990
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-04-25 21:50:43 +00:00
Joseph Rodriguez baeeb6efc3 refactor and make gem rake task inclusion explicit
fixes: CNVS-12513

test plan:
- run rake tasks for i18n and jst

Change-Id: Ied2b1d67979e55356adfef1cc7aaed42aa0c4b5a
Reviewed-on: https://gerrit.instructure.com/33501
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2014-04-24 15:50:31 +00:00
Raphael Weiner 732d4991e5 extract linkedin into a gem and add tests
fixes: CNVS-12119

test plan:
regression test linkedin functionality

Change-Id: I9cec121d641db37d4c8f6a04966e766e9f8b293e
Reviewed-on: https://gerrit.instructure.com/33473
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
2014-04-23 20:23:55 +00:00
Raphael Weiner 71d9f96279 extract canvas_ext gem
fixes: CNVS-11902

Test Plan:

Make sure Canvas is not broken.  This will break a lot of things if it
does not work correctly.

Change-Id: I8701ff8c271a162a712fe3be05a4fd361430b26e
Reviewed-on: https://gerrit.instructure.com/32113
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
2014-04-23 17:39:32 +00:00
Jon Willesen 1f4737ed05 add migration_selection lti extension
this commit lets canvas remember that an LTI has this extension.
launching and using LTI for content migrations will happen
separately.

refs LOR-20

test plan:
 - configure an LTI tool with XML that includes the
   migration_selection extension
 - the tool should show up in the tool list with the "Migration
   Selection" tag.

Change-Id: I880125515a32af1b9a39fbd1787617bceae74f50
Reviewed-on: https://gerrit.instructure.com/21442
Reviewed-by: Jake Trent <jaketrent@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2014-04-23 17:05:41 +00:00
Joseph Rodriguez 3a8cdd8656 remove AR dependency from PaginatedCollection gem
fixes: CNVS-12271

test plan:
- no test needed, spec changes only

Change-Id: I54a814319e17f8ca05c5b8652fc13db70258ff5a
Reviewed-on: https://gerrit.instructure.com/33515
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2014-04-21 19:52:19 +00:00
Mark Severson a1dde79530 extract handlebars_tasks gem
fixes CNVS-11180

test plan:
 * ensure the jst rake commands operate correctly
	 * jst:compile
	 * jst:ember

Change-Id: Ibe3109cf2708abf08783e06b180eba9299472ccb
Reviewed-on: https://gerrit.instructure.com/29920
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-04-21 19:48:22 +00:00
Mark Severson a1fac754d2 extract i18n_tasks gem
fixes CNVS-11181

test plan:
 * i18n rake tasks still operate correctly

Change-Id: I261973a947ce28840d6817f5a931f5221192e8db
Reviewed-on: https://gerrit.instructure.com/31441
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-04-21 03:19:47 +00:00
Mark Severson 4fbe46509c extract i18n_extraction gem
fixes CNVS-11182

test plan:
 * rake i18n tasks work correctly
 * rake jst tasks work correctly

Change-Id: I9777649e338d81cd7129c887acc18d9ef6722a92
Reviewed-on: https://gerrit.instructure.com/31440
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-04-21 03:19:30 +00:00
Joseph Rodriguez c6fce9e781 extract bookmarked_collection gem
fixes: CNVS-11645

Test Plan:

Test the groups api endpoint at

api/v1/users/self/groups?context_type=Account

Make sure its not broken.

Change-Id: I2a17672f0e81530aa8623c5ed16b9cb0bb6b3ce5
Reviewed-on: https://gerrit.instructure.com/31417
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2014-04-17 18:16:13 +00:00
James Williams 8b63a0d85f allow h1 tags in html sanitation
test plan:
* add html content including one or more h1 tags
 (e.g. "<h1>Header</h1>")
* confirm that it retains the tags rather than
 stripping them out

fixes #CNVS-12321

Change-Id: I74dd56aced493255b2f8a5834d2a5a841de6d910
Reviewed-on: https://gerrit.instructure.com/33139
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
2014-04-17 04:33:02 +00:00
Nick Cloward f1009a38fe canvas kaltura gem
fixes CNVS-10479

test plan:
  - in a course with kaltura enabled
    - go to a discussion and add media
    - upload a video (use right tab, not the webcam)
    - save the video/discussion post
    - the video should be saved properly and viewable
      (this sometimes takes a minute of two)

Change-Id: I40b9174807707dd1fb41125e04705422a8711d5d
Reviewed-on: https://gerrit.instructure.com/32024
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-04-16 19:39:45 +00:00
Jacob Fugal f2e7523419 fix activesupport-suspend_callbacks for 4.1
activesupport 4.1 doesn't have CallbackChain inherit from Array anymore,
instead, it houses an internal array and delegates to it.

Change-Id: I5730f734be5e7c0422ac56245609043f52b6425a
test-plan: specs
Reviewed-on: https://gerrit.instructure.com/33081
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2014-04-16 15:12:22 +00:00
Raphael Weiner 9a08d9d934 Move time related code into canvas_time gem
fixes CNVS-10748

Change-Id: If9015c54bf54969d8c47e5e39a372e1c5bfe158b
Reviewed-on: https://gerrit.instructure.com/32532
Reviewed-by: Raphael Weiner <instructure@pivotallabs.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2014-04-14 20:47:01 +00:00
Raphael Weiner dea07dc90f loosen rails version requirements for gems
fixes: CNVS-12259

test plan:
- run unit tests, run bundle, verify app starts up without rails version
  conflicts

Change-Id: Iddd6167bbb8a4cc61ca015fc979236659e24da73
Reviewed-on: https://gerrit.instructure.com/33126
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2014-04-10 20:28:03 +00:00
Joseph Rodriguez 86c8d2a7ed Extract paginated collection gem
refs: CNVS-11648

Test Plan:

Test the sub_accounts api endpoint and make sure the pagination
is not broken.

Change-Id: Ie59674a7a834698ac432307940305d6958cb73f1
Reviewed-on: https://gerrit.instructure.com/31413
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-04-10 20:14:13 +00:00
Joseph Rodriguez bfbaf63de6 move acts_as_list to gems (empty vendor/plugins)
fixes CNVS-12056

test plan:
  * ordering/reordering of modules/module items should still work
  * ordering/reordering of discussion topics should still work

Change-Id: I599b559933a4a89c9329d631d71f83343c6f24da
Reviewed-on: https://gerrit.instructure.com/32516
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-04-07 22:37:09 +00:00
Brad Humphrey b9bdfaf8c9 limit temp file name length when upload files via url
Test plan
 * Upload a file using the url file upload api with a 500+ character name
 * It should upload

Change-Id: I19ad272c1f5702ee5bc3c369060b3f6cea4077d7
Reviewed-on: https://gerrit.instructure.com/32890
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
2014-04-07 15:20:57 +00:00
Simon Williams c530236e81 don't commit Gemfile.lock in html_text_helper gem
test plan: tests should pass

Change-Id: I148918fee298c0903b0449c187affaf19a553ddd
Reviewed-on: https://gerrit.instructure.com/32875
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2014-04-04 16:16:05 +00:00