Merge branch 'cxt_course' into develop

This commit is contained in:
cxt 2016-09-09 15:55:54 +08:00
commit bc2e9f2231
49 changed files with 507 additions and 473 deletions

View File

@ -50,10 +50,10 @@ gem 'elasticsearch-model'
gem 'elasticsearch-rails'
#rails 3.2.22.2 bug
# gem "test-unit", "~>3.0"
gem "test-unit", "~>3.0"
### profile
# gem 'oneapm_rpm'
gem 'oneapm_rpm'
group :development do
gem 'grape-swagger'

View File

@ -1691,9 +1691,12 @@ class UsersController < ApplicationController
when "current_user"
container_type = 'Principal'
act_type = 'Principal'
when "all"
container_type = 'all'
act_type = 'all'
end
end
if container_type != '' && act_type != ''
if container_type != '' && container_type != 'all'
if container_type == 'Course'
sql = "container_type = '#{container_type}' and container_id in #{user_course_ids} and act_type = '#{act_type}'"
elsif container_type == 'Project'
@ -1709,69 +1712,19 @@ class UsersController < ApplicationController
else
if User.current != @user
blog_ids = "("+@user.blog.id.to_s+")"
sql = "user_id = #{@user.id} and((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
"or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
"or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " +
"or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids}))"
else
blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")"
sql = "(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
"or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
"or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " +
"or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})"
end
sql = "(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
"or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
"or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " +
"or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})"
if container_type != 'all' && User.current != @user
sql = "user_id = #{@user.id} and(" + sql + ")"
end
end
@user_activities = UserActivity.where("#{sql}").order('updated_at desc').limit(10).offset(@page * 10)
# if params[:type].present?
# case params[:type]
# when "course_homework"
# @user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'HomeworkCommon'").order('updated_at desc').limit(10).offset(@page * 10)
# when "course_news"
# @user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'News'").order('updated_at desc').limit(10).offset(@page * 10)
# when "course_message"
# @user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'Message'").order('updated_at desc').limit(10).offset(@page * 10)
# when "course_poll"
# @user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'Poll'").order('updated_at desc').limit(10).offset(@page * 10)
# when "course_journals"
# @user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'JournalsForMessage'").order('updated_at desc').limit(10).offset(@page * 10)
# when "project_issue"
# @user_activities = UserActivity.where("container_type = 'Project' and container_id in #{user_project_ids} and act_type = 'Issue'").order('updated_at desc').limit(10).offset(@page * 10)
# when "project_message"
# @user_activities = UserActivity.where("container_type = 'Project' and container_id in #{user_project_ids} and act_type = 'Message'").order('updated_at desc').limit(10).offset(@page * 10)
# when "user_journals"
# @user_activities = UserActivity.where("container_type = 'Principal' and act_type= 'JournalsForMessage' and container_id = #{@user.id}").order('updated_at desc').limit(10).offset(@page * 10)
# when "current_user"
# @user_activities = UserActivity.where("user_id = #{@user.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}))").order('updated_at desc').limit(10).offset(@page * 10)
# else
# if @user == User.current
# blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")"
# else
# blog_ids = "("+@user.blog.id.to_s+")"
# end
# @user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
# "or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
# "or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " +
# "or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})").order('updated_at desc').limit(10).offset(@page * 10)
# end
# else
# # @user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types})or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id})").order('updated_at desc').limit(10).offset(@page * 10)
# # blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")"
# # 减少数据库交互
# if @user == User.current
# watched_user_ids = User.watched_by(@user.id).count == 0 ? " " : ("," + User.watched_by(@user.id).map{|u| u.id.to_s }.join(','))
# user_ids = "(" + @user.id.to_s + watched_user_ids + ")"
# else
# user_ids = "(" + @user.id.to_s + ")"
# end
# watched_user_blog_ids = Blog.select("id").where("author_id in #{user_ids}")
# blog_ids = watched_user_blog_ids.empty? ? "(-1)" : "(" + watched_user_blog_ids.map { |blog| blog.id}.join(",") + ")"
#
# @user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
# "or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
# "or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " +
# "or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})").order('updated_at desc').limit(10).offset(@page * 10)
# end
# @user_activities = paginateHelper @user_activities,500
@type = params[:type]
respond_to do |format|
format.js

View File

@ -3420,6 +3420,43 @@ def get_hw_index(hw,is_teacher)
return index
end
def get_hw_status homework_common
str = ""
if homework_common.homework_detail_manual
if homework_common.homework_detail_manual.comment_status == 0 && homework_common.publish_time.nil?
str += '<span class="grey_homework_btn_cir ml5">挂起</span>'
elsif homework_common.homework_detail_manual.comment_status == 0
str += '<span class="grey_homework_btn_cir ml5">未发布</span>'
elsif homework_common.homework_detail_manual.comment_status == 1
if homework_common.anonymous_comment == 0
str += '<span class="grey_homework_btn_cir ml5">未开启匿评</span>'
else
str += '<span class="grey_homework_btn_cir ml5">匿评已禁用</span>'
end
if Time.parse(homework_common.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
str += '<span class="green_homework_btn_cir ml5">作品提交中</span>'
elsif Time.parse(homework_common.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d")
str += '<span class="red_homework_btn_cir ml5">作品补交中</span>'
end
elsif homework_common.homework_detail_manual.comment_status == 2
if homework_common.anonymous_comment == 0
str += '<span class="green_homework_btn_cir ml5">匿评中</span>'
else
str += '<span class="grey_homework_btn_cir ml5">匿评已禁用</span>'
end
str += '<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>'
elsif homework_common.homework_detail_manual.comment_status == 3
if homework_common.anonymous_comment == 0
str += '<span class="grey_homework_btn_cir ml5">匿评已结束</span>'
else
str += '<span class="grey_homework_btn_cir ml5">匿评已禁用</span>'
end
str += '<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>'
end
end
str
end
def get_group_member_names work
result = ""
unless work.nil?

View File

@ -162,17 +162,17 @@ module UsersHelper
end
def current_time_and_term_resource course
str = ""
str = course.syllabus.title + "<span class='fb'> · </span>"
term = cur_course_term_resource
name = course.name
if (course.time == course.end_time && course.term == course.end_term) || (course.end_term.nil? && course.end_time.nil?) || course.time > Time.now.year
str = name + "(" + course.time.to_s + course.term.to_s + ")"
str = str + name + "(" + course.time.to_s + course.term.to_s + ")"
elsif course.time == Time.now.year && set_term_value(cur_course_term) <= set_term_value(course.term)
str = name + "(" + course.time.to_s + course.term.to_s + ")"
str = str + name + "(" + course.time.to_s + course.term.to_s + ")"
elsif course.end_time < Time.now.year || (course.end_time == Time.now.year && set_term_value(cur_course_term) >= set_term_value(course.term))
str = name + "(" + course.end_time.to_s + course.end_term.to_s + ")"
str = str + name + "(" + course.end_time.to_s + course.end_term.to_s + ")"
else
str = name + "(" + Time.now.year.to_s + cur_course_term_resource.to_s + ")"
str = str + name + "(" + Time.now.year.to_s + cur_course_term_resource.to_s + ")"
end
str
end

View File

@ -58,7 +58,7 @@
<%= format_date(syllabus.created_at) %>
</td>
</tr>
<% courses = syllabus.courses %>
<% courses = syllabus.courses.not_deleted %>
<% courses.each do |course| %>
<tr class="even">
<td style="text-align: center;">

View File

@ -1,193 +1,192 @@
<style type="text/css">
div.talk_new .ke-container{margin-left:2px;}
.break_word {width:100%;}
</style>
<script type="text/javascript">
//头部导航
var menuids=["TopUserNav"] //Enter id(s) of SuckerTree UL menus, separated by commas
function buildsubmenus(){
for (var i=0; i<menuids.length; i++){
var div = document.getElementById(menuids[i]);
if(div == undefined)continue;
var ultags=div.getElementsByTagName("ul");
for (var t=0; t<ultags.length; t++){
ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle";
ultags[t].parentNode.onmouseover=function(){
this.getElementsByTagName("ul")[0].style.display="block";
}
ultags[t].parentNode.onmouseout=function(){
this.getElementsByTagName("ul")[0].style.display="none";
}
}
}
}
if (window.addEventListener)
window.addEventListener("load", buildsubmenus, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus)
</script>
<%= import_ke(enable_at: false, prettify: false) %>
<%= render :partial => 'blogs/article_list', :locals => {:blog=>@user.blog,:topics => @topics, :page => 0, :user => @user} %>
<script type="text/javascript">//侧导航
function nh_check_field(params){
var result=true;
if(params.subject!=undefined){
if($.trim(params.subject.val()) == ""){
params.subjectmsg.html('主题不能为空');
params.subjectmsg.css({color:'#ff0000'});
result=false;
}else{
params.subjectmsg.html('填写正确');
params.subjectmsg.css({color:'#008000'});
}
params.subjectmsg.show();
}
if(params.content!=undefined){
if(params.content.isEmpty()){
result=false;
}
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
params.textarea.html(params.content.html());
params.content.sync(); //用上面那句ie11提交到服务器居然木有值
if(params.content.isEmpty()){
params.contentmsg.html('内容不能为空');
params.contentmsg.css({color:'#ff0000'});
}else{
params.contentmsg.html('填写正确');
params.contentmsg.css({color:'#008000'});
}
params.contentmsg.show();
}
}
return result;
}
function nh_init_board(params){
//发帖/编辑/回复按钮的click
params.showbtn.click(function(){
params.textarea.removeAttr('placeholder');
if(params.textarea.data('init') == undefined){
//初始化编辑器
var editor = params.kindutil.create(params.textarea, {
// allowPreviewEmoticons : false,
// allowImageUpload : false,
autoHeightMode : true,
resizeType : 1,minWidth:"1px",width:"560px",height:"150px",
allowFileManager:true,uploadJson:"/kindeditor/upload",
fileManagerJson:"/kindeditor/filemanager",
afterChange:function(){//按键事件
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
// var edit = this.edit;
// var body = edit.doc.body;
// edit.iframe.height(minHeight);
// this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) + 30, minHeight));
},
afterCreate:function(){
this.loadPlugin("autoheight");
var userAgent = navigator.userAgent.toLowerCase();
if(/trident/.test(userAgent)){
$("div.talk_new .ke-container").css({'margin-left':'0px'});
}
// var toolbar = $("div[class='ke-toolbar']",params.about_talk);
// $(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
// params.toolbar_container.append(toolbar);
}
}).loadPlugin('paste');
//主题输入框按键事件
params.inputsubject.keyup(function(){
nh_check_field({subject:params.inputsubject,subjectmsg:params.subjectmsg});
})
//表单提交
params.form.submit(function(){
var is_checked = nh_check_field({
issubmit:true,
subject:params.inputsubject,
subjectmsg:params.subjectmsg,
content:editor,
contentmsg:params.contentmsg,
textarea:params.textarea
});
if(is_checked){
//return true 居然不提交 fuck your sister
$(this)[0].submit();
// return true;
}
return false;
});
//提交按钮click
params.submitbtn.click(function(){
params.form.submit();
});
//取消按钮click
params.cancelbtn.click(function(){
params.about_talk.toggle();//显示/隐藏编辑区
if(params.about_talk.is(':hidden')){//隐藏时reset表单数据
params.form[0].reset();
if(params.type=='reply'){
params.textarea.empty();
}else{
params.textarea.html(params.init_content_val.val());
}
var str = params.textarea.html();
str=str.replace(new RegExp(/&lt;/g),'<');
str=str.replace(new RegExp(/&gt;/g),'>');
editor.html(str);
params.subjectmsg.hide();
params.contentmsg.hide();
if(params.quote_show!=undefined)params.quote_show.empty();
if(params.quote_input!=undefined)params.quote_input.empty();
}else{
if(params.type=='reply'){
params.textarea.show();
params.textarea.focus();
params.textarea.hide();
//params.jumphref.attr('href','#'+params.form.attr('id'));
//params.jumphref[0].click();
}else{
params.textarea.show();
params.textarea.focus();
params.textarea.hide();
// params.inputsubject.focus();
}
}
});
params.textarea.data('init','1');//标记为已经初始化
}
params.cancelbtn.click();//显示/隐藏编辑区
});
if(params.type == 'reply'){
params.showbtn_child.click(function(){
if(params.textarea.data('init') == undefined){
params.showbtn.click();
}else{
params.cancelbtn.click();
if(params.about_talk.is(':hidden')){
params.cancelbtn.click();
}
}
var parent_topic_id = $(this).data('topic-id');
if(parent_topic_id!=undefined)$("input[name='parent_topic']",params.form).val(parent_topic_id);
var ref_str = params.get_ref_str_call($(this));
params.quote_show.html(ref_str);
params.quote_input.html(ref_str);
});
}
}
</script>
<script type="text/javascript">
$(function(){
setTimeout(function(){
elocalStorage(message_content_editor,'blog_<%=User.current.id %>');
}, 10000);
});
</script>
<style type="text/css">
div.talk_new .ke-container{margin-left:2px;}
</style>
<script type="text/javascript">
//头部导航
var menuids=["TopUserNav"] //Enter id(s) of SuckerTree UL menus, separated by commas
function buildsubmenus(){
for (var i=0; i<menuids.length; i++){
var div = document.getElementById(menuids[i]);
if(div == undefined)continue;
var ultags=div.getElementsByTagName("ul");
for (var t=0; t<ultags.length; t++){
ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle";
ultags[t].parentNode.onmouseover=function(){
this.getElementsByTagName("ul")[0].style.display="block";
}
ultags[t].parentNode.onmouseout=function(){
this.getElementsByTagName("ul")[0].style.display="none";
}
}
}
}
if (window.addEventListener)
window.addEventListener("load", buildsubmenus, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus)
</script>
<%= import_ke(enable_at: false, prettify: false) %>
<%= render :partial => 'blogs/article_list', :locals => {:blog=>@user.blog,:topics => @topics, :page => 0, :user => @user} %>
<script type="text/javascript">//侧导航
function nh_check_field(params){
var result=true;
if(params.subject!=undefined){
if($.trim(params.subject.val()) == ""){
params.subjectmsg.html('主题不能为空');
params.subjectmsg.css({color:'#ff0000'});
result=false;
}else{
params.subjectmsg.html('填写正确');
params.subjectmsg.css({color:'#008000'});
}
params.subjectmsg.show();
}
if(params.content!=undefined){
if(params.content.isEmpty()){
result=false;
}
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
params.textarea.html(params.content.html());
params.content.sync(); //用上面那句ie11提交到服务器居然木有值
if(params.content.isEmpty()){
params.contentmsg.html('内容不能为空');
params.contentmsg.css({color:'#ff0000'});
}else{
params.contentmsg.html('填写正确');
params.contentmsg.css({color:'#008000'});
}
params.contentmsg.show();
}
}
return result;
}
function nh_init_board(params){
//发帖/编辑/回复按钮的click
params.showbtn.click(function(){
params.textarea.removeAttr('placeholder');
if(params.textarea.data('init') == undefined){
//初始化编辑器
var editor = params.kindutil.create(params.textarea, {
// allowPreviewEmoticons : false,
// allowImageUpload : false,
autoHeightMode : true,
resizeType : 1,minWidth:"1px",width:"560px",height:"150px",
allowFileManager:true,uploadJson:"/kindeditor/upload",
fileManagerJson:"/kindeditor/filemanager",
afterChange:function(){//按键事件
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
// var edit = this.edit;
// var body = edit.doc.body;
// edit.iframe.height(minHeight);
// this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) + 30, minHeight));
},
afterCreate:function(){
this.loadPlugin("autoheight");
var userAgent = navigator.userAgent.toLowerCase();
if(/trident/.test(userAgent)){
$("div.talk_new .ke-container").css({'margin-left':'0px'});
}
// var toolbar = $("div[class='ke-toolbar']",params.about_talk);
// $(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
// params.toolbar_container.append(toolbar);
}
}).loadPlugin('paste');
//主题输入框按键事件
params.inputsubject.keyup(function(){
nh_check_field({subject:params.inputsubject,subjectmsg:params.subjectmsg});
})
//表单提交
params.form.submit(function(){
var is_checked = nh_check_field({
issubmit:true,
subject:params.inputsubject,
subjectmsg:params.subjectmsg,
content:editor,
contentmsg:params.contentmsg,
textarea:params.textarea
});
if(is_checked){
//return true 居然不提交 fuck your sister
$(this)[0].submit();
// return true;
}
return false;
});
//提交按钮click
params.submitbtn.click(function(){
params.form.submit();
});
//取消按钮click
params.cancelbtn.click(function(){
params.about_talk.toggle();//显示/隐藏编辑区
if(params.about_talk.is(':hidden')){//隐藏时reset表单数据
params.form[0].reset();
if(params.type=='reply'){
params.textarea.empty();
}else{
params.textarea.html(params.init_content_val.val());
}
var str = params.textarea.html();
str=str.replace(new RegExp(/&lt;/g),'<');
str=str.replace(new RegExp(/&gt;/g),'>');
editor.html(str);
params.subjectmsg.hide();
params.contentmsg.hide();
if(params.quote_show!=undefined)params.quote_show.empty();
if(params.quote_input!=undefined)params.quote_input.empty();
}else{
if(params.type=='reply'){
params.textarea.show();
params.textarea.focus();
params.textarea.hide();
//params.jumphref.attr('href','#'+params.form.attr('id'));
//params.jumphref[0].click();
}else{
params.textarea.show();
params.textarea.focus();
params.textarea.hide();
// params.inputsubject.focus();
}
}
});
params.textarea.data('init','1');//标记为已经初始化
}
params.cancelbtn.click();//显示/隐藏编辑区
});
if(params.type == 'reply'){
params.showbtn_child.click(function(){
if(params.textarea.data('init') == undefined){
params.showbtn.click();
}else{
params.cancelbtn.click();
if(params.about_talk.is(':hidden')){
params.cancelbtn.click();
}
}
var parent_topic_id = $(this).data('topic-id');
if(parent_topic_id!=undefined)$("input[name='parent_topic']",params.form).val(parent_topic_id);
var ref_str = params.get_ref_str_call($(this));
params.quote_show.html(ref_str);
params.quote_input.html(ref_str);
});
}
}
</script>
<script type="text/javascript">
$(function(){
setTimeout(function(){
elocalStorage(message_content_editor,'blog_<%=User.current.id %>');
}, 10000);
});
</script>

View File

@ -1,7 +1,6 @@
<style type="text/css">
div.talk_new .ke-container{margin-left:2px;}
.break_word {width:100%;}
</style>
<script type="text/javascript">
//头部导航

View File

@ -54,7 +54,7 @@
<li class="ml45 mb10">
<label><span class="c_red">*</span>&nbsp;<%= l(:label_tags_syllabus_name)%>&nbsp;&nbsp;</label>
<%= select_tag :syllabus_id,options_for_select(course_syllabus_option,@course.syllabus_id), {:id=>"new_syllabus_id", :class=>"syllabus_input"} %>
<span class="c_red" id="new_syllabus_notice">如果列表中没有对应的课程,请您先<%=link_to '创建课程', new_syllabus_path(),:target => '_blank', :class => 'ml5 green_btn_share c_white'%></span>
<span class="c_red" id="new_syllabus_notice">如果列表中没有对应的课程,请您先<%=link_to '创建课程', new_syllabus_path(),:target => '_blank', :class => 'ml5 green_btn_share c_white'%>,然后【刷新】</span>
</li>
<li class="ml45">
<label><span class="c_red">*</span>&nbsp;<%= l(:label_tags_course_name)%>&nbsp;&nbsp;</label>

View File

@ -4,7 +4,12 @@
<% exc_course.each_with_index do |e_course, i| %>
<li>
<span class="sy_sq_orange fl mr5 mt5"><%= i+1 %></span>
<%=link_to e_course.name, course_path(e_course.id), :class => "sy_class_ltitle fl mb10" %>
<div class="fl" style="width:185px;">
<%= link_to e_course.syllabus.title, syllabus_path(e_course.syllabus_id), :target => '_blank', :class => "sy_class_ltitle"%>
&nbsp;<font class="fb c_grey">·</font>&nbsp;
<%=link_to e_course.name, course_path(e_course.id), :class => "sy_class_ltitle mb10" %>
</div>
<div class="cl"></div>
<p class="sy_cgrey ml20">
<% homework_count = e_course.homework_commons.where("publish_time <= '#{Date.today}'").count %>
<% if homework_count > 0 %>

View File

@ -45,9 +45,13 @@
<%= link_to( "", new_exercise_path(:course_id => @course.id), :class => 'sy_class_add', :title =>"新建试卷") if is_teacher %>
</li>
<% end %>
<% if (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin? %>
<li>
<%=link_to "分班", course_member_path(@course, :role => 2) %>
</li>
<% end %>
<% if show_nav?(0) %>
<li>
<a href="<%=statistics_course_course_path(@course) %>">统计</a>
<!--<a href="javascript:void(0);" class="sy_class_add"></a>-->
</li>
<% end %>

View File

@ -8,7 +8,7 @@
<label><span class="c_red">*</span>&nbsp;<%= l(:label_tags_syllabus_name)%>&nbsp;&nbsp;</label>
<% if @syllabus.nil? %>
<%= select_tag :syllabus_id,options_for_select(course_syllabus_option,@course.syllabus_id), {:id=>"new_syllabus_id", :class=>"syllabus_input"} %>
<span class="c_red" id="new_syllabus_notice">如果列表中没有对应的课程,请您先<%=link_to '创建课程', new_syllabus_path(),:target => '_blank', :class => 'ml5 green_btn_share c_white'%></span>
<span class="c_red" id="new_syllabus_notice">如果列表中没有对应的课程,请您先<%=link_to '创建课程', new_syllabus_path(),:target => '_blank', :class => 'ml5 green_btn_share c_white'%>,然后【刷新】</span>
<% else %>
<span><%=@syllabus.title %></span>
<input style="display: none;" name="syllabus_id" value="<%=@syllabus.id %>" />
@ -21,6 +21,8 @@
<span class="c_red" id="new_course_name_notice" style="display: none;">班级名称不能为空且至少有两个字符</span>
</li>
<div class="cl"></div>
<li class="ml125 mb5 fontGrey3"><span class="success-icon mr25">正确示例计算机系2016秋季A班</span></li>
<li class="ml125 mb10 fontGrey3"><span class="error-icon">错误示例:软件工程 - 计算机系2016秋季A班</span></li>
<li class="ml45">
<label><span class="c_red">*</span>&nbsp;<%= l(:label_class_period)%>&nbsp;&nbsp;</label>
<input type="text" name="class_period" id="new_class_period" class="hwork_input02" onkeyup="regex_course_class_period('new');" placeholder="例如54" maxlength="6">
@ -73,7 +75,7 @@
<span class="c_grey">(选中后允许学生上传班级资源,否则不允许)</span>
<div class="cl"></div>
</li>
<li class=" ml90" >
<li class=" ml30" >
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_new_course();" >提交</a>
<%= link_to "取消",user_activities_path(User.current.id),:class => "grey_btn fl c_white ml10"%>
<div class="cl"></div>

View File

@ -32,8 +32,8 @@
</li>
<li class="ml45 mb10">
<label><span class="c_red">*</span>&nbsp;<%= l(:label_tags_syllabus_name)%>&nbsp;&nbsp;</label>
<%= select_tag :syllabus_id,options_for_select(course_syllabus_option,@course.syllabus_id), {:id=>"edit_syllabus_id", :class=>"syllabus_input", :style=>'width:280px'} %>
<span class="c_red" id="edit_syllabus_notice">如果列表中没有对应的课程,请您先<%=link_to '创建课程', new_syllabus_path(),:target => '_blank', :class => 'ml5 green_btn_share c_white'%></span>
<%= select_tag :syllabus_id,options_for_select(course_syllabus_option,@course.syllabus_id), {:id=>"edit_syllabus_id", :class=>"syllabus_input", :style=>'width:210px'} %>
<span class="c_red" id="edit_syllabus_notice">如果列表中没有对应的课程,请您先<%=link_to '创建课程', new_syllabus_path(),:target => '_blank', :class => 'ml5 green_btn_share c_white'%>,然后【刷新】</span>
</li>
<li class="ml45">
<label><span class="c_red">*</span>&nbsp;<%= l(:label_tags_course_name)%>&nbsp;&nbsp;</label>

View File

@ -1,71 +1,71 @@
<table class="hwork-table-wrap" style="border-bottom:1px solid #eaeaea;">
<tr class="b_grey hworkH30">
<th class="hworkList30 pl5 pr5"><span class="c_dark f14 fb">序号</span></th>
<th class="hworkList50">&nbsp;&nbsp;</th>
<th class="hworkList60"><span class="c_dark f14 fb">姓名</span></th>
<th class="hworkList80"><span class="c_dark f14 fb">学号</span></th>
<th class="hworkList80"><span class="c_dark f14 fb">班级</span></th>
<th width="230">&nbsp;&nbsp;</th>
<th class="hworkList130">
<%= link_to "时间",'',:class => "c_dark f14 fb" ,:remote => true%>
</th>
<th class="hworkList50">
<%= link_to "成绩",'',:class => "c_dark f14 fb",:remote => true%>
</th>
</tr>
<% @exercise_users_list.each_with_index do |exercise, index|%>
<tr class="hworkListRow" id="student_work_<%= exercise.id%>">
<td class="pl5 pr5" style="text-align:center;"><%=index + 1 %></td>
<td class="hworkPortrait pr10 float-none">
<%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40",:style => "display:block;", :class => "mt15"),user_activities_path(exercise.user)) %>
<table class="hwork-table-wrap" style="border-bottom:1px solid #eaeaea;">
<tr class="b_grey hworkH30">
<th class="hworkList30 pl5 pr5"><span class="c_dark f14 fb">序号</span></th>
<th class="hworkList50">&nbsp;&nbsp;</th>
<th class="hworkList130"><span class="c_dark f14 fb">姓名</span></th>
<th class="hworkList130"><span class="c_dark f14 fb">学号</span></th>
<th class="hworkList130"><span class="c_dark f14 fb">班级</span></th>
<th width="60">&nbsp;&nbsp;</th>
<th class="hworkList130">
<%= link_to "时间",'',:class => "c_dark f14 fb" ,:remote => true%>
</th>
<th class="hworkList50">
<%= link_to "成绩",'',:class => "c_dark f14 fb",:remote => true%>
</th>
</tr>
<% @exercise_users_list.each_with_index do |exercise, index|%>
<tr class="hworkListRow" id="student_work_<%= exercise.id%>">
<td class="pl5 pr5" style="text-align:center;"><%=index + 1 %></td>
<td class="hworkPortrait float-none">
<%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40",:style => "display:block;", :class => "mt15"),user_activities_path(exercise.user)) %>
</td>
<td class="hworkStName130 pr10 student_work_<%= exercise.id%>" title="姓名" id="student_name_<%= exercise.id%>" style="cursor:pointer;">
<%=exercise.user.show_name %>
</td>
<td class="hworkStID130 pr10 student_work_<%= exercise.id%> float-none" title="学号" id="student_id_<%= exercise.id%>" style="cursor:pointer;">
<span class="hidden fl" style="width:130px;"><%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%></span>
</td>
<td class="hworkStName student_work_<%= exercise.id%>" title="姓名" id="student_name_<%= exercise.id%>" style="cursor:pointer;">
<%=exercise.user.show_name %>
</td>
<td class="hworkStID student_work_<%= exercise.id%> pl15 pr10 float-none" title="学号" id="student_id_<%= exercise.id%>" style="cursor:pointer;">
<span class="hidden fl" style="width:55px;"><%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%></span>
</td>
<td class="hworkStID student_work_<%= exercise.id%> float-none" title="班级" id="student_class_<%= exercise.id%>" style="cursor:pointer;">
--
</td>
<td width="230">&nbsp;</td>
<td class="hworkList130 c_grey">
<% if exercise.created_at%>
<%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>&nbsp;
<% if @exercise.end_time <= exercise.created_at %>
<span class="c_red">[未答]</span>
<% end %>
<% end %>
</td>
<td class="hworkList50 <%= score_color exercise.score%> student_final_scor_info">
<%= exercise.score.nil? ? "--" : format("%.1f",exercise.score)%>
</td>
<td><div style="position:relative;"><div class="hworkTip" style="display: none" id="work_click_<%= exercise.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></div></div></td>
</tr>
<script type="text/javascript">
$(".student_work_<%= exercise.id%>").mouseenter(function(){
$("#work_click_<%= exercise.id%>").show();
}).mouseleave(function(){
$("#work_click_<%= exercise.id%>").hide();
}).mouse;
$(function(){
<% if Time.parse(h(@exercise.end_time)).strftime("%Y-%m-%d-%H-%M-%S") <= Time.now.strftime("%Y-%m-%d-%H-%M-%S") %>
$("#student_name_<%= exercise.id%>,#student_id_<%= exercise.id%>,#student_class_<%= exercise.id%>").on('click',function() {
window.location.href = '<%=show_student_result_exercise_path(@exercise,:user_id => exercise.user_id) %>';
});
<% else %>
//$("#show_student_result_div_<%#= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
$("#student_name_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
$("#student_id_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
$("#student_class_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
<% end %>
});
/*function show_result(id) {
window.location.href = '<%#=show_student_result_exercise_path(@exercise,:user_id => exercise.user.id) %>';
}*/
</script>
<% end%>
<td class="hworkStID130 student_work_<%= exercise.id%> float-none" title="班级" id="student_class_<%= exercise.id%>" style="cursor:pointer;">
--
</td>
<td width="60">&nbsp;</td>
<td class="hworkList130 c_grey">
<% if exercise.created_at%>
<%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>&nbsp;
<% if @exercise.end_time <= exercise.created_at %>
<span class="c_red">[未答]</span>
<% end %>
<% end %>
</td>
<td class="hworkList50 <%= score_color exercise.score%> student_final_scor_info">
<%= exercise.score.nil? ? "--" : format("%.1f",exercise.score)%>
</td>
<td><div style="position:relative;"><div class="hworkTip" style="display: none" id="work_click_<%= exercise.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></div></div></td>
</tr>
<script type="text/javascript">
$(function(){
<% if Time.parse(h(@exercise.end_time)).strftime("%Y-%m-%d-%H-%M-%S") <= Time.now.strftime("%Y-%m-%d-%H-%M-%S") %>
$(".student_work_<%= exercise.id%>").mouseenter(function(){
$("#work_click_<%= exercise.id%>").show();
}).mouseleave(function(){
$("#work_click_<%= exercise.id%>").hide();
}).mouse;
$("#student_name_<%= exercise.id%>,#student_id_<%= exercise.id%>,#student_class_<%= exercise.id%>").on('click',function() {
window.location.href = '<%=show_student_result_exercise_path(@exercise,:user_id => exercise.user_id) %>';
});
<% else %>
//$("#show_student_result_div_<%#= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
$("#student_name_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
$("#student_id_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
$("#student_class_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
<% end %>
});
/*function show_result(id) {
window.location.href = '<%#=show_student_result_exercise_path(@exercise,:user_id => exercise.user.id) %>';
}*/
</script>
<% end%>
</table>

View File

@ -18,7 +18,7 @@
<li class="sy_class_setting_icon">
<ul class="sy_class_setting_text">
<li><%= link_to @course.is_public == 0 ? "设为公开" : "设为私有", {:controller => 'courses', :action => 'private_or_public', :id => @course},:remote=>true,:confirm=>"您确定要设置为"+(@course.is_public == 0 ? "公开" : "私有")+"吗", :class => "sy_class_option" %></li>
<li><%= link_to "复制班级", copy_course_course_path(@course.id),:remote=>true, :class => "sy_class_option" %></li>
<!--<li><%#= link_to "复制班级", copy_course_course_path(@course.id),:remote=>true, :class => "sy_class_option" %></li>-->
<% if @course.syllabus %>
<li><%= link_to "进入课程", syllabus_path(@course.syllabus), :class => "sy_class_option", :target => "_blank" %></li>
<% end %>
@ -54,7 +54,11 @@
</div>
<div class="sy_class_info fl ml15">
<div class="sy_class_titbox">
<h3 class="fl sy_class_title"><%=@course.name %></h3>
<h3 class="fl sy_class_title">
<%= link_to @course.syllabus.title, syllabus_path(@course.syllabus_id), :class =>'c_dark', :target => '_blank'%>
&nbsp;<font class="fb">·</font>&nbsp;
<%=@course.name %>
</h3>
<span class="<%= @course.is_public == 0 ? 'hw_icon_private' : 'hw_icon_open' %> fl mr20 mt3"></span>
<p class="sy_cgrey fl mt3">
<span class=" mr15">教师:<%= course_teacher_link teacher_num %></span>
@ -84,4 +88,12 @@
<div id="join_in_course_header"><%= join_in_course_header(@course, User.current) %></div>
<% end %>
</div>
<div class="cl"></div>
<div class="cl"></div>
<% if is_teacher %>
<div class="invite_code_tip_box fontGrey2">
<em></em>
<span></span>
<p class="mt10 mb5">请将邀请码告诉学生和教辅</p>
<p class="mb10">他们可以主动加入班级</p>
</div>
<% end %>

View File

@ -2,7 +2,12 @@
<li>
<span class="user_icons_class"></span>
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,course)) %>
<%= link_to course.name+"("+current_time_and_term_short(course)+")", course_path(course.id,:host=>Setting.host_course),
<p href="javascript:void(0);" id="show_course_<%= course.id %>" class="course_list_menu hidden" title="<%= course.syllabus.title+' · '+(course.is_public? ? '公开班级:' : '私有班级:')+course.name+''+current_time_and_term(course)+'' %>">
<%= link_to course.syllabus.title, syllabus_path(course.syllabus_id), :target => '_blank'%>
&nbsp;<font class="fb">·</font>&nbsp;
<%= link_to course.name, course_path(course.id,:host=>Setting.host_course), :target => '_blank'%>
</p>
<%#= link_to course.name+"("+current_time_and_term_short(course)+")", course_path(course.id,:host=>Setting.host_course),
:id => "show_course_#{course.id}", :class => 'course_list_menu hidden', :target => '_blank', :title => (course.is_public? ? "公开班级:":"私有班级:")+course.name+""+current_time_and_term(course)+""%>
<% count = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Course' and shield_id=#{course.id}").count %>
<% wechat_count = ShieldWechatMessage.where("container_type='User' and container_id=#{user.id} and shield_type='Course' and shield_id=#{course.id}").count %>

View File

@ -50,7 +50,7 @@
</div>
<div class="cl"></div>
<div class="">
<div class="sy_class_infobox" id="project_info_<%=@course.id %>">
<div class="sy_class_infobox pr" id="project_info_<%=@course.id %>">
<%=render :partial => 'layouts/course_base_info' %>
</div>

View File

@ -163,6 +163,7 @@
<ul class="users_accordion mb10">
<li id="user_01" class="user_icons_course">
<%= link_to '班级',{:controller => "users", :action => "user_courselist", :id => @user.id}, :id => "user_course_list" %>
<font class="show-all-sub"><%= link_to '全部',{:controller => "users", :action => "user_courselist", :id => @user.id}, :class => "linkGrey2" %></font>
<% courses = @user.favorite_courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(10) %>
<div class="<%= courses.empty? ? 'none' : ''%>" id="homepage_left_course_list">
<%=render :partial => 'layouts/homepage_left_course_list', :locals => {:courses => courses} %>
@ -190,6 +191,7 @@
<ul class="users_accordion mb10">
<li id="user_06" class="user_icons_project">
<%= link_to '项目',{:controller => "users", :action => "user_projectlist", :id => @user.id}, :id => 'user_project_list'%>
<font class="show-all-sub"><%= link_to '全部',{:controller => "users", :action => "user_projectlist", :id => @user.id}, :class => 'linkGrey2'%></font>
<% projects = @user.favorite_projects.visible.select("projects.*, (SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(10)%>
<div class="<%= projects.empty? ? 'none' : ''%>" id="homepage_left_project_list">
<%=render :partial => 'layouts/homepage_left_project_list', :locals => {:projects => projects} %>

View File

@ -2,7 +2,7 @@
$('#ajax-modal').html($("#nh_tx_dialog_html").html());
showModal('ajax-modal','460px');
$('#ajax-modal').siblings().hide();
$('#ajax-modal').parent().removeClass("alert_praise");
//$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().removeClass("alert_praise").removeClass("copyCoursePopup");
$('#ajax-modal').parent().css("top","30%").css("left","40%");
$('#ajax-modal').parent().addClass("alert_box");
$('#ajax-modal').parent().css("border", "3px solid #269ac9").css("border-radius", "0").css(" -webkit-border-radius", "0").css(" -moz-border-radius", "0");

View File

@ -14,7 +14,7 @@
</div>
<div class="cl"></div>
<% end %>
<% if work.user == User.current %>
<% if work.user == User.current && !User.current.allowed_to?(:as_teacher, @homework.course) %>
<div class="resubAtt mb15">
<span class="resubTitle">追加修订附件</span>
</div>

View File

@ -50,7 +50,7 @@
{
$("#homework_info_show").show();
}
<% if !@is_evaluation && (!@is_teacher || params[:show_work_id].present?) || @message_student_work_id %>
<% if !@is_evaluation && (!@is_teacher || params[:show_work_id].present?) || @message_student_work_id || (@is_evaluation && @is_focus == 1) %>
<% if @message_student_work_id %>
<% work = @homework.student_works.where("id =?", @message_student_work_id).first %>
<% else %>

View File

@ -18,11 +18,19 @@
<% @courses.each do |course| %>
<ul class="sy_classlist">
<div class="fl">
<% if !course.is_public && !User.current.member_of_course?(course) %>
<h3 class="sy_classlist_title fl"><%=course.name %><%=current_time_and_term_short(course) %></h3>
<% if course.is_public == 0 && !User.current.member_of_course?(course) && !User.current.admin? %>
<h3 class="sy_classlist_title fl">
<%= link_to @syllabus.title, syllabus_path(@syllabus.id), :style => 'color:#000', :target => '_blank' %>
&nbsp;<font class="fb">·</font>&nbsp;
<%=course.name %><%=current_time_and_term_short(course) %>
</h3>
<% else %>
<%= link_to course.name+"("+current_time_and_term_short(course)+")", course_path(course.id,:host=>Setting.host_course), :class => "sy_classlist_title fl",
<h3 class="sy_classlist_title fl">
<%= link_to @syllabus.title, syllabus_path(@syllabus.id), :style => 'color:#000', :target => '_blank' %>
&nbsp;<font class="fb">·</font>&nbsp;
<%= link_to course.name+"("+current_time_and_term_short(course)+")", course_path(course.id,:host=>Setting.host_course),
:style => 'color:#000',:id => "show_course_#{course.id}", :target => '_blank', :title => (course.is_public? ? "公开班级:":"私有班级:")+course.name+""+current_time_and_term(course)+""%>
</h3>
<% end %>
<span class="<%= course.is_public == 0 ? 'hw_icon_private' : 'hw_icon_open' %> fl mr20 mt3"></span>
<div class="cl"></div>

View File

@ -11,7 +11,7 @@
</li>
<div class="cl"></div>
<li class="ml125 fontGrey3"><span class="success-icon mr25">正确示例:软件工程</span><span class="error-icon">错误示例2016软件工程</span></li>
<li class="ml125 mt10 mb10 fontGrey2">课程是针对一个具体的学科方向开展的教学内容与进程安排<br/>本质上,一门课程就是一个教学计划</li>
<li class="ml125 mt10 mb10 fontGrey2">课程是针对一个具体的学科方向开展的教学内容与进程安排<br/>本质上,一门课程就是一个教学计划</li>
<li class="ml45">
<label><span class="c_white">*</span>&nbsp;<%= l(:label_tags_course_eng_name)%>&nbsp;&nbsp;</label>
<input type="text" name="eng_name" id="new_syllabus_eng_name" placeholder="例如Software Engineering" class="name_input" maxlength="100">

View File

@ -4,6 +4,7 @@
<script type="text/javascript">
$(function() {
sd_create_editor_from_data(<%= @syllabus.id %>, null, "100%", "<%= @syllabus.class.to_s %>");
showNormalImage('syllabus_description_<%= @syllabus.id %>');
});
</script>
<ul id="sy_tab_nav">
@ -23,7 +24,7 @@
<p class="sy_tab_con_p">该课程尚未填写课程大纲,敬请期待!</p>
<% else %>
<div class="sy_tab_con">
<div class="syllabuscon">
<div class="syllabuscon upload_img" id="syllabus_description_<%= @syllabus.id %>">
<%=@syllabus.description.html_safe %>
<div class="mt10" style="font-weight:normal;">
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @syllabus} %>

View File

@ -12,7 +12,9 @@
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %>
TO
<%= link_to activity.course.name.to_s+" | 班级资源", course_files_path(activity.course), :class => "newsBlue ml15" %>
<%=link_to activity.course.syllabus.title, syllabus_path(activity.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
<span class="fb" style="color: #269ac9"> • </span>
<%= link_to activity.course.name.to_s+" | 班级资源", course_files_path(activity.course), :class => "newsBlue" %>
</div>
<div class="homepagePostTitle break_word" >
<%= link_to activity.filename, course_files_path(activity.course), :class => "postGrey" %>

View File

@ -12,7 +12,9 @@
<%= link_to activity.try(:teacher).try(:realname), user_path(activity.tea_id), :class => "newsBlue mr15" %>
<% end %>
TO
<%= link_to activity.name.to_s+" | 班级", course_path(activity.id,:host=>Setting.host_course), :class => "newsBlue ml15" %>
<%=link_to activity.syllabus.title, syllabus_path(activity.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
<span class="fb" style="color: #269ac9"> • </span>
<%= link_to activity.name.to_s+" | 班级", course_path(activity.id,:host=>Setting.host_course), :class => "newsBlue" %>
</div>
<div class="homepagePostTitle break_word" >
<%= link_to activity.name, course_path(activity.id,:host=>Setting.host_course), :class => "postGrey" %>

View File

@ -9,39 +9,15 @@
<div class="homepagePostTo break_word">
<%= link_to activity.user.show_name, user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
TO <!--+"(课程名称)" -->
<%= link_to activity.course.name.to_s+" | 班级作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
<%=link_to activity.course.syllabus.title, syllabus_path(activity.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
<span class="fb" style="color: #269ac9"> • </span>
<%= link_to activity.course.name.to_s+" | 班级作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue"%>
</div>
<div class="homepagePostTitle hidden fl m_w505"> <!--+"(作业名称)"-->
<%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey"%>
</div>
<% if activity.homework_detail_manual%>
<% if activity.homework_detail_manual.comment_status == 1%>
<% if activity.anonymous_comment == 0%>
<span class="grey_homework_btn_cir ml5">未开启匿评</span>
<% else %>
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
<% end %>
<% if Time.parse(activity.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")%>
<span class="green_homework_btn_cir ml5">作品提交中</span>
<% elsif Time.parse(activity.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") %>
<span class="red_homework_btn_cir ml5">作品补交中</span>
<% end %>
<% elsif activity.homework_detail_manual.comment_status == 2%>
<% if activity.anonymous_comment == 0%>
<span class="green_homework_btn_cir ml5">匿评中</span>
<% else %>
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
<% end %>
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
<% elsif activity.homework_detail_manual.comment_status == 3%>
<% if activity.anonymous_comment == 0%>
<span class="grey_homework_btn_cir ml5">匿评已结束</span>
<% else %>
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
<% end %>
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
<% end%>
<% end%>
<%=get_hw_status(activity).html_safe %>
<div class="cl"></div>
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1%>

View File

@ -9,7 +9,9 @@
<%= link_to activity.user.show_name, user_path(activity.user_id), :class => "newsBlue mr15" %>
TO
<% course=Course.find(activity.jour_id) %>
<%= link_to course.name.to_s+" | 班级留言", course_feedback_path(course), :class => "newsBlue ml15" %>
<%=link_to course.syllabus.title, syllabus_path(course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
<span class="fb" style="color: #269ac9"> • </span>
<%= link_to course.name.to_s+" | 班级留言", course_feedback_path(course), :class => "newsBlue" %>
</div>
<!--<div class="homepagePostTitle break_word list_style upload_img">
<%# if activity.parent %>

View File

@ -8,7 +8,9 @@
<div class="homepagePostTo break_word">
<%= link_to activity.author.show_name, user_path(activity.author_id, :host=>Setting.host_user), :class => "newsBlue mr15" %>
TO
<%= link_to activity.course.name.to_s+" | 班级讨论区", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue ml15 mr5"%>
<%=link_to activity.course.syllabus.title, syllabus_path(activity.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
<span class="fb" style="color: #269ac9"> • </span>
<%= link_to activity.course.name.to_s+" | 班级讨论区", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue mr5"%>
</div>
<div class="homepagePostTitle hidden m_w530 fl">
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->

View File

@ -8,7 +8,9 @@
<div class="homepagePostTo break_word">
<%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
TO <!--+"(课程名称)"-->
<%= link_to activity.course.name.to_s+" | 班级通知", course_news_index_path(activity.course), :class => "newsBlue ml15" %>
<%=link_to activity.course.syllabus.title, syllabus_path(activity.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
<span class="fb" style="color: #269ac9"> • </span>
<%= link_to activity.course.name.to_s+" | 班级通知", course_news_index_path(activity.course), :class => "newsBlue" %>
</div>
<div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"-->
<%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %>

View File

@ -16,7 +16,10 @@
<%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% end %>
TO
<%= link_to Course.find(activity.polls_group_id).name.to_s+" | 问卷", poll_index_path(:polls_type => "Course", :polls_group_id => activity.polls_group_id), :class => "newsBlue ml15" %>
<% course = Course.find(activity.polls_group_id) %>
<%=link_to course.syllabus.title, syllabus_path(course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
<span class="fb" style="color: #269ac9"> • </span>
<%= link_to course.name.to_s+" | 问卷", poll_index_path(:polls_type => "Course", :polls_group_id => activity.polls_group_id), :class => "newsBlue" %>
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
</div>
<div class="homepagePostTitle break_word" >

View File

@ -15,11 +15,13 @@
</h3>
<span class="<%=homework.course.is_public? ? 'hw_icon_open' : 'hw_icon_private'%> fl mt3"></span>
<div class="cl"></div>
<p class="sy_cgrey">
<span class="fl">
<div class="sy_cgrey">
<span class="fl">来源:</span>
<%=link_to homework.course.name.to_s + "#{current_time_and_term_short(homework.course)}", course_path(homework.course), :class => 'hw_cgrey hw_list_classname fl mr15', :target => '_blank' %>
</span>
<p class="fl hw_list_classname mr15">
<%=link_to homework.course.syllabus.title, syllabus_path(homework.course.syllabus_id), :class => 'hw_cgrey', :target => '_blank' %>
<span> • </span>
<%=link_to homework.course.name.to_s + "#{current_time_and_term_short(homework.course)}", course_path(homework.course), :class => 'hw_cgrey', :target => '_blank' %>
</p>
<% if type == "2" %>
<span class="mr15 fl">
<span class="fl">贡献者:</span>
@ -42,7 +44,7 @@
<% else %>
<span class="fl mr15">发布时间:<%= format_date(homework.publish_time) %></span>
<% end %>
</p>
</div>
<div class="cl"></div>
</div>
<% student_ids = homework.course.student.empty? ? [] : homework.course.student.map{|student| student.student_id}.join(',') %>

View File

@ -13,7 +13,11 @@
<div class="cl"></div>
<p class="sy_cgrey clear">
<span class="fl">来源:</span>
<%= link_to homework.course.name, course_path(homework.course), :target => '_blank', :class => 'hw_cgrey hw_classname fl mr15' %>
<span class="hw_classname mr15 fl">
<%=link_to homework.course.syllabus.title, syllabus_path(homework.course.syllabus_id), :class => 'hw_cgrey', :target => '_blank' %>
<span> • </span>
<%= link_to homework.course.name, course_path(homework.course), :target => '_blank', :class => 'hw_cgrey' %>
</span>
<span class="mr15 fl">类别:<%=homework.homework_type_ch %></span>
<span class="fl">作品:</span>
<span class="sy_corange hw_w20 fl "><%=homework.student_works.has_committed.count %></span>

View File

@ -13,7 +13,11 @@
<div class="cl"></div>
<p class="sy_cgrey clear">
<span class=" fl">来源:</span>
<%= link_to homework.course.name, course_path(homework.course), :target => '_blank', :class => 'hw_cgrey hw_classname fl mr15' %>
<span class="hw_classname fl mr15">
<%=link_to homework.course.syllabus.title, syllabus_path(homework.course.syllabus_id), :class => 'hw_cgrey', :target => '_blank' %>
<span> • </span>
<%= link_to homework.course.name, course_path(homework.course), :target => '_blank', :class => 'hw_cgrey' %>
</span>
<span class="mr15 fl">类别:<%=homework.homework_type_ch %></span>
<% my_work = cur_user_works_for_homework(homework) %>
<span class="fl">状态:</span><span class="<%= my_work ? '' : 'hw_cir_nomal hw_cir_lorange' %> fl mr15"><%= my_work ? '已提交' : '未提交' %></span>

View File

@ -13,13 +13,13 @@
<%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename, :class => 'resourcesBlack resource-list-middle hidden mw280' %>
</li>
<li class="resource-list-time fr"><%= format_date(attach.created_on) %></li>
<li class="resource-list-quote fr"><%= attach.quotes.nil? ? 0 : attach.quotes %></li>
<!--<li class="resource-list-quote fr"><%#= attach.quotes.nil? ? 0 : attach.quotes %></li>-->
<li class="resource-list-download fr"><%= attach.downloads %></li>
<li style="display: none"><%= attach.author_id %></li>
<li class="resource-list-size fr"><%= (number_to_human_size(attach.filesize)).gsub("ytes", "") %></li>
<li class="resource-list-uploader fr hidden"><%= User.find(attach.author_id).realname.blank? ? User.find(attach.author_id).nickname : User.find(attach.author_id).realname %></li>
<li class="resource-list-type fr"><%= get_resource_type(attach.container_type)%></li>
<li class="resource-list-from fr hidden" title="<%= get_resource_origin(attach) %>"><%= get_resource_origin(attach) %></li>
<li class="resource-list-from fr hidden" title="<%= get_resource_origin(attach).html_safe %>"><%= get_resource_origin(attach).html_safe %></li>
<li style="display: none"><%= attach.id %></li>
</ul>
<div class="cl"></div>

View File

@ -19,10 +19,10 @@
<% syllabuses.each_with_index do |syllabus, index|%>
<div class="syllabus_courses_box">
<% course_count = syllabus.courses.not_deleted.count %>
<div class="syllabus_courses_list" onclick="expand_courses(<%=syllabus.id %>,<%=course_count %>);" id="syllabus_courses_list_<%= syllabus.id %>">
<div class="syllabus_courses_list" id="syllabus_courses_list_<%= syllabus.id %>">
<div class="<%=index == 0 ? 'sy_courses_open' : 'sy_courses_close' %>">
<span class="<%=index == 0 && course_count != 0 ? 'icons_sy_open' : 'icons_sy_close' %> fl mr5"></span>
<h3 class="syllabus_courses_title fl"><%=syllabus.title %></h3>
<span onclick="expand_courses(<%=syllabus.id %>,<%=course_count %>);" class="<%=index == 0 && course_count != 0 ? 'icons_sy_open' : 'icons_sy_close' %> fl mr5" title="点击展开/收起班级列表"></span>
<%=link_to syllabus.title, syllabus_path(syllabus.id), :class => 'syllabus_courses_title fl', :target => '_blank' %>
</div>
<p class="fl sy_p_grey">更新时间:<%=format_date syllabus.updated_at %>
<span class="mr10"></span>创建老师:<%=syllabus.user.show_name %>

View File

@ -1,4 +1,4 @@
<% if ma.class == AtMessage && ma.at_valid? %>
<% if ma.class == AtMessage && ma.at_valid? && ma.at_message %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.author), :width => "30", :height => "30"),user_path(ma.author) %></a></li>
<li class="homepageNewsPubType fl">

View File

@ -8,7 +8,9 @@
<div class="homepagePostTo">
<%= link_to homework_common.user.show_name, user_activities_path(homework_common.user_id), :class => "newsBlue mr15"%>
TO
<%= link_to homework_common.course.name, course_path(homework_common.course_id), :class => "newsBlue ml15"%>
<%=link_to homework_common.course.syllabus.title, syllabus_path(homework_common.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
<span class="fb" style="color: #269ac9"> • </span>
<%= link_to homework_common.course.name, course_path(homework_common.course_id), :class => "newsBlue"%>
</div>
<span class="homepagePostTitle hidden fl m_w505">
<% if is_in_course == 1%>
@ -19,38 +21,8 @@
<% end %>
</span>
<% if homework_common.homework_detail_manual%>
<% if homework_common.homework_detail_manual.comment_status == 0 && homework_common.publish_time.nil? %>
<span class="grey_homework_btn_cir ml5">挂起</span>
<% elsif homework_common.homework_detail_manual.comment_status == 0 %>
<span class="grey_homework_btn_cir ml5">未发布</span>
<% elsif homework_common.homework_detail_manual.comment_status == 1%>
<% if homework_common.anonymous_comment == 0%>
<span class="grey_homework_btn_cir ml5">未开启匿评</span>
<% else %>
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
<% end %>
<% if Time.parse(homework_common.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")%>
<span class="green_homework_btn_cir ml5">作品提交中</span>
<% elsif Time.parse(homework_common.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") %>
<span class="red_homework_btn_cir ml5">作品补交中</span>
<% end %>
<% elsif homework_common.homework_detail_manual.comment_status == 2%>
<% if homework_common.anonymous_comment == 0%>
<span class="green_homework_btn_cir ml5">匿评中</span>
<% else %>
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
<% end %>
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
<% elsif homework_common.homework_detail_manual.comment_status == 3%>
<% if homework_common.anonymous_comment == 0%>
<span class="grey_homework_btn_cir ml5">匿评已结束</span>
<% else %>
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
<% end %>
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
<% end%>
<% end%>
<%=get_hw_status(homework_common).html_safe %>
<div class="cl"></div>
<% if homework_common.homework_type == 3 && homework_common.homework_detail_group.base_on_project == 1%>
<span class="c_red">系统提示:该作业要求各组长<%=link_to "创建项目", new_project_path(:host=>Setting.host_name),:class=>"linkBlue",:title=>"新建项目",:style=>"text-decoration:underline;"%>,组成员加入项目,然后由组长关联项目。谢谢配合!</span>

View File

@ -164,21 +164,22 @@
<% unless edit_mode %>
<input type="hidden" name="quotes" id="ref_homework_id" value=""/>
<% end %>
<% if edit_mode %>
<%# if edit_mode %>
<label class="fl c_grey f14" style="margin-top: 4px;">截止日期:</label>
<% end %>
<%# end %>
<div class="calendar_div fl mr10">
<input type="text" name="homework_common[end_time]" id="homework_end_time" placeholder="截止日期" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.end_time%>" >
<input type="text" name="homework_common[end_time]" id="homework_end_time" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.end_time%>" >
<% if homework.homework_detail_manual.comment_status.to_i < 2 %>
<%= calendar_for('homework_end_time')%>
<% end %>
</div>
<% if edit_mode %>
<%# if edit_mode %>
<label class="fl c_grey f14" style="margin-top: 4px;">发布日期(可选)</label>
<% end %>
<%# end %>
<div class="calendar_div fl">
<input type="text" name="homework_common[publish_time]" id="homework_publish_time" placeholder="发布日期(可选)" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.publish_time%>" >
<% if homework.homework_detail_manual.comment_status.to_i == 0 %>
<% allow_edit = homework.student_works.has_committed.count == 0 && homework.student_work_projects.count ==0 %>
<input title="<%=allow_edit ? '' : '已有学生提交作品或关联项目,发布日期不可再编辑' %>" type="text" name="homework_common[publish_time]" id="homework_publish_time" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.publish_time%>" >
<% if allow_edit %>
<%= calendar_for('homework_publish_time')%>
<% end %>
</div>

View File

@ -8,12 +8,12 @@
<%= link_to "", user_resource_user_path(:type => @type, :status => @status, :sort => @score, :order => "created_on", :search => " "), :class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt16", :remote => true %>
<% end %>
</li>
<li class="resource-list-quote fr">
<%= link_to "引用数", resource_search_user_path(:type => @type, :status => @status, :sort => @score, :order => "quotes"), :class => "fl", :remote => true %>
<% if @order == "quotes" %>
<%= link_to "", user_resource_user_path(:type => @type, :status => @status, :sort => @score, :order => "quotes"), :class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt16", :remote => true %>
<% end %>
</li>
<!--<li class="resource-list-quote fr">-->
<!--<%#= link_to "引用数", resource_search_user_path(:type => @type, :status => @status, :sort => @score, :order => "quotes"), :class => "fl", :remote => true %>-->
<!--<%# if @order == "quotes" %>-->
<!--<%#= link_to "", user_resource_user_path(:type => @type, :status => @status, :sort => @score, :order => "quotes"), :class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt16", :remote => true %>-->
<!--<%# end %>-->
<!--</li>-->
<li class="resource-list-download fr">
<%= link_to "下载数", resource_search_user_path(:type => @type, :status => @status, :sort => @score, :order => "downloads"), :class => "fl", :remote => true %>
<% if @order == "downloads" %>

View File

@ -3,7 +3,7 @@
window.location.href = url;
}
</script>
<div class="hw_content" >
<div class="hw_content mb10" >
<ul id="hw_tab_nav">
<li id="hw_tab_nav_1" onclick="HoverLi('<%= my_homeworks_user_path(@user) %>');">
<a href="javascript:void(0);" class="hw_tab_type">我的作业</a>

View File

@ -9,7 +9,7 @@
window.location.href = url;
}
</script>
<div class="hw_content" >
<div class="hw_content mb10" >
<ul id="hw_tab_nav">
<li id="hw_tab_nav_1" class="hw_tab_hover" onclick="HoverLi('<%= my_homeworks_user_path(@user) %>');">
<a href="javascript:void(0);" class="hw_tab_type">我的作业</a>

View File

@ -34,10 +34,8 @@
<ul class="homepagePostTypeProject fl">
<li class="f14">更多</li>
<li class="mt-4"><%= link_to "个人留言", {:controller => "users", :action => "show", :type => "user_journals"}, :class =>"homepagePostTypeMessage postTypeGrey"%>
<% if @user == User.current %>
<li class="mt-4"><%= link_to "我的动态", {:controller => "users", :action => "show", :type => "current_user"}, :class =>"homepagePostTypeMine postTypeGrey"%>
<% end %>
<li class="mt-4"><%= link_to "全部动态", {:controller => "users", :action => "show", :type => nil}, :class =>"homepagePostTypeAll postTypeGrey"%>
<li class="mt-4"><%= link_to @user == User.current ? "我的动态" : "他的动态", {:controller => "users", :action => "show", :type => "current_user"}, :class =>"homepagePostTypeMine postTypeGrey"%>
<li class="mt-4"><%= link_to "全部动态", {:controller => "users", :action => "show", :type => "all"}, :class =>"homepagePostTypeAll postTypeGrey"%>
</ul>
</li>
</ul>

View File

@ -0,0 +1,5 @@
class AddIndexToStudentWorkTests < ActiveRecord::Migration
def change
add_index :student_work_tests, :student_work_id
end
end

View File

@ -0,0 +1,7 @@
class AddIndexToCourseContributorScores < ActiveRecord::Migration
def change
add_index :course_contributor_scores, [:course_id, :user_id]
add_index :members, :course_id
add_index :course_groups, :course_id
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20160907080621) do
ActiveRecord::Schema.define(:version => 20160907061917) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -56,10 +56,10 @@ ActiveRecord::Schema.define(:version => 20160907080621) do
t.integer "user_id"
t.integer "applied_id"
t.string "applied_type"
t.integer "viewed"
t.integer "status"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "viewed", :default => 0
t.integer "status", :default => 0
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "name"
t.integer "applied_user_id"
t.integer "role"
@ -157,13 +157,13 @@ ActiveRecord::Schema.define(:version => 20160907080621) do
create_table "attachments", :force => true do |t|
t.integer "container_id"
t.string "container_type", :limit => 30
t.string "filename", :default => "", :null => false
t.string "disk_filename", :default => "", :null => false
t.integer "filesize", :default => 0, :null => false
t.string "filename", :default => "", :null => false
t.string "disk_filename", :default => "", :null => false
t.integer "filesize", :default => 0, :null => false
t.string "content_type", :default => ""
t.string "digest", :limit => 40, :default => "", :null => false
t.integer "downloads", :default => 0, :null => false
t.integer "author_id", :default => 0, :null => false
t.string "digest", :limit => 40, :default => "", :null => false
t.integer "downloads", :default => 0, :null => false
t.integer "author_id", :default => 0, :null => false
t.datetime "created_on"
t.string "description"
t.string "disk_directory"
@ -173,7 +173,6 @@ ActiveRecord::Schema.define(:version => 20160907080621) do
t.integer "quotes"
t.integer "is_publish", :default => 1
t.date "publish_time"
t.boolean "init_file", :default => false
end
add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id"
@ -311,16 +310,14 @@ ActiveRecord::Schema.define(:version => 20160907080621) do
add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids"
create_table "changesets", :force => true do |t|
t.integer "repository_id", :null => false
t.string "revision", :null => false
t.integer "repository_id", :null => false
t.string "revision", :null => false
t.string "committer"
t.datetime "committed_on", :null => false
t.datetime "committed_on", :null => false
t.text "comments"
t.date "commit_date"
t.string "scmid"
t.integer "user_id"
t.integer "project_id"
t.integer "type", :default => 0
end
add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on"
@ -520,6 +517,8 @@ ActiveRecord::Schema.define(:version => 20160907080621) do
t.integer "news_num", :default => 0
end
add_index "course_contributor_scores", ["course_id", "user_id"], :name => "index_course_contributor_scores_on_course_id_and_user_id"
create_table "course_groups", :force => true do |t|
t.string "name"
t.integer "course_id"
@ -527,6 +526,8 @@ ActiveRecord::Schema.define(:version => 20160907080621) do
t.datetime "updated_at", :null => false
end
add_index "course_groups", ["course_id"], :name => "index_course_groups_on_course_id"
create_table "course_infos", :force => true do |t|
t.integer "course_id"
t.integer "user_id"
@ -1143,6 +1144,7 @@ ActiveRecord::Schema.define(:version => 20160907080621) do
t.integer "is_collect", :default => 1
end
add_index "members", ["course_id"], :name => "index_members_on_course_id"
add_index "members", ["project_id"], :name => "index_members_on_project_id"
add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true
add_index "members", ["user_id"], :name => "index_members_on_user_id"
@ -1832,6 +1834,8 @@ ActiveRecord::Schema.define(:version => 20160907080621) do
t.text "src"
end
add_index "student_work_tests", ["student_work_id"], :name => "index_student_work_tests_on_student_work_id"
create_table "student_works", :force => true do |t|
t.string "name"
t.text "description", :limit => 2147483647

View File

@ -539,4 +539,12 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
.hwork-table-wrap th {font-size:14px; color:#2d2d2d; border-bottom:1px solid #e1e1e1; text-align:center;}
/*20160901作品信息确认*/
#worksDescription p {word-wrap:break-word;}
#worksDescription p {word-wrap:break-word;}
/*20160907作业详情更改*/
.homework-type-option {border:1px solid #d9d9d9; width:98px; height:28px; color:#888; font-size:14px;}
.homework-detail-tab {font-size:14px; color:#484848; overflow:hidden;}
.homework-detail-tab li {float:left; width:100px; text-align:center; padding:3px 0; border-bottom:2px solid #ddd;}
.homework-detail-tab li.selected {border-bottom:2px solid #f00;}
.test-set-table, .test-set-table tr, .test-set-table th, .test-set-table td {border-collapse:collapse; text-align:left; border:1px solid #ddd; color:#484848;}
.test-set-table th, .test-set-table td {padding:2px 5px;}

View File

@ -321,7 +321,7 @@ a.loginChooseTab {color:#484848; height:30px; display:block;}
.resource-list-checkbox {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle;}
.resource-checkbox {margin-top:14px; width:12px; height:12px;}
.resource-list-name {width:380px; height:40px; line-height:40px; text-align:left;}
.resource-list-from {width:150px; height:40px; line-height:40px; text-align:center;}
.resource-list-from {width:210px; height:40px; line-height:40px; text-align:center;}
.resource-list-size {width:80px; height:40px; line-height:40px; text-align:center;}
.resource-list-type {width:80px; height:40px; line-height:40px; text-align:center;}
.resource-list-uploader {width:80px; height:40px; line-height:40px; text-align:center;}
@ -1454,4 +1454,8 @@ a:hover.sy_btn_green{ background: #51a74f;}
.resource_tip_box em {display:block; border-width:10px; position:absolute;top:35px; left:-20px; border-style:dashed solid dashed dashed; border-color:transparent #eaeaea transparent transparent; font-size:0; line-height:0;}
.resource_tip_box span {display:block; border-width:10px; position:absolute;top:35px; left:-18px; border-style:dashed solid dashed dashed; border-color:transparent #fff transparent transparent; font-size:0; line-height:0;}
/*邀请码提示框*/
.invite_code_tip_box {position:absolute; padding:5px 10px; white-space:nowrap; background-color:#fff; right:-185px; top:50px; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
.invite_code_tip_box em {display:block; border-width:10px; position:absolute;top:26px; left:-20px; border-style:dashed solid dashed dashed; border-color:transparent #eaeaea transparent transparent; font-size:0; line-height:0;}
.invite_code_tip_box span {display:block; border-width:10px; position:absolute;top:26px; left:-18px; border-style:dashed solid dashed dashed; border-color:transparent #fff transparent transparent; font-size:0; line-height:0;}

View File

@ -596,6 +596,9 @@ a.user_leftinfo_img { display:block; width:80px; height:80px; margin:15px auto;}
.user_sub_menu li a:hover,.user_sub_menu li a:target { color:#3b94d6; background:#fff url(/images/user/user_navmore_icons.png) 0px 0px no-repeat;}
.user_sub_menu li a:hover,.user_sub_menu li a:target{}
.user_sub_menu li:last-child a { }
.user_sub_menu li p {padding:0 25px; border:1px solid #e5e5e5; border-bottom:none; background:#f8f8f8;}
.user_sub_menu li p:hover {background:#fff;}
.user_sub_menu li p:hover a {background:#fff;}
.users_accordion li > .user_sub_menu {
display: none;
}
@ -634,6 +637,7 @@ a.user_navmorebox .user_icons_closeclass{
height:10px;
background:url(/images/user/icons_user_leftnav.png) -25px -347px no-repeat;
}
.show-all-sub {position:absolute; top:18px; right:15px;}
/* 个人主页左侧导航更多功能 */
.user_navmore_box {position:absolute; width:15px; height:15px; right:13px; top:17px; cursor:pointer;}
.user_navmore_box ul li:hover ul {display:block; }

View File

@ -41,7 +41,7 @@ input.syllabus_input_min{
border: 1px solid #dddddd;
}
.sy_tab_con{
width:740px; padding:20px 20px 0 20px; position:relative;
width:720px; padding:20px 28px 0 32px; position:relative;
}
.syllabuscon_title{
color:#000; text-align:center;
@ -88,7 +88,7 @@ input.syllabus_input_min{
.syllabus_box{ width:750px; border:1px solid #e7e7e7; background-color:#fff;}
.syllabus_courses_list{ padding:15px; border-bottom:1px solid #e7e7e7; cursor:pointer;}
.syllabus_courses_list:hover{ background:#f6fafd;}
.syllabus_courses_title{ font-size:16px; color:#333; width:650px; font-weight:normal;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.syllabus_courses_title{ font-size:16px; color:#333 !important; width:650px; font-weight:normal;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sy_p_grey{ margin-left:25px; color:#888; margin-top:5px; font-size:12px;}
.syllabus_class_box{ padding-left:43px; background:#f6f6f6;}
.syllabus_class_list{ padding:12px 0 12px 15px; height:44px;border-left:1px solid #e7e7e7;border-bottom:1px solid #e7e7e7; position:relative;}
@ -408,6 +408,10 @@ a:hover.sy_btn_orange{
color: #ee4a1f;
background: #fff;
}
.sub-menu > li:hover > a{
color: #ee4a1f;
background: #fff;
}
.accordion > li:target > a,
.accordion > li > a.active {
color: #ee4a1f;
@ -563,7 +567,7 @@ a:hover.sy_btn_orange{
font-weight:normal;
}
.sy_sq_orange{ display: block;width: 15px; height: 15px; background:#f79981; color: #fff; text-align:center; line-height: 15px;}
a.sy_class_ltitle{display: block; font-size: 14px; width: 185px; color:#888; }
a.sy_class_ltitle{font-size: 14px; color:#888; }
a:hover.sy_class_ltitle{ color:#333;}
.sy_cir_grey{
font-size:11px;
@ -602,6 +606,7 @@ a:hover.sy_class_ltitle{ color:#333;}
/*.hw_search_box a:hover.hw_btn_search{background:url(../images/hw/icons_hw.png) -40px -57px no-repeat;}*/
.hw_files_icon{display:block; width:17px; height:14px; background:url(../images/hw/icons_hw.png) 0 -135px no-repeat;}
.hw_list_classname{ width:300px; overflow:hidden; display:block;overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
.syllabus_course_name{ width:450px; overflow:hidden; display:block;overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
.hw_list_teachername{ width:80px; overflow:hidden; display:block;overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
/* 测试集显示 */
.hw_popup_testtable{background:#fff; color:#888888; margin:10px 0; border-right:1px solid #e7e7e7; border-bottom:1px solid #e7e7e7;}