Commit Graph

115 Commits

Author SHA1 Message Date
Graham Ballantyne 79b29ddfd2 Change canvas_quizzes dependencies to use https:// instead of git://
The canvas_quizzes dependency for grunt-template-jasmine-requirejs used
the git protocol (`git://`). This is an issue when trying to build in a Docker
environment AND when behind a corporate firewall. Git can be configured
to prefer `https://` instead of `git://`; however, this configuration
takes place in the host's gitconfig file and isn't visible to the git
implementation inside a container (unless you mount your host's
gitconfig inside the container, which may or may not be desirable).

This commit changes canvas_quizzes' package.json file to use `https://`
instead of `git://`. This resolves the issue of not being able to fetch
the dependency from inside a container whilst behind a firewall since
Docker will pick up the `https_proxy` environment variables from the
host and use the proxy to fetch the dependency via https.

Test plan:

- check out the repo
- run `yarn`

Expected result:

- all dependencies should be fetched without issue

Change-Id: I866ae05b120c190bfe268b936fb873f5fdc98e75
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241575
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2020-06-30 21:41:15 +00:00
Andrew Gardener 51a25db1b8 Add user_ids to quiz statistics endpoint
Fixes #1522
Closes #1534

Test plan:
- Create a quiz and have users take it.
- Generate quiz statistics.
- Fetch the statistics via the api:
  https://canvas.instructure.com/doc/api/quiz_statistics.html#
    method.quizzes/quiz_statistics.index
- They should include user_ids in addition to user_names

Change-Id: I9cec089790a2216d1b4ec3469c5557782f1cb74d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218189
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Bryan Petty <bpetty@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2019-12-04 19:24:27 +00:00
Ryan Shaw 60e8c8bbdd Clean up yarn.lock
If you ran yarn on master it would create a dirty yarn.lock

Test plan:
* after this is applied, if you run `yarn` it should not make any
  Changes to yarn.lock

Change-Id: I0303e6e9ca0032771b95497df4b39a3e26e2eed3
Reviewed-on: https://gerrit.instructure.com/206700
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-26 16:31:11 +00:00
Ryan Shaw f4e36a93d6 upgrade some NPM dependencies
Change-Id: If2a90959713e292a46c9d5e9c75c89a37f7316b6
Reviewed-on: https://gerrit.instructure.com/205007
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-20 18:30:44 +00:00
Gabriel Brady 81d20ec754 fix(CorrectAnswerDonut) Replace donut chart with text
fixes QO-488

Test plan:
- Create a quiz
- Take the quiz
- View quiz statistics
- Verify donut chart does not appear
- Verify plain-text correct answer ratio does appear

Change-Id: I5cda69c300a63904d21ce0626573f9ee4dadea75
Reviewed-on: https://gerrit.instructure.com/205375
Tested-by: Jenkins
QA-Review: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
2019-08-19 16:57:10 +00:00
Aaron Griffin b8135f38b8 Quiz Statistics: Support i18n numbers
Also includes some small fixes to this deterioriating codebase

Test Plan:
- Given a quiz with more than one student
- And a quiz with 3 questions, each worth 1.2 points (or similar)
- Take the quiz with each student, getting some right and some wrong
  each time
- Then view the statistics page in a locale with a different decimal
  separator
- See the separator appear where needed

Closes QO-448

Change-Id: Ie0fceb3ff827bcc68aff9c6e60292768d43410b3
Reviewed-on: https://gerrit.instructure.com/204141
Reviewed-by: Bryan Petty <bpetty@instructure.com>
Tested-by: Jenkins
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
2019-08-07 19:34:35 +00:00
Ryan Shaw fc02d78824 get stuff ready to use lodash instead of underscore
closes: CORE-3178

right now, we send 2 copies of underscore/lodash to browsers. that is
wasteful and slow because it causes browsers to download and execute
more JS than they need to. we should use the most recent version of
lodash for everything and have everything just share that one.

Using the old version of lodash.underscore is also preventing us from
upgrading backbone to the latest version (because backbone relies on
using a newer lodash/underscore). and we want to upgrade backbone to
the latest version so we can use the
`https://backbonejs.org/#Model-preinitialize` method which was
specifically made to help people upgrade things to es6 classes and
avoid the "trick babel to allow `this` before `super` hacks" that we
have in our code & need to get rid of before we can drop ie11

but to make upgrading to lodash 4 easier, I made this commit which
avoids using it in a lot of places (so upgrading is a non-issue) and
uses the method alias names that are both present in the old underscore
we use and lodash 4.

some of this was done by:
https://github.com/cpojer/js-codemod#underscore-to-lodash-native

see https://github.com/lodash/lodash/wiki/Migrating for what is
different between underscore and lodash

test plan:
* automated tests should pass

Change-Id: Ieefc0be36d277fc115974aa06c03e46a37b9f426
Reviewed-on: https://gerrit.instructure.com/200550
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-07-15 18:44:15 +00:00
Clay Diffrient 529729797a Make client_apps not fail test suite
refs QO-491

Test Plan:
  - Tests pass

Change-Id: Ie779c3466bd630b67530441017566a47d3326ba9
Reviewed-on: https://gerrit.instructure.com/192143
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-05-06 13:44:19 +00:00
Ryan Shaw 3bad0a160b Remove add-module-exports babel plugin & use esModules
Closes: CORE-2868 CORE-2869

This is needed because without
Doing that, our bundle sizes are going to blow up from the things we
Import from InstUI

Test plan:
* the result of a dynamic export will now give you a object grab bag
  That has a “default” property. Not just the thing of whatever the
  “default" export was.
* so to test this, go to some page that does a dynamic import (like
  the dashboard page) and make sure that still works\

* run a prod build
* make sure that translations still work as before

Change-Id: I3dd1b32216052afd5fbc5d6cec40ea18264f65e9
Reviewed-on: https://gerrit.instructure.com/191578
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-05-03 22:49:58 +00:00
Clay Diffrient 633f2aab79 Comment out failing test for canvas_quizzes package
closes CORE-2761

Change-Id: Ic6e07d8fcfa88ffb7dcef6a15fb7c284efe91e4d
Reviewed-on: https://gerrit.instructure.com/188902
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-04-09 22:35:58 +00:00
Clay Diffrient ade362e515 Bump to Node 10
closes CORE-2329

There were some tests that were expecting a snapshot-like value
where it expected `new Date().toLocaleDateString()` to give something
Like “2016-7-11” but that was actually wrong. If you do
`new Date().toLocaleDateString()` in a browser it will give you
something like “7/11/2016”. And this new version of node matches what
a real browser would have done, so I just updated the specs so they
are looking for the correct format. This change does not actually
reflect a change in what a real user would see. Just what
jest/jsdom/node formats it as.

Test Plan:
  - check to make sure that the assignments 2 availability dates
    component produces markup exactly as it did before
  - Automated tests pass
  - Build canvas locally, everything passes.
  - Build canvas with docker, everything passes.

Change-Id: I74285cd6d9b251ca60ab79396e332cc3a419bcee
Reviewed-on: https://gerrit.instructure.com/177198
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-03-22 17:29:36 +00:00
Michael Brewer-Davis e5ffed6da1 update quiz statistics documentation
closes QO-263

Test plan:
- Visit quiz statistics page
- Click on help icon under discrimination
  index for a question
- Verify that text and link are
  updated as in the ticket

Change-Id: Ib78ccf40856d44b4e2c2d73a47e0fed8ccc4fcef
Reviewed-on: https://gerrit.instructure.com/176154
Tested-by: Jenkins
QA-Review: Michael Brewer-Davis <mbd@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Omar Khan <okhan@instructure.com>
2019-01-07 22:31:07 +00:00
Clay Diffrient d30be21992 Add junit reporting for canvas-rce
refs QA-614

Test Plan:
  - `yarn test` inside of packages/canvas-rce outputs
    `coverage/canvas-rce-junit.xml`
  - Also, Jenkins should pick that file up on patchset builds
    as well

Change-Id: Ib4db4ba16b90e181e17a319219544aa2f0c205ea
Reviewed-on: https://gerrit.instructure.com/172430
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-11-19 21:51:04 +00:00
Michael Brewer-Davis 5a028b3050 fix essay speedgrader button
closes QO-391

Test plan:
Create a quiz with essay question
Take the quiz as a student
Go to quiz statistics page
Verify that "View in SpeedGrader"
  button is present in item analysis,
  and that clicking takes you to
  speedgrader
Repeat with practice quiz, graded
  survey, and ungraded survey.  Of these,
  only graded survey has access to speed
  grader, so button should be present
  for it and absent for other types

Change-Id: I43d1d688ba4c2e790a767d7191b2186b8a3ddfb0
Reviewed-on: https://gerrit.instructure.com/164636
Reviewed-by: Aaron Griffin <agriffin@instructure.com>
QA-Review: Aaron Griffin <agriffin@instructure.com>
Product-Review: Kevin Dougherty <jdougherty@instructure.com>
Tested-by: Jenkins
2018-10-02 01:44:33 +00:00
Ryan Shaw e415eaa961 Use yarn workspaces
Run `script/nuke_node.sh` to clean everything up
Run `yarn install` it should install everything for everything
Run `yarn build` and `yarn test` they should work exactly as before

Change-Id: I11a27ff2d705c6cbb3b3f9029dd8b32138706146
Reviewed-on: https://gerrit.instructure.com/151356
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-04 20:02:02 +00:00
Ryan Shaw e361de1655 client_apps: update deps & prepare for workspaces
This gets canvas_quizzes ready to be used as a yarn workspace

Test plan:
* the quiz log auditing pages and the quiz statistics pages
  Should look / work the exact same as before
* `cd client_apps/canvas_quizzes`
* `yarn test`
* it should work, as it did before

Change-Id: I55528fb8dfc9f49ac37989cb848be2ffd2fcf245
Reviewed-on: https://gerrit.instructure.com/152121
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-01 16:56:38 +00:00
Ryan Shaw e89f058f94 Remove a couple explicit keys to make i18n refactor easier
closes: CORE-1177

This just changes these 2 keys to use the implicit format where
They get a key_with_md5_checksum key. It is not needed now, but
Shouldn’t hurt anything and it makes the i18n refactor work I am doing
Easier

Test plan:
* go to the quiz log auditing page in Spanish or some other language
* these 2 strings should still be translated

Change-Id: Ie6a0c0c0970cc815e210c2f00701c9a6e2736a6d
Reviewed-on: https://gerrit.instructure.com/147883
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-04-25 20:00:15 +00:00
Omar Khan c54577ec8b Remove broken symlink
The `client_apps/canvas_quizzes/vendor/canvas_app` and
`client_apps/canvas_quizzes/www/font` symlinks don't point to anything.
That probably means they're safe to remove, along with anything that
references them.

Test plan:

- Build is green
- Canvas quizzes works (both with and without docker)
- Portal2 Canvas works

Change-Id: I6205b60d4e65b49ca03a732d249d603ca23609a5
Reviewed-on: https://gerrit.instructure.com/140796
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Bryan Petty <bpetty@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Bryan Petty <bpetty@instructure.com>
Product-Review: Bryan Petty <bpetty@instructure.com>
2018-02-16 17:12:08 +00:00
Ryan Shaw b29aeb6995 upgrade node-sass in client_apps/canvas_quizzes
fixes: CORE-971

…this should fix the build issue where xenial has a problem building
node-sass for the canvas_quizzes client app.

test plan:
* automated tests and beta deploy should work
* smoke test to make sure the css works on the quiz log auditing
  and quiz statistics pages
* to get to quiz log auditing make a quiz, then log in as a student,
  take the quiz, then log back in as the teacher and go to the quiz
  and go to /courses/1/quizzes/2/history?user_id=2 or go to that quiz
  page and click the “…” button and then “show student quiz results”
  and then click that student’s name under “Students who have taken the
  quiz”. then click “View Log”
* to get to quiz statistics go to the quiz page and then click the
  “Quiz Statistics” button on the right side or go to
  /courses/1/quizzes/2/statistics

Change-Id: I2873dd3c309280e0254ece18f935914857216328
Reviewed-on: https://gerrit.instructure.com/139871
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-02-05 22:20:15 +00:00
Ryan Shaw 4adb868928 Convert straggling `$ic-bran-primary`s to css vars
Closes CNVS-39665

Test plan:
* go to these pages 
* make sure they show these things in the brand’s primary color

Change-Id: I6325636bade20ee7c68125f682421f20eecfbb7f
Reviewed-on: https://gerrit.instructure.com/127907
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Pam Hiett <phiett@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-09-29 20:28:54 +00:00
Chris Hart 4140da636d Audit and move vendor/bootstrap/mixins
Fixes: CNVS-39278

This commit:
- Moves the mixins we want to keep from `/bootstrap/mixins` to
  a new Canvas mixins stylesheet, `base/ic_mixins`

- Removes `/bootstrap/mixins` from `base/environment`, so it is
  no longer loaded on every page

- Removes Bootstrap mixins from non-Bootstrap CSS:
  The only stylesheets that are now using `/bootstrap/mixins`
  are old Bootstrap components. Once they are deleted, we can
  remove `/bootstrap/mixins`.

- Deletes any unused Bootstrap mixins, so they will not be used
  in the future

Test plan:
- Canvas CSS should compile without errors
- Canvas should look exactly the same as before

Change-Id: I01a9ad90f354ca45c9528d860e20ceb4caaceaad
Reviewed-on: https://gerrit.instructure.com/126149
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Pam Hiett <phiett@instructure.com>
2017-09-18 19:28:09 +00:00
Ryan Shaw ba2680a62e Fix gerrit-builder by s/const/var in quiz-stats
the quizzes client apps have their own build
process and don’t pass things through babel.
which means that things like ‘let’ or ‘const’
pass through undetected. Which means this
file has not worked in ie11/safari for a long
time now.

The bug was caught because an updated version of 
UglifyJS noticed the const and said “hey, that’s
Not valid es5 code”.

That passed Jenkins because it runs its tests
without uglifying the code so uglify didn’t error out on it.

Test plan:
* open quiz-stats & quiz-events page in safari 9 or ie11, 
  it should work with no js errors
* the gerrit-builder Jenkins build for this commit should pass

Change-Id: I3d0607e0d72ee32b827e5fd6fde7744e39a7e26a
Reviewed-on: https://gerrit.instructure.com/123201
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2017-08-18 04:45:24 +00:00
Chris Hart b86b3e0bac Convert $ic-link-color to CSS variable
Fixes: CNVS-38651

This commit makes it so Canvas no longer needs to
define the $ic-link-color variable (and its
lighten and darken variants) in Sass. Instead,
we can use the CSS variable.

Test plan:
- Make sure Canvas CSS compiles correctly:
  `bundle exec rake brand_configs:write && node_modules/.bin/brandable_css`

- NOTE: If you have lost all your styles, try running:
  `rm -rf node_modules gems/*/node_modules && npm cache clean && npm install`

- Go to Theme Editor as an admin, and set the Canvas `Link Color` to
  something new in your theme:
  https://www.screencast.com/t/idxpkyQ9ZDl0

- Click around Canvas and confirm that the link color is as it
  should be:
  - In normal contrast, you should see your chosen color
  - In high contrast, you should see that links are
    set to `var(--ic-link-color)` which displays as `#0073A7`

Change-Id: I0c9edd32d259a7f2bbb7dd41b8e9ba8145f973fc
Reviewed-on: https://gerrit.instructure.com/122965
Reviewed-by: Pam Hiett <phiett@instructure.com>
Product-Review: Pam Hiett <phiett@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki <dsasaki@instructure.com>
2017-08-17 20:43:31 +00:00
Ryan Shaw 8ab39a092e get jquery and jquery.cookie from npm, not vendor
closes: CNVS-35923

test plan:
* all specs should pass
* if you open your devtools there should still be a $ and jQuery
  variable globally available for you to use
* check to make sure that the client_app quizzes stuff works.
* e.g.: go to view a quiz’s stats as well as quiz log auditing

Change-Id: Ibcb55c8f319fc02974814452273aea5af793b205
Reviewed-on: https://gerrit.instructure.com/106474
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2017-05-08 20:47:23 +00:00
Landon Wilkins 3f7da8d79a da licença part 52
add consistent license headers to all source files

Change-Id: I788ef38a3e193ef82e41d43ec8d26f67c81bcf5e
Reviewed-on: https://gerrit.instructure.com/110155
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-05-01 21:08:35 +00:00
Ryan Shaw db04f0b3c5 rename all .jsx files to .js
fixes: CNVS-34727

this will make webpack faster because it cuts down
the number of files it has to look for when
it looks a module up. right now, every time
someone asked for a app/jsx/whatever.jsx file
it had to do a stat for app/jsx/whatever.js first
and then look for app/jsx/whatever.jsx. it also
slows every lookup for handlebars/coffescript files
since it has to look for the jsx first

this was just the result of running this command:
find . -type f -name "*.jsx" | while read FNAME; do git mv "$FNAME" "${FNAME//.jsx/.js}"; done

test plan:
* automated specs should pass
* webpack build should run faster than the patchset
  before this one

Change-Id: Ia15ded6dc2b09c10c4f9070edcee9305b5b429ad
Reviewed-on: https://gerrit.instructure.com/101005
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-03-16 20:22:15 +00:00
Ryan Shaw 5b88629fe0 Remove RequireJS support
closes: CNVS-31785

test plan:
all builds should pass

Change-Id: I2925934692a3d2f115f1289d7b50cb72d8cb907f
Reviewed-on: https://gerrit.instructure.com/104492
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2017-03-13 22:10:23 +00:00
Ryan Shaw f3f18b4284 Make canvas_quizzes specs work w/o compiled coffee
fixes: CNVS-35496

Test plan:
cd client_apps/canvas_quizzes && script/test
should work

Change-Id: I860c1a459785db6d5a5e77d904083c9b02655b0a
Reviewed-on: https://gerrit.instructure.com/104545
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-03-09 19:50:43 +00:00
Ryan Shaw 05f55c1c30 Deprecate `npm` client. Use `yarn` instead
Closes: CNVS-35152

This changes all our tooling that used `npm` to
Run scripts to use `yarn`. `npm` will still work
for now but if you have yarn installed, it will use
that.

Cheat Sheet:
old command      -> new command
npm install      -> yarn install (or just `yarn`)
npm run webpack  -> yarn run webpack
npm test         -> yarn test
See more at https://yarnpkg.com

Test plan:
* all Jenkins builds should pass
* without yarn installed:
* run script/nuke_node.sh
* it should work and warn you about how `npm` is deprecated
* now install yarn, e.g.: `brew install yarn`
* run script/nuke_node.sh again
* it should work and you should see silly yarn emoji
  in the output and it should be a lot faster

* the docker changes I made should work and docker should
  build correctly and use yarn.

Change-Id: I4aa31eeae3ecc504634a7c72a1ea0d3396f445e3
Reviewed-on: https://gerrit.instructure.com/102969
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-03-01 19:39:01 +00:00
Han Yan accee852dd quiz stats filter shows only up to 10 sections
fixes CNVS-31091

test plan:
- Create 10+ Sections in a course
- Create a Quiz and have a few students take the Quiz
- go to the Quiz Statistics and notice the "Section Filter"
- when selected it should show all the Sections in the course

Change-Id: I110f4449b28b79b32708c74293a2d6b48b16b87c
Reviewed-on: https://gerrit.instructure.com/101121
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2017-02-28 00:44:45 +00:00
Ryan Shaw ee89bcbdb0 fix canvas_quizzes requireJS mapping for running tests
test plan:
run:
* compile assets
* node client_apps/canvas_quizzes/script/test
* it should work 

Change-Id: I5cc90f124b688d1cc67ab8acc90138ca7a50fdf2
Reviewed-on: https://gerrit.instructure.com/102167
Reviewed-by: Han Yan <hyan@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-02-14 23:25:05 +00:00
Han Yan 02ef103588 change quiz "Table View" accessibility message
fixes CNVS-30123

test plan:
- message should hide after it is not focused
- message should look like other accessibility messages
- wording should be changed, as described in the ticket

Change-Id: I52d7146f9d1a2c7390263297c05b48e7a3fb6bfe
Reviewed-on: https://gerrit.instructure.com/100506
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
Product-Review: John Corrigan <jcorrigan@instructure.com>
2017-02-13 22:11:29 +00:00
Ryan Shaw fd06de9022 Get webpack builds working again
This is a combination of 3 commits.
The first commit's message is:

fix quiz log auditing build in webpack

fixes: CNVS-33125

test plan:
* webpack aux build & selenium should pass
* enable the quiz log auditing feature flag
* go to the quiz log audit page:
  eg: http://c.dev/courses/1/quizzes/2/submissions/1/log
* make sure the page loads without any script errors

This is the 2nd commit message:

fix webpack build of ember screenreader gradebook

fixes: CNVS-33051

test plan:
* tests should pass, both in webpack and requireJS
* in both webpack and requireJS
* go to the the screenreader gradebook page
* it should load without errors

This is the 3rd commit message:

fix js tests in webpack

Change-Id: I75e2d3d8ec3c817d5ac7d4aade5204f9a6016c10
Reviewed-on: https://gerrit.instructure.com/94497
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-11-08 19:51:43 +00:00
Ryan Shaw 5a994c1a0a better way of doing webpack_configs in client_apps
refs: CNVS-31785

test plan:
the client_apps should work when using webpack

Change-Id: I086bfb35bdc56c2677bd262112495429f57ac087
Reviewed-on: https://gerrit.instructure.com/93223
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-11-01 23:51:09 +00:00
Ryan Shaw 354325c8a1 use node_modules wherever possible
closes: CNVS-31787

the only things left in bower are things that
are just not avalable on npm because they are so old.
we'll have to continue using the bower versions of them,
but it's ok since they are mostly old ember stuff
that will be ripped out when we finish our react screenreader gradebook

also:
remove some ember stuff that wasn't being used anymore.
nothing was using this stuff

test plan:

this really does touch a lot of stuff. some things
to check out specifically in the prod/optimized requireJS build:
(load the page, click around to make sure things work)

the screenreader gradebook
client_apps:
  quiz statistics
  quiz event logging

creating a new student group

calendar, try all the views (month/agenda/etc)
gradebook 2

turn on the new course/user search feature for your account
and go to accounts/x and search for a user/course

the new react gradebook

use tinymce on a page, make sure that both the service
and local version of it work

Change-Id: I4322a154d289760ab51b92e34dd7fac808b41ba8
Reviewed-on: https://gerrit.instructure.com/93102
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-11-01 15:14:52 +00:00
Simon Williams abafb9c587 remove "ensure-contrast" functions, they are unused
fixes CNVS-32673

test plan:
- compile assets and click around
- enable high contrast
- it should all still work the same

Change-Id: I1bd0f100605d43330af57a4af966e37ec0a8a314
Reviewed-on: https://gerrit.instructure.com/92858
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2016-10-18 16:02:21 +00:00
Cody Cutrer bd389b0861 stop referencing a JS file that doesn't exist anymore
Change-Id: I774f862591ff4c56df0bdb8a741aaf1870879f6b
Reviewed-on: https://gerrit.instructure.com/92164
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-10-06 20:25:20 +00:00
Michael Nomitch 55d22fb710 add description of percentiles graph for screenreaders
fixes CNVS-31803

test plan:
  - take a quiz with several students
    and get different scores
  - go to the quiz statistics page
  - with a screenreader go to the chart
    showing the breakdown of scores
    by percentile
  - you get a description of the bars
    in the screenreader (X students in
    percentile Y)

Change-Id: I100577687058d27a9921773e81edc64b3cf1cb87
Reviewed-on: https://gerrit.instructure.com/90642
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Nathan Rogowski <nathan@instructure.com>
2016-10-06 16:19:22 +00:00
Ryan Shaw 2121cf7430 move "old_unsupported_react" to client_apps
closes: CNVS-30472

since client_apps/canvas_quizzes is the only
thing that cares about our old version of
react and react-router, this moves them out
of canvas and into canvas_quizzes so it is the
only one that can use them. This simplifies
things in canvas so no one ever tries to
use them going forward.

test plan:

* inside of client_apps/canvas_quzzes
  run: `script/build && grunt test`
* it should pass jenkins
* click around in the quiz stats and quiz log
auditing apps to make sure they still load

mv old_unsupported

Change-Id: I56eadedfe2417f32f2afb99ec76a21870871ad7e

WIP move "old_unsupported_react" to client_apps

Change-Id: I673321b51db9b197a298ccb831c417e902aaae28
Reviewed-on: https://gerrit.instructure.com/85483
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-08-05 19:26:33 +00:00
Clay Diffrient c08c79e127 Fix the webpack build for quiz statistics
This keeps quiz_statistics using the underscore compatible
version of lodash 2.4.1 in which exists _.findWhere rather than
using the new 4.x version of lodash recently added.

closes CNVS-30750

Test Plan:
  - Post-merge and silent patchset builds for selenium webpack pass

Change-Id: I4f63aa431e29b77dd46dad4a9828afe10e84ef85
Reviewed-on: https://gerrit.instructure.com/86007
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-08-03 22:28:29 +00:00
Ryan Shaw b06b6af1db upgrade canvas_quizzes npm deps so it is ready for node 6
closes: CNVS-30448

in order to get node 6 to build and run on jenkins,
we have to upgrade grunt-contrib-jasmine to work
around this bug: https://github.com/Medium/phantomjs/issues/430

and we have to upgrade gulp-sass so the node-sass
version it asks for is node-sass@3.8.0 to get it to
actually build on jenkins. as in, so there
is a precompiled binary for it that is compiled
against the v8 in node 6. (there are none for 0.9.3
against node 6, since node 6 didn't exist when 0.9.3
was released).  This is necessary because
the gcc on jenkins is too old to compile node-sass
from source.

test plan:

* quzzes jenkins build should pass
* click around in quiz stats and quiz log auditing
  to make sure things load

Change-Id: Ic56fae34c52aab5d9b7971fe871d04fcc0738206
Reviewed-on: https://gerrit.instructure.com/85389
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-07-25 21:24:14 +00:00
Ryan Shaw f7209f78b3 fix build for canvas_quizzes
closes: CNVS-30446
test plan:
canvas_quizzes build should pass in jenkins
if you want to test locally,
run `grunt test` inside the client_apps/canvas_quizzes folder

Change-Id: I9a34e2edf134074b29f3481e6413433e48e03b57
Reviewed-on: https://gerrit.instructure.com/85343
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-07-14 22:50:41 +00:00
Ryan Shaw ad7a8ba070 get our scss working on newest node-sass
closes: CNVS-29785

the newest versions of node-sass do not allow
@import inside an @if

also, this:
@if something { $foo: 'bar'}
@else { $foo: 'baz'}
// on this line foo is not supposed to exist,
//but it erroneously did in old node-sass and we relied on it

this blocks us from upgrading to node 6 because the
gcc on the jenkins and job boxes is to old to compile
node-sass 3.4 from source against the v8 in node 6. but
there are prebuilt binaries it can use for node-sass
3.7+, so it doesn't need to compile from source

test plan
* check out this commit
* compile assets
* it should work
* the css it outputs should be exactly the same as before

Change-Id: I797ce68ecc82566401076771784c8be590233e27
Reviewed-on: https://gerrit.instructure.com/81513
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-06-28 20:27:05 +00:00
Sterling Cobb ac2578c360 add better description text to quiz stats page
fixes CNVS-28202

There weren't enough labels and descriptions for graphs and tabels on
the quiz stats page. This add's those things in.

Test Plan
Given you're using a screen reader
And you have a test that has been taken by someone in your class
And you're on the quiz stats page
ie: http://canvas.docker/courses/1/quizzes/3/statistics
When you navigate to the 'Question Breakdown' section
And you navigate over the correct answer table
Then you should be read the correct answer
And it should be followed by the words 'Corret answer'
When you navigate over an incorrect answer
Then it should read the incorrect answer
And it should be followed by the words 'Incorrect answer'

Change-Id: I47f7d8a1cf776ccc026b829b29b0c94d773f233b
Reviewed-on: https://gerrit.instructure.com/77293
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
2016-04-22 19:47:26 +00:00
Sterling Cobb c0595609a5 ensure interactions with tooltip are good
fixes CNVS-25735

perviously when you navigated across the report buttons it was weird
for sighted users because there were tab indexes that forces focusing
on divs that shouldn't have had tab index on them. This commit does two
things

1. Removes tab indexes that are not needed so sighted users can easily
navigate the page.
2. Add a better screenreader only description that describes the
download button with other content. Using describedby was not the right
path here since its suppose to be used as a generate descriptor ie:
"buttons to download content" but thats redudent since the label
already implies that. The right path is to ensure the screnreader
content had the right information in it, which gets read by the
screenreader just fine.

Test Plan

Given I've created a course
And I'm using a screenreader
And I have access to the statistics page
(http://canvas.docker/courses/1/quizzes/1/statistics)
And I load the page
When I navigate over the 'Student Analysis' button
Then I hear text about downloading a report
And I should hear text about when the report was generated
When when I navigate over the 'Item Analysis' button
Then I hear text about downloading a report
And I should hear text about when the report was generated

Given I've created a course
And I'm NOT using a screenreader
And I'm only using the keyboard to navigate
And I have access to the statistics page
(http://canvas.docker/courses/1/quizzes/1/statistics)
And I load the page
When I navigate over the 'Student Analysis' button
Then I tab again
I should go to the next button immediately

Change-Id: I358783dbeae0981d8e70ed6e7e885603fa77c39e
Reviewed-on: https://gerrit.instructure.com/76778
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
2016-04-18 23:20:32 +00:00
Ryan Taylor 02a1fb97eb Fix canvas-quizzes client apps jenkins failure
This enables us to turn on the client_apps jenkins build for all canvas
commits and catch breaking changes a bit more often.

Closes CNVS-28262

Test Plan:
 - Confirm that quiz log auditing and quiz statistics are fully
   functional

Change-Id: I3b07679e7ce44191b672bc7f8a1220e69fc0d600
Reviewed-on: https://gerrit.instructure.com/75223
Tested-by: Jenkins
Reviewed-by: Chris Wang <cwang@instructure.com>
Product-Review: Chris Wang <cwang@instructure.com>
QA-Review: Chris Wang <cwang@instructure.com>
2016-03-25 16:08:06 +00:00
Clay Diffrient 9822ee4194 Upgrade dependant package in npm-shrinkwrap for es5-shim
According to https://github.com/es-shims/es5-shim/issues/280
4.0.5 is almost identical and includes proper minified versions
that 4.0.3 should have included.

This isn't the best solution, but should unbreak our builds
for the time being.  Ideally we should re-shrinkwrap this
with proper versions, but it seems there are some issues
doing that at this point.  This should be a good stopgap.

fixes gh-791

Change-Id: Id56cff056a025ac8dbf69e6b6d216bc644ed73b6
Reviewed-on: https://gerrit.instructure.com/75059
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2016-03-22 17:01:38 +00:00
Ryan Taylor ccddb9d036 Add statistics for manually graded question types
This adds the ability to see the breakdown of grades for
essay/file-upload question types.  They are broken up as the top 27%,
the bottom 27%, the middle 46%, and any ungraded answers, then displayed
in table format.

Refs CNVS-25737
Closes CNVS-26756

Test Plan:
  - Check that essay+file_upload question type tables look good
  - Buckets show themselves as "correct" if they contain a student
    score >= to the question points possible
  - Buckets can contain more students than 27% if the scores are
    identical (All 100% scores show up in top bucket/middle bucket
    even if 100% are 100% scores)
  - New answer tables are accessible like other tables
  - Buckets are explicitly ordered as top, middle, bottom, ungraded

Change-Id: I62798938b9176de97df2e498a2f9b3b02a81086c
Reviewed-on: https://gerrit.instructure.com/70907
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Reviewed-by: Davis McClellan <dmcclellan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2016-02-23 03:31:09 +00:00
Ryan Taylor 55557f7fa1 Redesign the quiz_stats page for a11y/UI reasons
This rearranges and redefines much of the user experience on this page.

The score distribution chart is now rendered in HTML from React. Other
charts on the page have been rearranged or tweaked to match the new UI
design.

The new table contains all the screenreader data required, there are no
longer tooltips to be rendered on each score column (now a horizontal bar).
The bar chart is not read to screenreaders.
The bar chart indicates correctness by more than color alone.
The donut chart contains "N% responded correctly" in the center
The donut chart is not read by screenreaders, other than a brief
explanatory message.

Closes CNVS-25737
Closes CNVS-25738

Test Plan:

- Full test of quiz stats for both a11y and basic functionality
- Confirm that webpack and require_js builds are working
- Make sure it looks good!

Change-Id: Ie3f1a2ae99e7b2eea56e97e1cb5b6d3f51b83792
Reviewed-on: https://gerrit.instructure.com/70164
Tested-by: Jenkins
Reviewed-by: Davis McClellan <dmcclellan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2016-01-22 22:22:30 +00:00
Davis McClellan a506ec9245 Remove unaccessible summary graph a->b functions and add y-axis
fixes CNVS-25736

test plan:
- Go to quiz statistics page
- Access summary graph via keyboard
- Ensure that KO users do not have less functionality than other
  users with the graph
- Ensure that y-axis correctly demonstrates the data presented

Change-Id: Ib971a9e4061f65562f21ef60796afdc046224b89
Reviewed-on: https://gerrit.instructure.com/70073
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Dana Danger <dana@instructure.com>
2016-01-18 21:18:20 +00:00