show the correct date/time for the student access report
The report was displaying the AssetUserAccess updated_at, which isn't
always the time of the last access -- #display_name re-saves the record,
for example.
Now AssetUserAccess keeps the last access time in a dedicated
last_access field. Turns out the table already had this column, but it
was unused. So now we're using it.
fixes #6679
test plan:
* As a student, access some course content -- look at assignments,
quizzes, pages, the syllabus, etc
* As a teacher, go to the student roster, select the student, and
click to view the student access report.
* Verify that all the last access times are correct (and not just set
to the current time).
Change-Id: Icef3073e777d191c281a21e8d160ec08201be374
Reviewed-on: https://gerrit.instructure.com/8880
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-02-22 06:40:06 +08:00
|
|
|
class UseAssetUserAccessLastAccess < ActiveRecord::Migration
|
|
|
|
tag :postdeploy
|
|
|
|
|
|
|
|
def self.up
|
2012-03-06 07:00:06 +08:00
|
|
|
DataFixup::UseAssetUserAccessLastAccess.send_later_if_production(:run)
|
show the correct date/time for the student access report
The report was displaying the AssetUserAccess updated_at, which isn't
always the time of the last access -- #display_name re-saves the record,
for example.
Now AssetUserAccess keeps the last access time in a dedicated
last_access field. Turns out the table already had this column, but it
was unused. So now we're using it.
fixes #6679
test plan:
* As a student, access some course content -- look at assignments,
quizzes, pages, the syllabus, etc
* As a teacher, go to the student roster, select the student, and
click to view the student access report.
* Verify that all the last access times are correct (and not just set
to the current time).
Change-Id: Icef3073e777d191c281a21e8d160ec08201be374
Reviewed-on: https://gerrit.instructure.com/8880
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-02-22 06:40:06 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
raise ActiveRecord::IrreversibleMigration
|
|
|
|
end
|
|
|
|
end
|