From 088854f7df3e8b2164ae66799b7e79339c33461d Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 25 Jun 2015 14:53:33 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=8F=AF=E8=AE=BF=E9=97=AE=E5=85=AC=E5=BC=80=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E7=9A=84=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_common_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index d5e62127d..5cd55e23b 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -206,7 +206,7 @@ class HomeworkCommonController < ApplicationController #当前用户是不是课程的成员 def member_of_course - render_403 unless User.current.member_of_course?(@course) || User.current.admin? + render_403 unless @course.is_public || User.current.member_of_course?(@course) || User.current.admin? end def get_assigned_homeworks(student_works, n, index) From 7efe628e73cc1eb4b6ec9c488d7ab6cf7ef5fc39 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 25 Jun 2015 14:56:53 +0800 Subject: [PATCH 02/13] =?UTF-8?q?admin=E5=8F=AF=E4=BB=A5=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E4=BD=9C=E5=93=81=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 2693eea82..e695a6fb0 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -284,7 +284,7 @@ class StudentWorkController < ApplicationController #是不是当前课程的成员 #当前课程成员才可以看到作品列表 def member_of_course - render_403 unless User.current.member_of_course? @course || User.current.admin? + render_403 unless User.current.member_of_course?(@course) || User.current.admin? end #判断是不是当前作品的提交者 From ebeeb9cf2892201da3cd5952dfb8bdf88cf21ba6 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 25 Jun 2015 15:55:57 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E5=BC=80=E5=90=AF=E5=8C=BF=E8=AF=84?= =?UTF-8?q?=E5=90=8E=E5=AD=A6=E7=94=9F=E6=8F=90=E4=BA=A4=E4=BD=9C=E5=93=81?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=EF=BC=8C=E5=BC=80=E5=90=AF=E5=8C=BF=E8=AF=84?= =?UTF-8?q?=E6=97=B6=E5=AF=B9=E8=80=81=E5=B8=88=E7=9A=84=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=20=E7=95=8C=E9=9D=A2css?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/homework_common/_alert_anonyoms.html.erb | 4 +++- .../student_work/_new_student_work_alert.html.erb | 14 ++++++++++++++ app/views/student_work/_praise_alert.html.erb | 9 +++++++++ app/views/student_work/new.html.erb | 14 ++++++++++++++ public/javascripts/course.js | 2 ++ public/stylesheets/courses.css | 7 +++---- 6 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 app/views/student_work/_new_student_work_alert.html.erb create mode 100644 app/views/student_work/_praise_alert.html.erb diff --git a/app/views/homework_common/_alert_anonyoms.html.erb b/app/views/homework_common/_alert_anonyoms.html.erb index 3b199e0d8..13fcf6469 100644 --- a/app/views/homework_common/_alert_anonyoms.html.erb +++ b/app/views/homework_common/_alert_anonyoms.html.erb @@ -5,7 +5,9 @@
开启匿评后学生将不能对作品进行 修改、删除 - 等操作,目前有 + 等操作,开启匿评后的提交作品,该学生及该学生提交的作业 + 不能参与匿评。 + 目前有 <%= @totle_size%>个 学生,共提交了 <%= @cur_size %> diff --git a/app/views/student_work/_new_student_work_alert.html.erb b/app/views/student_work/_new_student_work_alert.html.erb new file mode 100644 index 000000000..8e0c8a954 --- /dev/null +++ b/app/views/student_work/_new_student_work_alert.html.erb @@ -0,0 +1,14 @@ +
+ 当前作业 + 已开启匿评 + 您提交作品后将 + 不会收到任何匿评作品, + 您的作品也 + 不会被其他用户匿评. + 如需获得最终成绩,请您联系主讲老师对您的作品单独进行评分 +
+ 确定 +据说雷锋做完好事是从来不留名的呢,我们这次评分也不留名!!!但是,但是,您给的分数一定要公正哦,老天爷看不到,我们的系统可是清楚得很!
+别怪我没告诉你,系统分配给你的作品不评价可是要扣分的哈!
+ 匿名评分 + 冒着扣分的危险残忍拒绝 +开启匿评后学生将不能对作品进行 修改、删除 - 等操作,开启匿评后的提交作品,该学生及该学生提交的作业 - 不能参与匿评。 - 目前有 + 等操作,开启匿评后的提交作品,将 + 不能参与匿评, + 匿评评分将被记为 + 0分 + 。目前有 <%= @totle_size%>个 学生,共提交了 <%= @cur_size %> diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index 38fcb78c9..015fb8e48 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -1,3 +1,17 @@ + +