Merge branch 'szzh' into develop

This commit is contained in:
huang 2015-11-06 14:41:11 +08:00
commit ef4d93ce40
24 changed files with 245 additions and 108 deletions

View File

@ -89,7 +89,9 @@ class StudentWorkController < ApplicationController
else
student_in_group = '(' + group_students.map{|user| user.id}.join(',') + ')'
end
if @is_teacher || @homework.homework_detail_manual.nil? #老师 || 超级管理员 显示所有列表
#老师 || 超级管理员 || 禁用匿评&&作业截止&&已提交作品 显示所有列表
if @is_teacher || @homework.homework_detail_manual.nil? ||
(@homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.where(:user_id => User.current.id).empty?)
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").joins(:user).where("users.id in #{student_in_group}").order("#{@order} #{@b_sort}"),@name
@show_all = true
elsif @homework.homework_detail_manual.comment_status == 1 #学生 && 未开启匿评 只看到自己的
@ -110,7 +112,7 @@ class StudentWorkController < ApplicationController
end
@student_work_count = (search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").joins(:user).where("users.id in #{student_in_group}").order("#{@order} #{@b_sort}"),@name).count
else
if @is_teacher || @homework.homework_detail_manual.nil? #老师 || 超级管理员 显示所有列表
if @is_teacher || @homework.homework_detail_manual.nil? || (@homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.where(:user_id => User.current.id).empty?) #老师 || 超级管理员 显示所有列表
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name
@show_all = true
elsif @homework.homework_detail_manual.comment_status == 1 #学生 && 未开启匿评 只看到自己的
@ -166,6 +168,7 @@ class StudentWorkController < ApplicationController
def create
if params[:student_work]
@submit_result = true
student_work = StudentWork.find(params[:student_work_id]) if params[:student_work_id]
student_work ||= StudentWork.new
student_work.name = params[:student_work][:name]
@ -181,7 +184,6 @@ class StudentWorkController < ApplicationController
else
student_work.late_penalty = 0
end
if student_work.save
course_activity = CourseActivity.where("course_act_type='HomeworkCommon' and course_act_id =#{@homework.id}").first
if course_activity
@ -193,20 +195,16 @@ class StudentWorkController < ApplicationController
user_activity.updated_at = Time.now
user_activity.save
end
@student_work = StudentWork.where(homework_common_id: @homework.id, user_id: User.current.id).first
respond_to do |format|
format.html {
flash[:notice] = l(:notice_successful_create)
redirect_to student_work_index_url(:homework => @homework.id)
}
format.js
end
return
end
end
@submit_result = false
respond_to do |format|
format.html {
flash[:notice] = l(:notice_failed_create)
redirect_to new_student_work_url(:homework => @homework.id)
}
format.js
end
end

View File

@ -2372,10 +2372,12 @@ module ApplicationHelper
link_to "作品匿评", student_work_index_path(:homework => homework.id), :class => 'c_blue', :title => "开启匿评后不可修改作品"
elsif homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 3
link_to "匿评结束", student_work_index_path(:homework => homework.id), :class => 'c_blue', :title => "匿评已结束"
elsif homework.homework_type == 2 #编程作业不能修改作品
link_to "修改作品(#{homework.student_works.count})", new_student_work_path(:homework => homework.id),:class => 'c_blue'
elsif homework.homework_type == 2 && Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")#编程作业不能修改作品
link_to "修改作品(#{homework.student_works.count})", new_student_work_path(:homework => homework.id),:class => 'c_blue'
elsif Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
link_to "修改作品(#{homework.student_works.count})", edit_student_work_path(work.id),:class => 'c_blue'
else
link_to "修改作品(#{homework.student_works.count})", edit_student_work_path(work.id),:class => 'c_blue'
link_to "查看作品(#{homework.student_works.count})", student_work_index_path(:homework => homework.id), :class => 'c_blue', :title => "作业截止后不可修改作品"
end
end
end

View File

@ -73,11 +73,18 @@
</li>
<li style="margin-top: 30px;">
<span style="margin-right: 20px;">身&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;份:</span>
<select name="role" class="IDType">
<option value="9">教师</option>
<option value="7">教辅</option>
<option value="10">学生</option>
</select>
<% if User.current.logged? && User.current.extensions && User.current.extensions.identity == 0%>
<select name="role" class="IDType">
<option value="9">教师</option>
<option value="7">教辅</option>
<option value="10">学生</option>
</select>
<%else%>
<select name="role" class="IDType">
<option value="10">学生</option>
<option value="7">教辅</option>
</select>
<%end%>
</li>
<li>
<a href="javascript:" class="btn_join" style="margin-left: 50px;" onclick="submit_form(this);">

View File

@ -3,6 +3,6 @@ hideModal();
<% else %>
$("#course_outline_bar").html('<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>')
<%end %>
<%if @is_in_show_outline_page && @is_in_show_outline_page == 'Y'%>
<%#if @is_in_show_outline_page && @is_in_show_outline_page == 'Y'%>
window.location.href='<%=syllabus_course_path(@course) %>';
<% end %>
<%# end %>

View File

@ -58,7 +58,7 @@
'取消大纲',
{:controller => 'blog_comments',:action => 'destroy',:user_id=>BlogComment.find(@course.outline).author_id,:blog_id=>BlogComment.find(@course.outline).blog_id, :id => @course.outline,:course_id=>@course.id},
:method => :delete,
:data => {:confirm => '确定取消么'},
:data => {:confirm => '确定取消么'},
:class => 'postOptionLink'
) if User.current && User.current.id == @article.author.id %>
</li>

View File

@ -1,6 +1,6 @@
<ul class="hworkUl">
<li class="hworkList340 hworkH30 <%= @homework.homework_type == 2 ? '' : 'width385'%>">
<span class="c_dark f14 fb fl <%= @homework.homework_type == 2 ? 'mr60 ml80' : 'mr95 ml100'%>">作品名称</span>
<span class="c_dark f14 fb fl <%= @homework.homework_type == 2 ? 'mr90 ml50' : 'mr140 ml50'%>">作品名称</span>
<span class="c_dark f14 fb fl mr50">姓名</span>
<span class="c_dark f14 fb fl">学号</span>
</li>

View File

@ -3,21 +3,21 @@
<ul>
<li class="fl" >
<span class="tit_fb">上交时间:</span>
<%=format_time @work.created_at %>
<%=format_time work.created_at %>
</li>
<% if @work.user == User.current && @homework.homework_detail_manual.comment_status == 1 %>
<% if work.user == User.current && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") %>
<!-- 我的作业 && 匿评作业 && 未开启匿评,显示编辑和删除按钮 -->
<li class="fr" >
<%= link_to("", student_work_path(@work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
<%= link_to("", student_work_path(work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
</li>
<li class="fr" >
<%= link_to "",new_student_work_path(:homework => @homework.id),:class => "pic_edit"%>
</li>
<% end%>
<% if @homework.homework_detail_manual.comment_status == 3 && @work.user != User.current%>
<% if @homework.homework_detail_manual.comment_status == 3 && work.user != User.current%>
<!-- 匿评结束阶段,显示点赞按钮 -->
<li class="fr" id="student_work_praise_<%= @work.id%>">
<li class="fr" id="student_work_praise_<%= work.id%>">
<%= render :partial => 'student_work_praise' %>
</li>
<% end%>
@ -26,7 +26,7 @@
<li >
<span class="tit_fb ">编程代码:</span>
<div class="showHworkP break_word">
<%= text_format(@work.description) if @work.description%>
<%= text_format(work.description) if work.description%>
</div>
<div class="cl"></div>
</li>
@ -37,10 +37,10 @@
测试结果:
</span>
<div class="show_hwork_p break_word">
<% @work.student_work_tests.each_with_index do |test, index| %>
<% work.student_work_tests.each_with_index do |test, index| %>
<div class="ProResultTop">
<p class="c_blue fl">
第<%= @work.student_work_tests.count - index%>次测试
第<%= work.student_work_tests.count - index%>次测试
</p>
<span class="fr c_grey">
<%= test.created_at.to_s(:db) %>
@ -79,24 +79,24 @@
<% end%>
<li >
<% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && @work.user != User.current )%>
<% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && work.user != User.current )%>
<!-- 老师 || 开启匿评状态 && 不是当前用户自己的作品 -->
<div id="add_student_score_<%= @work.id%>" class="mt10 evaluation">
<%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>
<div id="add_student_score_<%= work.id%>" class="mt10 evaluation">
<%= render :partial => 'add_score',:locals => {:work => work,:score => score}%>
</div>
<% end%>
<div class="cl"></div>
</li>
</ul>
<div class="ping_box fl" id="score_list_<%= @work.id%>" style="<%= @work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
<%@student_work_scores.each do |score|%>
<div id="work_score_<%= score.id%>">
<%= render :partial => 'student_work_score',:locals => {:score => score,:is_last => score == @student_work_scores.last}%>
<div class="ping_box fl" id="score_list_<%= work.id%>" style="<%= work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
<%student_work_scores.each do |student_score|%>
<div id="work_score_<%= student_score.id%>">
<%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%>
</div>
<% end%>
</div>
<!---ping_box end--->
<a href="javascript:void(0);" class="fr linkBlue mt5 mb5" onclick="$('#about_hwork_<%= @work.id%>').html('');">收起</a>
<a href="javascript:void(0);" class="fr linkBlue mt5 mb5" onclick="$('#about_hwork_<%= work.id%>').html('');">收起</a>
<div class="cl"></div>
</div>

View File

@ -3,21 +3,21 @@
<ul>
<li class="fl" >
<span class="tit_fb">上交时间:</span>
<%=format_time @work.created_at %>
<%=format_time work.created_at %>
</li>
<% if @work.user == User.current && @homework.homework_detail_manual.comment_status == 1 %>
<% if work.user == User.current && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") %>
<!-- 我的作业 && 匿评作业 && 未开启匿评,显示编辑和删除按钮 -->
<li class="fr" >
<%= link_to("", student_work_path(@work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
<%= link_to("", student_work_path(work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
</li>
<li class="fr" >
<%= link_to "",edit_student_work_path(@work),:class => "pic_edit"%>
<%= link_to "",edit_student_work_path(work),:class => "pic_edit"%>
</li>
<% end%>
<% if @homework.homework_detail_manual.comment_status == 3 && @work.user != User.current%>
<% if @homework.homework_detail_manual.comment_status == 3 && work.user != User.current%>
<!-- 匿评结束阶段,显示点赞按钮 -->
<li class="fr" id="student_work_praise_<%= @work.id%>">
<li class="fr" id="student_work_praise_<%= work.id%>">
<%= render :partial => 'student_work_praise' %>
</li>
<% end%>
@ -25,50 +25,50 @@
<!--<li ><span class="tit_fb"> 参与人员:</span>程梦雯&nbsp;&nbsp;王强</li>-->
<% if @work.project%>
<% if work.project%>
<li >
<span class="tit_fb"> 关联项目:</span>
<%= link_to( @work.project.name, project_path(@work.project.id), :class => "linkBlue" )%>
<%= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
</li>
<% end%>
<li >
<span class="tit_fb ">内容:</span>
<div class="showHworkP break_word">
<%= text_format(@work.description) if @work.description%>
<%= text_format(work.description) if work.description%>
</div>
<div class="cl"></div>
</li>
<li >
<span class="tit_fb"> 附件:</span>
<% if @work.attachments.empty?%>
<% if work.attachments.empty?%>
<span style="color: #999999">尚未提交附件</span>
<% else%>
<div class="fl" style="width: 90%;">
<%= render :partial => 'work_attachments_status', :locals => {:attachments => @work.attachments, :status => @homework.homework_detail_manual.comment_status} %>
<%= render :partial => 'work_attachments_status', :locals => {:attachments => work.attachments, :status => @homework.homework_detail_manual.comment_status} %>
</div>
<% end%>
<div class="cl"></div>
</li>
<li >
<% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && @work.user != User.current )%>
<% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && work.user != User.current )%>
<!-- 老师 || 开启匿评状态 && 不是当前用户自己的作品 -->
<div id="add_student_score_<%= @work.id%>" class="mt10 evaluation">
<%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>
<div id="add_student_score_<%= work.id%>" class="mt10 evaluation">
<%= render :partial => 'add_score',:locals => {:work => work,:score => score}%>
</div>
<% end%>
<div class="cl"></div>
</li>
</ul>
<div class="ping_box fl" id="score_list_<%= @work.id%>" style="<%= @work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
<%@student_work_scores.each do |score|%>
<div id="work_score_<%= score.id%>">
<%= render :partial => 'student_work_score',:locals => {:score => score,:is_last => score == @student_work_scores.last}%>
<div class="ping_box fl" id="score_list_<%= work.id%>" style="<%= work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
<%student_work_scores.each do |student_score|%>
<div id="work_score_<%= student_score.id%>">
<%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%>
</div>
<% end%>
</div>
<!---ping_box end--->
<a href="javascript:void(0);" class="fr linkBlue mt5 mb5" onclick="$('#about_hwork_<%= @work.id%>').html('');">收起</a>
<a href="javascript:void(0);" class="fr linkBlue mt5 mb5" onclick="$('#about_hwork_<%= work.id%>').html('');">收起</a>
<div class="cl"></div>
</div>

View File

@ -1,4 +1,4 @@
<div class="fl" style="border-bottom:1px solid #eaeaea; padding-bottom:10px; width:720px;">
<div class="fl" style="padding-bottom:10px; width:720px;">
<span class="c_dark f14 fb fl mr30">
作品
<font class="f12 c_red">
@ -35,6 +35,14 @@
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work}%>
<% end%>
<div class="cl"></div>
<div id="about_hwork_<%= student_work.id%>"></div>
<div id="about_hwork_<%= student_work.id%>">
<% if student_work.user == User.current && !@is_evaluation %>
<% if @homework.homework_type == 2%>
<%=render :partial => 'programing_work_show', :locals=> {:work => student_work, :score =>student_work_score(student_work,User.current),:student_work_scores => student_work.student_works_scores.order("updated_at desc")} %>
<% else %>
<%=render :partial => 'show' , :locals=> {:work => student_work, :score =>student_work_score(student_work,User.current),:student_work_scores => student_work.student_works_scores.order("updated_at desc")} %>
<% end %>
<% end %>
</div>
<div class="cl"></div>
<% end%>

View File

@ -0,0 +1,35 @@
<div id="popbox02">
<div class="ni_con">
<span class="f16 fontBlue fb">请您确认刚刚上传的作品信息</span>
<p class="f14 mt5">
<span class="fb">作品名称:</span><%=@student_work.name%>
</p>
<p class="f14 mt5">
<span class="fb">作品描述:</span><%=@student_work.description%>
</p>
<p class="mt5">
<span class="fl fb mr30">附</span><span class="fb fl">件:</span>
<% if @student_work.attachments.count == 0%>
<span class="fl c_red"><%= "无附件"%></span>
<% else %>
<div class="fl">
<% @student_work.attachments.each do |attachment| %>
<span style="display: block; color: #808181;"><%=attachment.filename %></span>
<% end %>
</div>
<% end %>
</p>
<div class="cl"></div>
<div class="ni_btn mt10">
<a href="javascript:" class="tijiao" onclick="clickOK();" style="margin-bottom: 15px; margin-left: 55px;" >
确&nbsp;&nbsp;定
</a>
</div>
</div>
</div>
<script type="text/javascript">
function clickOK() {
window.location.href = '<%= student_work_index_url(:homework => @homework.id)%>';
}
</script>

View File

@ -0,0 +1,16 @@
<% if @submit_result%>
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/work_information') %>');
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("anonymos");
<% else %>
window.location.href = '<%= new_student_work_url(:homework => @homework.id)%>';
<% end %>
function clickCanel() {
hideModal('#popbox02');
window.location.href = '<%= student_work_index_url(:homework => @homework.id)%>';
}

View File

@ -120,14 +120,31 @@
<div class="homeworkInfo" id="homeworkInformation">
<div class="">
<div class="homepagePostTitle fl hidden m_w500" title="<%= @homework.name %>"><%= @homework.name %></div>
<div class="homepagePostTitle fl hidden m_w460" title="<%= @homework.name %>"><%= @homework.name %></div>
<% if @homework.homework_detail_manual%>
<% if @homework.homework_detail_manual.comment_status == 1%>
<span class="grey_btn_cir ml10">未开启匿评</span>
<% if @homework.homework_detail_manual.comment_status == 0 %>
<span class="grey_homework_btn_cir ml5">未发布</span>
<% elsif @homework.homework_detail_manual.comment_status == 1%>
<% if @homework.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">作品提交中</span>
<% elsif @homework.homework_detail_manual.comment_status == 2%>
<span class="green_btn_cir ml10">匿评中</span>
<% if @homework.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.homework_detail_manual.comment_status == 3%>
<span class="grey_btn_cir ml10">匿评已结束</span>
<% if @homework.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%>
<span class="fr c_grey"> <a href="javascript:void(0);" class="linkGrey2" id="homework_info_hidden">[ 隐藏作业信息 ]</a> </span>
@ -145,6 +162,9 @@
</div>
<div class="mt5">
<div class="fontGrey2 db fl">截止时间:<%= @homework.end_time %>&nbsp;23:59</div>
<% if @homework.homework_detail_manual.comment_status == 0 %>
<div class="fontGrey2 db fl ml10">发布时间:<%= @homework.publish_time %>&nbsp;00:00</div>
<% end %>
<% if @homework.homework_detail_manual%>
<% if @homework.homework_detail_manual.comment_status == 1%>
<% end_time = @homework.end_time.to_time.to_i + 24*60*60 - 1 %>

View File

@ -73,7 +73,7 @@
:url => {:controller => 'student_work',
:action => 'create',
:homework => @homework.id
}) do |f|%>
},:remote=>true ) do |f| %>
<div class=" c_red mb10">
提示:作品名称和描述中不要出现真实的姓名信息
</div>

View File

@ -3,9 +3,9 @@ if($("#about_hwork_<%= @work.id%>").children().length > 0){
}
else{
<% if @homework.homework_type == 2%>
$("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show') %>");
$("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show',:locals => {:work =>@work,:score =>@score,:student_work_scores => @student_work_scores}) %>");
<% else%>
$("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show') %>");
$("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show',:locals => {:work =>@work,:score =>@score,:student_work_scores => @student_work_scores}) %>");
<% end%>
$('#score_<%= @work.id%>').peSlider({range: 'min'});
}

View File

@ -13,25 +13,31 @@
<% end %> TO <!--+"(课程名称)" -->
<%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
</div>
<div class="homepagePostTitle hidden m_w480 fl"> <!--+"(作业名称)"-->
<div class="homepagePostTitle hidden m_w505 fl"> <!--+"(作业名称)"-->
<%= 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_btn_cir ml5">未开启匿评</span>
<span class="grey_homework_btn_cir ml5">未开启匿评</span>
<% else %>
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
<% end %>
<span class="green_btn_cir ml5">作品提交中</span>
<span class="green_homework_btn_cir ml5">作品提交中</span>
<% elsif activity.homework_detail_manual.comment_status == 2%>
<% if activity.anonymous_comment == 0%>
<span class="green_btn_cir ml5">匿评中</span>
<span class="green_homework_btn_cir ml5">匿评中</span>
<% else %>
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
<% end %>
<span class="green_btn_cir ml5">教师教辅评阅中</span>
<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_btn_cir ml5">匿评已结束</span>
<span class="grey_homework_btn_cir ml5">匿评已结束</span>
<% else %>
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
<% end %>
<span class="green_btn_cir ml5">教师教辅评阅中</span>
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
<% end%>
<% end%>
<div class="homepagePostSubmitContainer">
@ -52,7 +58,7 @@
</div>
<% end %>
<div class="homepagePostDeadline">截止时间:<%= activity.end_time.to_s %></div>
<div class="homepagePostDeadline">截止时间:<%= activity.end_time.to_s %>&nbsp;23:59</div>
</div>
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18 table_maxWidth" id="activity_description_<%= user_activity_id%>">
<div id="intro_content_<%= user_activity_id%>">

View File

@ -10,28 +10,34 @@
TO
<%= link_to homework_common.course.name, course_path(homework_common.course_id), :class => "newsBlue ml15"%>
</div>
<span class="homepagePostTitle hidden m_w480 fl">
<span class="homepagePostTitle hidden m_w505 fl">
<%= link_to homework_common.name,student_work_index_path(:homework => homework_common.id),:class => "postGrey"%>
</span>
<% if homework_common.homework_detail_manual%>
<% if homework_common.homework_detail_manual.comment_status == 0 %>
<span class="grey_btn_cir ml5">未发布</span>
<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_btn_cir ml5">未开启匿评</span>
<span class="grey_homework_btn_cir ml5">未开启匿评</span>
<% else %>
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
<% end %>
<span class="green_btn_cir ml5">作品提交中</span>
<span class="green_homework_btn_cir ml5">作品提交中</span>
<% elsif homework_common.homework_detail_manual.comment_status == 2%>
<% if homework_common.anonymous_comment == 0%>
<span class="green_btn_cir ml5">匿评中</span>
<span class="green_homework_btn_cir ml5">匿评中</span>
<% else %>
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
<% end %>
<span class="green_btn_cir ml5">教师教辅评阅中</span>
<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_btn_cir ml5">匿评已结束</span>
<span class="grey_homework_btn_cir ml5">匿评已结束</span>
<% else %>
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
<% end %>
<span class="green_btn_cir ml5">教师教辅评阅中</span>
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
<% end%>
<% end%>
@ -50,14 +56,14 @@
<%= homework_common.language_name%>
</div>
<% end %>
<div class="homepagePostDeadline">
<%= l(:label_end_time)%><%= homework_common.end_time%>&nbsp;23:59
</div>
<% if homework_common.homework_detail_manual.comment_status == 0 %>
<div class="homepagePostDeadline mr15">
<%= l(:label_publish_time)%><%= homework_common.publish_time%>
<div class="homepagePostDeadline ml15">
<%= l(:label_publish_time)%><%= homework_common.publish_time%>&nbsp;00:00
</div>
<% end %>
<div class="homepagePostDeadline">
<%= l(:label_end_time)%><%= homework_common.end_time%>
</div>
</div>
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18 table_maxWidth" id="homework_description_<%= homework_common.id%>">
<div id="intro_content_<%= homework_common.id%>">
@ -92,7 +98,7 @@
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(homework_common),:class => "postOptionLink", :remote => true)%>
</li>
<% end %>
<% if homework_common.anonymous_comment == 0 &&(comment_status == 0 || comment_status == 1)%>
<% if homework_common.anonymous_comment == 0%>
<li>
<%= homework_anonymous_comment homework_common %>
</li>

View File

@ -354,7 +354,7 @@ zh:
# 意见反馈
#
label_feedback: 意见反馈
label_feedback_tips: "欢迎反馈网站问题,课程中遇到的问题请反馈给相关老师!"
label_feedback_tips: "请在此提问平台问题,或直接加入师姐答疑群,谢谢!"
label_technical_support: "QQ 在线支持:"
label_feedback_success: "您的意见已经反馈到公共贴吧的新手讨论吧,我们会第一时间解决您的问题,谢谢支持!"
label_feedback_value: "该帖来自用户反馈:)"

View File

@ -4,7 +4,7 @@ namespace :rep_fault do
desc "set ossean's type value"
task :rep_update => :environment do
rep = Repository.find(400)
rep.type = "Repository::Gitlab"
rep.type = "Repository::Git"
rep.save
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -663,7 +663,7 @@ function regex_homework_end_publish_time()
var myDate = new Date();
if($.trim($("#homework_publish_time").val()) == "")
{
$("#homework_publish_time").val(myDate.toLocaleDateString());
$("#homework_publish_time").val(formate_date(myDate));
}
var publish_time = Date.parse($("#homework_publish_time").val());
var end_time = Date.parse($("#homework_end_time").val());
@ -695,6 +695,21 @@ function regex_homework_end_time()
}
}
function formate_date(date){
var str = "";
var year = date.getFullYear();
var month = date.getMonth() + 1;
var day = date.getDate();
if(month < 10) {
month = '0' + month;
}
if(day < 10) {
day = '0' + day;
}
str = year + '-' + month + '-' + day;
return str;
}
//验证发送到课程
function regex_course_id(){
var course_id = $("#course_id").val();

View File

@ -97,7 +97,7 @@ function regex_homework_end_publish_time()
var myDate = new Date();
if($.trim($("#homework_publish_time").val()) == "")
{
$("#homework_publish_time").val(myDate.toLocaleDateString());
$("#homework_publish_time").val(formate_date(myDate));
}
var end_time = Date.parse($("#homework_end_time").val());
var publish_time = Date.parse($("#homework_publish_time").val());
@ -129,6 +129,21 @@ function regex_homework_end_time()
}
}
function formate_date(date){
var str = "";
var year = date.getFullYear();
var month = date.getMonth() + 1;
var day = date.getDate();
if(month < 10) {
month = '0' + month;
}
if(day < 10) {
day = '0' + day;
}
str = year + '-' + month + '-' + day;
return str;
}
//验证发送到课程
function regex_course_id(){
var course_id = $("#course_id").val();

View File

@ -33,7 +33,7 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;}
.ctt2{clear:both; }
.hworkListBanner {width:720px; height:40px; background:#eaeaea; margin-bottom:10px;}
.hworkListContainer {float:left; clear:both; width:720px;}
.showHwork{ border:2px solid #269ac9; width:696px; padding:10px; color:#666666; padding-bottom:0px; }
.showHwork{ border:1px solid #eaeaea; width:696px; padding:10px; color:#666666; padding-bottom:0px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); }
.showHworkP{ width:630px; float:left;}
.showHwork ul li {margin-bottom: 5px;}
.hworkPingText{ float:left; border:1px solid #e4e4e4; padding:5px; width:618px; height:35px;}
@ -41,9 +41,9 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;}
.pingBoxTit{ float:left; width:625px; margin-left:10px;}
.pingText{border:1px solid #CCCCCC; margin:5px; padding:5px; width:610px; height:20px; }
.pingBackTit{ float:left; width:573px; margin-left:10px; }
.hworkUl{ height:30px; border-bottom:1px solid #eaeaea; line-height:30px; vertical-align:middle;}
.hworkUl{ height:30px; border-bottom:1px solid #eaeaea; line-height:30px; vertical-align:middle; background-color: #f6f6f6;}
.hworkH30 {height:30px !important; line-height:30px !important;}
.hworkListRow {height:65px; border-bottom:1px solid #eaeaea; line-height:65px; vertical-align:middle;}
.hworkListRow {height:65px; border-bottom:1px dashed #eaeaea; line-height:65px; vertical-align:middle;}
.hworkListRow:hover {background-color:#f6f6f7;}
.hworkUl li{ float:left;}
.hworkListRow li{ float:left;}
@ -71,9 +71,9 @@ a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-re
.classSplit {border:1px solid #e7e7e7; height:27px; line-height:27px; display:inline-block; margin-left:10px; padding-left:5px; cursor:pointer; outline:none; width:95px; max-width:95px;}
.classList {width:45px; border:1px solid #e7e7e7; float:left; position:absolute; background-color:#ffffff; left:-1px;}
.hworkPortrait {float:left; width:40px;}
.HomeworkNameTitle{width: 285px;text-align: center;margin-left: 50px;}
.HomeworkNameTitle{width: 285px;text-align: left;margin-left: 50px;}
.HomeworkStuTitle{width: 80px;text-align: center;}
.StudentName{display: table-cell;width: 115px;vertical-align: middle;text-align: center;height: 40px;}
.StudentName{display: table-cell;width: 115px;vertical-align: middle;text-align: left;height: 40px;}
.width385{width: 385px;}
.width505{width: 505px;}
.width165{width: 165px;}
@ -81,6 +81,7 @@ a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-re
.width525{width: 525px;}
.width285{width: 285px;}
.mr95{margin-right: 95px;}
.mr140 {margin-right: 140px;}
.ml100{margin-left: 100px;}
.mt16{margin-top: 16px;}
.pr10{padding-right: 10px;}
@ -178,7 +179,9 @@ a.f_grey:hover {color:#000000;}
/*.upbtn{ margin:42px 0 0 10px; border:none; color:#999; width:150px;}*/
.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
.grey_btn_cir{ background:#b2b2b2; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
.green_homework_btn_cir{ background:#28be6c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
.grey_btn_cir{ background:#b2b2b2; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
.grey_homework_btn_cir{ background:#b2b2b2; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
.blue_btn_cir{ background:#3498db; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
.orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
.sticky_btn_cir{ background:#269ac9; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
@ -835,7 +838,7 @@ a:hover.icon_remove{background:url(images/icons.png) -20px -338px no-repeat;}
a.hwork_center{ display:block; width:60px; text-align:center; margin-right:5px;}
.show_hwork{ border:2px solid #64bdd9; width:646px; padding:10px; color:#666666; padding-bottom:0px; }
.show_hwork ul li{ margin-bottom:5px;}
.show_hwork_arrow{ position:relative; top:2px; left:165px;background:url(../images/course/arrow_up.jpg) 0 0 no-repeat; width:20px; height:11px;}
.show_hwork_arrow{ position:relative; top:1px; left:165px;background:url(../images/course/arrow_up.jpg) 0 0 no-repeat; width:20px; height:11px;}
.tit_fb{ font-weight:bold; width:66px; text-align:right; display:block; float:left;}
.ml160{ margin-left:160px;}
.show_hwork_p{ width:630px; float:left;}
@ -966,7 +969,8 @@ a:hover.icon_remove{background:url(../images/course/icons.png) -20px -338px no-r
.ProResultCon{ padding:10px; color:#888888; line-height:24px; border-bottom:1px solid #dddddd; }
.W50{ width:50px;}
.W200{ width:200px;}
.m_w480{max-width: 480px;}
.m_w460{max-width: 460px;}
.m_w505{max-width: 505px;}
.m_w500{max-width: 500px;}
.m_w530{max-width: 530px;}
.ProResultTable{ color:#888888;}

View File

@ -213,6 +213,8 @@ a.bBlue {background-color:#3498db;}
a.bBlue:hover {background-color:#297fb8;}
a.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;}
a.submit_btn:hover {background-color:#3498db; color:#ffffff;}
a.submit_btn2 {background-color: #269ac9; padding: 3px 5px; color: #ffffff;}
a.submit_btn2:hover {background-color: #297fb8;}
/****翻页***/
.wlist{float:right;}
@ -293,8 +295,10 @@ a:hover.bgreen_n_btn{background:#08a384;}
.more_btn{-moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #9DCEFF; color:#9DCEFF; border-radius:3px; padding:0px 3px;}
.upbtn{ margin:42px 0 0 10px; border:none; color:#999; width:150px;}
.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
.green_btn_cir{ background:#28be6c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
.grey_btn_cir{ background:#b2b2b2; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
.green_homework_btn_cir{ background:#28be6c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
.grey_btn_cir{ background:#b2b2b2; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
.grey_homework_btn_cir{ background:#b2b2b2; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
.blue_btn_cir{ background:#3498db; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
.orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
.sticky_btn_cir{ background:#269ac9; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
@ -1073,7 +1077,8 @@ a:hover.icon_remove{background:url(../images/course/icons.png) -20px -338px no-r
.ProResultCon{ padding:10px; color:#888888; line-height:24px; border-bottom:1px solid #dddddd; }
.W50{ width:50px;}
.W200{ width:200px;}
.m_w480{max-width: 480px;}
.m_w460{max-width: 460px;}
.m_w505{max-width: 505px;}
.m_w530{max-width: 530px;}
.ProResultTable{ color:#888888;}
.T_C{ text-align:center;}
@ -1292,13 +1297,13 @@ a:hover.SetUpIcon{background: url(../images/homepage_icon.png) 0px -486px no-rep
/* 开启匿评弹框 */
.anonymos{width:480px;height:180px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
.anonymos_work {position:fixed !important;left:60%;top:60%;margin:-215px 0 0 -300px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
.ni_con { width:425px; margin:25px 30px;}
.ni_con { width:425px; margin:15px;}
.ni_con h2{ display:block; height:40px; width:425px; text-align:center; color:#3a3a3a;}
.ni_con p{ color:#808181; }
.ni_con a:hover{ text-decoration:none;}
.ni_btn{ width:190px; margin:15px auto; line-height:1.9;}
a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#15bccf; text-align:center; padding-top:4px; float:left; margin-right:15px;}
a:hover.tijiao{ background:#0f99a9;}
a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#269ac9; text-align:center; padding-top:4px; float:left; margin-right:15px;}
a:hover.tijiao{ background:#297fb8;}
.c_pink{ color:#e65d5e;}
.ni_con_work { width:300px; margin:25px 20px;}
.ni_con_work p{ color:#808181; }