Commit Graph

20 Commits

Author SHA1 Message Date
Brian Palmer d1486b6930 remove last_activity from CountsReport
This data point is difficult to get with the new page views
infrastructure, and isn't displayed anywhere anyway.

fixes CNVS-6731

test plan:
* with cassandra page views enabled, open a rails console and run
  Reporting::CountsReport.process
* once that completes, go to /accounts/X/statistics and verify that the
  stats have been updated (there is a generated timestamp at the top)

Change-Id: I7f1144cd6dab9b68478a79e3f7f82bc6d8feb0b3
Reviewed-on: https://gerrit.instructure.com/22046
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-07-05 21:41:31 +00:00
Cody Cutrer 6e9c843b3d switch to Shackles gem
extracted out of canvas-lms

refs CNVS-4713

test plan:
 * actions that use a slave should still work (dashboard render)
 * you should be able to switch envs and users in console

Change-Id: I07dda8057cf94383bc4579f1ef6b5a4b3ffc20b5
Reviewed-on: https://gerrit.instructure.com/19287
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-04-17 16:25:06 +00:00
Cody Cutrer 5ffbcbeb05 arel-ify lib
excluding api_find, which needs more work

refs CNVS-4706

Change-Id: I013d0660ff2b8dbe2abf6a5c973bd1203f432f99
Reviewed-on: https://gerrit.instructure.com/18921
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-04-01 19:12:22 +00:00
Jacob Fugal 4a236e32bd change tracking of active teachers/students/users
...in the CountReport to only users with a pseudonym that's been
accessed in the last 30 days. fixes #11381

Change-Id: Ic4c10b1bd49bc9f10e5d4ef20a7ea2bd78ab27b9
Reviewed-on: https://gerrit.instructure.com/14780
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-10-29 12:20:36 -06:00
Cody Cutrer 7b8dd548d3 a few more things to skip for deleted root accounts refs #6891
Change-Id: Id56c0f9a157734483fad29ffd95b9ea146ff1002
Reviewed-on: https://gerrit.instructure.com/13060
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-21 13:49:23 -06:00
Cody Cutrer 8e4b59a3ba switch back to the master to save results of CountsReport
test plan:
 * run CountsReport with a slave environment that's not writeable

Change-Id: Ie99db198a42a505401bde711c674349763b79bad
Reviewed-on: https://gerrit.instructure.com/10721
Tested-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-05-14 12:51:09 -06:00
Brian Palmer 671f04606f remove page views from the counts report
This will get added back in once page views are moved out of the
database.

test plan: visit an account statistics page, the two lines of page view
counts in last week/month will be gone. The CountsReport periodic job
should now not do the page view rollup queries.

Change-Id: Icb947a88ff6644d600a31593ff07050f964b8580
Reviewed-on: https://gerrit.instructure.com/10640
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-05-09 13:31:29 -06:00
Cody Cutrer 2cb3d39f56 use a slave db if available for CountsReport
test plan:
 * run Reporting::CountsReport.process; it should work
 * add a slave db configuration as a child of the current
   environment to database.yml; re-run the CountsReport

Change-Id: Iba08d6697cf0e864ecbc3a2829fcd7a134267bec
Reviewed-on: https://gerrit.instructure.com/10100
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2012-04-19 12:33:20 -06:00
Cody Cutrer df56b0dd7d update with_each_shard stub
Change-Id: I8737b2735ac1564e1fa6ec8b0ca0055e5039bb6a
Reviewed-on: https://gerrit.instructure.com/10072
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-04-16 15:01:56 -06:00
Simon Williams 874b5489c1 student view; closes #6995
allows course admins to view the course from a student perspective. this is
accessible from a button on the course/settings page. They should be able to
interact with the course as a student would, including submitting homework and
quizzes. Right now there is one student view student per course, so if the
course has multiple administrators, they will all share the same student view
student.

There are a few things that won't work in student view the way the
would for a normal student, most notably access to conversations is disabled.
Additionally, any publicly visible action that the teacher takes while in
student view will still be publicly visible -- for example if the teacher posts
a discussion topic/reply as the student view student, it will be visible to the
whole class.

test-plan:
- (the following should be tried both as a full teacher and as
  a section-limited course admin)
- set up a few assignments, quizzes, discussions, and module progressions in
  a course.
- enter student view from the coures settings page.
- work through the things you set up above.
- leave student view from the upper right corner of the page.
- as a teacher you should be able to grade the fake student so that they can
  continue to progress.
- the student should not show up in the course users list
- the student should not show up at the account level at all:
  * total user list
  * statistics

Change-Id: I886a4663777f3ef2bdae594349ff6da6981e14ed
Reviewed-on: https://gerrit.instructure.com/9484
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-04-03 14:11:07 -06:00
Cody Cutrer d7e3d5e842 refactor ReportSnapshot refs #7721
basically for detailed reports, have a row per account, instead of
stuffing everything into one massive hash with every account

test plan:
 * ensure that the account statistics page still works
 * ensure that the statistics update when the delayed job runs

Change-Id: I2d4c9ff5a86c8df6d82097aa4f0203a0f55ddb2d
Reviewed-on: https://gerrit.instructure.com/9565
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2012-03-30 09:17:43 -06:00
Cody Cutrer de92da47b0 remove the account.root_account || account idiom
just make Account#root_account return self if it is a root account

test plan:
 * run existing specs

Change-Id: Iff3f621bb722e0f5e90659c4b711d48d8d3c510f
Reviewed-on: https://gerrit.instructure.com/7700
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2012-01-03 11:47:33 -07:00
Cody Cutrer e280a309d2 don't use presence/absence of root_account(_id) to determine if an account is a root account
in preparation for having Account#root_account return self if it is a root account

also remove some unused named scopes

test plan:
 * run specs

Change-Id: I8c78c45f0d2f6002021bc2bba594de8bcbaa086b
Reviewed-on: https://gerrit.instructure.com/7698
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2012-01-03 11:47:22 -07:00
Brian Palmer 92feb2bcdb replace ActiveRecord::Base calls with subclass calls where it makes sense
This was already a small issue if the job queue was on a different
database driver than the main database, and it'll become more important
as more AR connections are introduced.

Change-Id: I204becadd32bb935df096e8c937a04bb6962f0b2
Reviewed-on: https://gerrit.instructure.com/4601
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-07-18 13:56:08 -06:00
Brian Palmer 0fbc37226c counts report error when new external status is added, fixes #4730
also limit the job to one attempt

Change-Id: I65bad8ae6e7aa79e4916d4f5f03ef67d2dc683de
Reviewed-on: https://gerrit.instructure.com/3980
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-06-02 09:29:01 -06:00
Cody Cutrer 8f4e0687cf use named scope to avoid postgres warning
Change-Id: I9ef84d815ddf059ae0244977af250eb39d1b6c85
Reviewed-on: https://gerrit.instructure.com/3486
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-05-04 16:59:24 -06:00
Jon Jensen 471267deb9 rework some mysql-specific stuff, closes #4090
Change-Id: I6791f124aae5caf2c5a3d5cd2b36dce60657d7ca
Reviewed-on: https://gerrit.instructure.com/2843
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-03-28 12:44:08 -06:00
Jon Jensen 4ea607cea4 postgres support and misc bugfixes, fixes #3574, #3943
Change-Id: I16aa188175a588b02dd6460baa83daae805aec9f
Reviewed-on: https://gerrit.instructure.com/2474
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-03-11 18:01:02 -07:00
JT Olds c1f180bf7e Bug fix for last minute features.
Change-Id: Ie04d4756d41b37902ef30d161f1f0ac9436ac2b3
Reviewed-on: https://gerrit.instructure.com/2094
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
2011-02-01 10:16:42 -07:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00