Dashboard agora com rss e ical

This commit is contained in:
2008-03-05 06:52:52 -03:00
parent ba4a6a20fe
commit e5bc6024ba
15 changed files with 101 additions and 35 deletions

View File

@@ -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'

View File

@@ -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