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>
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>
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>
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>
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>
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>
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>
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>
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>
(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>
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>
"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>
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>