From 2577df56ce19d0bb90732e0934eab32033784a79 Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Sat, 18 Jul 2015 15:45:04 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/my/account.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 257bcc1a6..c23266afd 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -77,11 +77,11 @@
  • <% if User.current.user_extensions.nil? %> - readonly> + readonly> <% elsif User.current.user_extensions.identity == 3 || User.current.user_extensions.identity == 2 %> - readonly> + readonly> <% elsif User.current.user_extensions.school.nil? %> @@ -89,7 +89,7 @@ <% else %> - + <% end %> From 63f44535a321ec99f62fae4015e90cc2362f00bb Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Sat, 18 Jul 2015 15:52:54 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/activities_helper.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/helpers/activities_helper.rb b/app/helpers/activities_helper.rb index cf8679da6..822613455 100644 --- a/app/helpers/activities_helper.rb +++ b/app/helpers/activities_helper.rb @@ -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] From 55f57ef8b79a54211e90a5c9235796ccc2fcf177 Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Sat, 18 Jul 2015 15:58:33 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/users_helper.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index db041c0ba..d4f9e4eb8 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -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" From 5ecf7f12affda9985d520ff3d775ecb56db0d5a7 Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Sat, 18 Jul 2015 16:10:47 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=96=BB=E6=B6=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/users.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/users.css b/public/stylesheets/users.css index ddfb02e18..81529288c 100644 --- a/public/stylesheets/users.css +++ b/public/stylesheets/users.css @@ -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;} From d4dcbad7e840706c83546cfcaea9a4ed8189fc4d Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Sat, 18 Jul 2015 16:35:20 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/api_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/api_helper.rb b/app/helpers/api_helper.rb index fa231607a..1f34112ad 100644 --- a/app/helpers/api_helper.rb +++ b/app/helpers/api_helper.rb @@ -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 = "未启用匿评" From 679ad8406d4f467d0376e0b25890a017b4759c83 Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Sat, 18 Jul 2015 17:01:22 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/activities_helper.rb | 2 +- app/models/activity.rb | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/helpers/activities_helper.rb b/app/helpers/activities_helper.rb index 822613455..c8cb20ba9 100644 --- a/app/helpers/activities_helper.rb +++ b/app/helpers/activities_helper.rb @@ -57,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 diff --git a/app/models/activity.rb b/app/models/activity.rb index 679cb9599..63081be6f 100644 --- a/app/models/activity.rb +++ b/app/models/activity.rb @@ -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