diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ce11bded8..7289d534b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2357,8 +2357,10 @@ module ApplicationHelper if work.nil? link_to "提交作品", new_student_work_path(:homework => homework.id),:class => 'c_blue' else - if homework.homework_detail_manual && homework.homework_detail_manual.comment_status != 1 #匿评作业,且作业状态不是在开启匿评之前 + if homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 2 #匿评作业,且作业状态不是在开启匿评之前 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 "修改作品", new_student_work_path(:homework => homework.id),:class => 'c_blue' else diff --git a/app/views/courses/_course_activity.html.erb b/app/views/courses/_course_activity.html.erb index aa99236df..b79964a8d 100644 --- a/app/views/courses/_course_activity.html.erb +++ b/app/views/courses/_course_activity.html.erb @@ -68,13 +68,22 @@ } } - function expand_reply_input(id) { - $(id).toggle(); - } - $(function () { init_activity_KindEditor_data(<%= activity.id%>, null, "87%"); showNormalImage('activity_description_<%= activity.id %>'); + if($("#intro_content_<%= activity.id %>").height() > 360) { + $("#intro_content_show_<%= activity.id %>").show(); + } + $("#intro_content_show_<%= activity.id %>").click(function(){ + $("#activity_description_<%= activity.id %>").toggleClass("maxh360"); + $("#intro_content_show_<%= activity.id %>").hide(); + $("#intro_content_hide_<%= activity.id %>").show(); + }); + $("#intro_content_hide_<%= activity.id %>").click(function(){ + $("#activity_description_<%= activity.id %>").toggleClass("maxh360"); + $("#intro_content_hide_<%= activity.id %>").hide(); + $("#intro_content_show_<%= activity.id %>").show(); + }); }); <% if activity && activity.course_act%> diff --git a/app/views/student_work/_student_work_list.html.erb b/app/views/student_work/_student_work_list.html.erb index 197fecac9..2d0e9220c 100644 --- a/app/views/student_work/_student_work_list.html.erb +++ b/app/views/student_work/_student_work_list.html.erb @@ -12,6 +12,7 @@ <%= select_tag(:student_work_in_group,options_for_select(course_group_list(@course),@group), {:class => "classSplit"}) unless course_group_list(@course).empty? %> <% end%> +
diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index e28cdb1e2..72ca36ca9 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -28,6 +28,33 @@ $('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed"); } + $(function(){ + $("#homework_info_hidden").click(function(){ + $("#homeworkInformation").hide(); + $("#homework_info_hidden").hide(); + $("#homework_info_show").show(); + }); + $("#homework_info_show").click(function(){ + $("#homework_info_show").hide(); + $("#homeworkInformation").show(); + $("#homework_info_hidden").show(); + }); + + if($("#homework_description").height() > 54) { + $("#homeworkDetailShow").show(); + } + $("#homeworkDetailShow").click(function(){ + $("#homeworkDetail").toggleClass("max_h54"); + $("#homeworkDetailShow").hide(); + $("#homeworkDetailHide").show(); + }); + $("#homeworkDetailHide").click(function(){ + $("#homeworkDetail").toggleClass("max_h54"); + $("#homeworkDetailHide").hide(); + $("#homeworkDetailShow").show(); + }); + }); +