Merge branch 'cxt_course' of https://git.trustie.net/jacknudt/trustieforge into cxt_course
This commit is contained in:
commit
f6efefd38d
|
@ -3420,6 +3420,43 @@ def get_hw_index(hw,is_teacher)
|
|||
return index
|
||||
end
|
||||
|
||||
def get_hw_status homework_common
|
||||
str = ""
|
||||
if homework_common.homework_detail_manual
|
||||
if homework_common.homework_detail_manual.comment_status == 0 && homework_common.publish_time.nil?
|
||||
str += '<span class="grey_homework_btn_cir ml5">挂起</span>'
|
||||
elsif homework_common.homework_detail_manual.comment_status == 0
|
||||
str += '<span class="grey_homework_btn_cir ml5">未发布</span>'
|
||||
elsif homework_common.homework_detail_manual.comment_status == 1
|
||||
if homework_common.anonymous_comment == 0
|
||||
str += '<span class="grey_homework_btn_cir ml5">未开启匿评</span>'
|
||||
else
|
||||
str += '<span class="grey_homework_btn_cir ml5">匿评已禁用</span>'
|
||||
end
|
||||
if Time.parse(homework_common.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
||||
str += '<span class="green_homework_btn_cir ml5">作品提交中</span>'
|
||||
elsif Time.parse(homework_common.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d")
|
||||
str += '<span class="red_homework_btn_cir ml5">作品补交中</span>'
|
||||
end
|
||||
elsif homework_common.homework_detail_manual.comment_status == 2
|
||||
if homework_common.anonymous_comment == 0
|
||||
str += '<span class="green_homework_btn_cir ml5">匿评中</span>'
|
||||
else
|
||||
str += '<span class="grey_homework_btn_cir ml5">匿评已禁用</span>'
|
||||
end
|
||||
str += '<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>'
|
||||
elsif homework_common.homework_detail_manual.comment_status == 3
|
||||
if homework_common.anonymous_comment == 0
|
||||
str += '<span class="grey_homework_btn_cir ml5">匿评已结束</span>'
|
||||
else
|
||||
str += '<span class="grey_homework_btn_cir ml5">匿评已禁用</span>'
|
||||
end
|
||||
str += '<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>'
|
||||
end
|
||||
end
|
||||
str
|
||||
end
|
||||
|
||||
def get_group_member_names work
|
||||
result = ""
|
||||
unless work.nil?
|
||||
|
|
|
@ -45,9 +45,13 @@
|
|||
<%= link_to( "", new_exercise_path(:course_id => @course.id), :class => 'sy_class_add', :title =>"新建试卷") if is_teacher %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin? %>
|
||||
<li>
|
||||
<%=link_to "分班", course_member_path(@course, :role => 2) %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if show_nav?(0) %>
|
||||
<li>
|
||||
<a href="<%=statistics_course_course_path(@course) %>">统计</a>
|
||||
<!--<a href="javascript:void(0);" class="sy_class_add"></a>-->
|
||||
</li>
|
||||
<% end %>
|
|
@ -16,34 +16,8 @@
|
|||
<div class="homepagePostTitle hidden fl m_w505"> <!--+"(作业名称)"-->
|
||||
<%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey"%>
|
||||
</div>
|
||||
<% if activity.homework_detail_manual%>
|
||||
<% if activity.homework_detail_manual.comment_status == 1%>
|
||||
<% if activity.anonymous_comment == 0%>
|
||||
<span class="grey_homework_btn_cir ml5">未开启匿评</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<% if Time.parse(activity.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")%>
|
||||
<span class="green_homework_btn_cir ml5">作品提交中</span>
|
||||
<% elsif Time.parse(activity.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") %>
|
||||
<span class="red_homework_btn_cir ml5">作品补交中</span>
|
||||
<% end %>
|
||||
<% elsif activity.homework_detail_manual.comment_status == 2%>
|
||||
<% if activity.anonymous_comment == 0%>
|
||||
<span class="green_homework_btn_cir ml5">匿评中</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% elsif activity.homework_detail_manual.comment_status == 3%>
|
||||
<% if activity.anonymous_comment == 0%>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已结束</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% end%>
|
||||
<% end%>
|
||||
|
||||
<%=get_hw_status(activity).html_safe %>
|
||||
|
||||
<div class="cl"></div>
|
||||
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1%>
|
||||
|
|
|
@ -21,38 +21,8 @@
|
|||
<% end %>
|
||||
</span>
|
||||
|
||||
<% if homework_common.homework_detail_manual%>
|
||||
<% if homework_common.homework_detail_manual.comment_status == 0 && homework_common.publish_time.nil? %>
|
||||
<span class="grey_homework_btn_cir ml5">挂起</span>
|
||||
<% elsif homework_common.homework_detail_manual.comment_status == 0 %>
|
||||
<span class="grey_homework_btn_cir ml5">未发布</span>
|
||||
<% elsif homework_common.homework_detail_manual.comment_status == 1%>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<span class="grey_homework_btn_cir ml5">未开启匿评</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<% if Time.parse(homework_common.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")%>
|
||||
<span class="green_homework_btn_cir ml5">作品提交中</span>
|
||||
<% elsif Time.parse(homework_common.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") %>
|
||||
<span class="red_homework_btn_cir ml5">作品补交中</span>
|
||||
<% end %>
|
||||
<% elsif homework_common.homework_detail_manual.comment_status == 2%>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<span class="green_homework_btn_cir ml5">匿评中</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% elsif homework_common.homework_detail_manual.comment_status == 3%>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已结束</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% end%>
|
||||
<% end%>
|
||||
<%=get_hw_status(homework_common).html_safe %>
|
||||
|
||||
<div class="cl"></div>
|
||||
<% if homework_common.homework_type == 3 && homework_common.homework_detail_group.base_on_project == 1%>
|
||||
<span class="c_red">系统提示:该作业要求各组长<%=link_to "创建项目", new_project_path(:host=>Setting.host_name),:class=>"linkBlue",:title=>"新建项目",:style=>"text-decoration:underline;"%>,组成员加入项目,然后由组长关联项目。谢谢配合!</span>
|
||||
|
|
|
@ -540,3 +540,11 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
|
|||
|
||||
/*20160901作品信息确认*/
|
||||
#worksDescription p {word-wrap:break-word;}
|
||||
|
||||
/*20160907作业详情更改*/
|
||||
.homework-type-option {border:1px solid #d9d9d9; width:98px; height:28px; color:#888; font-size:14px;}
|
||||
.homework-detail-tab {font-size:14px; color:#484848; overflow:hidden;}
|
||||
.homework-detail-tab li {float:left; width:100px; text-align:center; padding:3px 0; border-bottom:2px solid #ddd;}
|
||||
.homework-detail-tab li.selected {border-bottom:2px solid #f00;}
|
||||
.test-set-table, .test-set-table tr, .test-set-table th, .test-set-table td {border-collapse:collapse; text-align:left; border:1px solid #ddd; color:#484848;}
|
||||
.test-set-table th, .test-set-table td {padding:2px 5px;}
|
|
@ -408,6 +408,10 @@ a:hover.sy_btn_orange{
|
|||
color: #ee4a1f;
|
||||
background: #fff;
|
||||
}
|
||||
.sub-menu > li:hover > a{
|
||||
color: #ee4a1f;
|
||||
background: #fff;
|
||||
}
|
||||
.accordion > li:target > a,
|
||||
.accordion > li > a.active {
|
||||
color: #ee4a1f;
|
||||
|
|
Loading…
Reference in New Issue