Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
huang 2016-04-18 15:38:31 +08:00
commit 3b373a78fe
28 changed files with 226 additions and 84 deletions

View File

@ -65,9 +65,18 @@ class AdminController < ApplicationController
#精品课程下的全部课程
def excellent_all_courses
@name = params[:name]
@courses = Course.like(@name).order('created_at desc')
@courses = paginateHelper @courses,30
name = params[:name]
@order = ""
if params[:order] == 'asc'
courses = Course.find_by_sql("SELECT c.*,count(c.id) FROM courses c,course_activities ca WHERE c.id = ca.course_id AND c.name like '%#{name}%' GROUP BY c.id ORDER BY count(c.id) asc, c.id desc")
@order = params[:order]
elsif params[:order] == 'desc'
courses = Course.find_by_sql("SELECT c.*,count(c.id) FROM courses c,course_activities ca WHERE c.id = ca.course_id AND c.name like '%#{name}%' GROUP BY c.id ORDER BY count(c.id) DESC, c.id desc")
@order = params[:order]
else
courses = Course.like(name).order('created_at desc')
end
@courses = paginateHelper courses,30
@page = (params['page'] || 1).to_i - 1
respond_to do |format|
format.html

View File

@ -956,6 +956,7 @@ class CoursesController < ApplicationController
@student_works.each do |tmpwork|
@works_hash[tmpwork.id] = tmpwork
puts tmpwork.id
end
#respond_to do |format|

View File

@ -5,7 +5,7 @@ class StudentWorkController < ApplicationController
include ApplicationHelper
require 'bigdecimal'
require "base64"
before_filter :find_homework, :only => [:new, :index, :create, :student_work_absence_penalty, :absence_penalty_list, :evaluation_list, :program_test,:program_test_ex,:code_repeattest,:set_score_rule,:forbidden_anonymous_comment,:delete_work,:new_student_work_project,:student_work_project,:cancel_relate_project,:search_course_students]
before_filter :find_homework, :only => [:new, :index, :create, :student_work_absence_penalty, :absence_penalty_list, :evaluation_list, :program_test,:program_test_ex,:code_repeattest,:work_canrepeat,:set_score_rule,:forbidden_anonymous_comment,:delete_work,:new_student_work_project,:student_work_project,:cancel_relate_project,:search_course_students]
before_filter :find_work, :only => [:edit, :update, :show, :destroy, :add_score, :praise_student_work,:retry_work,:revise_attachment]
before_filter :member_of_course, :only => [:new, :create, :show, :add_score, :praise_student_work]
before_filter :author_of_work, :only => [:edit, :update, :destroy]
@ -141,11 +141,12 @@ class StudentWorkController < ApplicationController
if result["status"].to_i != -2
result["results"].first['user_wait'] = tUsedtime
if result["results"][0]["status"].to_i == 2
result["status"] = 2
end
end
if result["results"][0]["status"].to_i == 2
result["status"] = 2
end
status = result["status"]
if index == 1
student_work_test = student_work.student_work_tests.build(status: status,
@ -188,7 +189,7 @@ class StudentWorkController < ApplicationController
#找出该作业的所有提交作业
def find_all_student_work_by_homeid()
all_studentwork = StudentWork.where("homework_common_id =?", @homework.id)
all_studentwork = StudentWork.where("homework_common_id =#{@homework.id} and is_test = 0 ")
all_studentwork
end
@ -222,6 +223,15 @@ class StudentWorkController < ApplicationController
JSON.parse(res.body)
end
def work_canrepeat
@homework_id = params[:homework]
@course_id = params[:course_id]
all_studentwork = find_all_student_work_by_homeid()
@work_count = all_studentwork.count
end
#代码查重 status: 0完成 -2不需要查重 -1查重失败不支持该语言
def code_repeattest
tStarttime = Time.now
@ -890,7 +900,7 @@ class StudentWorkController < ApplicationController
@homework.save
end
unless homework_detail_manual.absence_penalty.to_s == params[:absence_penalty].to_s
if params[:absence_penalty] && homework_detail_manual.absence_penalty.to_s != params[:absence_penalty].to_s
homework_detail_manual.absence_penalty = params[:absence_penalty]
if homework_detail_manual.comment_status == 3 #当前作业处于匿评结束状态,修改缺评扣分才会修改每个作品应扣分的值
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"

View File

@ -48,8 +48,8 @@
<th style="width: 50px;">
帖子数
</th>
<th style="width: 50px;">
动态数
<th style="width: 50px;" class = "<%= @order == 'desc' ? 'st_up' : (@order == 'asc' ? 'st_down' : '') %>">
<%=link_to '动态数', excellent_all_courses_path(:order=> @order == "desc" ? 'asc' : 'desc') %>
</th>
<th style="width: 40px;">
</tr>

View File

@ -37,11 +37,12 @@
console.log(data);
if (data.status == 0) {
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'courses/compare_code_tips_2',:locals => {:des=>"查重完成,是否立即查看结果?",:status=>1, :homework=> homework,:courseid=> courseid})%>');
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'courses/compare_code_tips_2',:locals => {:des=>"查重完成,是否立即查看结果?",:status=>1, :homework=> homework,:courseid=> courseid})%>');
showModal('ajax-modal', '580px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 560px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top","40%").css("left","50%");
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 565px; margin-top:-10px;' class='resourceClose'></a>");
//$('#ajax-modal').parent().css("top","40%").css("left","50%");
$('#ajax-modal').parent().css("top","30%").css("left","50%").css("padding-top","10px").css("position","fixed");
$('#ajax-modal').parent().addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
@ -54,8 +55,8 @@
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'courses/compare_code_tips_2',:locals => {:des=>"对不起目前只支持java/c/c++的代码查重!",:status=>0, :homework=> homework,:courseid=> courseid})%>');
showModal('ajax-modal', '580px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 560px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top","40%").css("left","50%");
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 565px; margin-top:-10px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top","30%").css("left","50%").css("padding-top","10px").css("position","fixed");
$('#ajax-modal').parent().addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
@ -69,8 +70,8 @@
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'courses/compare_code_tips_2',:locals => {:des=>"对不起该作业的作品过少不能查重!",:status=>0, :homework=> homework,:courseid=> courseid})%>');
showModal('ajax-modal', '580px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 560px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top","40%").css("left","50%");
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 565px; margin-top:-10px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top","30%").css("left","50%").css("padding-top","10px").css("position","fixed");
$('#ajax-modal').parent().addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
@ -85,8 +86,8 @@
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'courses/compare_code_tips_2',:locals => {:des=>"对不起,服务器繁忙请稍后再试!",:status=>0, :homework=> homework,:courseid=> courseid})%>');
showModal('ajax-modal', '580px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 560px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top","40%").css("left","50%");
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 565px; margin-top:-10px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top","30%").css("left","50%").css("padding-top","10px").css("position","fixed");
$('#ajax-modal').parent().addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");

View File

@ -12,7 +12,7 @@
<% if @simi_value.to_i >= 90 %>
<h6 style="color:red;float:left; width:6%; text-align:center;">相似度<%=@simi_value.to_i%>%</h3>
<% else %>
<h6 style="float:left; width:6%; text-align:center;">相似度<%=@simi_valu.to_i%>%</h3>
<h6 style="float:left; width:6%; text-align:center;">相似度<%=@simi_value.to_i%>%</h3>
<% end %>
<h3 style="float:left; width:47%; text-align:center;"><%=dst_name%></h3><div class="cl"></div>
<pre id = "program-src_1" style = "display: none" ><%= src_code if src_code%></pre>

View File

@ -48,7 +48,7 @@
<%= link_to("查看", show_comparecode_course_path(:homework_id => @homework.id,:src_id => student_work.id,:dst_id => student_work.simi_id.to_i),:class => "cha-btn",:remote => true ) %>
</li>
<%else%>
<li class="chabox-w-401"></li>
<li class="chabox-w-401">--</li>
<li>--</li>
<li>--</li>
<li class="chabox-r-line">--</li>

View File

@ -47,7 +47,7 @@
<ul style="max-height:240px; overflow-y:auto; overflow-x:hidden;">
<% @homework_commons.each_with_index do |homework_common,index |%>
<li class="pr10">
<%= link_to "作业#{@homework_commons.count - index}#{homework_common.name}",student_work_index_path(:homework => homework_common.id)%>
<%= link_to "作业#{@homework_commons.count - index}#{homework_common.name}",student_work_index_path(:homework => homework_common.id),:target=>"_blank"%>
</li>
<% end%>
</ul>

View File

@ -4,10 +4,12 @@
<span class="f14 fontGrey3 mr10">迟交扣分</span>
<input type="text" name="late_penalty" id="late_penalty_num" placeholder="请输入0-50数值" class=" markInput" value="<%= homework.late_penalty%>" onkeyup="check_late_penalty('late_penalty_num')"/>
</div>
<div>
<span class="f14 fontGrey3 mr10">缺评扣分</span>
<input type="text" name="absence_penalty" id="absence_penalty_num" placeholder="请输入0-50数值" class="markInput" value="<%= homework.homework_detail_manual.absence_penalty%>" onkeyup="check_late_penalty('absence_penalty_num')"/>
</div>
<% if homework.anonymous_comment == 0 %>
<div>
<span class="f14 fontGrey3 mr10">缺评扣分</span>
<input type="text" name="absence_penalty" id="absence_penalty_num" placeholder="请输入0-50数值" class="markInput" value="<%= homework.homework_detail_manual.absence_penalty%>" onkeyup="check_late_penalty('absence_penalty_num')"/>
</div>
<% end %>
<% if homework.homework_type == 2%>
<div>

View File

@ -18,8 +18,8 @@
<input type="text" id="course_student_name" value="<%= @name%>" placeholder="姓名、学号、邮箱" class="hworkSearchInput" onkeypress="SearchByName('<%= student_work_index_path(:homework => @homework.id)%>',event);"/>
<a class="hworkSearchIcon" id="search_in_student_work" onclick="SearchByName_1('<%= student_work_index_path(:homework => @homework.id)%>');" href="javascript:void(0)"></a>
</div>
<%if @homework.homework_type == 2 %>
<a href="javascript:void(0);" class="BlueCirBtn fr" data-course-id="<%=@course.id%>" data-homework-simi-time="<%=@homework.simi_time%>" data-homework-id="<%=@homework.id%>" id="test-program-repeat-btn" onclick = "code_repeat()">代码查重</a>
<%if @homework.homework_type == 2 && @is_teacher %>
<%= link_to "代码查重", work_canrepeat_student_work_index_path(homework:@homework.id, course_id:@course.id), class: 'BlueCirBtn fr',:remote => true %>
<% end %>
<%= select_tag(:student_work_in_group,options_for_select(course_group_list(@course),@group), {:class => "classSplit"}) unless course_group_list(@course).empty? %>
<% end%>

View File

@ -0,0 +1,99 @@
//代码查重
<% if @work_count <= 1 %>
//弹框
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'courses/compare_code_tips_2',:locals => {:des=>"对不起该作业的作品过少不能查重!",:status=>0, :homework=> @homework,:courseid=> @course_id})%>');
showModal('ajax-modal', '580px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 565px; margin-top:-10px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top", "30%").css("left", "50%").css("padding-top", "10px").css("position", "fixed");
$('#ajax-modal').parent().addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left", "16px").css("padding-bottom", "16px");
function closeModal() {
hideModal($(".blue-border-box"));
}
<% else %>
<% if !@homework.simi_time %>
//请求查重
var test_repeat = function () {
$.post(
'/student_work/code_repeattest',
{homework: <%=@homework.id%>},
function (data, status) {
if (data.status == 0) {
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'courses/compare_code_tips_2',:locals => {:des=>"查重完成是否立即查看结果?",:status=>1, :homework=> @homework,:courseid=> @course_id})%>');
showModal('ajax-modal', '580px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 565px; margin-top:-10px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top", "30%").css("left", "50%").css("padding-top", "10px").css("position", "fixed");
$('#ajax-modal').parent().addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left", "16px").css("padding-bottom", "16px");
function closeModal() {
hideModal($(".blue-border-box"));
}
}
else if (data.status == -1) {
// confirm("对不起只支持java/c/c++的代码查重!");
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'courses/compare_code_tips_2',:locals => {:des=>"对不起目前只支持java/c/c++的代码查重!",:status=>0, :homework=> @homework,:courseid=> @course_id})%>');
showModal('ajax-modal', '580px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 565px; margin-top:-10px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top", "30%").css("left", "50%").css("padding-top", "10px").css("position", "fixed");
$('#ajax-modal').parent().addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left", "16px").css("padding-bottom", "16px");
function closeModal() {
hideModal($(".blue-border-box"));
}
}
else if (data.status == -2) {
// confirm("对不起该作业的作品过少不能查重!");
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'courses/compare_code_tips_2',:locals => {:des=>"对不起该作业的作品过少不能查重!",:status=>0, :homework=> @homework,:courseid=> @course_id})%>');
showModal('ajax-modal', '580px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 565px; margin-top:-10px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top", "30%").css("left", "50%").css("padding-top", "10px").css("position", "fixed");
$('#ajax-modal').parent().addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left", "16px").css("padding-bottom", "16px");
function closeModal() {
hideModal($(".blue-border-box"));
}
}
}
).fail(function (xhr, status) {
// confirm("对不起,服务器繁忙请稍后再试!");
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'courses/compare_code_tips_2',:locals => {:des=>"对不起,服务器繁忙请稍后再试!",:status=>0, :homework=> @homework,:courseid=> @course_id})%>');
showModal('ajax-modal', '580px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 565px; margin-top:-10px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top", "30%").css("left", "50%").css("padding-top", "10px").css("position", "fixed");
$('#ajax-modal').parent().addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left", "16px").css("padding-bottom", "16px");
function closeModal() {
hideModal($(".blue-border-box"));
}
});
};
test_repeat();
<% else%>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'courses/compare_code_tips_1',:locals => {:homework=> @homework,:courseid=>@course_id })%>');
$('#compare-tips-1').html('您上次查重的时间为<%= Time.parse(@homework.simi_time.to_s).strftime("%Y-%m-%d %H-%M-%S")%>');
showModal('ajax-modal', '580px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 565px; margin-top:-10px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top", "30%").css("left", "50%").css("padding-top", "10px").css("position", "fixed");
$('#ajax-modal').parent().addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left", "16px").css("padding-bottom", "16px");
function closeModal() {
hideModal($(".blue-border-box"));
}
<% end %>
<% end %>

View File

@ -45,6 +45,7 @@
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
<% end%>
<% end%>
<div class="cl"></div>
<% if activity.homework_type == 3 && activity.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>
@ -75,7 +76,10 @@
<div class="homepagePostSubmit">
<%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: activity.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %>
</div>
<% end %>
<div class="homepagePostSubmit">
<%= link_to "代码查重", work_canrepeat_student_work_index_path(homework: activity.id, course_id: activity.course.id), class: 'c_blue test-program-btn',:remote => true %>
</div>
<% end %>
<% if activity.homework_type == 2%>
<div class="homepagePostDeadline mr15">
语言:

View File

@ -74,6 +74,9 @@
<div class="homepagePostSubmit">
<%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: homework_common.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %>
</div>
<div class="homepagePostSubmit">
<%= link_to "代码查重", work_canrepeat_student_work_index_path(homework: homework_common.id, course_id: homework_common.course_id), class: 'c_blue test-program-btn',:remote => true %>
</div>
<% end %>
<% if homework_common.homework_type == 2%>
<div class="homepagePostDeadline mr15">

View File

@ -286,6 +286,7 @@ RedmineApp::Application.routes.draw do
post 'code_repeattest'
post 'last_codecomparetime'
post 'set_score_rule'
get 'work_canrepeat'
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 => 20160408074854) do
ActiveRecord::Schema.define(:version => 20160414055511) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -809,6 +809,7 @@ ActiveRecord::Schema.define(:version => 20160408074854) do
t.integer "anonymous_comment", :default => 0
t.integer "quotes", :default => 0
t.integer "is_open", :default => 0
t.datetime "simi_time"
end
add_index "homework_commons", ["course_id", "id"], :name => "index_homework_commons_on_course_id_and_id"
@ -1685,6 +1686,8 @@ ActiveRecord::Schema.define(:version => 20160408074854) do
t.integer "absence_penalty", :default => 0
t.float "system_score", :default => 0.0
t.boolean "is_test", :default => false
t.integer "simi_id"
t.integer "simi_value"
end
add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id"

View File

@ -26,9 +26,9 @@
<div class="cl"></div>
</div>
<div class="post-interactive">
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" ng-href="#/homework/{{act.act_id}}" class="c-grey">回复 ({{act.reply_count}})</a></div>
<div class="post-interactive-column c-grey2" ng-if="!act.has_praise" ng-click="addPraise(act);">赞 ({{act.praise_count}})</div>
<div class="post-interactive-column c-grey2" ng-if="act.has_praise" ng-click="decreasePraise(act);">已赞 ({{act.praise_count}})</div>
<div class="post-interactive-column"><a href="javascript:void(0);" ng-href="#/homework/{{act.act_id}}" class="c-grey2">回复 ({{act.reply_count}})</a></div>
<div class="post-interactive-column c-grey" ng-if="!act.has_praise" ng-click="addPraise(act);">赞 ({{act.praise_count}})</div>
<div class="post-interactive-column c-grey" ng-if="act.has_praise" ng-click="decreasePraise(act);">已赞 ({{act.praise_count}})</div>
</div>
</div>
</div>
@ -51,9 +51,9 @@
<div class="cl"></div>
</div>
<div class="post-interactive">
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" ng-href="#/course_notice/{{act.act_id}}" class="c-grey">回复 ({{act.reply_count}})</a></div>
<div class="post-interactive-column c-grey2" ng-if="!act.has_praise" ng-click="addPraise(act);">赞 ({{act.praise_count}})</div>
<div class="post-interactive-column c-grey2" ng-if="act.has_praise" ng-click="decreasePraise(act);">已赞 ({{act.praise_count}})</div>
<div class="post-interactive-column"><a href="javascript:void(0);" ng-href="#/course_notice/{{act.act_id}}" class="c-grey2">回复 ({{act.reply_count}})</a></div>
<div class="post-interactive-column c-grey" ng-if="!act.has_praise" ng-click="addPraise(act);">赞 ({{act.praise_count}})</div>
<div class="post-interactive-column c-grey" ng-if="act.has_praise" ng-click="decreasePraise(act);">已赞 ({{act.praise_count}})</div>
</div>
</div>
</div>
@ -76,9 +76,9 @@
<div class="cl"></div>
</div>
<div class="post-interactive">
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" ng-href="#/course_discussion/{{act.act_id}}" class="c-grey">回复 ({{act.reply_count}})</a></div>
<div class="post-interactive-column c-grey2" ng-if="!act.has_praise" ng-click="addPraise(act);">赞 ({{act.praise_count}})</div>
<div class="post-interactive-column c-grey2" ng-if="act.has_praise" ng-click="decreasePraise(act);">已赞 ({{act.praise_count}})</div>
<div class="post-interactive-column"><a href="javascript:void(0);" ng-href="#/course_discussion/{{act.act_id}}" class="c-grey2">回复 ({{act.reply_count}})</a></div>
<div class="post-interactive-column c-grey" ng-if="!act.has_praise" ng-click="addPraise(act);">赞 ({{act.praise_count}})</div>
<div class="post-interactive-column c-grey" ng-if="act.has_praise" ng-click="decreasePraise(act);">已赞 ({{act.praise_count}})</div>
</div>
</div>
</div>
@ -119,9 +119,9 @@
<div class="cl"></div>
</div>
<div class="post-interactive">
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" ng-href="#/issues/{{act.act_id}}" class="c-grey"> 回复 ({{act.reply_count}})</a></div>
<div class="post-interactive-column c-grey2" ng-if="!act.has_praise" ng-click="addPraise(act);">赞 ({{act.praise_count}})</div>
<div class="post-interactive-column c-grey2" ng-if="act.has_praise" ng-click="decreasePraise(act);">已赞 ({{act.praise_count}})</div>
<div class="post-interactive-column"><a href="javascript:void(0);" ng-href="#/issues/{{act.act_id}}" class="c-grey2"> 回复 ({{act.reply_count}})</a></div>
<div class="post-interactive-column c-grey" ng-if="!act.has_praise" ng-click="addPraise(act);">赞 ({{act.praise_count}})</div>
<div class="post-interactive-column c-grey" ng-if="act.has_praise" ng-click="decreasePraise(act);">已赞 ({{act.praise_count}})</div>
</div>
</div>
</div>
@ -145,9 +145,9 @@
<div class="cl"></div>
</div>
<div class="post-interactive">
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey"> 回复 ({{act.reply_count}}) </a></div>
<div class="post-interactive-column c-grey2" ng-if="!act.has_praise" ng-click="addPraise(act);">赞 ({{act.praise_count}})</div>
<div class="post-interactive-column c-grey2" ng-if="act.has_praise" ng-click="decreasePraise(act);">已赞 ({{act.praise_count}})</div>
<div class="post-interactive-column"><a href="javascript:void(0);" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey2"> 回复 ({{act.reply_count}}) </a></div>
<div class="post-interactive-column c-grey" ng-if="!act.has_praise" ng-click="addPraise(act);">赞 ({{act.praise_count}})</div>
<div class="post-interactive-column c-grey" ng-if="act.has_praise" ng-click="decreasePraise(act);">已赞 ({{act.praise_count}})</div>
</div>
</div>
</div>
@ -183,9 +183,9 @@
<div class="cl"></div>
</div>
<div class="post-interactive">
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" ng-href="#/journal_for_message/{{act.act_id}}" class="c-grey"> 回复 ({{act.reply_count}})</a></div>
<div class="post-interactive-column c-grey2" ng-if="!act.has_praise" ng-click="addPraise(act);">赞 ({{act.praise_count}})</div>
<div class="post-interactive-column c-grey2" ng-if="act.has_praise" ng-click="decreasePraise(act);">已赞 ({{act.praise_count}})</div>
<div class="post-interactive-column"><a href="javascript:void(0);" ng-href="#/journal_for_message/{{act.act_id}}" class="c-grey2"> 回复 ({{act.reply_count}})</a></div>
<div class="post-interactive-column c-grey" ng-if="!act.has_praise" ng-click="addPraise(act);">赞 ({{act.praise_count}})</div>
<div class="post-interactive-column c-grey" ng-if="act.has_praise" ng-click="decreasePraise(act);">已赞 ({{act.praise_count}})</div>
</div>
</div>
</div>
@ -209,9 +209,9 @@
<div class="cl"></div>
</div>
<div class="post-interactive">
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" ng-href="#/blog_comment/{{act.act_id}}" class="c-grey"> 回复 ({{act.reply_count}})</a></div>
<div class="post-interactive-column c-grey2" ng-if="!act.has_praise" ng-click="addPraise(act);">赞 ({{act.praise_count}})</div>
<div class="post-interactive-column c-grey2" ng-if="act.has_praise" ng-click="decreasePraise(act);">已赞 ({{act.praise_count}})</div>
<div class="post-interactive-column"><a href="javascript:void(0);" ng-href="#/blog_comment/{{act.act_id}}" class="c-grey2"> 回复 ({{act.reply_count}})</a></div>
<div class="post-interactive-column c-grey" ng-if="!act.has_praise" ng-click="addPraise(act);">赞 ({{act.praise_count}})</div>
<div class="post-interactive-column c-grey" ng-if="act.has_praise" ng-click="decreasePraise(act);">已赞 ({{act.praise_count}})</div>
</div>
</div>
</div>

View File

@ -14,9 +14,9 @@
<div class="cl"></div>
</div>
<div class="post-interactive border-bottom">
<div class="post-interactive-reply c-grey2">回复 <span class="reply-num">({{blog.comment_count}})</span></div>
<div class="post-interactive-column c-grey2" ng-if="blog.has_praise" ng-click="decreasePraise(blog);">已赞 ({{blog.praise_count}})</div>
<div class="post-interactive-column c-grey2" ng-if="!blog.has_praise" ng-click="addPraise(blog);">赞 ({{blog.praise_count}})</div>
<div class="post-interactive-reply c-grey">回复 <span class="reply-num">({{blog.comment_count}})</span></div>
<div class="post-interactive-column c-grey" ng-if="blog.has_praise" ng-click="decreasePraise(blog);">已赞 ({{blog.praise_count}})</div>
<div class="post-interactive-column c-grey" ng-if="!blog.has_praise" ng-click="addPraise(blog);">赞 ({{blog.praise_count}})</div>
</div>
<div id="all_blog_reply">
<div class="post-reply-wrap border-bottom" ng-repeat="journal in blog.blog_comment_children">

View File

@ -20,9 +20,9 @@
<div class="cl"></div>
</div>
<div class="post-interactive border-bottom">
<div class="post-interactive-reply c-grey2">回复 <span class="reply-num">({{discussion.replies_count}})</span></div>
<div class="post-interactive-column c-grey2" ng-if="discussion.has_praise" ng-click="decreasePraise(discussion);">已赞 ({{discussion.praise_count}})</div>
<div class="post-interactive-column c-grey2" ng-if="!discussion.has_praise" ng-click="addPraise(discussion);">赞 ({{discussion.praise_count}})</div>
<div class="post-interactive-reply c-grey">回复 <span class="reply-num">({{discussion.replies_count}})</span></div>
<div class="post-interactive-column c-grey" ng-if="discussion.has_praise" ng-click="decreasePraise(discussion);">已赞 ({{discussion.praise_count}})</div>
<div class="post-interactive-column c-grey" ng-if="!discussion.has_praise" ng-click="addPraise(discussion);">赞 ({{discussion.praise_count}})</div>
</div>
<div id="all_course_message_reply">
<div class="post-reply-wrap border-bottom" ng-repeat="journal in discussion.message_children">

View File

@ -20,9 +20,9 @@
<div class="cl"></div>
</div>
<div class="post-interactive border-bottom">
<div class="post-interactive-reply c-grey2">回复 <span class="reply-num">({{news.comments_count}})</span></div>
<div class="post-interactive-column c-grey2" ng-if="news.has_praise" ng-click="decreasePraise(news);">已赞 ({{news.praise_count}})</div>
<div class="post-interactive-column c-grey2" ng-if="!news.has_praise" ng-click="addPraise(news);">赞 ({{news.praise_count}})</div>
<div class="post-interactive-reply c-grey">回复 <span class="reply-num">({{news.comments_count}})</span></div>
<div class="post-interactive-column c-grey" ng-if="news.has_praise" ng-click="decreasePraise(news);">已赞 ({{news.praise_count}})</div>
<div class="post-interactive-column c-grey" ng-if="!news.has_praise" ng-click="addPraise(news);">赞 ({{news.praise_count}})</div>
</div>
<div id="all_news_reply">
<div class="post-reply-wrap border-bottom" ng-repeat="comments in news.comments">

View File

@ -26,9 +26,9 @@
<div class="cl"></div>
</div>
<div class="post-interactive border-bottom">
<div class="post-interactive-reply c-grey2">回复 <span class="reply-num">({{homework.whomework_journal_count}})</span></div>
<div class="post-interactive-column c-grey2" ng-if="homework.has_praise" ng-click="decreasePraise(homework);">已赞 ({{homework.praise_count}})</div>
<div class="post-interactive-column c-grey2" ng-if="!homework.has_praise" ng-click="addPraise(homework);">赞 ({{homework.praise_count}})</div>
<div class="post-interactive-reply c-grey">回复 <span class="reply-num">({{homework.whomework_journal_count}})</span></div>
<div class="post-interactive-column c-grey" ng-if="homework.has_praise" ng-click="decreasePraise(homework);">已赞 ({{homework.praise_count}})</div>
<div class="post-interactive-column c-grey" ng-if="!homework.has_praise" ng-click="addPraise(homework);">赞 ({{homework.praise_count}})</div>
</div>
<div id="all_homework_reply">
<div class="post-reply-wrap border-bottom" ng-repeat="journal in homework.journals_for_messages">

View File

@ -24,9 +24,9 @@
<div class="cl"></div>
</div>
<div class="post-interactive border-bottom">
<div class="post-interactive-reply c-grey2">回复 <span class="reply-num">({{issue.journals_count}})</span></div>
<div class="post-interactive-column c-grey2" ng-if="issue.has_praise" ng-click="decreasePraise(issue);">已赞 ({{issue.praise_count}})</div>
<div class="post-interactive-column c-grey2" ng-if="!issue.has_praise" ng-click="addPraise(issue);">赞 ({{issue.praise_count}})</div>
<div class="post-interactive-reply c-grey">回复 <span class="reply-num">({{issue.journals_count}})</span></div>
<div class="post-interactive-column c-grey" ng-if="issue.has_praise" ng-click="decreasePraise(issue);">已赞 ({{issue.praise_count}})</div>
<div class="post-interactive-column c-grey" ng-if="!issue.has_praise" ng-click="addPraise(issue);">赞 ({{issue.praise_count}})</div>
</div>
<div id="all_issue_reply">
<div class="post-reply-wrap border-bottom" ng-repeat="journal in issue.issue_journals">

View File

@ -11,9 +11,9 @@
<div class="cl"></div>
</div>
<div class="post-interactive border-bottom">
<div class="post-interactive-reply c-grey2">回复 <span class="reply-num">({{message.reply_count}})</span></div>
<div class="post-interactive-column c-grey2" ng-if="message.has_praise" ng-click="decreasePraise(message);">已赞 ({{message.praise_count}})</div>
<div class="post-interactive-column c-grey2" ng-if="!message.has_praise" ng-click="addPraise(message);">赞 ({{message.praise_count}})</div>
<div class="post-interactive-reply c-grey">回复 <span class="reply-num">({{message.reply_count}})</span></div>
<div class="post-interactive-column c-grey" ng-if="message.has_praise" ng-click="decreasePraise(message);">已赞 ({{message.praise_count}})</div>
<div class="post-interactive-column c-grey" ng-if="!message.has_praise" ng-click="addPraise(message);">赞 ({{message.praise_count}})</div>
</div>
<div id="all_message_reply">

View File

@ -20,9 +20,9 @@
<div class="cl"></div>
</div>
<div class="post-interactive border-bottom">
<div class="post-interactive-reply c-grey2">回复 <span class="reply-num">({{discussion.replies_count}})</span></div>
<div class="post-interactive-column c-grey2" ng-if="discussion.has_praise" ng-click="decreasePraise(discussion);">已赞 ({{discussion.praise_count}})</div>
<div class="post-interactive-column c-grey2" ng-if="!discussion.has_praise" ng-click="addPraise(discussion);">赞 ({{discussion.praise_count}})</div>
<div class="post-interactive-reply c-grey">回复 <span class="reply-num">({{discussion.replies_count}})</span></div>
<div class="post-interactive-column c-grey" ng-if="discussion.has_praise" ng-click="decreasePraise(discussion);">已赞 ({{discussion.praise_count}})</div>
<div class="post-interactive-column c-grey" ng-if="!discussion.has_praise" ng-click="addPraise(discussion);">赞 ({{discussion.praise_count}})</div>
</div>
<div id="all_course_message_reply">
<div class="post-reply-wrap border-bottom" ng-repeat="journal in discussion.message_children">

View File

@ -114,7 +114,7 @@ function regex_course_class_period()
}
else
{
$("#course_class_period_notice").html("学时总数必须为");
$("#course_class_period_notice").html("学时总数必须为正整数");
$("#course_class_period_notice").show();
return false;
}
@ -1431,4 +1431,4 @@ function submit_course_feedback() {
function show_more_tool(){
$('#navContentCourse').css('display', 'block');
}
}

View File

@ -3,7 +3,7 @@ var apiUrl = '/api/v1/';
var debug = false; //调试标志,如果在本地请置为true
if(debug===true){
apiUrl = 'https://www.trustie.net/api/v1/';
apiUrl = 'http://localhost:3000/api/v1/';
}
app.factory('auth', function($http,$routeParams, $cookies, $q){

View File

@ -1296,7 +1296,7 @@ a.contributor_course{float: right; color: #888; font-size: 12px; font-weight: no
/*20160310分班样式*/
.select-class-option {width:125px;}
/* 弹框 */
/* 代码查重弹框 */
a.Blue-btn{ display:block; margin-right:15px;width:65px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
a:hover.Blue-btn{ background:#3598db; color:#fff;}
.fl{ float:left;}

View File

@ -1487,3 +1487,13 @@ a.choose-active {background-color:#269ac9; color:#ffffff;}
a.st_up{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 0 no-repeat; margin-top:5px; margin-left:3px;}
a.st_down{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 -22px no-repeat; margin-top:5px; margin-left:3px;}
a.st_img { display:block;width:32px; height:32px; border:1px solid #CCC; padding:1px;}
/* 代码查重弹框 */
a.Blue-btn{ display:block; margin-right:15px;width:65px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
a:hover.Blue-btn{ background:#3598db; color:#fff;}
.fl{ float:left;}
.fr{ float:right;}
.blue-border-box{ width:500px; padding:20px; margin:0 auto; background:#fff;}
.box-con h4{ font-size:14px; font-weight: bold; width:450px; text-align:center;}
.box-con{ width:450px; margin:0 auto; text-align:center;}
.box-con-a{ width:170px; margin:0 auto; margin-top:10px;}

View File

@ -23,6 +23,7 @@ h1,h2,h3,h4,h5,p {padding:0px; margin:0px;}
.c-grey3 {color:#555555;}
a {color:#707070;}
a.c-grey {color:#707070;}
a.c-grey2 {color:#9a9a9a;}
a:link,a:visited{text-decoration:none;}
a:hover,a:active{cursor:pointer;}
a.link-blue {color:#269ac9;}
@ -38,7 +39,7 @@ a.underline {text-decoration:underline;}
/*动态样式*/
.post-container {width:100%;}
.post-wrapper {width:98%; border:1px solid #e6e6e6; border-radius:3px; background-color:#ffffff; margin:15px auto;}
.post-wrapper {width:98%; border-radius:3px; box-shadow:0px 0px 8px rgba(146, 153, 169, 0.5); background-color:#ffffff; margin:15px auto;}
.post-main {padding:10px; color:#9a9a9a;}
.post-avatar {width:45px; height:45px; margin-right:10px;}
.post-title {font-size:13px; text-align:left;}
@ -48,20 +49,18 @@ a.underline {text-decoration:underline;}
.cl {clear:both; overflow:hidden;}
.post-content {width:100%; font-size:13px; line-height:18px; height:90px; overflow:hidden; word-break:break-all; word-wrap:break-word;}
.post-interactive {width:100%; height:35px; line-height:35px; vertical-align:middle; border-top:1px solid #e6e6e6; background-color:#f8f9fb;}
.post-interactive-column {width:50%; text-align:center; float:left; font-size:13px;}
.post-interactive-reply {width:50%; text-align:center; float:left; font-size:13px;}
.post-interactive-column,
.post-interactive-reply,
.post-interactive-praise {width:50%; text-align:center; float:left; font-size:13px;}
.more-wrap {width:100%;}
.more-events {width:98%; font-size:13px; text-align:center; margin:0 auto; padding: 5px 0; border:1px solid #e6e6e6; border-radius:3px; background-color:#f8f9fb; }
.border-bottom {border-bottom:1px solid #e6e6e6;}
.post-reply-wrap {width:100%; line-height:18px; background-color:#f8f9fb;}
.post-input-wrap {width:100%; line-height:18px; background-color:#f8f9fb;}
.post-reply-wrap, .post-input-wrap {width:100%; line-height:18px; background-color:#f8f9fb;}
.post-reply-row {padding:10px; color:#9a9a9a;}
.post-reply-avatar {width:45px; height:30px; text-align:center; margin-right:10px;}
.post-reply-user {font-size:13px; text-align:left; margin-bottom:10px;}
.post-reply-content {font-size:13px; text-align:left; word-break:break-all; word-wrap:break-word; overflow:hidden;}
.post-reply-date {font-size:13px;}
.post-reply-trigger {font-size:13px;}
.post-reply-date, .post-reply-trigger {font-size:13px;}
.post-input-container {padding-right:2px;}
.post-reply-input {width:100%; height:28px; line-height:28px; border:1px solid #e6e6e6; outline:none; padding:0; margin:0; border-radius:3px;}
.post-reply-submit {font-size:13px; padding:3px 8px; color:#fff; background-color:#269ac9; outline:none; border:none; display:inline-block;}