Commit Graph

20 Commits

Author SHA1 Message Date
Ahmad Amireh 4243097b21 rename some things
fixes FOO-1265

[skip-eslint=true]
[pin-commit-analytics=7e49eefd7f59cbf43fd03bf8957bbbfa76f8d9d5]
[pin-commit-demo_site=adade2e38e46a358a4643cd3db2fe5ccffe39ec5]
[pin-commit-instructure_misc_plugin=47a3161102b0611af56d134fbd0c828ddc1b8abf]
[pin-commit-migration_tool=0dbac2f5b421d894395605ce4b583ef0f7d60b22]
[pin-commit-multiple_root_accounts=cc96d28c0d59bbe47acc64de4fdd8e1d2b029805]

Change-Id: I14c07f20bd260cf0de1f48ceb70b3c2313edf2d2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258807
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
2021-04-06 01:12:49 +00:00
Ryan Shaw 84e71e95df simplify/modernize google analytics & load faster
now that we have streaming working, by loading google analytics
like this in the <head> it will load sooner but not block any of our
scripts from running.

this commit also upgrades us to use the analytics.js instead of the
legacy ga.js library.

it also actually imports it as a named export instead of just relying
on it being on the jQuery global `$` object

note: I actually took the time to set this up with a testing google
analytics account and verified that it got all the page views recorded
as before. Doing so even exposed one place where we were currently
sending PII to google analytics (in the “Act As” page) and I fixed that
https://cl.ly/e869a25266fc

test plan:
* in the console do: Setting.set('google_analytics_key', 'testing123')
  but replace “testing123” with a real valid google analytics account id
* google analytics tracking data should post to your google analytics
  account exactly the same as it did before this commit

Change-Id: I3ca51642c622ce72992159646f9d9338c58b44ba
Reviewed-on: https://gerrit.instructure.com/203581
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-02 20:07:18 +00:00
Ryan Shaw 47be295903 remove all content_for :stylesheets
this is so that we can avoid dealing with yield :stylesheets altogether
in the streaming work james is working on

test plan:
* these pages should look exactly the same as they did before
* double check to make sure the prefetching on the discussion topic
  index page still works

Change-Id: Ie6057bbe95c34a6ee31ff36c44d58743c7ca9853
Reviewed-on: https://gerrit.instructure.com/201844
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-07-19 15:27:01 +00:00
James Williams 49bd2bb55c replace content_for :page_title or :title w/ provide
these were separated out of james’s bigger streaming commit. but these
should be a lot easier and safer to merge now and then we can focus our
attention detail to the rest of what is going on in that commit.


test plan:
* nothing should change
* all these pages should have the same <title> tag 
* and they should all have the same <div id=“right-side”> as before

Change-Id: I67b0ef2d19d7a669b884087c9595b5c81f439884
Reviewed-on: https://gerrit.instructure.com/201504
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
2019-07-17 17:25:51 +00:00
Ed Schiebel 16cb291989 Remove PII from any page title
closes ADMIN-1118

test plan:
  - in a rails console, execute Setting.set('google_analytics_key', 'foo')
    (if that doesn't work, replace 'foo' with 'UA-124895132-1')
  - restart your rails server
  - load a user's profile page
  - inspect the network tab
  > expect the https://www.google-analytics.com/__utm.gif URLs to send
    a page title "utmdt" as "User Profile", and not the student's name

  - if you really want to be complete, repeat for each of the changed
    files and expect not to see any PII in the page title
    (I couldn't figure out the canvas URL for all of them)
	app/views/communication_channels/confirm.html.erb: /register/:nonce
             though I don't know how to get a valid nonce
	app/views/context/new_roster_user.html.erb: /courses/:cid/users/:uid
	app/views/context/roster_user.html.erb: almost positive this has
             been replaces by new_roster_user and is no longer used.
	app/views/profile/profile.html.erb: /profile
	app/views/profile/show.html.erb: /profile/settings
	app/views/gradebooks/grade_summary.html.erb: /courses/26/grades/43
	app/views/outcomes/user_outcome_results.html.erb:
             pretty sure it's /outcomes/users/:user_id, but when
             I try, I get a routing error. Maybe you have to turn
             outcomes on
	app/views/profile/observees.html.erb:
             pretty sure it's /users/:user_id/observees, but
             I get a routing error.
	app/views/quizzes/quizzes/history.html.erb:
                  /courses/26/quizzes/51/history (as the student)
	app/views/submissions/show_preview.html.erb:
                 /courses/:course_id/assignments/:aid/submissions/:user_id
	app/views/users/grades.html.erb: /users/:user_id/grades
	app/views/users/index.html.erb: i don't believe this is used any
             more. the title is "User Search results for %{user_name}",
             and from what I can tell, user search is an ajax query now.
	app/views/users/show.html.erb: /acounts/:acct_id/users/:user_id
               or /users/:user_id

  - you probably want to run Setting.set('google_analytics_key', nil)
    from the rails console and restart your server

Change-Id: I3619c5bf75889226f7bce52c641fb7d727485b36
Reviewed-on: https://gerrit.instructure.com/162694
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Mysti Sadler <mysti@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2018-09-05 18:12:05 +00:00
Ryan Shaw 1eafdf5755 Handle RTL in inline styles
Closes: CORE-1243

These are all the places that we are using in line styles that w
ould be affected in right to left. This change does absolutely nothing 
to our existing left to right CSS it just flips it in right to left.

Test plan:
Because this change does not change anything for our left-to-right users
We can safely merge it without having to manually check these pages 
Just likewe did With the other automated CSS changes

Change-Id: I62841f4b47925b4d9594c3ca914fa3e5d53fd7b0
Reviewed-on: https://gerrit.instructure.com/145447
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-04-03 20:22:27 +00:00
Landon Wilkins aaee67adf0 da licença part 55
add consistent license headers to all source files

Change-Id: Iec5a2ecba91e736f3b7230f1fba9526096ffc177
Reviewed-on: https://gerrit.instructure.com/110166
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-28 19:42:23 +00:00
Simon Williams 7009d1d868 remove .rs-margin-all classes and style
closes CNVS-32914

test plan: make sure the right sidebar has good spacing in the following
sections:
- accounts index
- account statistics
- assignment show page for an lti tool assignment
- calendar event show page
- collaborations index page
- users "usage" page (/coures/x/users/y/usage)
- users "services" page (/courses/x/user_services)
- discussion topic show page with mastery paths
- eportfolio show page (preview view)
- student grade summary
- gradebook upload submissions
- outcomes show and user results
- question banks index and show
- quizzes read only
- rubrics index and show
- sections show

Change-Id: I021d9d5ab1e5e2ba6f650c5b505f0d6d9dce5652
Reviewed-on: https://gerrit.instructure.com/93667
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2016-10-26 20:31:40 +00:00
Ryan Shaw f6edb77702 s/jammit_css/css_bundle
with the new css stuff, we don't actually use
jammit so jammit_css has been renamed to css_bundle.

we left an aliased jammit_css and marked it deprecated
so these all still worked but spit out a deprecation warning.

Change-Id: Ib74037711f559f64851d9379644479587c1f83f2
Reviewed-on: https://gerrit.instructure.com/55888
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2015-07-07 21:26:35 +00:00
Aaron Cannon 538f1eedc5 Accessibility: Fix and add to heading structure across Canvas
Fixes CNVS-14293

Test plan:
Visit the following pages and verify that each:
- has an unaltered visual appearance
- has exactly one level 1 heading which can be navigated to by screen readers
- When appropriate (I.E. when the length or organization of the page warrents
  it) has lower level headings which can be navigated to by screen readers
- when lower level headings are present, heading levels proceed in order, and
  logically

The following pages should be verified to confirm they meet the above criteria.
  Note that the URL fragments provided may not be reachable on all installs,
  and should be modified appropriately.
- /courses/1/assignments
- /courses/1/assignments/18
- /courses/1/discussion_topics (Sections should be level 2, individual
  discussions level 3.)
- /courses/1/users/prior
- /courses/1/pages/front-page
- /courses/1/pages/front-page/revisions
- /courses/1/assignments/syllabus
- /courses/1/outcomes
- /courses/1/rubrics
- /courses/1/quizzes/11/take?preview=1
- /courses/1/quizzes/11/moderate
- /courses/1/question_banks
- /courses/1/modules
- /courses/1/statistics
- /courses/1/confirm_action?event=conclude
- /courses/1/copy
- /courses/1/content_migrations
- /courses/1/content_exports
- /courses/1/content_exports
- /profile/communication
- /users/2/user_notes
- /courses/1/users/1/usage
- /courses/1/announcements
  - An additional heading can be seen by loading the page when no
    announcements exist.
- /courses/1/pages
- /courses/1/files
- /courses/1/quizzes
- /courses/1/settings
- /dashboard/files
- /courses/1/outcomes/users/1

Change-Id: I26d7dba115105c36026758cf55644139116224ec
Reviewed-on: https://gerrit.instructure.com/37669
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-08-14 19:57:43 +00:00
Landon Wilkins efceb76996 converts user_outcome_results js_block into js_bundle
test plan:
* regression test user outcome results

Change-Id: Ie69085636afaa4f582ddacb81ca970ae42928a31
Reviewed-on: https://gerrit.instructure.com/29140
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
2014-02-05 00:18:04 +00:00
Ryan Shaw 713d0b8c91 replace all .button(s) with .btn
in order to not have to support buttons with .ui-button AND
.button AND .btn classes this simplifies and and makes our
codebase more consistent by deprecating the .button class
with .btn

Change-Id: I4802d785a47b36aa477f302e6ac8c87715db8a62
Reviewed-on: https://gerrit.instructure.com/15194
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-11-14 13:29:30 -07:00
Mark Ericksen 0f56787915 Partial Revert: Nested outcomes UI, closes #9158
(27edbc1e8b)

Link outcome to artifacts display. Fixes #11570.

Restores views for outcome alignment and results.

Adds a link from an outcome to the results view.

 Testing Notes:
 ===========
 * On the outcomes page, select an outcome
    and verify that the h3 name display should be
    a link that opens the outcome alignment and
    results view.
* To see results, create a rubric and link it to an
   outcome. Then grade an assignment using the
   rubric.
* On the outcome results view, click a
   student/assignment combination link
   and verify that it goes to the submission.
* On the outcome results view, click the
   "all outcome results for this student" link
   and verify it displays a page for that user.

Change-Id: Ic88d5d1b71f02cdbd97310a2321931a22833bed1
Reviewed-on: https://gerrit.instructure.com/14899
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-11-02 09:49:52 -06:00
Joe Tanner 27edbc1e8b Nested outcomes UI, closes #9158
test plan for course, account, and sub-account
outcomes page:
- using the 'New' buttons in the toolbar
  create, edit, and delete a bunch of outcomes
  and groups and nested groups
- when editing an outcome, insert, edit, and delete the criterion ratings
- find dialog
  - inside any top level standard group
  - select an individual outcome or a group to import
  - after importing, the outcome or group should show up in the
    seleced group of the main window and show it's details on the right
  - account standards
    - the account groups (the first level under 'Account Standards') should
      not be importable
- pagination
  - add 20-30 outcomes and groups to a group
  - groups should load first and then the outcomes
  - a 'Loading more results' item should be displayed when fetching
    more pages
- test out the 'Back' button

Change-Id: Iba1bb0533fb962ac6d206179c82c388f5fee1d84
Reviewed-on: https://gerrit.instructure.com/13086
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2012-10-25 11:03:21 -06:00
Ryan Florence a1e31c8c9a AMD Conversion
"Trivial" JavaScript / CoffeeScript changes
--------------------------------------------------

For the most part, all javascript was simply
wrapped in `require` or `define`. The dependencies
were found with a script that matched regexes in
the files, it errs on the side of listing too many
dependencies, so its worth double checking each
file's dependencies (over time, anyway).

i18n API changes
--------------------------------------------------

No longer have to do I18n.scoped calls, just
list i18n as a dependency with the scope and it's
imported already scoped

  require ['i18n!some_scope'], (I18n) ->
    I18n.t 'im_scoped', 'I'm scoped!'

JS bundling now done with r.js, not Jammit
--------------------------------------------------

We don't use jammit to bundle JS anymore. Simply
list dependencies for your JS modules in the file
and RequireJS handles the rest.

To optimize the JavaScript, first make sure you
have node.js 0.4.12+ installed and then run:

  $ rake js:build

The app defaults to the optimized build in
production. You can use non-optimized in
production by putting ?debug_assets=true in the
url just like before.

You can also test the optimized JavaScript in
development with ?optimized_js=true.

Significant changes
--------------------------------------------------

These files have "real" changes to them (unlike
the JavaScript that is simply wrapped in require
and define).  Worth taking a really close look at:

- app/helpers/application_helper.rb
- app/views/layouts/application.html.erb
- config/assets.yml
- config/build.js
- lib/handlebars/handlebars.rb
- lib/i18n_extraction/js_extractor.rb
- lib/tasks/canvas.rake
- lib/tasks/i18n.rake
- lib/tasks/js.rake

Change-Id: I4bc5ecb1231f331aaded0fef2bcc1f3a9fe482a7
Reviewed-on: https://gerrit.instructure.com/6986
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-02-06 16:41:40 -07:00
JT Olds 828bf5a9f5 outcomes i18n
Change-Id: I18719a70a3c3c7841eb6035414bcf283d2a0b284
Reviewed-on: https://gerrit.instructure.com/4235
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-07-05 16:44:48 -06:00
Brian Palmer 249cb7491f filter out results without percentage, fixes #4490
Change-Id: I8a5076172c7fadfef44c0185652b91b4d3e83dd5
Reviewed-on: https://gerrit.instructure.com/3477
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-05-05 08:09:31 -06:00
Cody Cutrer d3ff9cf279 show artifact details on learning outcome results page
Closes #3864.

Change-Id: Iecac9f1cef80982dd4a74d2cf5dbecdd787a0431
Reviewed-on: https://gerrit.instructure.com/3046
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-04-15 09:03:12 -06:00
Brian Whitmer b7f1d5ae18 align question banks to outcomes
Question banks can be aligned to outcomes that
are part of the same context.  Whenever students
take a quiz with questions from the bank they'll
get evaluated for the linked outcomes based on
the points they got for each bank question.

Also fixed a bug which may or may not have existed
before this commit that unexpectedly deleted quiz
submissions when a user tried to re-take a quiz.

refs #3317

Change-Id: I744af3915672a5e260b078503e0bc648c238eca9
Reviewed-on: https://gerrit.instructure.com/2641
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-03-25 15:39:56 -06:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00