|
|
@ -24,12 +24,16 @@ module Mobile
|
|
|
|
wh.nil? || wh.homework_detail_manual.nil? ? nil : convert_to_time(wh.homework_detail_manual.evaluation_start, 0)
|
|
|
|
wh.nil? || wh.homework_detail_manual.nil? ? nil : convert_to_time(wh.homework_detail_manual.evaluation_start, 0)
|
|
|
|
when :evaluation_end
|
|
|
|
when :evaluation_end
|
|
|
|
wh.nil? || wh.homework_detail_manual.nil? ? nil : convert_to_time(wh.homework_detail_manual.evaluation_end, 1)
|
|
|
|
wh.nil? || wh.homework_detail_manual.nil? ? nil : convert_to_time(wh.homework_detail_manual.evaluation_end, 1)
|
|
|
|
when :whomework_praise_count
|
|
|
|
when :praise_count
|
|
|
|
get_activity_praise_num(wh)
|
|
|
|
get_activity_praise_num(wh)
|
|
|
|
when :whomework_journal_count
|
|
|
|
when :whomework_journal_count
|
|
|
|
wh.journals_for_messages.count
|
|
|
|
wh.journals_for_messages.count
|
|
|
|
when :course_name
|
|
|
|
when :course_name
|
|
|
|
wh.course.name
|
|
|
|
wh.course.name
|
|
|
|
|
|
|
|
when :act_type
|
|
|
|
|
|
|
|
'Homework'
|
|
|
|
|
|
|
|
when :act_id
|
|
|
|
|
|
|
|
wh.id
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -54,12 +58,14 @@ module Mobile
|
|
|
|
expose :anonymous_comment
|
|
|
|
expose :anonymous_comment
|
|
|
|
expose :quotes
|
|
|
|
expose :quotes
|
|
|
|
expose :is_open
|
|
|
|
expose :is_open
|
|
|
|
|
|
|
|
whomework_expose :act_type
|
|
|
|
|
|
|
|
whomework_expose :act_id
|
|
|
|
whomework_expose :course_name
|
|
|
|
whomework_expose :course_name
|
|
|
|
whomework_expose :created_at
|
|
|
|
whomework_expose :created_at
|
|
|
|
whomework_expose :absence_penalty
|
|
|
|
whomework_expose :absence_penalty
|
|
|
|
whomework_expose :evaluation_start
|
|
|
|
whomework_expose :evaluation_start
|
|
|
|
whomework_expose :evaluation_end
|
|
|
|
whomework_expose :evaluation_end
|
|
|
|
whomework_expose :whomework_praise_count
|
|
|
|
whomework_expose :praise_count
|
|
|
|
whomework_expose :whomework_journal_count
|
|
|
|
whomework_expose :whomework_journal_count
|
|
|
|
expose :journals_for_messages, using: Mobile::Entities::Jours do |f, opt|
|
|
|
|
expose :journals_for_messages, using: Mobile::Entities::Jours do |f, opt|
|
|
|
|
#f[:journals_for_messages] if f.is_a?(Hash) && f.key?(:journals_for_messages)
|
|
|
|
#f[:journals_for_messages] if f.is_a?(Hash) && f.key?(:journals_for_messages)
|
|
|
|