私有课程作业的公开作品
This commit is contained in:
parent
796125bd1c
commit
ed84783f26
|
@ -390,7 +390,7 @@ class StudentWorkController < ApplicationController
|
|||
student_in_group = '(' + group_students.map{|user| user.id}.join(',') + ')'
|
||||
end
|
||||
#开放作品 || 老师 || 超级管理员 || 禁用匿评&&作业截止&&已提交作品 显示所有列表
|
||||
if @homework.is_open == 1 || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.where(:user_id => User.current.id).empty?)
|
||||
if (@homework.is_open == 1 && @course.is_public == 1) || (@homework.is_open == 1 && @course.is_public == 0 && User.current.member_of_course?(@course)) || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.where(:user_id => User.current.id).empty?)
|
||||
if @order == 'lastname'
|
||||
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,student_works.work_score as score").joins(:user).where("users.id in #{student_in_group}").order("CONVERT(lastname USING gbk) COLLATE gbk_chinese_ci #{@b_sort}, login #{@b_sort}"),@name
|
||||
elsif @order == 'student_id'
|
||||
|
@ -456,7 +456,7 @@ class StudentWorkController < ApplicationController
|
|||
|
||||
@student_work_count = (search_homework_member @homework.student_works.select("student_works.*,student_works.work_score as score").joins(:user).where("users.id in #{student_in_group}").order("#{@order} #{@b_sort}"),@name).count
|
||||
else
|
||||
if @homework.is_open == 1 || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.where(:user_id => User.current.id).empty?)
|
||||
if (@homework.is_open == 1 &&@course.is_public == 1) || (@homework.is_open == 1 && @course.is_public == 0 && User.current.member_of_course?(@course)) || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.where(:user_id => User.current.id).empty?)
|
||||
if @order == 'lastname'
|
||||
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,student_works.work_score as score").joins(:user).order("CONVERT(lastname USING gbk) COLLATE gbk_chinese_ci #{@b_sort}, login #{@b_sort}"),@name
|
||||
elsif @order == 'student_id'
|
||||
|
|
|
@ -1,10 +1,20 @@
|
|||
<div id="popbox02">
|
||||
<div class="ni_con">
|
||||
<% if @homework.is_open == 0 %>
|
||||
<% if @homework.is_open == 0 && @homework.course.is_public == 1 %>
|
||||
<h2>公开作品</h2>
|
||||
<p>
|
||||
本次作业的所有作品将对Trustie平台所有注册用户开放,请问是否确定公开作品?
|
||||
</p>
|
||||
<% elsif @homework.is_open == 0 && @homework.course.is_public == 0 %>
|
||||
<h2>公开作品</h2>
|
||||
<p>
|
||||
该作业是私有课程的作业,公开作品后本次作业的所有作品将对课程内的所有学生开放,请问是否确定公开作品?
|
||||
</p>
|
||||
<% elsif @homework.is_open == 1 && @homework.course.is_public == 0 %>
|
||||
<h2>取消公开作品</h2>
|
||||
<p>
|
||||
您将取消“公开作品”的功能,该私有作业的作品将只在作业截止后对已提交作品的学生开放,请问是否确定?
|
||||
</p>
|
||||
<% else %>
|
||||
<h2>取消公开作品</h2>
|
||||
<p>
|
||||
|
|
Loading…
Reference in New Issue