diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 8e08508ed..d8e9a0f62 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -288,6 +288,27 @@ class UsersController < ApplicationController
end
end
+ #处理引用作业的请求
+ #status 1 同意 2 拒绝
+ def dealwith_apply_homework
+ @msg = CourseMessage.find(params[:msg_id])
+ case params[:agree]
+ when 'Y'
+ ah = ApplyHomework.where("user_id = ? and homework_common_id = ?",@msg.apply_user_id, @msg.course_message_id)
+ unless ah.empty?
+ ah.first.update_column('status', 2)
+ CourseMessage.create(:user_id => @msg.apply_user_id, :course_id => @msg.course_id, :viewed => false,:content=> @msg.content,:course_message_id=>@msg.course_message_id,:content=>@msg.content,:course_message_type=>'HomeworkCommon',:status=>5,:apply_result=>1)
+ @msg.update_attributes(:apply_result=>1,:viewed=>1)
+ end
+ when 'N'
+ CourseMessage.create(:user_id => @msg.apply_user_id, :course_id => @msg.course_id, :viewed => false,:content=> @msg.content,:course_message_id=>@msg.course_message_id,:content=>@msg.content,:course_message_type=>'HomeworkCommon',:status=>5,:apply_result=>2)
+ @msg.update_attributes(:apply_result=>2,:viewed=>1)
+ end
+ respond_to do |format|
+ format.js
+ end
+ end
+
# added by bai
def show_score
@@ -372,13 +393,38 @@ class UsersController < ApplicationController
end
# end
+ #申请引用非公开作业
+ def apply_for_homework
+ if User.current.logged?
+ homework = HomeworkCommon.find params[:homework_id]
+ unless homework.nil?
+ ah = ApplyHomework.where("user_id = ? and homework_common_id = ?", User.current.id, params[:homework_id].to_i)
+ if ah.empty?
+ ApplyHomework.create(:user_id => params[:id].to_i, :homework_common_id => params[:homework_id].to_i, :status => 1)
+ Mailer.run.apply_for_homework_request(homework, User.current)
+ CourseMessage.create(:user_id => homework.user_id, :course_id => homework.course.id, :viewed => false,:course_message_id=>params[:homework_id].to_i,:course_message_type=>'HomeworkCommon',:status=>5,:apply_user_id=>params[:id].to_i)
+ @state = 2
+ @ah = ApplyHomework.where("user_id = ? and homework_common_id = ?", params[:id].to_i, params[:homework_id].to_i).first
+ @homework = homework
+ else
+ @state = 3
+ end
+ end
+ else
+ @state = 1
+ end
+ respond_to do |format|
+ format.js
+ end
+ end
+
#用户作业列表
def user_homeworks
@order,@b_sort = params[:order] || "created_at",params[:sort] || "desc"
@user = User.current
@r_sort = @b_sort == "desc" ? "asc" : "desc"
- if(params[:type].blank? || params[:type] == "1") #公共题库
- visible_course = Course.where("is_public = 1 && is_delete = 0")
+ if(params[:type].blank? || params[:type] == "1") #题库
+ visible_course = Course.where("is_delete = 0")
visible_course_ids = visible_course.empty? ? "(-1)" : "(" + visible_course.map{|course| course.id}.join(",") + ")"
@homeworks = HomeworkCommon.where("course_id in #{visible_course_ids} and publish_time <= '#{Date.today}'").order("#{@order} #{@b_sort}")
elsif params[:type] == "2" #我的题库
@@ -424,6 +470,14 @@ class UsersController < ApplicationController
def choose_user_course
homework = HomeworkCommon.find params[:send_id].to_i
+ if homework.course.is_public == 0 && homework.user_id != User.current.id
+ ah = ApplyHomework.where("user_id = ? and homework_common_id = ?", User.current.id, params[:send_id].to_i)
+ if ah.empty?
+ @status = 2
+ elsif ah.first.status == 1
+ @status = 1
+ end
+ end
if !params[:search].nil?
search = "%#{params[:search].to_s.strip.downcase}%"
@course = @user.courses.where("is_delete = 0 and #{Course.table_name}.id != #{homework.course_id} and #{Course.table_name}.id = #{params[:search].to_i } or #{Course.table_name}.name like :p",:p=>search).select { |course| @user.allowed_to?(:as_teacher,course)}
@@ -528,12 +582,18 @@ class UsersController < ApplicationController
@order,@b_sort = params[:order] || "created_at",params[:sort] || "desc"
@r_sort = @b_sort == "desc" ? "asc" : "desc"
@user = User.current
- if(params[:type].blank? || params[:type] == "1") #公共题库
- visible_course = Course.where("is_public = 1 && is_delete = 0")
+ if(params[:type].blank? || params[:type] == "1") #题库
+ visible_course = Course.where("is_delete = 0")
visible_course_ids = visible_course.empty? ? "(-1)" : "(" + visible_course.map{|course| course.id}.join(",") + ")"
@homeworks = HomeworkCommon.where("course_id in #{visible_course_ids} and publish_time <= '#{Date.today}'").order("#{@order} #{@b_sort}")
elsif params[:type] == "2" #我的题库
@homeworks = HomeworkCommon.where("user_id = #{@user.id} and publish_time <= '#{Date.today}'").order("#{@order} #{@b_sort}")
+ elsif params[:type] == "3" #申请题库
+ #apply_homeworks = ApplyHomework.where("user_id = ?",@user.id)
+ #homework_ids = apply_homeworks.empty? ? "(-1)" : "(" + apply_homeworks.map{|ah| ah.homework_common_id}.join(",") + ")"
+ #@homeworks = HomeworkCommon.where("id in #{homework_ids}")
+ sql = "SELECT homework_commons.* FROM homework_commons INNER JOIN apply_homeworks as ah ON homework_commons.id = ah.homework_common_id where ah.user_id = #{@user.id} order by ah.created_at desc"
+ @homeworks = HomeworkCommon.find_by_sql(sql)
end
if params[:property] && params[:property] == "1"
@homeworks = @homeworks.where("homework_type = 1").reorder("#{@order} #{@b_sort}")
@@ -571,8 +631,8 @@ class UsersController < ApplicationController
@user = User.current
search = params[:name].to_s.strip.downcase
type_ids = params[:property]=="" || params[:property].nil? ? "(1, 2, 3)" : "(" + params[:property] + ")"
- if(params[:type].blank? || params[:type] == "1") #全部
- visible_course = Course.where("is_public = 1 && is_delete = 0")
+ if(params[:type].blank? || params[:type] == "1") #全部
+ visible_course = Course.where("is_delete = 0")
visible_course_ids = visible_course.empty? ? "(-1)" : "(" + visible_course.map{|course| course.id}.join(",") + ")"
all_homeworks = HomeworkCommon.where("course_id in #{visible_course_ids} and publish_time <= '#{Date.today}'")
all_user_ids = all_homeworks.map{|hw| hw.user_id}
@@ -586,7 +646,7 @@ class UsersController < ApplicationController
else
@homeworks = HomeworkCommon.where("course_id in #{visible_course_ids} and publish_time <= '#{Date.today}' and homework_type in #{type_ids} and (name like '%#{search}%' or user_id in #{user_ids})").order("#{@order} #{@b_sort}")
end
- elsif params[:type] == "2" #课程资源
+ elsif params[:type] == "2" #我的题库
if @order == "course_name"
sql = "SELECT homework_commons.* FROM homework_commons INNER JOIN courses ON homework_commons.course_id = courses.id where homework_commons.user_id = #{@user.id} and homework_type in #{type_ids} and publish_time <= '#{Date.today}' and (homework_commons.name like '%#{search}%') order by CONVERT (courses.name USING gbk) COLLATE gbk_chinese_ci #{@b_sort}"
@homeworks = HomeworkCommon.find_by_sql(sql)
@@ -595,6 +655,17 @@ class UsersController < ApplicationController
else
@homeworks = HomeworkCommon.where("user_id = #{@user.id} and publish_time <= '#{Date.today}' and (name like '%#{search}%') and homework_type in #{type_ids}").order("#{@order} #{@b_sort}")
end
+ elsif params[:type] == "3" #申请题库
+ apply_homeworks = ApplyHomework.where("user_id = ?",@user.id)
+ homework_ids = apply_homeworks.empty? ? "(-1)" : "(" + apply_homeworks.map{|ah| ah.homework_common_id}.join(",") + ")"
+ if @order == "course_name"
+ sql = "SELECT homework_commons.* FROM homework_commons INNER JOIN courses ON homework_commons.course_id = courses.id where homework_commons.id in #{homework_ids} and homework_type in #{type_ids} and publish_time <= '#{Date.today}' and (homework_commons.name like '%#{search}%') order by CONVERT (courses.name USING gbk) COLLATE gbk_chinese_ci #{@b_sort}"
+ @homeworks = HomeworkCommon.find_by_sql(sql)
+ elsif @order == "user_name"
+ @homeworks = HomeworkCommon.where("homework_commons.id in #{homework_ids} and (name like '%#{search}%') and homework_type in #{type_ids}").joins(:user).order("CONVERT (lastname USING gbk) COLLATE gbk_chinese_ci #{@b_sort}, CONVERT (firstname USING gbk) COLLATE gbk_chinese_ci #{@b_sort},login #{@b_sort}")
+ else
+ @homeworks = HomeworkCommon.where("id in #{homework_ids} and (name like '%#{search}%') and homework_type in #{type_ids}").order("#{@order} #{@b_sort}")
+ end
end
=begin
if params[:property] && params[:property] == "1"
diff --git a/app/models/apply_homework.rb b/app/models/apply_homework.rb
new file mode 100644
index 000000000..c92eccca6
--- /dev/null
+++ b/app/models/apply_homework.rb
@@ -0,0 +1,6 @@
+class ApplyHomework < ActiveRecord::Base
+ #status:1. 待审核 2.审核通过
+ belongs_to :user
+ belongs_to :homework_common
+ attr_accessible :status, :user_id, :homework_common_id
+end
diff --git a/app/models/course_message.rb b/app/models/course_message.rb
index 79d27f3c5..3375aa5ab 100644
--- a/app/models/course_message.rb
+++ b/app/models/course_message.rb
@@ -1,8 +1,9 @@
class CourseMessage < ActiveRecord::Base
# status说明: status在课程不同的类型,区分不同的功能 status = 9 作品的提交记录
# HomeworkCommon:status:
- # nil:发布了作业; 1:作业截止时间到了提醒!;2:开启匿评; 3:关闭匿评; 4:匿评开始失败
- attr_accessible :course_id, :course_message_id, :course_message_type, :user_id, :viewed, :content, :status
+ # nil:发布了作业; 1:作业截止时间到了提醒!;2:开启匿评; 3:关闭匿评; 4:匿评开始失败; 5:申请引用作业
+ # apply_user_id: 申请者的用户id
+ attr_accessible :course_id, :course_message_id, :course_message_type, :user_id, :viewed, :content, :status, :apply_user_id, :apply_result
# 多态 虚拟关联
belongs_to :course_message ,:polymorphic => true
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index 05b0349ec..7f6f5abb9 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -1039,7 +1039,13 @@ class Mailer < ActionMailer::Base
:subject => @subject
end
-
+ def apply_for_homework_request(homework, user)
+ @receive = User.find(homework.user_id)
+ @user = user
+ @subject = "#{@user.show_name} #{l(:label_apply_for_homework)} #{homework.name} "
+ mail :to => @receive.mail,
+ :subject => @subject
+ end
private
diff --git a/app/views/users/_homework_repository.html.erb b/app/views/users/_homework_repository.html.erb
index 1ed8ae688..72211a0d9 100644
--- a/app/views/users/_homework_repository.html.erb
+++ b/app/views/users/_homework_repository.html.erb
@@ -19,7 +19,9 @@
<%= homework.name%>
-
+ <% if homework.course.is_public == 0 %>
+
+ <% end %>
<%=homework.course.name %>(<%=current_time_and_term_short(homework.course) %>)
@@ -35,7 +37,20 @@
<%= homework.user.show_name %>
<%= homework.quotes %>
<%=format_date homework.publish_time %>
- 提交申请
+ <% if homework.course.is_public == 0 && homework.user_id != User.current.id %>
+
+ <% ah = ApplyHomework.where("user_id = ? and homework_common_id = ?", User.current.id, homework.id).first %>
+ <% if ah.nil? %>
+ <%= link_to("提交申请", apply_for_homework_user_path(User.current.id,:homework_id => homework.id), :remote => true) %>
+ <% elsif ah.status == 1 %>
+ 待审核
+ <% elsif ah.status == 2 %>
+ 可引用
+ <% end %>
+
+ <% else %>
+ --
+ <% end %>
<% end %>
\ No newline at end of file
diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb
index ccd329852..cfde9d4bd 100644
--- a/app/views/users/_user_message_course.html.erb
+++ b/app/views/users/_user_message_course.html.erb
@@ -229,7 +229,36 @@
<%= time_tag(ma.created_at).html_safe %>
<% end %>
+ <% if ma.course_message_type == "HomeworkCommon" && ma.status == 5 %>
+
+ <%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %>
+
+ 系统提示
+ ">您有了新的引用作业申请:
+
+
+ " class ='#{ma.viewed==0 ? "newsBlack" : "newsGrey"}'><%=User.find(ma.apply_user_id).show_name+"申请引用作业\""+"#{HomeworkCommon.find(ma.course_message_id).name}"+"\"" %>
+
+
+
+
+
+
+ <% if ma.apply_result == 0 || ma.apply_result.nil?%>
+ <%= link_to '同意',dealwith_apply_homework_user_path(User.current,:agree=>'Y',:msg_id=>ma.id),:remote=>'true'%>
+ |
+ <%= link_to '拒绝',dealwith_apply_homework_user_path(User.current,:agree=>'N',:msg_id=>ma.id),:remote=>'true'%>
+ <% elsif ma.apply_result == 1%>
+ 您已经同意了该申请
+ <% elsif ma.apply_result == 2%>
+ 您已经拒绝了该申请
+ <%end %>
+
+
+ <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
<% if ma.course_message_type == "Poll" %>
<%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
diff --git a/app/views/users/apply_for_homework.js.erb b/app/views/users/apply_for_homework.js.erb
new file mode 100644
index 000000000..69ad56cf3
--- /dev/null
+++ b/app/views/users/apply_for_homework.js.erb
@@ -0,0 +1,8 @@
+<% if @state == 1 %>
+alert("您还未登录");
+<% elsif @state == 2 %>
+alert("申请成功,请等待审核");
+$("#homework_apply_status_<%=@homework.id %>").html("待审核");
+<% elsif @state == 3 %>
+alert("您已经发送过申请了,请耐心等待");
+<% end %>
\ No newline at end of file
diff --git a/app/views/users/choose_user_course.js.erb b/app/views/users/choose_user_course.js.erb
index 64f3708f8..77c8d2522 100644
--- a/app/views/users/choose_user_course.js.erb
+++ b/app/views/users/choose_user_course.js.erb
@@ -1,11 +1,17 @@
-<% if params[:is_observe].nil? %>
-$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/send_homework_to_course', :locals => {:courses => @course, :user => @user, :send_id => @send_id}) %>');
-showModal('ajax-modal', '452px');
-$('#ajax-modal').siblings().remove();
-$('#ajax-modal').before(" ");
-$('#ajax-modal').parent().css("top","50%").css("left","50%");
-$('#ajax-modal').parent().addClass("popbox").addClass("resourceUploadPopup");
-$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
+<% if @status == 1 %>
+ alert("您的申请尚未通过审核,暂时不可发送至课程");
+<% elsif @status == 2 %>
+ alert("该作业是私有的,请先提交申请并通过审核后再发送");
<% else %>
- $("#send_homework_to_course_form").html("<%= escape_javascript(render :partial => 'users/send_homework_to_course_form', :locals => {:courses => @course, :user => @user, :send_id => @send_id}) %>");
+ <% if params[:is_observe].nil? %>
+ $("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/send_homework_to_course', :locals => {:courses => @course, :user => @user, :send_id => @send_id}) %>');
+ showModal('ajax-modal', '452px');
+ $('#ajax-modal').siblings().remove();
+ $('#ajax-modal').before(" ");
+ $('#ajax-modal').parent().css("top","50%").css("left","50%");
+ $('#ajax-modal').parent().addClass("popbox").addClass("resourceUploadPopup");
+ $('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
+ <% else %>
+ $("#send_homework_to_course_form").html("<%= escape_javascript(render :partial => 'users/send_homework_to_course_form', :locals => {:courses => @course, :user => @user, :send_id => @send_id}) %>");
+ <% end %>
<% end %>
\ No newline at end of file
diff --git a/app/views/users/dealwith_apply_homework.js.erb b/app/views/users/dealwith_apply_homework.js.erb
new file mode 100644
index 000000000..0f6f1af61
--- /dev/null
+++ b/app/views/users/dealwith_apply_homework.js.erb
@@ -0,0 +1,11 @@
+$("#deal_info_<%=@msg.id%>").html(
+ <% if @msg.apply_result == 0 || @msg.apply_result.nil?%>
+ <%= link_to '同意',dealwith_apply_request_user_path(User.current,:agree=>'Y',:msg_id=>@msg.id),:remote=>'true'%>
+ '|'
+<%= link_to '拒绝',dealwith_apply_request_user_path(User.current,:agree=>'N',:msg_id=>@msg.id),:remote=>'true'%>
+<% elsif @msg.apply_result == 1%>
+'您已经同意了该申请'
+<% elsif @msg.apply_result == 2%>
+'您已经拒绝了该申请'
+<%end %>
+);
\ No newline at end of file
diff --git a/app/views/users/user_homeworks.html.erb b/app/views/users/user_homeworks.html.erb
index 5eaf61569..93e385070 100644
--- a/app/views/users/user_homeworks.html.erb
+++ b/app/views/users/user_homeworks.html.erb
@@ -36,13 +36,13 @@
- 公共题库
+ 题库
我的题库
- 申请题库
+ 申请题库
diff --git a/config/locales/courses/zh.yml b/config/locales/courses/zh.yml
index b59538bc9..c3d4b0d58 100644
--- a/config/locales/courses/zh.yml
+++ b/config/locales/courses/zh.yml
@@ -28,6 +28,7 @@ zh:
label_course_file: 资源库
label_upload_files: 上传资源
label_apply_join_course: 申请加入课程
+ label_apply_for_homework: 申请引用作业
#
# 课程托管平台主页
#
diff --git a/config/routes.rb b/config/routes.rb
index 9cfb3126d..edfc5b1cc 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -514,6 +514,7 @@ RedmineApp::Application.routes.draw do
match 'user_project_activities', :to => 'users#user_project_activities', :via => :get
match 'user_feedback4show', :to => 'users#user_feedback4show', :via => :get
match 'user_visitorlist', :to => 'users#user_visitorlist', :via => :get
+ match 'apply_for_homework', :to => 'users#apply_for_homework', :via => :get
match 'user_homeworks', :to => 'users#user_homeworks', :via => :get
match 'student_homeworks', :to => 'users#student_homeworks', :via => :get
get 'user_import_homeworks'
@@ -571,6 +572,7 @@ RedmineApp::Application.routes.draw do
get 'user_ref_resource_search'
post 'import_resources_to_homework'
get 'dealwith_apply_request'
+ get 'dealwith_apply_homework'
get 'store_selected_resource'
get 'user_organizations'
get 'search_user_orgs'
diff --git a/db/migrate/20160429015956_create_apply_homeworks.rb b/db/migrate/20160429015956_create_apply_homeworks.rb
new file mode 100644
index 000000000..932604a9d
--- /dev/null
+++ b/db/migrate/20160429015956_create_apply_homeworks.rb
@@ -0,0 +1,13 @@
+class CreateApplyHomeworks < ActiveRecord::Migration
+ def change
+ create_table :apply_homeworks do |t|
+ t.integer :status
+ t.references :user
+ t.references :homework_common
+
+ t.timestamps
+ end
+ add_index :apply_homeworks, :user_id
+ add_index :apply_homeworks, :homework_common_id
+ end
+end
diff --git a/db/migrate/20160429030819_add_column_to_course_messages.rb b/db/migrate/20160429030819_add_column_to_course_messages.rb
new file mode 100644
index 000000000..f3aa1020e
--- /dev/null
+++ b/db/migrate/20160429030819_add_column_to_course_messages.rb
@@ -0,0 +1,6 @@
+class AddColumnToCourseMessages < ActiveRecord::Migration
+ def change
+ add_column :course_messages, :apply_user_id, :integer
+ add_column :course_messages, :apply_result, :integer
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 0ec4fab77..4e44a2638 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 => 20160427061847) do
+ActiveRecord::Schema.define(:version => 20160429030819) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -57,6 +57,17 @@ ActiveRecord::Schema.define(:version => 20160427061847) do
t.integer "user_id", :null => false
end
+ create_table "apply_homeworks", :force => true do |t|
+ t.integer "status"
+ t.integer "user_id"
+ t.integer "homework_common_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "apply_homeworks", ["homework_common_id"], :name => "index_apply_homeworks_on_homework_common_id"
+ add_index "apply_homeworks", ["user_id"], :name => "index_apply_homeworks_on_user_id"
+
create_table "apply_project_masters", :force => true do |t|
t.integer "user_id"
t.string "apply_type"
@@ -476,6 +487,8 @@ ActiveRecord::Schema.define(:version => 20160427061847) do
t.datetime "updated_at", :null => false
t.string "content"
t.integer "status"
+ t.integer "apply_user_id"
+ t.integer "apply_result"
end
add_index "course_messages", ["course_message_type"], :name => "index_course_messages_on_course_message_type"
@@ -1094,6 +1107,23 @@ ActiveRecord::Schema.define(:version => 20160427061847) do
t.integer "viewed_count", :default => 0
end
+ create_table "mess", :id => false, :force => true do |t|
+ t.string "课程名"
+ t.integer "课程ID", :default => 0, :null => false
+ t.string "教师姓", :default => "", :null => false
+ t.string "教师名", :limit => 30, :default => "", :null => false
+ t.string "主贴名", :default => "", :null => false
+ t.integer "主贴或回帖ID", :default => 0, :null => false
+ t.integer "回帖对应主贴ID"
+ t.integer "帖子点赞数"
+ t.integer "主贴回复数", :default => 0, :null => false
+ t.text "主贴或回帖内容"
+ t.datetime "发帖时间", :null => false
+ t.integer "发帖或回帖用户ID", :default => 0, :null => false
+ t.string "发帖或回帖用户姓", :default => "", :null => false
+ t.string "发帖或回帖用户名", :limit => 30, :default => "", :null => false
+ end
+
create_table "message_alls", :force => true do |t|
t.integer "user_id"
t.integer "message_id"
diff --git a/spec/factories/apply_homeworks.rb b/spec/factories/apply_homeworks.rb
new file mode 100644
index 000000000..49ebe229d
--- /dev/null
+++ b/spec/factories/apply_homeworks.rb
@@ -0,0 +1,9 @@
+# Read about factories at https://github.com/thoughtbot/factory_girl
+
+FactoryGirl.define do
+ factory :apply_homework do
+ status 1
+ user nil
+ homework_common nil
+ end
+end
diff --git a/spec/models/apply_homework_spec.rb b/spec/models/apply_homework_spec.rb
new file mode 100644
index 000000000..05106eb88
--- /dev/null
+++ b/spec/models/apply_homework_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe ApplyHomework, :type => :model do
+ pending "add some examples to (or delete) #{__FILE__}"
+end