commit
						6ae28a1bef
					
				| @ -1,3 +1,3 @@ | ||||
| $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>"); | ||||
| $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>"); | ||||
| 
 | ||||
| init_activity_KindEditor_data('<%= @user_activity_id%>',"","87%"); | ||||
|  | ||||
| @ -0,0 +1,6 @@ | ||||
| $('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/alert_forbidden_anonymous', :locals => {:user_activity_id => @user_activity_id,:is_in_course => @is_in_course,:course_activity => @course_activity}) %>'); | ||||
| 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","30%").css("left","30%").css("position","fixed"); | ||||
| @ -1,3 +1,3 @@ | ||||
| $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_issue', :locals => {:activity => @issue,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>"); | ||||
| $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_issue', :locals => {:activity => @issue,:user_activity_id =>@user_activity_id}) %>"); | ||||
| 
 | ||||
| init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%"); | ||||
| @ -1,6 +1,6 @@ | ||||
| <%if @project%> | ||||
|     $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>"); | ||||
|     $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>"); | ||||
| <%elsif @course%> | ||||
|     $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>"); | ||||
|     $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>"); | ||||
| <%end%> | ||||
| init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%"); | ||||
| @ -0,0 +1,16 @@ | ||||
| <div id="popbox02"> | ||||
|   <div class="ni_con"> | ||||
|     <h2>禁用匿评</h2> | ||||
|     <p> | ||||
|       禁用匿评后学生将不能对作品进行互评,且匿评不能再开启,是否确定禁用匿评? | ||||
|     </p> | ||||
|     <div class="ni_btn"> | ||||
|       <a href="javascript:" class="tijiao" onclick="clickOK('<%= forbidden_anonymous_comment_student_work_path(:homework=>@homework, :user_activity_id => user_activity_id, :course_activity => course_activity)%>');" style="margin-bottom: 20px;" > | ||||
|         确  定 | ||||
|       </a> | ||||
|       <a href="javascript:" class="tijiao" onclick="clickCanel();" style="margin-bottom: 20px;"> | ||||
|         取  消 | ||||
|       </a> | ||||
|     </div> | ||||
|   </div> | ||||
| </div> | ||||
| @ -0,0 +1,7 @@ | ||||
| <% if @user_activity_id == -1 %> | ||||
| $("#homework_common_<%= @homework.id %>").replaceWith("<%= escape_javascript(render :partial => "users/user_homework_detail",:locals => {:homework_common => @homework, :is_in_course => @is_in_course})%>"); | ||||
| init_activity_KindEditor_data(<%= @homework.id%>,"","87%"); | ||||
| <% else %> | ||||
| $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id,:course_activity=>@course_activity}) %>"); | ||||
| init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%"); | ||||
| <% end %> | ||||
| @ -0,0 +1,5 @@ | ||||
| class AddAnonymousCommentToHomeworkCommon < ActiveRecord::Migration | ||||
|   def change | ||||
|     add_column :homework_commons, :anonymous_comment, :integer, :default => 0 | ||||
|   end | ||||
| end | ||||
| @ -1,22 +1,11 @@ | ||||
| #coding=utf-8 | ||||
| 
 | ||||
| namespace :rep_fault do | ||||
|   desc "update fault rep" | ||||
|   desc "set ossean's type value" | ||||
|   task :rep_update => :environment do | ||||
|     Project.all.each do |project| | ||||
|       if project.repositories.count > 0 | ||||
|         unless Repository.where("project_id =? and type = ?",project, "Repository::Gitlab").blank? | ||||
|           project.repositories.each do |repository| | ||||
|             repository.update_attributes(:is_default => false) | ||||
|           end | ||||
|         end | ||||
|       end | ||||
|     end | ||||
|     rep = Repository.find(400) | ||||
|     rep.type = "Repository::Gitlab" | ||||
|     rep.save | ||||
|   end | ||||
| 
 | ||||
|   desc "update ossean's data" | ||||
|   task :update_type => :environment do | ||||
|     repository = Repository.find(400) | ||||
|     repository.update_attributes(:type => "Repository::Git") | ||||
|   end | ||||
| end | ||||
					Loading…
					
					
				
		Reference in new issue