Dashboard agora com rss e ical
This commit is contained in:
@@ -16,6 +16,21 @@ class LogEntry < ActiveRecord::Base
|
||||
belongs_to :course
|
||||
|
||||
def reversible?() false end
|
||||
|
||||
def to_xml(options = {})
|
||||
options[:indent] ||= 2
|
||||
xml = options[:builder] ||= Builder::XmlMarkup.new(:indent => options[:indent])
|
||||
xml.instruct! unless options[:skip_instruct]
|
||||
xml.log_entry do
|
||||
xml.id self.id
|
||||
xml.course_id self.course_id
|
||||
xml.created_at self.created_at
|
||||
xml.target_id self.target_id
|
||||
xml.user_id self.user_id
|
||||
xml.type self.type
|
||||
xml.version self.version unless self.version.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
require 'log_entry/attachment_log_entry.rb'
|
||||
|
||||
@@ -48,6 +48,8 @@ class User < ActiveRecord::Base
|
||||
xml.user do
|
||||
xml.id self.id
|
||||
xml.name self.name
|
||||
xml.display_name self.display_name
|
||||
xml.login self.login
|
||||
xml.created_at self.created_at
|
||||
xml.last_seen self.last_seen
|
||||
xml.description self.description
|
||||
@@ -91,6 +93,7 @@ class User < ActiveRecord::Base
|
||||
|
||||
def before_save
|
||||
self.salt = User.random_string(10) if !self.salt?
|
||||
self.secret = User.random_string(32) if !self.secret?
|
||||
self.hashed_password = User.encrypt(@password, self.salt) if !@password.blank?
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user