This commit is contained in:
cxt 2015-11-06 17:45:19 +08:00
commit 008775ad7e
3 changed files with 15 additions and 15 deletions

View File

@ -21,7 +21,6 @@ class AccountController < ApplicationController
# prevents login action to be filtered by check_if_login_required application scope filter
skip_before_filter :check_if_login_required
# Login request and validation
def login
if request.get?

View File

@ -663,7 +663,8 @@ class ApplicationController < ActionController::Base
if api_request?
logger.error "Form authenticity token is missing or is invalid. API calls must include a proper Content-type header (text/xml or text/json)."
end
render_error "Invalid form authenticity token."
#render_error "Invalid form authenticity token."
redirect_to signin_path(:login=>true)
end
def render_feed(items, options={})

View File

@ -66,9 +66,9 @@
<li>课程名称:<%= ma.course_message.course.name %>
(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
<li>作业标题:<span style="color:Red"><%= ma.course_message.name %></span></li>
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>&nbsp;&nbsp;24点</span></li>
<li>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %>&nbsp;&nbsp;24点</span></li>
<li>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点</span></li>
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>&nbsp;&nbsp;23:59</span></li>
<li>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %>&nbsp;&nbsp;23:59</span></li>
<li>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;23:59</span></li>
<li>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></li>
<li>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></li>
</ul>
@ -81,9 +81,9 @@
<li>课程名称:<%= ma.course_message.course.name %>
(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
<li>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></li>
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>&nbsp;&nbsp;24点</span></li>
<li>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %>&nbsp;&nbsp;24点</span></li>
<li>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点</span></li>
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>&nbsp;&nbsp;23:59</span></li>
<li>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %>&nbsp;&nbsp;23:59</span></li>
<li>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;23:59</span></li>
<li>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></li>
<li>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></li>
</ul>
@ -116,9 +116,9 @@
<ul class="ul_normal_color">
<li>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
<li>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></li>
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>&nbsp;&nbsp;24点</span></li>
<li>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %>&nbsp;&nbsp;24点</span></li>
<li>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点</span></li>
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>&nbsp;&nbsp;23:59</span></li>
<li>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %>&nbsp;&nbsp;23:59</span></li>
<li>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;23:59</span></li>
<li>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></li>
<li>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></li>
<p>请抓紧时间提交您的作品,谢谢!</p>
@ -154,7 +154,7 @@
<li>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
<li>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></li>
<li>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></li>
<li>匿评截止:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点</span></li>
<li>匿评截止:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;23:59</span></li>
</ul>
<% unless User.current.allowed_to?(:as_teacher, ma.course_message.course)%>
<p>请您尽早完成匿评!如果您在截止日期前未完成匿评,您的最终成绩将被扣除<%= ma.course_message.homework_detail_manual.absence_penalty %>分乘以缺评份数。</p>
@ -215,7 +215,7 @@
<li>失败原因:<span style="color:red;">提交作品的人数低于2人</span></li>
<li>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年' + ma.course_message.course.term %>)</li>
<li>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></li>
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time%>&nbsp;&nbsp;24点</span></li>
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time%>&nbsp;&nbsp;23:59</span></li>
</ul>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
@ -314,7 +314,7 @@
<% end %>
</ul>
<p>
本次作业将在<%= ma.course_message.student_work.homework_common.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点结束匿评,到时您将可以看到所有其他同学的作品啦!大家可以进一步互相学习。 期待您取得更大的进步!
本次作业将在<%= ma.course_message.student_work.homework_common.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;23:59结束匿评,到时您将可以看到所有其他同学的作品啦!大家可以进一步互相学习。 期待您取得更大的进步!
</p>
</div>
<% end %>
@ -397,7 +397,7 @@
<ul class="ul_grey">
<li>课程名称:<%= ma.course_message.homework_common.course.name %>(<%= ma.course_message.homework_common.course.time.to_s + '年' + ma.course_message.homework_common.course.term %>)</li>
<li>作业标题:<%= ma.course_message.homework_common.name %></li>
<li>提交截止:<%= ma.course_message.homework_common.end_time %>&nbsp;24:00</li>
<li>提交截止:<%= ma.course_message.homework_common.end_time %>&nbsp;23:59</li>
<li>提交时间:<%= format_time(ma.course_message.created_at) %></li>
<li>迟交扣分:<%= ma.course_message.homework_common.late_penalty %>分</li>
</ul>