Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
cxt 2017-04-07 15:35:59 +08:00
commit 3e286f8ac3
2 changed files with 3 additions and 3 deletions

View File

@ -779,8 +779,8 @@ class StudentWorkController < ApplicationController
course_statistics.update_attribute('committed_work_num', (course_statistics.committed_work_num - 1) < 0 ? 0 : (course_statistics.committed_work_num - 1)) if course_statistics
course_statistics.update_attribute('un_commit_work_num', course_statistics.un_commit_work_num + 1) if course_statistics
end
student_works.delete_all
pros.delete_all
student_works.destroy_all
pros.destroy_all
project = @work.student_work_projects.where("is_leader = 1").first
if @homework.homework_detail_group.base_on_project == 1

View File

@ -1,5 +1,6 @@
//$("#HomeWorkCon").replaceWith("<%#= escape_javascript(render :partial => 'users/user_homework_form', :locals => { :homework => @homework,:edit_mode => true })%>");
hideModal('#coursesChoosePopup');
$("#homework_editor").show();
$("#homework_name").val("<%= @homework.name%>");
//$("#homework_end_time").val("<%#= @homework.end_time%>");
<% if @select_course == "0"%>
@ -20,6 +21,5 @@ homework_description_editor.html("<%= escape_javascript(@homework.description.ht
<% end %>
document.getElementById("homework_type_option").options[<%=@homework.homework_type %>].selected = true;
$("#select_type_nitice").hide();
$("#homework_editor").show();
$("#join_bank").attr("checked",false);
$("#join_bank_li").hide();