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 @@ +

+
+

+ 当前作业 + 已开启匿评 + 您提交作品后将 + 不会收到任何匿评作品, + 您的作品也 + 不会被其他用户匿评. + 如需获得最终成绩,请您联系主讲老师对您的作品单独进行评分 +

+ 确定 +
+
diff --git a/app/views/student_work/_praise_alert.html.erb b/app/views/student_work/_praise_alert.html.erb new file mode 100644 index 000000000..293bcab13 --- /dev/null +++ b/app/views/student_work/_praise_alert.html.erb @@ -0,0 +1,9 @@ +
+
+

匿名评价

+

    据说雷锋做完好事是从来不留名的呢,我们这次评分也不留名!!!但是,但是,您给的分数一定要公正哦,老天爷看不到,我们的系统可是清楚得很!

+

    别怪我没告诉你,系统分配给你的作品不评价可是要扣分的哈!

+ 匿名评分 + 冒着扣分的危险残忍拒绝 +
+
diff --git a/app/views/student_work/new.html.erb b/app/views/student_work/new.html.erb index 7d685131f..1b82ac31b 100644 --- a/app/views/student_work/new.html.erb +++ b/app/views/student_work/new.html.erb @@ -1,3 +1,17 @@ +

创建作品

diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 8f87767ed..50dc89de8 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -671,6 +671,8 @@ function edit_student_work(id) {$("#edit_student_work_" + id).submit();} } +// + //滑动打分 $.fn.peSlider = function(settings){ //configurable options (none so far) diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index bb5baedd6..0bd28bea7 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -278,14 +278,11 @@ a:hover.member_btn{ background:#329cbd;} /* 匿名评分弹框 */ /*.popbox02{width:480px;height:200px;position:absolute;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}*/ .alert .close02{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-490px;background:url(images/close.png) no-repeat;cursor:pointer;} -.ni_con { width:425px; margin:25px 30px;} -.ni_con h2{ display:block; height:40px; width:188px; margin:0 auto;} -.ni_con p{ color:#808181;} -.ni_con a:hover{ text-decoration:none;} a.xls{ margin-left:5px; color:#136b3b;} /* 开启匿评弹框 */ .anonymos{width:480px;height:180px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;} +.anonymos_work {position:fixed !important;left:60%;top:60%;margin:-215px 0 0 -300px; box-shadow:0px 0px 8px #194a81; overflow:auto;} .ni_con { width:425px; margin:25px 30px;} .ni_con h2{ display:block; height:40px; width:425px; text-align:center; color:#3a3a3a;} .ni_con p{ color:#808181; } @@ -294,6 +291,8 @@ a.xls{ margin-left:5px; color:#136b3b;} a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#15bccf; text-align:center; padding-top:4px; float:left; margin-right:15px;} a:hover.tijiao{ background:#0f99a9;} .c_pink{ color:#e65d5e;} +.ni_con_work { width:300px; margin:25px 20px;} +.ni_con_work p{ color:#808181; } /* 学生列表*/ .st_list{ width:670px;} From 620fd4230ea88cfd1d6484adf91bf3ae323e37c0 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 25 Jun 2015 16:06:32 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E5=BC=80=E5=90=AF=E5=8C=BF=E8=AF=84?= =?UTF-8?q?=E5=90=8E=E5=AF=B9=E5=B7=B2=E5=88=86=E9=85=8D=E5=88=B0=E5=8C=BF?= =?UTF-8?q?=E8=AF=84=E4=BD=9C=E5=93=81=E7=9A=84=E5=AD=A6=E7=94=9F=E7=9A=84?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/homework_common/_alert_anonyoms.html.erb | 8 +++++--- app/views/student_work/index.html.erb | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/app/views/homework_common/_alert_anonyoms.html.erb b/app/views/homework_common/_alert_anonyoms.html.erb index 13fcf6469..73f240b02 100644 --- a/app/views/homework_common/_alert_anonyoms.html.erb +++ b/app/views/homework_common/_alert_anonyoms.html.erb @@ -5,9 +5,11 @@

开启匿评后学生将不能对作品进行 修改、删除 - 等操作,开启匿评后的提交作品,该学生及该学生提交的作业 - 不能参与匿评。 - 目前有 + 等操作,开启匿评后的提交作品,将 + 不能参与匿评, + 匿评评分将被记为 + 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 @@ + +