Merge branch 'szzh' into develop
This commit is contained in:
commit
c66e74dc82
|
@ -44,6 +44,9 @@ module ActivitiesHelper
|
|||
end
|
||||
|
||||
def get_container_type(activity)
|
||||
if activity.act.nil?
|
||||
return ['Unknow',0]
|
||||
end
|
||||
#问卷
|
||||
if activity.act_type == 'Poll'
|
||||
return ['Course',activity.act.polls_group_id]
|
||||
|
@ -54,7 +57,7 @@ module ActivitiesHelper
|
|||
end
|
||||
#留言
|
||||
if activity.act_type == 'JournalsForMessage'
|
||||
return [activity.act.jour_type,activity.act.jour_id]
|
||||
return [activity.act.jour_type,activity.act.jour_id,activity.act.user_id]
|
||||
end
|
||||
|
||||
# HomeworkCommon Issue Journal Message News
|
||||
|
|
|
@ -66,7 +66,7 @@ module ApiHelper
|
|||
(user.language.nil? || user.language == "") ? 'zh':user.language
|
||||
end
|
||||
|
||||
# 获取课程作业的状态
|
||||
# 学生获取课程作业的状态
|
||||
def get_homework_status homework
|
||||
homework_status = ""
|
||||
if !homework.nil?
|
||||
|
@ -75,9 +75,9 @@ module ApiHelper
|
|||
when 1
|
||||
homework_status = show_homework_deadline homework
|
||||
when 2
|
||||
homework_status = "正在匿评中"
|
||||
homework_status = "正在匿评"
|
||||
when 3
|
||||
homework_status = "匿评已结束"
|
||||
homework_status = "匿评结束"
|
||||
end
|
||||
elsif homework.homework_type == 0
|
||||
homework_status = "未启用匿评"
|
||||
|
|
|
@ -434,6 +434,8 @@ module UsersHelper
|
|||
def get_activity_act_showname_htmlclear(activity)
|
||||
str = get_activity_act_showname(activity)
|
||||
str = str.gsub(/<.*>/,'')
|
||||
str = str.gsub(/\r/,'')
|
||||
str = str.gsub(/\n/,'')
|
||||
str = str.lstrip.rstrip
|
||||
if str == ''
|
||||
str = 'RE:'
|
||||
|
@ -449,7 +451,9 @@ module UsersHelper
|
|||
when "Journal"
|
||||
arr = details_to_strings(activity.act.details,true)
|
||||
arr << activity.act.notes
|
||||
return arr.to_s
|
||||
str = ''
|
||||
arr.each { |item| str = str+item }
|
||||
return str
|
||||
when "JournalsForMessage"
|
||||
return activity.act.notes
|
||||
when "Message"
|
||||
|
|
|
@ -14,8 +14,11 @@ class Activity < ActiveRecord::Base
|
|||
#helper :activities
|
||||
include ActivitiesHelper
|
||||
def set_container_type_val
|
||||
container_type,container_id =get_container_type(self)
|
||||
self.activity_container_type = container_type
|
||||
self.activity_container_id = container_id
|
||||
params =get_container_type(self)
|
||||
self.activity_container_type = params[0]
|
||||
self.activity_container_id = params[1]
|
||||
if(self.act_type == 'JournalsForMessage')
|
||||
self.user_id = params[2]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -77,11 +77,11 @@
|
|||
|
||||
<li nhname="tag" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" style="display:none;">
|
||||
<% if User.current.user_extensions.nil? %>
|
||||
<input nhname="tag" nh_tag_0="true" nh_tag_1="true" id="province" name="province" style="display: none;" class="w70" type="text" value=<%= l(:field_occupation_click) %> readonly>
|
||||
<input nhname="tag" nh_tag_0="true" nh_tag_1="true" id="province" name="province" style="display: none;width:130px;" class="w70" type="text" value=<%= l(:field_occupation_click) %> readonly>
|
||||
<input nhname="tag" nh_tag_3="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="" />
|
||||
<input nhname="tag" nh_tag_0="true" nh_tag_1="true" id="occupation_name" type="text" style="display: none;width:117px;" readonly/>
|
||||
<% elsif User.current.user_extensions.identity == 3 || User.current.user_extensions.identity == 2 %>
|
||||
<input nhname="tag" nh_tag_0="true" nh_tag_1="true" id="province" name="province" style="display: none;" class="w70" type="text" value=<%= l(:field_occupation_click) %> readonly>
|
||||
<input nhname="tag" nh_tag_0="true" nh_tag_1="true" id="province" name="province" style="display: none;width:130px;" class="w70" type="text" value=<%= l(:field_occupation_click) %> readonly>
|
||||
<input nhname="tag" nh_tag_3="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="<%= @user.user_extensions.occupation %>" />
|
||||
<input nhname="tag" nh_tag_0="true" nh_tag_1="true" id="occupation_name" type="text" style="display: none;width:117px;" readonly/>
|
||||
<% elsif User.current.user_extensions.school.nil? %>
|
||||
|
@ -89,7 +89,7 @@
|
|||
<input nhname="tag" nh_tag_3="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" />
|
||||
<input nhname="tag" nh_tag_0="true" nh_tag_1="true" id="occupation_name" type="text" style="display: none;width:117px;" readonly/>
|
||||
<% else %>
|
||||
<input nhname="tag" nh_tag_0="true" nh_tag_1="true" id="province" name="province" style="display: none;" class="w70" type="text" value="<%= User.current.user_extensions.school.province %>" readonly/>
|
||||
<input nhname="tag" nh_tag_0="true" nh_tag_1="true" id="province" name="province" style="display: none;width:130px;" class="w70" type="text" value="<%= User.current.user_extensions.school.province %>" readonly/>
|
||||
<input nhname="tag" nh_tag_3="true" id="occupation" name="occupation" type="text" style="display: none;" class="w210" value="<%= User.current.user_extensions.school.id %>"/>
|
||||
<input nhname="tag" nh_tag_0="true" nh_tag_1="true" id="occupation_name" type="text" style="display: none;width:117px;" value="<%= User.current.user_extensions.school.name %>" readonly="true" style="background-color: #E2E2E2;"/>
|
||||
<% end %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RSide{ min-height:860px;}
|
||||
#RSide{ min-height:1px;}
|
||||
/* 左侧信息*/
|
||||
.users_info{background:#fff; padding:10px; width:230px; padding-right:0px; margin-bottom:10px; }
|
||||
.pic_head{ width:214px; height:214px; border:1px solid #cbcbcb; padding:2px; position:relative;}
|
||||
|
|
Loading…
Reference in New Issue