Commit Graph

21 Commits

Author SHA1 Message Date
Cody Cutrer dd8fc67c41 RuboCop: Layout gems
Change-Id: Ie49d89234f4ffed27236a1713d072a00f637a253
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274064
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-22 15:35:24 +00:00
Ahmad Amireh 46f8efd61f modernize canvas_quizzes
fixes FOO-1409
flag  = none

no more client_apps, canvas_quizzes now lives as part of canvas-lms
proper inside app/jsx/, which makes the build leaner and leaves us with
one less thing to reason about

logical changes:

- converted from AMD to ES modules
- upgraded to recent react + react-router
- dropped RSVP in favor of native Promises
- used CanvasModal instead of home-grown Dialog
- removed dead code; notifications in particular were fishy as there had
  no dependents at all and did not even show up in the graph
- ported tests to Jest, added more unit ones and two integration ones
- removed "config.onError" and now throws errors where appropriate
- disabled console statements in non-dev

:: test plan ::

- create a (old-school) quiz containing all types of questions
- as 3 distinct students, take the quiz and try to randomize your
  answers

at this point it's helpful to have a reference to compare the screens; I
replicated the quiz on my production sandbox for this

- go to /courses/:id/quizzes/:id/submissions/:id/log
  - verify it looks OK
  - click on a specific question in the stream and verify the question
    inspector widget works OK
  - go back to stream and push "View table"
  - verify the table and its controls are OK

- go to /courses/:id/quizzes/:id/statistics
  - verify it looks OK
  - click on ? in the discrimination index chart and verify it displays
    a dialog with help content
  - click on "X respondents" in one of the charts and verify it displays
    a dialog with the respondent names
  - verify the interactive charts do interact as expected (no logic
    changed here so just a quick glance)
  - link to "View in SpeedGrader" for essay-like questions works

Change-Id: I79af5ff4f1479503b5e2528b613255dde5bc45d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256118
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2021-01-14 22:45:10 +00:00
Cody Cutrer d6e044ff76 add # frozen_string_literal: true for embedded gems
Change-Id: Ib49bc8939cf1706e758429e531a87c57d0231a37
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251156
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2020-10-28 22:08:40 +00:00
Cody Cutrer 79d0785a49 encoding has defaulted to UTF-8 for a long time; don't need a magic comment for it
Change-Id: Ife4d6b76d63fff14897421b58d9fcea8f423311c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251163
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-26 21:26:20 +00:00
Cody Cutrer 8f5cd95329 s/whitelist/allowlist/g in tatl_tael
Change-Id: Iddf9cef733df4d54175272efe610482e383c05b5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249262
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-08 15:23:33 +00:00
Ryan Shaw fbe1163faa update JavaScript tatl_tael lint messages
this is to reflect the current state of what we consider 
“best practices”

test plan:
* if you make a commit that creates a new qUnit spec file, gergich
  should complain to you

Change-Id: I502fe1261880c82f83f6d813b3c99c4a1f00b0f1
Reviewed-on: https://gerrit.instructure.com/206878
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-28 20:53:30 +00:00
Ryan Shaw 7c6f1458c6 get some tests to work with react 16
Change-Id: I5b26b400ff29fc90ab0f83e7ecef54690db999b6
Reviewed-on: https://gerrit.instructure.com/164138
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-12 16:07:01 +00:00
Cody Cutrer 41794a9383 rename AccountAuthorizationConfig* to AuthenticationProvider*
I couldn't take it anymore. it was driving me crazy

Change-Id: Ib40addff56e98a6e0a6d80f246c208e0ce0cb762
Reviewed-on: https://gerrit.instructure.com/148026
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2018-04-26 16:03:47 +00:00
Ryan Shaw 06d3ceb331 git rid of our vendor’ed fork of mediaelement
refs: CORE-24

test plan:
* this net result of this change should mean that we are using the exact
  same code as we were using before, just pulled from github directly
  in our package.json instead of vendored into our repo.
* testing the follow-on commits should show this worked correctly

Change-Id: Ie6d022d5fe8ed1a607f66f9d426c47ec7e8f5b14
Reviewed-on: https://gerrit.instructure.com/142381
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-03-12 16:17:43 +00:00
Ryan Shaw 061d264e6c decaffinate CalendarEvent.coffee
Change-Id: I8e4e41240a2c898dabe1ac4cd4580bd73deed862
Reviewed-on: https://gerrit.instructure.com/135332
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-12-13 20:44:27 +00:00
Landon Wilkins 9f47ed9a91 copyright linter auto correct, refs SD-2295
test plan:
* create a new file "test.rb"
* add "AUTO_CORRECT_LINTERS=1" to your .env
* install the pre-commit hook:
  echo "bin/lint" >> .git/hooks/pre-commit
  chmod +x .git/hooks/pre-commit
* git add .
* git commit -m "this should fail"
* verify the commit fails
* add the auto-corrected test.rb
* try to commit again
* verify it commits successfully

Change-Id: I3d52d6b192ca3bd83266a3e58d594acc3c516782
Reviewed-on: https://gerrit.instructure.com/111088
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-05-11 20:06:08 +00:00
Landon Wilkins 6d43106531 copyright linter for coffee/js/rb, refs SD-2295
discourage (-1 for now) any new source files w/o copyright

test plan:
* see test commits

Change-Id: Ia7a3add61cd7f03d02122d5efa9b4d1d739b263b
Reviewed-on: https://gerrit.instructure.com/110701
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-05-09 22:36:18 +00:00
Landon Wilkins c83a8e8aa0 custom comment generation for script/tatl_tael, refs SD-2295
test plan:
* tatl_tael still works (see test commits)

Change-Id: I1854693bd665f4018d1f0475dc922ac360b8d8d8
Reviewed-on: https://gerrit.instructure.com/109783
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-05-04 20:13:55 +00:00
Landon Wilkins 3e96d3232c better tatl_tael config, refs SD-2295
test plan:
* see test commits

Change-Id: If9f8cf898cdc76e81196de1f5bf8c91fea098126
Reviewed-on: https://gerrit.instructure.com/110408
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-05-03 18:54:52 +00:00
Landon Wilkins 87ba5f0e90 cleanup tatl_tael, refs SD-2295
better foundation for more complex linters

test plan:
- tatl_tael still works (see test commits)

Change-Id: Iff463b69e7acf873418842883dbcab38c83b798b
Reviewed-on: https://gerrit.instructure.com/109373
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-26 15:27:44 +00:00
Landon Wilkins de77840963 allow new .erb outside app/views
test plan:
* see test commits

Change-Id: Iff9b38ad98baed1ad53657192cde69fe6dadba76
Reviewed-on: https://gerrit.instructure.com/102347
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-02-15 23:12:39 +00:00
Landon Wilkins 31e90c0ce6 allow jsx tests for coffee changes, fixes SD-1261
test plan:
* test commit

Change-Id: I9e3da787a56467c886d1e70f107b3abb916c6d1e
Reviewed-on: https://gerrit.instructure.com/82842
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2016-06-17 17:28:43 +00:00
Landon Wilkins 216ab2181f improve tatl_tael for public/javascripts changes, fixes SD-1196
test plan:
* test commit

Change-Id: Iba8695913f05876dc076e2bb7b1e6d0584ad0710
Reviewed-on: https://gerrit.instructure.com/80944
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2016-05-27 23:36:27 +00:00
Landon Wilkins c332022162 tatl_tael suggest type of spec, fixes SD-1080
test plan
* test commit

Change-Id: I09e55588027cd609d00e5066c6de04f1c2018a25
Reviewed-on: https://gerrit.instructure.com/79692
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-05-23 20:38:20 +00:00
Landon Wilkins 6e4838856e lint: discourage new .erb files, fixes SD-871
test plan:
* specs
* see test commit

Change-Id: Ia8084890312b674cc30a60077e9b2643d769cd4b
Reviewed-on: https://gerrit.instructure.com/78425
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-05-02 16:16:53 +00:00
Landon Wilkins 9dc6299c38 lint: encourage specs, fixes SD-1024
test plan:
- change a file w/ a path that matches:
/(app|lib|public)\/.*\.(coffee|js|jsx|html|erb|rb)$/
but not:
/(bower|mediaelement|shims|vendor)\//
- ./script/tatl_tael
- verify you see:
  [error] => Your commit does not include specs. Please add some to
             verify your changes.

Change-Id: I725daf72c14180bb29c440f9867244a43dc5169d
Reviewed-on: https://gerrit.instructure.com/77579
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-05-02 16:16:44 +00:00