Merge branch 'szzh' into dev_hjq

This commit is contained in:
huang 2015-06-26 14:45:42 +08:00
commit 284703c386
13 changed files with 79 additions and 21 deletions

View File

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

View File

@ -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
#判断是不是当前作品的提交者

View File

@ -330,7 +330,7 @@ class CoursesService
def homework_list params,current_user
course = Course.find(params[:id])
if course.is_public != 0 || current_user.member_of_course?(course)
bids = course.homework_commons.page(1).per(3).order('end_time DESC')
bids = course.homework_commons.page(1).per(3).order('created_at DESC')
bids = bids.like(params[:name]) if params[:name].present?
homeworks = []
bids.each do |bid|

View File

@ -5,7 +5,11 @@
<p>
开启匿评后学生将不能对作品进行
<span class="c_blue">修改、删除</span>
等操作,目前有
等操作,开启匿评后的提交作品,将
<span class="c_blue">不能参与匿评</span>
匿评评分将被记为
<span class="c_pink">0分</span>
。目前有
<span class="c_pink"><%= @totle_size%>个</span>
学生,共提交了
<span class="c_pink"><%= @cur_size %></span>

View File

@ -0,0 +1,14 @@
<div id="popbox02">
<div class="ni_con_work">
<p>
当前作业
<span class="c_pink">已开启匿评</span>
您提交作品后将
<span class="c_pink">不会收到任何匿评作品</span>,
您的作品也
<span class="c_pink">不会被其他用户匿评</span>.
如需获得最终成绩,请您联系主讲老师对您的作品单独进行评分
</p>
<a href="javascript:void(0)" class="tijiao" style="margin-left:200px;" onclick="clickCanel()">确定</a>
</div>
</div>

View File

@ -0,0 +1,9 @@
<div id="popbox02">
<div class="ni_con">
<h2><img src="/images/bid/pic_top.jpg" width="188" height="37" alt="匿名评价" /></h2>
<p>&nbsp;&nbsp;&nbsp;&nbsp;据说雷锋做完好事是从来不留名的呢,我们这次评分也不留名!!!但是,但是,您给的分数一定要公正哦,老天爷看不到,我们的系统可是清楚得很!</p>
<p style="margin-bottom:15px;">&nbsp;&nbsp;&nbsp;&nbsp;别怪我没告诉你,系统分配给你的作品不评价可是要扣分的哈!</p>
<a href="javascript:" class="tijiao" style="margin-left:100px;" onclick="clickCanel()">匿名评分</a>
<a href="javascript:" style="color:#15bccf; margin-top:20px; display:block;" onclick="clickCanel()">冒着扣分的危险残忍拒绝</a>
</div>
</div>

View File

@ -1,3 +1,17 @@
<script type="text/javascript">
<% if @homework.homework_type == 1 && @homework.homework_detail_manual.comment_status == 2 && !@is_teacher && @stundet_works.count > 1%>
$(function(){
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/praise_alert') %>');
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("anonymos");
});
<% end%>
</script>
<div class="project_r_h">
<div id="menu_r">
<ul class="menu_r">

View File

@ -1,3 +1,17 @@
<script type="text/javascript">
<%if @homework.homework_type == 1 && @homework.homework_detail_manual.comment_status != 1%>
$(function(){
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/new_student_work_alert') %>');
showModal('ajax-modal', '360px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("anonymos_work");
// alert("当前作业已开启匿评,您提交作品后将不会收到任何匿评作品,您的作品也不会被其他用户匿评,如需获得最终成绩,请您联系主讲老师对您的作品单独进行评分");
});
<% end%>
</script>
<div class="project_r_h">
<h2 class="project_h2">创建作品</h2>
</div>

View File

@ -53,7 +53,7 @@
<%= image_tag(url_to_avatar(e.user), :class => "avatar") %>
</td>
<td>
<table width="580" border="0" class="info-break">
<table border="0" class="info-break" style="width:580px;">
<% case e.act_type %>
<% when 'JournalsForMessage' %>
<tr>
@ -97,7 +97,7 @@
</td>
</tr>
<tr>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description">
<%= textAreailizable act.notes %>
</p>
@ -144,7 +144,7 @@
<% end %>
</tr>
<tr>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description">
<%= textAreailizable act, :description %>
</p></td>
@ -204,7 +204,7 @@
<% else %>
<% desStr= textAreailizable(act, :notes) %>
<% end %>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description">
<%= desStr %>
</p>
@ -259,7 +259,7 @@
<% end %>
</tr>
<tr>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description">
<%= textAreailizable act, :long_comments %>
</p>
@ -320,7 +320,7 @@
<% end %>
</tr>
<tr>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description">
<%= textAreailizable(act, :content) %>
</p>
@ -361,7 +361,7 @@
<% end %>
</tr>
<tr>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description"></p>
</td>
</tr>
@ -404,7 +404,7 @@
<% end %>
</tr>
<tr>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description">
<%= textAreailizable act, :description %>
</p>
@ -446,7 +446,7 @@
</td>
</tr>
<tr>
<td colspan="2" width="580" style="WORD-BREAK: break-all; WORD-WRAP: break-word">
<td colspan="2" class="upload_img" style="max-width:580px;">
<%= textAreailizable act, :description %>
</td>
</tr>
@ -482,7 +482,7 @@
</td>
</tr>
<tr>
<td colspan="2" width="580" style="WORD-BREAK: break-all; WORD-WRAP: break-word">
<td colspan="2" class="upload_img" style="max-width:580px;">
<%= textAreailizable act, :description %>
</td>
</tr>
@ -535,7 +535,7 @@
<% end %>
</tr>
<tr>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description">
<%= textAreailizable act, :description %>
</p>
@ -609,7 +609,7 @@
</td>
</tr>
<tr>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description">
<%= textAreailizable e.notes %>
</p>

View File

@ -1,7 +1,7 @@
<% course_list.map do |course| %>
<li class='<%= cycle("odd", "even") %>' title="<%= course.description.to_s.gsub(/<\/?.*?>/,'') %>" style="min-height: 69px;">
<div class='avatar'>
<%= image_tag(get_course_avatar(course), :class => "avatar-4") %>
<%= image_tag(url_to_avatar(course), :class => "avatar-4") %>
</div>
<!-- 上左下右 -->
<div class='desc_item'>

View File

@ -671,6 +671,8 @@ function edit_student_work(id)
{$("#edit_student_work_" + id).submit();}
}
//
//滑动打分
$.fn.peSlider = function(settings){
//configurable options (none so far)

View File

@ -2795,3 +2795,5 @@ div.repos_explain{
}
.upload_img img{max-width: 100%;}
#activity .upload_img img{max-width: 580px;}
img,embed{max-width: 100%;}

View File

@ -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;}