diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 3136c5838..8f48d3857 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -715,13 +715,14 @@ class BidsController < ApplicationController def update @bid = Bid.find(params[:id]) + @project = @bid.courses.first if @bid.update_attributes(params[:bid]) flash[:notice] = l(:label_update_homework_succeed) - @project = Project.find(params[:course_id]) + #@project = Project.find(params[:course_id]) redirect_to project_homework_path(@project) else @bid.safe_attributes = params[:bid] - render :action => 'edit' + render :action => 'edit', :layout =>'base_courses' ,:bid_id=>@bid.id,:project_id =>@project end end diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index bddf9d0d4..a42a626dc 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -32,7 +32,7 @@ module ProjectsHelper {:name => 'categories', :action => :manage_categories, :partial => 'projects/settings/issue_categories', :label => :label_issue_category_plural}, # {:name => 'wiki', :action => :manage_wiki, :partial => 'projects/settings/wiki', :label => :label_wiki}, {:name => 'repositories', :action => :manage_repository, :partial => 'projects/settings/repositories', :label => :label_repository_plural}, - {:name => 'boards', :action => :manage_boards, :partial => 'projects/settings/boards', :label => :label_board_plural}, + #{:name => 'boards', :action => :manage_boards, :partial => 'projects/settings/boards', :label => :label_board_plural}, {:name => 'activities', :action => :manage_project_activities, :partial => 'projects/settings/activities', :label => :enumeration_activities} ] tabs.select {|tab| User.current.allowed_to?(tab[:action], @project)} @@ -145,7 +145,7 @@ module ProjectsHelper #Added by young def course_settings_tabs tabs = [{:name => 'info', :action => :edit_project, :partial => 'projects/edit', :label => :label_information_plural, :course=>'1'}, - {:name => 'boards', :action => :manage_boards, :partial => 'projects/settings/boards', :label => :label_board_plural, :project_type => 1}, + #{:name => 'boards', :action => :manage_boards, :partial => 'projects/settings/boards', :label => :label_board_plural, :project_type => 1}, # {:name => 'repositories', :action => :manage_repository, :partial => 'projects/settings/repositories', :label => :label_repository_plural}, {:name => 'members', :action => :manage_members, :partial => 'projects/settings/members', :label => :label_member_plural} ] diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb index 005f53710..eef2401f8 100644 --- a/app/views/welcome/course.html.erb +++ b/app/views/welcome/course.html.erb @@ -60,7 +60,7 @@

新开课程

- <% if(find_miracle_course(10, 7,params[:school_id]).map.count == 0) %> + <% if(find_miracle_course(10, 7,params[:school_id]).count == 0) %> <%= link_to "更多>>", {:controller => 'projects', :action => 'course', :project_type => 1, :school_id => nil} %>