Merge branch 'Homework' of http://repository.trustie.net/xianbo/trustie2 into Homework
This commit is contained in:
commit
13c3ac8551
|
@ -514,7 +514,7 @@ class BidsController < ApplicationController
|
||||||
(SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id = 3123) AS m_score
|
(SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id = 3123) AS m_score
|
||||||
FROM homework_attaches
|
FROM homework_attaches
|
||||||
INNER JOIN homework_evaluations ON homework_evaluations.homework_attach_id = homework_attaches.id
|
INNER JOIN homework_evaluations ON homework_evaluations.homework_attach_id = homework_attaches.id
|
||||||
WHERE homework_attaches.bid_id = #{@bid.id} AND homework_evaluations.user_id = #{User.current.id}) AS table1
|
WHERE homework_attaches.bid_id = #{@bid.id} AND homework_evaluations.user_id = #{User.current.id} ORDER BY s_score DESC) AS table1
|
||||||
WHERE table1.m_score IS NULL")
|
WHERE table1.m_score IS NULL")
|
||||||
@is_student_batch_homework = true
|
@is_student_batch_homework = true
|
||||||
@cur_type = 4
|
@cur_type = 4
|
||||||
|
@ -1004,7 +1004,10 @@ class BidsController < ApplicationController
|
||||||
# 启动匿评
|
# 启动匿评
|
||||||
def start_anonymous_comment
|
def start_anonymous_comment
|
||||||
@bid = Bid.find(params[:id])
|
@bid = Bid.find(params[:id])
|
||||||
|
if(@bid.comment_status == 0)
|
||||||
homeworks = @bid.homeworks
|
homeworks = @bid.homeworks
|
||||||
|
if(homeworks && homeworks.count >= 4)
|
||||||
|
@bid.update_column('comment_status', 1)
|
||||||
users = homeworks.map { |h| h.user }
|
users = homeworks.map { |h| h.user }
|
||||||
|
|
||||||
@start_index = rand(homeworks.size)
|
@start_index = rand(homeworks.size)
|
||||||
|
@ -1024,7 +1027,14 @@ class BidsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# 修改状态为 '启动匿评'
|
# 修改状态为 '启动匿评'
|
||||||
@bid.update_column('comment_status', 1)
|
#@bid.update_column('comment_status', 1)
|
||||||
|
@statue = 1
|
||||||
|
else
|
||||||
|
@statue = 2
|
||||||
|
end
|
||||||
|
else
|
||||||
|
@statue = 3
|
||||||
|
end
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
|
|
|
@ -21,8 +21,14 @@ class HomeworkAttachController < ApplicationController
|
||||||
|
|
||||||
#获取未批作业列表
|
#获取未批作业列表
|
||||||
def get_not_batch_homework
|
def get_not_batch_homework
|
||||||
sort, direction = params[:sort], params[:direction]
|
sort, direction = params[:sort] || "s_socre", params[:direction] || "desc"
|
||||||
order_by = sort == 'socre'? "s_score #{direction}" : "created_at #{direction}"
|
if sort == 't_socre'
|
||||||
|
order_by = "t_score #{direction}"
|
||||||
|
elsif sort == 's_socre'
|
||||||
|
order_by = "s_score #{direction}"
|
||||||
|
elsif sort == 'time'
|
||||||
|
order_by = "created_at #{direction}"
|
||||||
|
end
|
||||||
teachers = find_course_teachers @course
|
teachers = find_course_teachers @course
|
||||||
all_homework_list = HomeworkAttach.eager_load(:attachments,:user,:rate_averages).find_by_sql("SELECT * FROM (SELECT homework_attaches.*,
|
all_homework_list = HomeworkAttach.eager_load(:attachments,:user,:rate_averages).find_by_sql("SELECT * FROM (SELECT homework_attaches.*,
|
||||||
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id IN #{teachers}) AS t_score,
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id IN #{teachers}) AS t_score,
|
||||||
|
@ -41,9 +47,14 @@ class HomeworkAttachController < ApplicationController
|
||||||
|
|
||||||
#获取已评作业列表
|
#获取已评作业列表
|
||||||
def get_batch_homeworks
|
def get_batch_homeworks
|
||||||
sort, direction = params[:sort], params[:direction]
|
sort, direction = params[:sort] || "s_socre", params[:direction] || "desc"
|
||||||
teacher_proportion = get_teacher_proportion @bid
|
if sort == 't_socre'
|
||||||
order_by = sort == 'socre'? "(CASE WHEN t_score IS NULL THEN 0 ELSE t_score * #{teacher_proportion} END + CASE WHEN s_score IS NULL THEN 0 ELSE s_score * #{1 - teacher_proportion} END) #{direction}" : "created_at #{direction}"
|
order_by = "t_score #{direction}"
|
||||||
|
elsif sort == 's_socre'
|
||||||
|
order_by = "s_score #{direction}"
|
||||||
|
elsif sort == 'time'
|
||||||
|
order_by = "created_at #{direction}"
|
||||||
|
end
|
||||||
teachers = find_course_teachers @course
|
teachers = find_course_teachers @course
|
||||||
all_homework_list = HomeworkAttach.eager_load(:attachments,:user,:rate_averages).find_by_sql("SELECT * FROM (SELECT homework_attaches.*,
|
all_homework_list = HomeworkAttach.eager_load(:attachments,:user,:rate_averages).find_by_sql("SELECT * FROM (SELECT homework_attaches.*,
|
||||||
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id IN #{teachers} and stars IS NOT NULL) AS t_score,
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id IN #{teachers} and stars IS NOT NULL) AS t_score,
|
||||||
|
@ -62,9 +73,14 @@ class HomeworkAttachController < ApplicationController
|
||||||
|
|
||||||
#获取所有作业列表
|
#获取所有作业列表
|
||||||
def get_homeworks
|
def get_homeworks
|
||||||
sort, direction = params[:sort], params[:direction]
|
sort, direction = params[:sort] || "s_socre", params[:direction] || "desc"
|
||||||
teacher_proportion = get_teacher_proportion @bid
|
if sort == 't_socre'
|
||||||
order_by = sort == 'socre'? "(CASE WHEN t_score IS NULL THEN 0 ELSE t_score * #{teacher_proportion} END + CASE WHEN s_score IS NULL THEN 0 ELSE s_score * #{1 - teacher_proportion} END) #{direction}" : "created_at #{direction}"
|
order_by = "t_score #{direction}"
|
||||||
|
elsif sort == 's_socre'
|
||||||
|
order_by = "s_score #{direction}"
|
||||||
|
elsif sort == 'time'
|
||||||
|
order_by = "created_at #{direction}"
|
||||||
|
end
|
||||||
teachers = find_course_teachers @course
|
teachers = find_course_teachers @course
|
||||||
all_homework_list = HomeworkAttach.eager_load(:attachments,:user,:rate_averages).find_by_sql("SELECT homework_attaches.*,
|
all_homework_list = HomeworkAttach.eager_load(:attachments,:user,:rate_averages).find_by_sql("SELECT homework_attaches.*,
|
||||||
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id in #{teachers}) AS t_score,
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id in #{teachers}) AS t_score,
|
||||||
|
@ -90,7 +106,7 @@ class HomeworkAttachController < ApplicationController
|
||||||
(SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id = 3123) AS m_score
|
(SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id = 3123) AS m_score
|
||||||
FROM homework_attaches
|
FROM homework_attaches
|
||||||
INNER JOIN homework_evaluations ON homework_evaluations.homework_attach_id = homework_attaches.id
|
INNER JOIN homework_evaluations ON homework_evaluations.homework_attach_id = homework_attaches.id
|
||||||
WHERE homework_attaches.bid_id = #{@bid.id} AND homework_evaluations.user_id = #{User.current.id}) AS table1
|
WHERE homework_attaches.bid_id = #{@bid.id} AND homework_evaluations.user_id = #{User.current.id} ORDER BY s_score DESC) AS table1
|
||||||
WHERE table1.m_score IS NULL")
|
WHERE table1.m_score IS NULL")
|
||||||
@cur_page = params[:page] || 1
|
@cur_page = params[:page] || 1
|
||||||
@cur_type = 4
|
@cur_type = 4
|
||||||
|
|
|
@ -99,7 +99,7 @@ module WatchersHelper
|
||||||
# 主讲教师不允许退出课程
|
# 主讲教师不允许退出课程
|
||||||
return '' if user.id == course.tea_id || course.is_public == 0
|
return '' if user.id == course.tea_id || course.is_public == 0
|
||||||
joined = user.member_of_course?(course)
|
joined = user.member_of_course?(course)
|
||||||
text = joined ? l(:label_exit_course) : l(:label_join_course)
|
text = joined ? l(:label_exit_course) : l(:label_new_join)
|
||||||
url_t = join_path(:object_id => course.id)
|
url_t = join_path(:object_id => course.id)
|
||||||
url_f = try_join_path(:object_id => course.id)
|
url_f = try_join_path(:object_id => course.id)
|
||||||
method = joined ? 'delete' : 'post'
|
method = joined ? 'delete' : 'post'
|
||||||
|
|
|
@ -37,9 +37,9 @@
|
||||||
<span id="<%=bid.id %>_anonymous_comment">
|
<span id="<%=bid.id %>_anonymous_comment">
|
||||||
<% case bid.comment_status %>
|
<% case bid.comment_status %>
|
||||||
<% when 0 %>
|
<% when 0 %>
|
||||||
<%= link_to '启动匿评', start_anonymous_comment_bid_path(bid), id: "#{bid.id}_start_anonymous_comment", remote: true %>
|
<%= link_to '启动匿评', start_anonymous_comment_bid_path(bid), id: "#{bid.id}_start_anonymous_comment", remote: true, :confirm => "开启匿评后学生将不能对作业进行提交、修改、删除等操作\n是否确定开启匿评?" %>
|
||||||
<% when 1 %>
|
<% when 1 %>
|
||||||
<%= link_to '关闭匿评', stop_anonymous_comment_bid_path(bid), id: "#{bid.id}_stop_anonymous_comment", remote: true %>
|
<%= link_to '关闭匿评', stop_anonymous_comment_bid_path(bid), id: "#{bid.id}_stop_anonymous_comment", remote: true, :confirm => "关闭匿评后学生将不能对作业进行评分\n是否确定关闭匿评?" %>
|
||||||
<% when 2 %>
|
<% when 2 %>
|
||||||
匿评结束
|
匿评结束
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -35,8 +35,10 @@
|
||||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'homework_attach/praise_alert') %>');
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'homework_attach/praise_alert') %>');
|
||||||
showModal('ajax-modal', '480px');
|
showModal('ajax-modal', '480px');
|
||||||
$('#ajax-modal').css('height','240px');
|
$('#ajax-modal').css('height','240px');
|
||||||
$('#ajax-modal').before("<span style='float: right;padding-left: 455px;cursor:pointer;'>" +
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||||
"<a href='#' onclick='hiddent_alert_model();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
"<a href='#' onclick='hiddent_alert_model();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||||
|
$('#ajax-modal').parent().css("top","").css("left","").css("width","511");
|
||||||
|
$('#ajax-modal').parent().addClass("alert_praise");
|
||||||
<% end %>
|
<% end %>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,10 +37,10 @@
|
||||||
<span id="bid_deadline_span">
|
<span id="bid_deadline_span">
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p style="display: none;">
|
||||||
<%= f.select :is_evaluation, is_evaluation_option %>
|
<%= f.select :is_evaluation, is_evaluation_option %>
|
||||||
</p>
|
</p>
|
||||||
<p style="display: none;">
|
<p>
|
||||||
<%= f.select :proportion, proportion_option %>
|
<%= f.select :proportion, proportion_option %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -1,2 +1,8 @@
|
||||||
alert('启动成功')
|
<% if @statue == 1%>
|
||||||
$("#<%= @bid.id %>_start_anonymous_comment").html('<%= link_to "关闭匿评", stop_anonymous_comment_bid_path(@bid), remote: true %>')
|
alert('启动成功');
|
||||||
|
$("#<%= @bid.id %>_start_anonymous_comment").html('<%= link_to "关闭匿评", stop_anonymous_comment_bid_path(@bid), remote: true %>');
|
||||||
|
<% elsif @statue == 2 %>
|
||||||
|
alert('启动失败\n作业总数大于4份时才能启动匿评');
|
||||||
|
<% elsif @statue == 3%>
|
||||||
|
alert("已开启匿评,请务重复开启");
|
||||||
|
<% end %>
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
<% if @bid.comment_status == 1 %>
|
<% if @bid.comment_status == 1 %>
|
||||||
<!-- 处于开启匿评阶段,可以正常评分 -->
|
<!-- 处于开启匿评阶段,可以正常评分 -->
|
||||||
<li class="wping">
|
<li class="wping">
|
||||||
<%= link_to l(:label_work_rating),homework_attach_path(homework,:cur_page => @cur_page,:cur_type => @cur_type),:remote => true %>
|
<%= link_to l(:label_anonymous_comments),homework_attach_path(homework,:cur_page => @cur_page,:cur_type => @cur_type),:remote => true %>
|
||||||
<% if Time.parse(@bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
|
<% if Time.parse(@bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
|
||||||
<span class="c_red"> 迟交!</span>
|
<span class="c_red"> 迟交!</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
<% elsif @bid.comment_status == 2%>
|
<% elsif @bid.comment_status == 2%>
|
||||||
<!-- 处于匿评已关闭阶段,不容许评分 -->
|
<!-- 处于匿评已关闭阶段,不容许评分 -->
|
||||||
<li class="wping" title="关闭匿评后不可继续评分">
|
<li class="wping" title="关闭匿评后不可继续评分">
|
||||||
<a style="color:#8e8e8e;">评分</a>
|
<a style="background:#8e8e8e;"><%= l(:label_anonymous_comments) %></a>
|
||||||
<% if Time.parse(@bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
|
<% if Time.parse(@bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
|
||||||
<span class="c_red"> 迟交!</span>
|
<span class="c_red"> 迟交!</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -9,9 +9,12 @@
|
||||||
(<font color="#CC0000">
|
(<font color="#CC0000">
|
||||||
<%= homework_count%>
|
<%= homework_count%>
|
||||||
</font>)
|
</font>)
|
||||||
</span><span class="fr">
|
</span>
|
||||||
|
<span class="fr">
|
||||||
按
|
按
|
||||||
<%= link_to l(:label_work_rating), sort_homework_path(@bid, 'socre', @direction), {:remote => true}%>
|
<%= link_to l(:label_anonymous_comments), sort_homework_path(@bid, 's_socre', @direction), {:remote => true}%>
|
||||||
|
/
|
||||||
|
<%= link_to l(:label_teacher_score), sort_homework_path(@bid, 't_socre', @direction), {:remote => true}%>
|
||||||
/
|
/
|
||||||
<%= link_to l(:label_time), sort_homework_path(@bid, 'time', @direction), {:remote => true}%>
|
<%= link_to l(:label_time), sort_homework_path(@bid, 'time', @direction), {:remote => true}%>
|
||||||
<%= l(:label_sort) %>
|
<%= l(:label_sort) %>
|
||||||
|
@ -35,11 +38,11 @@
|
||||||
<% if @bid.comment_status == 0 %>
|
<% if @bid.comment_status == 0 %>
|
||||||
<!-- 老师布置的作业在创建和开启匿评这段时间才允许创建作品 -->
|
<!-- 老师布置的作业在创建和开启匿评这段时间才允许创建作品 -->
|
||||||
<li class="wping">
|
<li class="wping">
|
||||||
<%= link_to "创建作业", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %>
|
<%= link_to "提交作业", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %>
|
||||||
</li>
|
</li>
|
||||||
<% else %>
|
<% else %>
|
||||||
<li class="wping">
|
<li class="wping" title="只有开启匿评之前才能创建作业哦!">
|
||||||
<a style="width:80px; margin:20px 0 0 350px;">创建作业</a>
|
<a style="width:80px; margin:20px 0 0 350px;background:#8e8e8e;">提交作业</a>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -14,7 +14,24 @@
|
||||||
}
|
}
|
||||||
function submit_homework_form()
|
function submit_homework_form()
|
||||||
{
|
{
|
||||||
$('#edit_homework_attach_<%= @homework.id%>').submit();
|
if(regexName()){$('#edit_homework_attach_<%= @homework.id%>').submit();}
|
||||||
|
}
|
||||||
|
function regexName()
|
||||||
|
{
|
||||||
|
var name = $("#homework_attach_name").val();
|
||||||
|
|
||||||
|
if(name=="")
|
||||||
|
{
|
||||||
|
$("#homework_attach_name_span").text("名称不能为空");
|
||||||
|
$("#homework_attach_name_span").css('color','#ff0000');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$("#homework_attach_name_span").text("填写正确");
|
||||||
|
$("#homework_attach_name_span").css('color','#008000');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
@ -44,7 +61,8 @@
|
||||||
<%= form_for(@homework) do |f|%>
|
<%= form_for(@homework) do |f|%>
|
||||||
<p>
|
<p>
|
||||||
<label><span class="c_red">*</span> 作品名称 :</label>
|
<label><span class="c_red">*</span> 作品名称 :</label>
|
||||||
<%= f.text_field :name, :required => true, :name => "homework_name", :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称"%>
|
<%= f.text_field :name, :required => true, :name => "homework_name", :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称", :onblur => "regexName();"%>
|
||||||
|
<span id="homework_attach_name_span"></span>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label> 提交项目
|
<label> 提交项目
|
||||||
|
|
|
@ -1,9 +1,24 @@
|
||||||
<%= stylesheet_link_tag 'css', :media => 'all' %>
|
<%= stylesheet_link_tag 'css', :media => 'all' %>
|
||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript" xmlns="http://www.w3.org/1999/html">
|
||||||
function submit_homework_form()
|
function regexName()
|
||||||
{
|
{
|
||||||
$('#new_homework_attach').submit();
|
var name = $("#homework_attach_name").val();
|
||||||
|
|
||||||
|
if(name=="")
|
||||||
|
{
|
||||||
|
$("#homework_attach_name_span").text("名称不能为空");
|
||||||
|
$("#homework_attach_name_span").css('color','#ff0000');
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$("#homework_attach_name_span").text("填写正确");
|
||||||
|
$("#homework_attach_name_span").css('color','#008000');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function submit_homework_form(){if(regexName()){$('#new_homework_attach').submit();}}
|
||||||
</script>
|
</script>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="Newwork">
|
<div class="Newwork">
|
||||||
|
@ -36,7 +51,8 @@
|
||||||
</span>
|
</span>
|
||||||
作品名称 :
|
作品名称 :
|
||||||
</label>
|
</label>
|
||||||
<%= f.text_field "name", :required => true, :size => 60, :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称" %>
|
<%= f.text_field "name", :required => true, :size => 60, :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称", :onblur => "regexName();" %>
|
||||||
|
<span id="homework_attach_name_span"></span>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label> 提交项目
|
<label> 提交项目
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'show',:locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework, :teaher_score => @teaher_score}) %>');
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'show',:locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework, :teaher_score => @teaher_score}) %>');
|
||||||
showModal('ajax-modal', '503px');
|
showModal('ajax-modal', '513px');
|
||||||
$('#ajax-modal').css('height','569px');
|
$('#ajax-modal').css('height','569px');
|
||||||
$('#ajax-modal').siblings().remove();
|
$('#ajax-modal').siblings().remove();
|
||||||
$('#ajax-modal').before("<span style='float: right;padding-left: 455px;cursor:pointer;'>" +
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||||
"<a href='#' onclick='hidden_homework_atert_form("+
|
"<a href='#' onclick='hidden_homework_atert_form("+
|
||||||
<%= @cur_page%> + "," + <%= @cur_type%> +
|
<%= @cur_page%> + "," + <%= @cur_type%> +
|
||||||
");'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
");'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||||
|
$('#ajax-modal').parent().css("top","").css("left","");
|
||||||
|
$('#ajax-modal').parent().addClass("alert_box");
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
<div id="join_in_course">
|
<div id="join_in_course">
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
<% if User.current.allowed_to?(:as_teacher,@course) %>
|
<% if User.current.allowed_to?(:as_teacher,@course) %>
|
||||||
<%= link_to l(:label_course_modify_settings), {:controller => 'courses', :action => 'settings', :id => @course} %>
|
<%= link_to l(:button_configure), {:controller => 'courses', :action => 'settings', :id => @course} %>
|
||||||
<%= render :partial => 'courses/set_course_time', :locals => {:course => @course} %>
|
<%= render :partial => 'courses/set_course_time', :locals => {:course => @course} %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= join_in_course(@course, User.current) %>
|
<%= join_in_course(@course, User.current) %>
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
<td>
|
<td>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="vertical-align: top;font-size: 16px;text-align: center;">
|
<td style="vertical-align: top;font-size: 15px;">
|
||||||
<span style=" word-wrap: break-word; word-break: break-all">
|
<span style=" word-wrap: break-word; word-break: break-all">
|
||||||
<strong>
|
<strong>
|
||||||
<%= link_to course.name.to_s, homework_course_path(course) if course %>
|
<%= link_to course.name.to_s, homework_course_path(course) if course %>
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style=" word-wrap: break-word; word-break: break-all;font-size: 16px;text-align: center">
|
<td style=" word-wrap: break-word; word-break: break-all;font-size: 15px;">
|
||||||
<span style=" color:#ed8924">
|
<span style=" color:#ed8924">
|
||||||
<strong><%=link_to(@bid.name, course_for_bid_path(@bid)) %></strong>
|
<strong><%=link_to(@bid.name, course_for_bid_path(@bid)) %></strong>
|
||||||
</span>
|
</span>
|
||||||
|
@ -101,8 +101,25 @@
|
||||||
|
|
||||||
<div class="inf_user_image">
|
<div class="inf_user_image">
|
||||||
<table>
|
<table>
|
||||||
|
<% if (User.current.admin?||User.current.id==@bid.author_id) %>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" colspan="2" style="font-size: 16px;padding-left: 8px;">
|
<td valign="top" style="padding-left: 8px; font-size: 15px" colspan="2">
|
||||||
|
<span id="<%=@bid.id %>_anonymous_comment">
|
||||||
|
<% case @bid.comment_status %>
|
||||||
|
<% when 0 %>
|
||||||
|
<%= link_to '启动匿评', start_anonymous_comment_bid_path(bid), id: "#{bid.id}_start_anonymous_comment", remote: true, :confirm => "开启匿评后学生将不能对作业进行提交、修改、删除等操作\n是否确定开启匿评?" %>
|
||||||
|
<% when 1 %>
|
||||||
|
<%= link_to '关闭匿评', stop_anonymous_comment_bid_path(bid), id: "#{bid.id}_stop_anonymous_comment", remote: true, :confirm => "关闭匿评后学生将不能对作业进行评分\n是否确定关闭匿评?" %>
|
||||||
|
<% when 2 %>
|
||||||
|
匿评结束
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td valign="top" colspan="2" style="font-size: 15px;padding-left: 8px;">
|
||||||
<strong>
|
<strong>
|
||||||
<%= l(:label_homework_description) %> :
|
<%= l(:label_homework_description) %> :
|
||||||
</strong>
|
</strong>
|
||||||
|
@ -118,7 +135,6 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" style="padding-left: 8px; width:62px;">
|
<td valign="top" style="padding-left: 8px; width:62px;">
|
||||||
<%= l(:label_limit_time) %>:
|
<%= l(:label_limit_time) %>:
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar">
|
<td class="font_lighter_sidebar">
|
||||||
<%= @bid.deadline %>
|
<%= @bid.deadline %>
|
||||||
|
|
|
@ -1886,7 +1886,7 @@ zh:
|
||||||
|
|
||||||
label_bids_task_list: 作业列表
|
label_bids_task_list: 作业列表
|
||||||
label_join_course: 加入课程
|
label_join_course: 加入课程
|
||||||
label_exit_course: 退出课程
|
label_exit_course: 退出
|
||||||
label_new_join: 加入
|
label_new_join: 加入
|
||||||
label_new_course_password: 课程密码
|
label_new_course_password: 课程密码
|
||||||
label_new_course_school: 开课学校
|
label_new_course_school: 开课学校
|
||||||
|
|
|
@ -69,7 +69,7 @@ a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;}
|
||||||
|
|
||||||
|
|
||||||
/****评分弹框****/
|
/****评分弹框****/
|
||||||
|
.alert_box {width:488px;height:550px;position:absolute;z-index:1002;left:50%;top:40%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; padding:5px; overflow:auto; }
|
||||||
.alert .close{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-502px;background:url(images/close.png) no-repeat;cursor:pointer;}
|
.alert .close{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-502px;background:url(images/close.png) no-repeat;cursor:pointer;}
|
||||||
.alert .C{width:476px;height:296px;position:absolute;left:5px;top:5px; }
|
.alert .C{width:476px;height:296px;position:absolute;left:5px;top:5px; }
|
||||||
|
|
||||||
|
@ -143,6 +143,7 @@ a:hover.tijiao{ background:#0f99a9 !important;}
|
||||||
.N_search{ height:20px !important; border:1px solid #999 !important;}
|
.N_search{ height:20px !important; border:1px solid #999 !important;}
|
||||||
|
|
||||||
/* 匿名评分弹框 */
|
/* 匿名评分弹框 */
|
||||||
|
.alert_praise{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;}
|
.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 { width:425px; margin:25px 30px;}
|
||||||
.ni_con h2{ display:block; height:40px; width:188px; margin:0 auto;}
|
.ni_con h2{ display:block; height:40px; width:188px; margin:0 auto;}
|
||||||
|
|
Loading…
Reference in New Issue