Change-Id: I1eee577904575079654943b19fc990d2929ad9c6
Reviewed-on: https://gerrit.instructure.com/120224
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Change-Id: I33c8ca114c32d09a00352a28724bd46624600be4
Reviewed-on: https://gerrit.instructure.com/120135
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
fixes CNVS-29202
test plan:
- general regression test of csv exports
- with pv4 enabled, and 'page_views_csv_export_rows' set to >200, you
should get the right number of rows back
Change-Id: I0d8e733ef3ef7d7c7c50462f3d95539157da82c0
Reviewed-on: https://gerrit.instructure.com/81056
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
closes CNVS-28788
test plan:
* enable page views
* use an app (such as Canvas for iOS) to interact with your
Canvas, and record page view (particularly ones that count
as "participations")
* look at the page views for the user
* instead of listing a browser for the user agent, it should
list the name of the developer key for the app
Change-Id: Id07b293db333e44db7110fc2620409535927f915
Reviewed-on: https://gerrit.instructure.com/77409
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
apparently we like to change param names halfway through the stack
test plan:
* enable pv4
* do an api request for pv4 data, passing start_time and end_time
* it should work
Change-Id: I3fdc7c9105af5f45a2380f15981be03e91caed55
Reviewed-on: https://gerrit.instructure.com/74413
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
closes CNVS-25561
test plan:
- enable page views to point to cassandra, but don't configure cassandra
- log a page view
- it should not write 2 errors to ErrorReport
Change-Id: I19281d39023eebcc498ddc5820dfbb8c13225805
Reviewed-on: https://gerrit.instructure.com/68254
Tested-by: Jenkins
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Change-Id: I8a10679218b9a6ff8485b7822a21c704bdfaa398
Reviewed-on: https://gerrit.instructure.com/29213
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
- update the Gemfile to be 1.9 only, and raise an exception on wrong
ruby version
- remove RUBY_VERSION checks, replacing with the applicable code
- remove the FasterCSV compatibility shim, just use CSV now
test plan: trying to bundle install on ruby 1.8 or 2.0 should raise an
exception, specs should pass, canvas should work as normal on 1.9
Change-Id: I49088e9d227c59c6d5d5acb417c2df971129474a
Reviewed-on: https://gerrit.instructure.com/19806
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
This needs to check the user, not the account, but we no longer grant
:view_statistics if a user has :read_reports on a course, effectively
blocking teachers from viewing the top-level user page by default.
A new user-level :read_reports permission was added so that teachers and
account admins can still view the teacher/student interaction reports as
before, even though teachers don't have :view_statistics
fixes CNVS-2964
test plan:
- a site admin user should be able to view /users/X on any account
- an account admin user should be able to view /users/X for students in
thier account, but not in other accounts
- a teacher should not be able to view /users/X for a student in their
course Y, but they should be able to view /courses/Y/users/X
Change-Id: Iebc639bd935f50344cb77614f6eeae2bacb421e2
Reviewed-on: https://gerrit.instructure.com/18473
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Adds a new back-end store for page_views, using a Cassandra cluster. All
the current page view queries are supported, many using denormalized
views on the data.
test plan:
first, canvas instances that are currently using AR page views
should function as before.
by Setting.set('enable_page_views', 'cassandra') and restarting, you will
switch to cassandra page views. a script to migrate the AR page views to
Cassandra is coming. all page view functionality should work as before.
note that the format of the pagination headers in the
/api/v1/users/X/page_views endpoint has changed.
Change-Id: I2d1feb4d83b06a0c852e49508e85e8dce87507b4
Reviewed-on: https://gerrit.instructure.com/14258
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
The CSV requested data was unordered but limited to 300. So CVS list did not
always included expected data or in a predictable order. Added a named_scope
and use it to give explicit ordering. In the process of working on this, I
discovered that the "xml" link next to "csv" has no code backing it up and thus
returns a blank page. Talked with Jon and determined to just delete the link.
Test Plan:
* enable page_views in settings (in order to see in UI)
* ex: Setting.set('enable_page_views', 'db')
* setup a user with page views that are not in chronological order
* view the list at /accounts/?/users/?
* html display version should be listed chronological order with most
recent listed first (was correct before)
* csv link downloads data and it should be in the same order
and the same set of data.
The easiest testing approach for CSV ordering is to review and run the
new spec.
Change-Id: I004b10548fdcaffa795cc497aba93cfdda2eac82
Reviewed-on: https://gerrit.instructure.com/10534
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>