<% files_count = @course.attachments.count %>
- <% @course.versions.each do |version| %>
- <% files_count += version.attachments.count %>
- <% end %>
@@ -188,7 +185,7 @@
- <% if @course.description.size>0 %>
+ <% if @course.description && @course.description.size>0 %>
<% end %>
- <%= l(:label_create_time) %>:<%= format_time(@course.created_on) %>
+ <%= l(:label_create_time) %>:<%= format_time(@course.created_at) %>
@@ -210,7 +207,7 @@
diff --git a/app/views/tags/_tag_name.html.erb b/app/views/tags/_tag_name.html.erb
index dad5d53f..0b94264d 100644
--- a/app/views/tags/_tag_name.html.erb
+++ b/app/views/tags/_tag_name.html.erb
@@ -7,7 +7,7 @@
// });
// })
-
+
<% @tags = obj.reload.tag_list %>
<% if non_list_all and (@tags.size > 0) %>
@@ -70,6 +70,7 @@
:taggable_id => obj.id, :taggable_type => object_flag %>
<% end %>
+
<% when '6' %>
<% if (User.current.logged? &&
User.current.admin?
@@ -86,6 +87,12 @@
:taggable_id => obj.id, :taggable_type => object_flag %>
<% end %>
+ <% when '9' %>
+
+ <% if (CourseInfo.find_by_course_id(obj.id)).try(:user_id) == User.current.id %>
+ <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
+ :taggable_id => obj.id, :taggable_type => object_flag %>
+ <% end %>
<% end %>
diff --git a/config/routes.rb b/config/routes.rb
index 7074965f..3057955a 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -550,9 +550,16 @@ RedmineApp::Application.routes.draw do
get 'settings(/:tab)', :action => 'settings', :as => 'settings'
get 'homework', :action => 'homework', :as => 'homework'
get 'new_homework', :action => 'new_homework', :as => 'new_homework'
+ get 'file', :action => 'file', :as => 'file'
post 'finishcourse'
post 'restartcourse'
- end
+ end
+
+ resources :files, :only => [:index, :new, :create] do
+ collection do
+ match "getattachtype" , via: [:get, :post]
+ end
+ end
end
match '/courses/search', :controller => 'courses', :action => 'search', :via => [:get, :post]
#match 'project/enterprise_course', :to => 'projects#enterprise_course'
diff --git a/db/migrate/20140605025303_migrate_course_tags.rb b/db/migrate/20140605025303_migrate_course_tags.rb
new file mode 100644
index 00000000..17f93d40
--- /dev/null
+++ b/db/migrate/20140605025303_migrate_course_tags.rb
@@ -0,0 +1,16 @@
+class MigrateCourseTags < ActiveRecord::Migration
+ def self.up
+ # 原课程的标签数据迁移成新模式
+ taggings = ActsAsTaggableOn::Tagging.find_all_by_taggable_type('Project')
+ taggings.each do |tagging|
+ project = Project.find_by_id(tagging.taggable_id)
+ if project && project.project_type == 1
+ tagging.taggable_type= 'Course'
+ tagging.save
+ end
+ end
+ end
+
+ def self.down
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index d559d41f..f642770a 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20140605025302) do
+ActiveRecord::Schema.define(:version => 20140605025303) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
From 0255a61d2f4d1dba0a1904c50cab613c07e6129d Mon Sep 17 00:00:00 2001
From: wanglinchun
Date: Thu, 5 Jun 2014 15:23:58 +0800
Subject: [PATCH 082/420] dfg
---
app/helpers/application_helper.rb | 7 +++++++
app/views/contestnotifications/index.api.rsb | 14 ++++++++++++++
app/views/contestnotifications/show.html.erb | 14 +++++++-------
3 files changed, 28 insertions(+), 7 deletions(-)
create mode 100644 app/views/contestnotifications/index.api.rsb
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index fd1f6f16..f558f1e7 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -46,6 +46,10 @@ module ApplicationHelper
def authorize_for(controller, action)
User.current.allowed_to?({:controller => controller, :action => action}, @project)
end
+
+ def authorize_for_contest(controller, action)
+ User.current.allowed_to?({:controller => controller, :action => action}, @contest)
+ end
# Display a link if user is authorized
#
@@ -57,6 +61,9 @@ module ApplicationHelper
link_to(name, options, html_options, *parameters_for_method_reference) if authorize_for(options[:controller] || params[:controller], options[:action])
end
+ def link_to_if_authorized_contest(name, options = {}, html_options = nil, *parameters_for_method_reference)
+ link_to(name, options, html_options, *parameters_for_method_reference) if authorize_for_contest(options[:controller] || params[:controller], options[:action])
+ end
# Displays a link to user's account page if active
def link_to_user(user, options={})
if user.is_a?(User)
diff --git a/app/views/contestnotifications/index.api.rsb b/app/views/contestnotifications/index.api.rsb
new file mode 100644
index 00000000..6509d291
--- /dev/null
+++ b/app/views/contestnotifications/index.api.rsb
@@ -0,0 +1,14 @@
+api.array :contestnotifications, api_meta(:total_count => @contestnotifications_count, :offset => @offset, :limit => @limit) do
+ @contestnotificationss.each do |contestnotifications|
+ api.contestnotifications do
+ api.id contestnotifications.id
+ api.contest(:id => contestnotifications.contest_id, :name => contestnotifications.contest.name) unless contestnotifications.contest.nil?
+ api.author(:id => contestnotifications.author_id, :name => contestnotifications.author.name) unless contestnotifications.author.nil?
+
+ api.title contestnotifications.title
+ api.summary contestnotifications.summary
+ api.description contestnotifications.description
+ api.created_at contestnotifications.created_at
+ end
+ end
+end
diff --git a/app/views/contestnotifications/show.html.erb b/app/views/contestnotifications/show.html.erb
index bd4c8a4f..ead40aef 100644
--- a/app/views/contestnotifications/show.html.erb
+++ b/app/views/contestnotifications/show.html.erb
@@ -38,23 +38,23 @@
<%= watcher_link(@contestnotifications, User.current) %>
<%= link_to(l(:button_edit),
- edit_news_path(@news),
+ edit_contest_contestnotification_path(@contestnotifications),
:class => 'icon icon-edit',
:accesskey => accesskey(:edit),
- :onclick => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_contestnotification, @contest) %>
- <%= delete_link news_path(@contestnotifications) if User.current.allowed_to?(:manage_contestnotification, @contest) %>
+ :onclick => '$("#edit-contestnotifications").show(); return false;') if User.current.allowed_to?(:manage_contestnotifications, @contest) %>
+ <%= delete_link contest_contestnotification_path(@contestnotifications) if User.current.allowed_to?(:manage_contestnotifications, @contest) %>
<%=h @contestnotifications.title %>
-<% if authorize_for('contestnotifications', 'edit') %>
-
- <%= labelled_form_for :contestnotifications, @contestnotifications, :url => contestnotifications_path(@contestnotifications),
+<% if authorize_for_contest('contestnotifications', 'edit') %>
+
+ <%= labelled_form_for :contestnotifications, @contestnotifications, :url => contest_contestnotification_path(@contestnotifications),
:html => { :id => 'contestnotifications-form', :multipart => true, :method => :put } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<%= preview_link preview_contestnotifications_path(:contest_id => @contest, :id => @contestnotifications), 'contestnotifications-form',target='preview',{:class => ''} %> |
- <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %>
+ <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-contestnotifications").hide(); return false;' %>
<% end %>
From c1f9f389b7470145b92382579dedfae961adf714 Mon Sep 17 00:00:00 2001
From: nwb
Date: Thu, 5 Jun 2014 15:42:49 +0800
Subject: [PATCH 083/420] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B?=
=?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=E8=A7=86=E5=9B=BE=EF=BC=8C=E4=BB=8E?=
=?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=B8=AD=E5=88=86=E7=A6=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/courses_controller.rb | 89 ++++++----------------
app/views/courses/feedback.html.erb | 102 ++++++++++++++++++++++++++
config/routes.rb | 4 +-
3 files changed, 129 insertions(+), 66 deletions(-)
create mode 100644 app/views/courses/feedback.html.erb
diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb
index 7fd5518c..a4774517 100644
--- a/app/controllers/courses_controller.rb
+++ b/app/controllers/courses_controller.rb
@@ -387,6 +387,30 @@ class CoursesController < ApplicationController
end
end
+ def feedback
+ page = params[:page]
+ # Find the page of the requested reply
+ @jours = @course.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
+ @limit = 10
+ if params[:r] && page.nil?
+ offset = @jours.count(:conditions => ["#{JournalsForMessage.table_name}.id > ?", params[:r].to_i])
+ page = 1 + offset / @limit
+ end
+
+ @feedback_count = @jours.count
+ @feedback_pages = Paginator.new @feedback_count, @limit, page
+ @offset ||= @feedback_pages.offset
+ @jour = @jours[@offset, @limit]
+ @state = false
+ @base_courses_tag = @course.course_type
+ respond_to do |format|
+ format.html{render :layout => 'base_courses' if @base_courses_tag==1}
+ format.api
+ end
+ end
+
+
+
private
def allow_join
@@ -405,72 +429,7 @@ class CoursesController < ApplicationController
end
- def index1
- per_page_option = 10
-
- #当前所有的活动课程
- @courses_all = Course.active.visible.
- joins("LEFT JOIN #{CourseStatus.table_name} ON #{Course.table_name}.id = #{CourseStatus.table_name}.couse_id")
-
- @course_count = @courses_all.count
- @course_pages = Paginator.new @course_count, per_page_option, params['page']
-
-#gcm activity count
-
- @course_activity_count=Hash.new
-
- @courses_all.each do |course|
- @course_activity_count[course.id]=0
- end
-
- @course_activity_count=get_course_activity @courses_all, @course_activity_count
-
-#gcm end
-
- case params[:course_sort_type]
- when '0'
- @courses = @courses_all.order("created_on desc")
- @s_type = 0
- when '1'
- @courses = @courses_all.order("grade desc")
- @s_type = 1
- when '2'
- @courses = @courses_all.order("watchers_count desc")
- @s_type = 2
-
- #gcm
- when '3'
- #@courses=desc_sort_course_by_avtivity(@course_activity_count_array,@course_all_array)
- @courses=handle_course @courses_all, @course_activity_count
- @s_type = 3
- @courses = @courses[@course_pages.offset, @course_pages.per_page]
-
- else
- @courses = @courses = @courses_all.order("grade desc")
- @s_type = 1
- end
- @courses = @courses.offset(@course_pages.offset).limit(@course_pages.per_page)
-
- respond_to do |format|
- format.html {
- render :layout => 'base'
- # scope = Project
- # unless params[:closed]
- # scope = scope.active
- # end
- }
- format.api {
- # @offset, @limit = api_offset_and_limit
- # @course_count = Project.visible.count
- # @courses = Project.visible.offset(@offset).limit(@limit).order('lft').all
- }
- format.atom {
- courses = Project.visible.order('created_on DESC').limit(Setting.feeds_limit.to_i).all
- render_feed(courses, :title => "#{Setting.app_title}: #{l(:label_course_latest)}")
- }
- end
- end
end
\ No newline at end of file
diff --git a/app/views/courses/feedback.html.erb b/app/views/courses/feedback.html.erb
new file mode 100644
index 00000000..90803fdd
--- /dev/null
+++ b/app/views/courses/feedback.html.erb
@@ -0,0 +1,102 @@
+
+
+<% reply_allow = JournalsForMessage.create_by_user? User.current %>
+
+<%= l(:label_user_response) %>
+
+<% if !User.current.logged?%>
+
+ <%= l(:label_user_login_tips) %>
+ <%= link_to l(:label_user_login_new), signin_path %>
+
+
+<% else %>
+
+ <%= form_for('new_form', :method => :post,
+ :url => {:controller => 'words', :action => 'leave_course_message'}) do |f|%>
+ <%= f.text_area 'course_message', :rows => 3, :cols => 65,
+ :placeholder => "#{l(:label_welcome_my_respond)}",
+ :style => "resize: none; width: 98%",
+ :class => 'noline'%>
+ <%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-right: 1%; margin-top: 1px;"%>
+ <% end %>
+
+<% end %>
+
+<% if @jour.size >0 %>
+
+ <% for journal in @jour%>
+ -
+ <%= image_tag(url_to_avatar(journal.user), :class => "avatar") %>
+
+ <%= link_to journal.user, user_path(journal.user)%>
+ <%= textilizable journal.notes%>
+ <%= l :label_update_time %>: <%= format_time journal.created_on %>
+ <% id = 'course_respond_form_'+journal.id.to_s%>
+
+ <% if reply_allow %>
+ <%= link_to l(:label_projects_feedback_respond),'#',
+ {:focus => 'course_respond',
+ :onclick => "toggleAndSettingWordsVal($('##{id}'),
+ $('##{id} textarea'),
+ '#{l(:label_reply_plural)} #{journal.user.name}: ');
+ return false;"} %>
+ <% end %>
+
+
+
+ <% if reply_allow %>
+
+ <%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
+
+ <% end %>
+
+
+ <%= render :partial => "words/journal_reply", :locals => {:journal => journal } %>
+
+
+ <% end %>
+
+<% end %>
+
+
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 3057955a..52acdb65 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -554,13 +554,15 @@ RedmineApp::Application.routes.draw do
post 'finishcourse'
post 'restartcourse'
end
-
+ resources :boards
resources :files, :only => [:index, :new, :create] do
collection do
match "getattachtype" , via: [:get, :post]
end
end
+
end
+ match 'courses/:id/feedback', :to => 'courses#feedback', :via => :get, :as => 'course_feedback'
match '/courses/search', :controller => 'courses', :action => 'search', :via => [:get, :post]
#match 'project/enterprise_course', :to => 'projects#enterprise_course'
#match 'project/course_enterprise', :to => 'projects#course_enterprise'
From 00b1a40345493703bd48ce71f43e9bf4ec9e2950 Mon Sep 17 00:00:00 2001
From: wanglinchun
Date: Thu, 5 Jun 2014 15:45:17 +0800
Subject: [PATCH 084/420] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E7=AB=9E?=
=?UTF-8?q?=E8=B5=9B=E9=80=9A=E7=9F=A5=E5=8F=8A=E8=AF=84=E8=AE=BA=E7=9B=B8?=
=?UTF-8?q?=E5=85=B3=E6=96=87=E4=BB=B6=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/contestnotifications_controller.rb | 14 +++++++-------
app/models/contestnotification.rb | 6 +++---
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/app/controllers/contestnotifications_controller.rb b/app/controllers/contestnotifications_controller.rb
index 8aea1a6c..6a1ff23d 100644
--- a/app/controllers/contestnotifications_controller.rb
+++ b/app/controllers/contestnotifications_controller.rb
@@ -65,7 +65,7 @@ class ContestnotificationsController < ApplicationController
# GET /contestnotifications/1
# GET /contestnotifications/1.json
def show
- # @contestnotification = Contestnotification.find(params[:id])
+ @contestnotification = Contestnotification.find(params[:id])
#
# respond_to do |format|
# format.html # show.html.erb
@@ -136,12 +136,12 @@ class ContestnotificationsController < ApplicationController
# format.json { render json: @contestnotification.errors, status: :unprocessable_entity }
# end
# end
- @contestnotifications.safe_attributes = params[:contestnotifications]
- @contestnotifications.save_attachments(params[:attachments])
- if @contestnotifications.save
- render_attachment_warning_if_needed(@contestnotifications)
+ @contestnotification.safe_attributes = params[:contestnotification]
+ @contestnotification.save_attachments(params[:attachments])
+ if @contestnotification.save
+ render_attachment_warning_if_needed(@contestnotification)
flash[:notice] = l(:notice_successful_update)
- redirect_to contestnotification_path(@contestnotifications)
+ redirect_to contest_contestnotification_path(@contestnotification)
else
render :action => 'edit'
end
@@ -158,7 +158,7 @@ class ContestnotificationsController < ApplicationController
# format.json { head :no_content }
# end
@contestnotifications.destroy
- redirect_to contest_contestnotification_index_path(@contest)
+ redirect_to contest_contestnotifications_path(@contest)
end
private
diff --git a/app/models/contestnotification.rb b/app/models/contestnotification.rb
index 2f09e7f9..f245e7ad 100644
--- a/app/models/contestnotification.rb
+++ b/app/models/contestnotification.rb
@@ -41,18 +41,18 @@ class Contestnotification < ActiveRecord::Base
end
def recipients
- contest.users.select {|user| user.notify_about?(self)}.map(&:mail)
+ #contest.users.select {|user| user.notify_about?(self)}.map(&:mail)
end
# returns latest news for contests visible by user
def self.latest(user = User.current, count = 5)
- visible(user).includes([:author, :contest]).order("#{Contestnotifications.table_name}.created_at DESC").limit(count).all
+ visible(user).includes([:author, :contest]).order("#{Contestnotification.table_name}.created_at DESC").limit(count).all
end
private
def add_author_as_watcher
- Watcher.create(:watchable => self, :user => author)
+ #Watcher.create(:watchable => self, :user => author)
end
## fq
def act_as_activity
From 8e2288a362824a6ce38a6ac7c98fbd8116139fed Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Thu, 5 Jun 2014 15:57:40 +0800
Subject: [PATCH 085/420] =?UTF-8?q?1.=E5=B0=81=E8=A3=85=E8=8E=B7=E5=8F=96?=
=?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=B9=B3=E5=9D=87=E8=AF=84=E5=88=86=E6=96=B9?=
=?UTF-8?q?=E6=B3=95=202.=E4=BC=98=E5=8C=96=E4=BD=9C=E4=B8=9A=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E7=95=8C=E9=9D=A2=E6=95=88=E7=8E=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/bids_controller.rb | 2 +-
app/helpers/courses_helper.rb | 11 +++++++++++
app/views/bids/_homework_list.html.erb | 19 ++-----------------
app/views/layouts/base_homework.html.erb | 16 ++++++++--------
4 files changed, 22 insertions(+), 26 deletions(-)
diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb
index c0df0699..92322560 100644
--- a/app/controllers/bids_controller.rb
+++ b/app/controllers/bids_controller.rb
@@ -412,7 +412,7 @@ class BidsController < ApplicationController
#增加作业按评分排序,
@homework_list = HomeworkAttach.find_by_sql("SELECT homework_attaches.*,
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id) AS score
- FROM homework_attaches WHERE bid_id = #{@bid.id} ORDER BY score DESC")
+ FROM homework_attaches WHERE bid_id = #{@bid.id} ORDER BY score DESC",:include => [:attachments])
if params[:student_id].present?
@temp = []
@homework_list.each do |pro|
diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb
index fb0a269e..326ea873 100644
--- a/app/helpers/courses_helper.rb
+++ b/app/helpers/courses_helper.rb
@@ -168,4 +168,15 @@ module CoursesHelper
seem_count = homework.rates(:quality).where("rater_id = ?",User.current).count
seem_count > 0
end
+
+ #获取指定作业的平均评分
+ def homework_score homework
+ stars_reates = homework.rates(:quality)
+ sum = 0
+ stars_reates.each do |star_reates|
+ sum = sum + star_reates.stars
+ end
+ stars_reates_count = stars_reates.count == 0 ? 1 : stars_reates.count
+ format("%.2f", sum * 1.0 / stars_reates_count)
+ end
end
diff --git a/app/views/bids/_homework_list.html.erb b/app/views/bids/_homework_list.html.erb
index 48f1c150..a7d65ea4 100644
--- a/app/views/bids/_homework_list.html.erb
+++ b/app/views/bids/_homework_list.html.erb
@@ -43,14 +43,6 @@
<% else %>
<% homework_filename = attachment.filename %>
<% end %>
-
<% end %>
<% else %>
<% homework_filename = homework.name %>
@@ -83,13 +75,7 @@
|
作业评分:
- <% stars_reates = homework.rates(:quality) %>
- <% sum = 0 %>
- <% stars_reates.each do |star_reates| %>
- <% sum = sum + star_reates.stars %>
- <% end %>
- <% stars_reates_count = stars_reates.count == 0 ? 1 : stars_reates.count %>
- <%= format("%.2f", sum * 1.0 / stars_reates_count) %>
+ <%= homework_score homework %>
|
<% if Time.parse(@bid.deadline.to_s) < Time.parse(homework.created_at.to_s) %>
@@ -104,8 +90,7 @@
<% end %>
|
- <% if (User.current == homework.user) || (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? &&
- (Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',3,7, 9)).size >0) %>
+ <% if (User.current == homework.user) || is_teacher %>
<%= link_to l(:button_edit), edit_homework_attach_path(homework) %>
<%= link_to(l(:label_bid_respond_delete), homework,
method: :delete, :confirm => l(:text_are_you_sure)) %>
diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb
index 81a8b086..62c7d482 100644
--- a/app/views/layouts/base_homework.html.erb
+++ b/app/views/layouts/base_homework.html.erb
@@ -22,27 +22,27 @@
<% course = Course.find_by_extra(project.identifier) %>
-
- <%= render :partial => 'layouts/base_header'%>
+
+ <%= render :partial => 'layouts/base_header'%>
-
+
高校课程实践社区 |
<%= l(:label_user_location) %> : |
-
+
<%= link_to request.host()+"/courses", :controller => 'projects', :action => 'course'%> |
- <%=link_to "主页", home_path %> > <%=link_to l(:label_course_practice), :controller => 'projects', :action => 'course' %> >
- <%= link_to(@bid.courses.first.name.to_s, homework_project_path(@bid.courses.first)) if @bid.courses.first%> >
+ | <%=link_to "主页", home_path %> > <%=link_to l(:label_course_practice), :controller => 'projects', :action => 'course' %> >
+ <%= link_to(@bid.courses.first.name.to_s, homework_project_path(@bid.courses.first)) if @bid.courses.first%> >
<%=link_to(@bid.name, respond_path(@bid)) %> |
-
+ |