diff --git a/app/controllers/discusses_controller.rb b/app/controllers/discusses_controller.rb
index 37f3bb165..e434eaef9 100644
--- a/app/controllers/discusses_controller.rb
+++ b/app/controllers/discusses_controller.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
class DiscussesController < ApplicationController
include ApplicationHelper
before_filter :find_dis_object, :except => [:destroy]
@@ -6,10 +7,40 @@ class DiscussesController < ApplicationController
def create
if @model
if params[:reply_id].blank?
+ notes = User.current.show_name.to_s + " 评论了你发布的实训:#{params[:content]} "
@model.discusses << Discuss.new(:content => params[:content], :user_id => User.current.id, :praise_count => 0, :challenge_id => params[:challenge_id])
+ JournalsForMessage.create(
+ :jour_id => @model.user_id,
+ :jour_type => "Principal",
+ :user_id => User.current.id,
+ :reply_id => 0,
+ :is_readed => 0,
+ :private => 1,
+ :notes => notes
+ )
else
- @model.discusses << Discuss.new(:content => params[:content], :user_id => User.current.id, :parent_id => params[:reply_id], :root_id => params[:reply_id], :praise_count => 0, :challenge_id => params[:challenge_id])
+ notes = User.current.show_name.to_s + " 评论了你的回复:#{params[:content]} "
+ user_id = Discuss.find(params[:reply_id]).try(:user_id)
+ @model.discusses << Discuss.new(
+ :content => params[:content],
+ :user_id => User.current.id,
+ :parent_id => params[:reply_id],
+ :root_id => params[:reply_id],
+ :praise_count => 0,
+ :challenge_id => params[:challenge_id]
+ )
+ JournalsForMessage.create(
+ :jour_id => user_id,
+ :jour_type => "Principal",
+ :user_id => User.current.id,
+ :reply_id => 0,
+ :is_readed => 0,
+ :private => 1,
+ :notes => notes
+ )
end
+
+
if params[:dis_type] == "Shixun"
redirect_to shixun_discuss_shixun_path(@model, :challenge_id => params[:challenge_id])
end
diff --git a/app/controllers/exercise_controller.rb b/app/controllers/exercise_controller.rb
index 1b6d944cd..317e6cde5 100644
--- a/app/controllers/exercise_controller.rb
+++ b/app/controllers/exercise_controller.rb
@@ -824,11 +824,13 @@ class ExerciseController < ApplicationController
# 查作者是我,或者作者是当前课程的老师,且不在当前课程内的试卷 进行导入
@order,@b_sort = params[:order] || "created_at",params[:sort] || "desc"
@r_sort = @b_sort == "desc" ? "asc" : "desc"
- courses = User.current.courses.not_deleted.select { |course| User.current.allowed_to?(:as_teacher,course)}
- course_ids = courses.empty? ? "(-1)" : "(" + courses.map { |course| course.id}.join(',') + ")"
+ @search = params[:search] ? params[:search].to_s.strip.downcase : ""
+ #courses = User.current.courses.not_deleted.select { |course| User.current.allowed_to?(:as_teacher,course)}
+ #course_ids = courses.empty? ? "(-1)" : "(" + courses.map { |course| course.id}.join(',') + ")"
#none_courses = User.current.courses.where("is_delete = 1 or #{Course.table_name}.id = #{params[:course_id].to_i}")
#none_course_ids = none_courses.empty? ? "(-1)" : "(" + none_courses.map { |course| course.id}.join(',') + ")"
- @exercises = Exercise.where("(user_id = #{User.current.id} or course_id in #{course_ids}) and course_id != #{params[:course_id].to_i}").order("#{@order} #{@b_sort}")
+ #@exercises = Exercise.where("(user_id = #{User.current.id} or course_id in #{course_ids}) and course_id != #{params[:course_id].to_i} and exercise_name like '%#{@search}%'").order("#{@order} #{@b_sort}")
+ @exercises = Exercise.where("user_id = #{User.current.id} and exercise_name like '%#{@search}%'").order("#{@order} #{@b_sort}")
@course_id = params[:course_id]
@is_remote = true
@ex_count = @exercises.count
@@ -863,15 +865,15 @@ class ExerciseController < ApplicationController
def import_other_exercise
course_id = params[:course_id]
@course = Course.find(course_id)
- params[:exercise_id].each_with_index do |ex,i|
- exercise = Exercise.find(ex)
+ if params[:exercise_id]
+ exercise = Exercise.find(params[:exercise_id])
option = {
:exercise_name => exercise.exercise_name,
:exercise_status => 1,
:user_id => User.current.id,
:show_result => 1,
:course_id => @course.id,
- :time => exercise.time,
+ :time => -1,
:exercise_description => exercise.exercise_description
}
@exercise = Exercise.create option
@@ -903,9 +905,6 @@ class ExerciseController < ApplicationController
end
@exercise.save
end
- respond_to do |format|
- format.js
- end
end
private
diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb
index bc60fc027..23bab6a58 100644
--- a/app/controllers/games_controller.rb
+++ b/app/controllers/games_controller.rb
@@ -91,7 +91,13 @@ class GamesController < ApplicationController
# git_repository_url @myshixun, "Myshixun"
# @st 0 实践任务 1 选择题任务
def show
- # 展示全部实训
+ # g = Gitlab.client
+ # g_name = g.project(@myshixun.gpid).try(:name)
+ # if g_name.include?("-")
+ # g.delete_project()
+ # end
+ # 展示全部实训
+ # git_myshixun_url_ip @myshixun, user_id
@is_subject = params[:is_subject]
if @game.status == 1
# 放置页面ajax数据还没获取就关闭
diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb
index 26f89d0e3..c35555780 100644
--- a/app/controllers/homework_common_controller.rb
+++ b/app/controllers/homework_common_controller.rb
@@ -335,11 +335,11 @@ class HomeworkCommonController < ApplicationController
if @homework.homework_type == 4
if @homework_detail_manual.answer_open_evaluation != params[:answer_open_evaluation].to_i
@homework_detail_manual.answer_open_evaluation = params[:answer_open_evaluation].to_i
- # if @homework.end_time < Time.now
- # @homework.student_works.each do |student_work|
- # set_shixun_final_score @homework, student_work, @homework_detail_manual.answer_open_evaluation
- # end
- # end
+ if @homework.end_time < Time.now
+ @homework.student_works.each do |student_work|
+ set_shixun_final_score @homework, student_work, @homework_detail_manual.answer_open_evaluation
+ end
+ end
end
@homework.score_open = params[:homework_score_open] ? 1 : 0
else
diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb
index 14deb6c65..c7a2dd605 100644
--- a/app/controllers/shixuns_controller.rb
+++ b/app/controllers/shixuns_controller.rb
@@ -803,15 +803,20 @@ class ShixunsController < ApplicationController
end
def shixun_discuss
- @discusses = @shixun.discusses.where(:parent_id => nil).reorder("created_at desc")
+ @discusses = @shixun.discusses.reorder("created_at desc")
@discusses_count = @discusses.count
- @limit = 15
- @is_remote = true
- @discusses_pages = Paginator.new @discusses_count, @limit, params['page'] || 1
- @offset ||= @discusses_pages.offset
- @discusses = paginateHelper @discusses, @limit
+ #@limit = 15
+ #@is_remote = true
+ #@discusses_pages = Paginator.new @discusses_count, @limit, params['page'] || 1
+ # @offset ||= @discusses_pages.offset
+ #@discusses = paginateHelper @discusses, @limit
#@game_challenge = params[:challenge_id].blank? ? Challenge.find(@discusses.challenge_id) : Challenge.find(params[:challenge_id])
- @game_challenge = Challenge.find(params[:challenge_id].to_i)
+ challenge_id = params[:challenge_id].nil? ? @shixun.challenges.first.try(:id) : params[:challenge_id].to_i
+ @game_challenge = Challenge.find(challenge_id)
+ respond_to do |format|
+ format.js
+ format.html
+ end
end
def destroy
diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb
index 52fa12073..e89e7f363 100644
--- a/app/controllers/student_work_controller.rb
+++ b/app/controllers/student_work_controller.rb
@@ -1701,34 +1701,54 @@ class StudentWorkController < ApplicationController
count_row += 1
end
elsif @homework.homework_type == 3 #分组作业
+ if @homework.anonymous_comment ==0
+ sheet1.row(0).concat([l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
+ l(:excel_t_score),l(:excel_ta_score),l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
+ else
+ sheet1.row(0).concat([l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
+ l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
+ end
+ count_row = 1
+ items.each do |homework|
+ sheet1[count_row,0] = get_group_member_names homework
+ sheet1[count_row,1] = homework.name
+ sheet1[count_row,2] = (homework.project_id == 0 || homework.project_id.nil?) ? l(:excel_no_project) : homework.project.name
+ sheet1[count_row,3] = strip_html homework.description
+ sheet1[count_row,4] = homework.teacher_score.nil? ? l(:label_without_score) : homework.teacher_score.round(2)
+ sheet1[count_row,5] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2)
if @homework.anonymous_comment ==0
- sheet1.row(0).concat([l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
- l(:excel_t_score),l(:excel_ta_score),l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
+ sheet1[count_row,6] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2)
+ sheet1[count_row,7] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.absence_penalty
+ sheet1[count_row,8] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
+ sheet1[count_row,9] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
+ sheet1[count_row,10] = format_time(homework.created_at)
else
- sheet1.row(0).concat([l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
- l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
- end
- count_row = 1
- items.each do |homework|
- sheet1[count_row,0] = get_group_member_names homework
- sheet1[count_row,1] = homework.name
- sheet1[count_row,2] = (homework.project_id == 0 || homework.project_id.nil?) ? l(:excel_no_project) : homework.project.name
- sheet1[count_row,3] = strip_html homework.description
- sheet1[count_row,4] = homework.teacher_score.nil? ? l(:label_without_score) : homework.teacher_score.round(2)
- sheet1[count_row,5] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2)
- if @homework.anonymous_comment ==0
- sheet1[count_row,6] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2)
- sheet1[count_row,7] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.absence_penalty
- sheet1[count_row,8] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
- sheet1[count_row,9] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
- sheet1[count_row,10] = format_time(homework.created_at)
- else
- sheet1[count_row,6] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
- sheet1[count_row,7] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
- sheet1[count_row,8] = format_time(homework.created_at)
- end
- count_row += 1
+ sheet1[count_row,6] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
+ sheet1[count_row,7] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
+ sheet1[count_row,8] = format_time(homework.created_at)
end
+ count_row += 1
+ end
+ elsif @homework.homework_type == 4 #普通作业
+ sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),l(:excel_homework_complete_status),
+ l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
+ count_row = 1
+ shixun = @homework.homework_commons_shixuns.shixun
+ items.each do |homework|
+ sheet1[count_row,0]=homework.user.id
+ sheet1[count_row,1] = homework.user.show_name
+ sheet1[count_row,2] = homework.user.login
+ sheet1[count_row,3] = homework.user.user_extensions.student_id
+ sheet1[count_row,4] = homework.user.mail
+ sheet1[count_row,5] = homework.name
+ sheet1[count_row,6] = homework.work_status == 0 ? '--' : had_passed_changllenge_num(shixun, homework.user).to_s+"/"+shixun.challenges.count.to_s
+ sheet1[count_row,7] = homework.teacher_score.nil? ? l(:label_without_score) : homework.teacher_score.round(2)
+ sheet1[count_row,8] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2)
+ sheet1[count_row,9] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
+ sheet1[count_row,10] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
+ sheet1[count_row,11] = format_time(homework.created_at)
+ count_row += 1
+ end
end
book.write xls_report
xls_report.string
diff --git a/app/controllers/subjects_controller.rb b/app/controllers/subjects_controller.rb
index 528109a28..9d05cc44b 100644
--- a/app/controllers/subjects_controller.rb
+++ b/app/controllers/subjects_controller.rb
@@ -6,6 +6,7 @@ class SubjectsController < ApplicationController
before_filter :find_subject, :except => [:index, :new, :create, :create_subject, :new_subject, :append_to_stage]
include ApplicationHelper
+ include SubjectsHelper
def index
@order = params[:order] || "myshixun_count"
@@ -33,6 +34,7 @@ class SubjectsController < ApplicationController
def show
@stages = @subject.stages
+ @is_manager = User.current.manager_of_subject?(@subject)
end
def new
diff --git a/app/helpers/subjects_helper.rb b/app/helpers/subjects_helper.rb
index b2c94dbab..7757cd8d8 100644
--- a/app/helpers/subjects_helper.rb
+++ b/app/helpers/subjects_helper.rb
@@ -3,4 +3,21 @@ module SubjectsHelper
shixuns = Shixun.where(:id => subject.stage_shixuns.map(&:shixun_id))
co_users = User.where(:id => shixuns.map(&:user_id)).where("id != #{subject.user_id}")
end
+
+ def subject_data subject
+ result = {}
+ subject_choices = 0
+ subject_shixuns = 0
+ subject_score = 0
+ subject.stage_shixuns.each do |stage_shixun|
+ shixun = stage_shixun.shixun
+ subject_choices += shixun.challenges.where(:st => [1, 2]).count
+ subject_shixuns += shixun.challenges.where(:st => 0).count
+ subject_score += shixun.shixun_score
+ end
+ result[:subject_choices] = subject_choices
+ result[:subject_shixuns] = subject_shixuns
+ result[:subject_score] = subject_score
+ result
+ end
end
diff --git a/app/models/students_for_course.rb b/app/models/students_for_course.rb
index 662d57bd2..14071a3be 100644
--- a/app/models/students_for_course.rb
+++ b/app/models/students_for_course.rb
@@ -62,7 +62,7 @@ class StudentsForCourse < ActiveRecord::Base
def create_exercise_users
course = self.course
str = ""
- exercises = course.exercises.where("exercise_status > 0")
+ exercises = course.exercises.where("exercise_status > 1")
if exercises.count != 0
exercises.each do |ex|
if ex.exercise_users.where("user_id = #{self.student_id}").count == 0
diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb
index dce1176f2..f23a48366 100644
--- a/app/services/courses_service.rb
+++ b/app/services/courses_service.rb
@@ -593,7 +593,7 @@ class CoursesService
#多个角色加入课程
def join_course_roles params,current_user
- course = Course.find_by_invite_code(params[:invite_code]) if params[:invite_code]
+ course = Course.find_by_invite_code(params[:invite_code].strip) if params[:invite_code]
go_coursegroup_flag = 0
course_id = 0
diff --git a/app/views/account/avatar.html.erb b/app/views/account/avatar.html.erb
index b0a5eed9f..4fd128767 100644
--- a/app/views/account/avatar.html.erb
+++ b/app/views/account/avatar.html.erb
@@ -16,7 +16,7 @@
-
本地上传
+
本地上传
@@ -100,7 +100,7 @@
testend = teststr.match(/[^\\]+\.[^\(]+/i); //直接完整文件名的
filename.innerHTML = testend;
$(filename).css("color", '#333');
- $(".avatar-save").removeClass("task-btn-grey").addClass("task-btn-blue");
+ $(".avatar-save").removeClass("task-btn-grey").addClass("task-btn-orange");
$(".avatar-save").on("click", save_avatar);
}
diff --git a/app/views/account/security_settings.html.erb b/app/views/account/security_settings.html.erb
index 7c60bf230..13f6fe657 100644
--- a/app/views/account/security_settings.html.erb
+++ b/app/views/account/security_settings.html.erb
@@ -4,7 +4,7 @@
<% if @user.phone.blank? %>
未绑定
-
绑定
+
绑定
<% else %>
已绑定
您绑定的手机:<%= @user.user_phone %>
@@ -16,7 +16,7 @@
<% if @user.mail.blank? %>
未绑定
-
绑定
+
绑定
<% else %>
已绑定
您绑定的邮箱:<%= @user.user_mail %>
@@ -27,7 +27,7 @@
-
+
diff --git a/app/views/admin/_authentication_list.html.erb b/app/views/admin/_authentication_list.html.erb
index a2e1a2862..d35d2b6e6 100644
--- a/app/views/admin/_authentication_list.html.erb
+++ b/app/views/admin/_authentication_list.html.erb
@@ -36,7 +36,7 @@
- 确定
+ 确定
取消
diff --git a/app/views/courses/_compare_code_tips_1.html.erb b/app/views/courses/_compare_code_tips_1.html.erb
index 19bf87edb..da52a5ae0 100644
--- a/app/views/courses/_compare_code_tips_1.html.erb
+++ b/app/views/courses/_compare_code_tips_1.html.erb
@@ -10,8 +10,8 @@
diff --git a/app/views/courses/_compare_code_tips_2.html.erb b/app/views/courses/_compare_code_tips_2.html.erb
index 699ff94dd..434265a86 100644
--- a/app/views/courses/_compare_code_tips_2.html.erb
+++ b/app/views/courses/_compare_code_tips_2.html.erb
@@ -10,7 +10,7 @@
diff --git a/app/views/courses/_join_private_course.html.erb b/app/views/courses/_join_private_course.html.erb
index 6c6362652..fd7e0be01 100644
--- a/app/views/courses/_join_private_course.html.erb
+++ b/app/views/courses/_join_private_course.html.erb
@@ -28,7 +28,7 @@
请至少选择一个身份
- 确定
+ 确定
取消
diff --git a/app/views/courses/new.html.erb b/app/views/courses/new.html.erb
index b83aaf3f9..8be672ced 100644
--- a/app/views/courses/new.html.erb
+++ b/app/views/courses/new.html.erb
@@ -84,7 +84,7 @@
- 保存
+ 保存
<%= link_to '取消', courses_path, :class => 'task-btn fl' %>
diff --git a/app/views/courses/settings.html.erb b/app/views/courses/settings.html.erb
index fe69cbbd1..962077bbb 100644
--- a/app/views/courses/settings.html.erb
+++ b/app/views/courses/settings.html.erb
@@ -79,7 +79,7 @@
- 保存
+ 保存
<%= link_to '取消', course_path(@course), :class => 'task-btn fl ' %>
diff --git a/app/views/courses/settings/_add_teachers.html.erb b/app/views/courses/settings/_add_teachers.html.erb
index 86fc7b18f..5fb7a0e7b 100644
--- a/app/views/courses/settings/_add_teachers.html.erb
+++ b/app/views/courses/settings/_add_teachers.html.erb
@@ -52,7 +52,7 @@
取消
- 确定
+ 确定
<% end %>
diff --git a/app/views/courses/settings/_change_manager.html.erb b/app/views/courses/settings/_change_manager.html.erb
index b201df8b0..6484a0bba 100644
--- a/app/views/courses/settings/_change_manager.html.erb
+++ b/app/views/courses/settings/_change_manager.html.erb
@@ -28,7 +28,7 @@
<% end %>
请选择一个教师
- 确定
+ 确定
取消
diff --git a/app/views/courses/settings/_choose_course_group.html.erb b/app/views/courses/settings/_choose_course_group.html.erb
index c5e8acedc..2a1b6b4ac 100644
--- a/app/views/courses/settings/_choose_course_group.html.erb
+++ b/app/views/courses/settings/_choose_course_group.html.erb
@@ -15,7 +15,7 @@
<% end %>
\ No newline at end of file
diff --git a/app/views/courses/settings/_import_students.html.erb b/app/views/courses/settings/_import_students.html.erb
index 2a6e8aed7..452f0670f 100644
--- a/app/views/courses/settings/_import_students.html.erb
+++ b/app/views/courses/settings/_import_students.html.erb
@@ -20,7 +20,7 @@
- 确定
+ 确定
取消
<% end %>
diff --git a/app/views/courses/settings/_moduels.html.erb b/app/views/courses/settings/_moduels.html.erb
index 19b50d9ce..79f79f640 100644
--- a/app/views/courses/settings/_moduels.html.erb
+++ b/app/views/courses/settings/_moduels.html.erb
@@ -29,7 +29,7 @@
<% end %>
-保存
+保存
取消
diff --git a/app/views/exercise/_edit_multi.html.erb b/app/views/exercise/_edit_multi.html.erb
index c8d0d913a..bf5b49605 100644
--- a/app/views/exercise/_edit_multi.html.erb
+++ b/app/views/exercise/_edit_multi.html.erb
@@ -26,7 +26,7 @@
温馨提示:[简答题]属于主观题需要人工评分,未作答的情况下系统将自动评分
参考答案仅作为人工评分的参考
- 保存
+ 保存
取消
diff --git a/app/views/exercise/_edit_single.html.erb b/app/views/exercise/_edit_single.html.erb
index 212522326..70aa2b17a 100644
--- a/app/views/exercise/_edit_single.html.erb
+++ b/app/views/exercise/_edit_single.html.erb
@@ -49,7 +49,7 @@
分
温馨提示:[填空题]属于客观题将由系统自动评分,请设置标准答案
- 保存
+ 保存
取消
diff --git a/app/views/exercise/_exercise_setting.html.erb b/app/views/exercise/_exercise_setting.html.erb
index bb06b5ddf..758229dcc 100644
--- a/app/views/exercise/_exercise_setting.html.erb
+++ b/app/views/exercise/_exercise_setting.html.erb
@@ -350,7 +350,7 @@
\ No newline at end of file
diff --git a/app/views/exercise/_exercise_student_result.html.erb b/app/views/exercise/_exercise_student_result.html.erb
index 9839585be..fa953fd57 100644
--- a/app/views/exercise/_exercise_student_result.html.erb
+++ b/app/views/exercise/_exercise_student_result.html.erb
@@ -79,7 +79,7 @@
<% case exercise_question.question_type %>
<% when 1 %>
- <% exercise_choices = @exercise.choice_random == 1 ? exercise_question.exercise_choices.shuffle : exercise_question.exercise_choices.reorder("choice_position") %>
+ <% exercise_choices = exercise_question.exercise_choices.reorder("choice_position") %>
<% exercise_choices.each_with_index do |exercise_choice,index| %>
>
@@ -94,7 +94,7 @@
<% end %>
<% when 2 %>
- <% exercise_choices = @exercise.choice_random == 1 ? exercise_question.exercise_choices.shuffle : exercise_question.exercise_choices.reorder("choice_position") %>
+ <% exercise_choices = exercise_question.exercise_choices.reorder("choice_position") %>
<% exercise_choices.each_with_index do |exercise_choice,index| %>
>
diff --git a/app/views/exercise/_new_MC.html.erb b/app/views/exercise/_new_MC.html.erb
index 46f201dc7..fca7c23cd 100644
--- a/app/views/exercise/_new_MC.html.erb
+++ b/app/views/exercise/_new_MC.html.erb
@@ -55,8 +55,8 @@
分
温馨提示:[单选题]属于客观题将由系统自动评分,请设置标准答案
- 保存
- 取消
+ 保存
+ 取消
diff --git a/app/views/exercise/_new_MCQ.html.erb b/app/views/exercise/_new_MCQ.html.erb
index 5320f79e5..858342cbe 100644
--- a/app/views/exercise/_new_MCQ.html.erb
+++ b/app/views/exercise/_new_MCQ.html.erb
@@ -50,8 +50,8 @@
分
温馨提示:[多选题]属于客观题将由系统自动评分,请设置标准答案
- 保存
- 取消
+ 保存
+ 取消
diff --git a/app/views/exercise/_new_head.html.erb b/app/views/exercise/_new_head.html.erb
index d651b3d0d..419ec5825 100644
--- a/app/views/exercise/_new_head.html.erb
+++ b/app/views/exercise/_new_head.html.erb
@@ -12,6 +12,6 @@
- 保存
+ 保存
<% end %>
\ No newline at end of file
diff --git a/app/views/exercise/_new_multi.html.erb b/app/views/exercise/_new_multi.html.erb
index 6e627a8ef..2c3f970c1 100644
--- a/app/views/exercise/_new_multi.html.erb
+++ b/app/views/exercise/_new_multi.html.erb
@@ -24,8 +24,8 @@
温馨提示:[简答题]属于主观题需要人工评分,未作答的情况下系统将自动评分
参考答案仅作为人工评分的参考
- 保存
- 取消
+ 保存
+ 取消
diff --git a/app/views/exercise/_new_single.html.erb b/app/views/exercise/_new_single.html.erb
index 7980355ff..b11faf259 100644
--- a/app/views/exercise/_new_single.html.erb
+++ b/app/views/exercise/_new_single.html.erb
@@ -33,8 +33,8 @@
分
温馨提示:[填空题]属于客观题将由系统自动评分,请设置标准答案
- 保存
- 取消
+ 保存
+ 取消
diff --git a/app/views/exercise/_other_exercises.html.erb b/app/views/exercise/_other_exercises.html.erb
index 10638efe4..8e9be9aa3 100644
--- a/app/views/exercise/_other_exercises.html.erb
+++ b/app/views/exercise/_other_exercises.html.erb
@@ -1,48 +1,36 @@
-
diff --git a/app/views/managements/_all_department.html.erb b/app/views/managements/_all_department.html.erb
index 1f7b5c91e..a9d7e66fa 100644
--- a/app/views/managements/_all_department.html.erb
+++ b/app/views/managements/_all_department.html.erb
@@ -14,7 +14,7 @@
diff --git a/app/views/managements/_all_schools.html.erb b/app/views/managements/_all_schools.html.erb
index 05224be30..5f5843165 100644
--- a/app/views/managements/_all_schools.html.erb
+++ b/app/views/managements/_all_schools.html.erb
@@ -14,7 +14,7 @@
diff --git a/app/views/managements/_applicable_course_list.html.erb b/app/views/managements/_applicable_course_list.html.erb
index 7f8e74aa4..92b86a268 100644
--- a/app/views/managements/_applicable_course_list.html.erb
+++ b/app/views/managements/_applicable_course_list.html.erb
@@ -73,7 +73,7 @@
'
' +
'' +
''+
'';
diff --git a/app/views/managements/_authentication_list.html.erb b/app/views/managements/_authentication_list.html.erb
index 65b17273e..045ccf52c 100644
--- a/app/views/managements/_authentication_list.html.erb
+++ b/app/views/managements/_authentication_list.html.erb
@@ -36,7 +36,7 @@
- 确定
+ 确定
取消
diff --git a/app/views/managements/_create_department.html.erb b/app/views/managements/_create_department.html.erb
index 4cd6664bd..ff9c0cafb 100644
--- a/app/views/managements/_create_department.html.erb
+++ b/app/views/managements/_create_department.html.erb
@@ -23,7 +23,7 @@
diff --git a/app/views/managements/_modify_mirror_modal.html.erb b/app/views/managements/_modify_mirror_modal.html.erb
index 1c82cd14d..cdc7e5f48 100644
--- a/app/views/managements/_modify_mirror_modal.html.erb
+++ b/app/views/managements/_modify_mirror_modal.html.erb
@@ -48,7 +48,7 @@
diff --git a/app/views/managements/_new_add_unit.html.erb b/app/views/managements/_new_add_unit.html.erb
index c54a65446..c5640c566 100644
--- a/app/views/managements/_new_add_unit.html.erb
+++ b/app/views/managements/_new_add_unit.html.erb
@@ -13,9 +13,9 @@
<%= image_tag(@school.logo_link, id: "avatar_image", :class=>"school_avatar ml25")%>
-上传图片
+上传图片
<%= file_field_tag 'logo',:style => "display:none;", :id => "file", :onchange => "showPreview(this)"%>
-删除图片
+删除图片
diff --git a/app/views/managements/_new_major.html.erb b/app/views/managements/_new_major.html.erb
index b5cb5dd69..e91f5c08e 100644
--- a/app/views/managements/_new_major.html.erb
+++ b/app/views/managements/_new_major.html.erb
@@ -69,7 +69,7 @@
diff --git a/app/views/managements/_pro_authentication_list.html.erb b/app/views/managements/_pro_authentication_list.html.erb
index ec21fd371..893dac4fb 100644
--- a/app/views/managements/_pro_authentication_list.html.erb
+++ b/app/views/managements/_pro_authentication_list.html.erb
@@ -35,7 +35,7 @@
- 确定
+ 确定
取消
diff --git a/app/views/managements/_shixun_authorization_list.html.erb b/app/views/managements/_shixun_authorization_list.html.erb
index 059994224..0eb4b8d18 100644
--- a/app/views/managements/_shixun_authorization_list.html.erb
+++ b/app/views/managements/_shixun_authorization_list.html.erb
@@ -24,7 +24,7 @@
- 确定
+ 确定
取消
diff --git a/app/views/managements/_subject_authorization_list.html.erb b/app/views/managements/_subject_authorization_list.html.erb
index 63671bc55..3f05fd950 100644
--- a/app/views/managements/_subject_authorization_list.html.erb
+++ b/app/views/managements/_subject_authorization_list.html.erb
@@ -27,7 +27,7 @@
- 确定
+ 确定
取消
diff --git a/app/views/managements/_trial_authorization_list.html.erb b/app/views/managements/_trial_authorization_list.html.erb
index 5c3125ac7..22dd18052 100644
--- a/app/views/managements/_trial_authorization_list.html.erb
+++ b/app/views/managements/_trial_authorization_list.html.erb
@@ -35,7 +35,7 @@
- 确定
+ 确定
取消
diff --git a/app/views/managements/_update_department.html.erb b/app/views/managements/_update_department.html.erb
index 24e77a48d..5d6d3f41f 100644
--- a/app/views/managements/_update_department.html.erb
+++ b/app/views/managements/_update_department.html.erb
@@ -13,7 +13,7 @@
diff --git a/app/views/managements/add_departments_part.html.erb b/app/views/managements/add_departments_part.html.erb
index d94e166a9..6514083ae 100644
--- a/app/views/managements/add_departments_part.html.erb
+++ b/app/views/managements/add_departments_part.html.erb
@@ -117,7 +117,7 @@
取消
- 确定
+ 确定
diff --git a/app/views/managements/applicable_course.html.erb b/app/views/managements/applicable_course.html.erb
index 4872bdd7a..d8ebae437 100644
--- a/app/views/managements/applicable_course.html.erb
+++ b/app/views/managements/applicable_course.html.erb
@@ -1,7 +1,7 @@
<%= form_tag(url_for(applicable_course_managements_path),:id=>"classroom",:method => "post",:remote=>true) do %>
@@ -27,7 +27,7 @@
'
' +
'' +
''+
'<% end %>';
diff --git a/app/views/managements/auto_users_trial.html.erb b/app/views/managements/auto_users_trial.html.erb
index 45baf995e..b78e9745c 100644
--- a/app/views/managements/auto_users_trial.html.erb
+++ b/app/views/managements/auto_users_trial.html.erb
@@ -1,7 +1,7 @@
新增
diff --git a/app/views/managements/class_publish_shixuns.html.erb b/app/views/managements/class_publish_shixuns.html.erb
index 540b382bd..6d44878f0 100644
--- a/app/views/managements/class_publish_shixuns.html.erb
+++ b/app/views/managements/class_publish_shixuns.html.erb
@@ -11,7 +11,7 @@
实训套件名称搜索
-
搜索
+
搜索
清除
diff --git a/app/views/managements/class_shixuns.html.erb b/app/views/managements/class_shixuns.html.erb
index 2a75960e3..63c1e3757 100644
--- a/app/views/managements/class_shixuns.html.erb
+++ b/app/views/managements/class_shixuns.html.erb
@@ -17,7 +17,7 @@
实训套件名称搜索
- 搜索
+ 搜索
清除
diff --git a/app/views/managements/classroom.html.erb b/app/views/managements/classroom.html.erb
index 1494ddf2a..380f6777e 100644
--- a/app/views/managements/classroom.html.erb
+++ b/app/views/managements/classroom.html.erb
@@ -17,7 +17,7 @@
课程名称搜索
- 搜索
+ 搜索
清除
diff --git a/app/views/managements/classroom_classment.html.erb b/app/views/managements/classroom_classment.html.erb
index 6f2246357..22ac7fe7a 100644
--- a/app/views/managements/classroom_classment.html.erb
+++ b/app/views/managements/classroom_classment.html.erb
@@ -18,7 +18,7 @@
创建者单位搜索
- 搜索
+ 搜索
清除
@@ -45,7 +45,7 @@
:format => "xls"
),
:method => "POST",
- :class => "task-btn task-btn-blue ml5 mt3 fr mb5 mr30" %>
+ :class => "task-btn task-btn-orange ml5 mt3 fr mb5 mr30" %>
<% end %>
diff --git a/app/views/managements/classroom_classment.js.erb b/app/views/managements/classroom_classment.js.erb
index c51130b52..bd0c883df 100644
--- a/app/views/managements/classroom_classment.js.erb
+++ b/app/views/managements/classroom_classment.js.erb
@@ -9,4 +9,4 @@ $("#export_course_to_excel").html('<%= link_to "导出Excel",
:format => "xls"
),
:method => "POST",
- :class => "task-btn task-btn-blue ml5 mt3 fr mb5 mr30"%>');
\ No newline at end of file
+ :class => "task-btn task-btn-orange ml5 mt3 fr mb5 mr30"%>');
\ No newline at end of file
diff --git a/app/views/managements/close_shixuns.html.erb b/app/views/managements/close_shixuns.html.erb
index ac5bd52cc..f68b762cc 100644
--- a/app/views/managements/close_shixuns.html.erb
+++ b/app/views/managements/close_shixuns.html.erb
@@ -7,7 +7,7 @@
- 搜索
+ 搜索
清除
<% end %>
diff --git a/app/views/managements/depart.html.erb b/app/views/managements/depart.html.erb
index e7c8832c9..934f3c2a5 100644
--- a/app/views/managements/depart.html.erb
+++ b/app/views/managements/depart.html.erb
@@ -1,7 +1,7 @@
<%= form_tag(url_for(depart_managements_path), :id => "depart_search", :method => "post", :remote => true ) do %>
diff --git a/app/views/managements/departments.html.erb b/app/views/managements/departments.html.erb
index cfdc9db60..90cbce789 100644
--- a/app/views/managements/departments.html.erb
+++ b/app/views/managements/departments.html.erb
@@ -1,7 +1,7 @@
<%= form_tag(url_for(departments_managements_path),:id=>"department_search",:method => "post",:remote=>true) do %>
-
搜索
+
搜索
清除
<%= link_to '创建',{:controller => 'managements', :action => 'create_departments'}, :remote => true, :class => "task-btn task-btn-green fr mt6 mr30" %>
diff --git a/app/views/managements/departments_part.html.erb b/app/views/managements/departments_part.html.erb
index 28ff8ef59..952028d49 100644
--- a/app/views/managements/departments_part.html.erb
+++ b/app/views/managements/departments_part.html.erb
@@ -1,7 +1,7 @@
<%= form_tag(url_for(departments_part_managements_path),:id=>"department_part_search",:method => "post",:remote=>true) do %>
-
搜索
+
搜索
清除
<%= link_to "新建单位",add_departments_part_managements_path(),:class => "task-btn task-btn-green fr mt6 mr30" %>
diff --git a/app/views/managements/profession.html.erb b/app/views/managements/profession.html.erb
index 852ec75f2..db46637c9 100644
--- a/app/views/managements/profession.html.erb
+++ b/app/views/managements/profession.html.erb
@@ -3,7 +3,7 @@
<%= select_tag :major_level,options_for_select(major_level_option, 0), {:id=>"major_level_p", :class=>"fl task-form-15 task-height-30", :style => "margin:0px 10px 0px 25px;"} %>
<%= select_tag :discipline_category_id,options_for_select(discipline_category_option, nil), {:id=>"discipline_category_id_p", :class=>"fl task-form-15 task-height-30", :style => "margin:0px 30px 0px 50px;"} %>
<%= select_tag :first_level_discipline_id,options_for_select(first_level_discipline_option, nil), {:id=> "first_level_discipline_id_p", :class=>"fl task-form-20 task-height-30", :style => "margin:0px 30px 0px 25px;"} %>
-
搜索
+
搜索
清除
<%= link_to '新增',{ :controller => 'managements', :action => 'new_major', }, :remote => true, :class => "task-btn task-btn-green fr mr30" %>
diff --git a/app/views/managements/publish_shixuns.html.erb b/app/views/managements/publish_shixuns.html.erb
index ac596a4a0..0eb5a885a 100644
--- a/app/views/managements/publish_shixuns.html.erb
+++ b/app/views/managements/publish_shixuns.html.erb
@@ -7,7 +7,7 @@
- 搜索
+ 搜索
清除
diff --git a/app/views/managements/shixun_feedback.html.erb b/app/views/managements/shixun_feedback.html.erb
index 8bf11bd0d..83a60e921 100644
--- a/app/views/managements/shixun_feedback.html.erb
+++ b/app/views/managements/shixun_feedback.html.erb
@@ -3,7 +3,7 @@
-
+
diff --git a/app/views/managements/shixun_feedback_message.html.erb b/app/views/managements/shixun_feedback_message.html.erb
index ca73e0dfe..d818a150e 100644
--- a/app/views/managements/shixun_feedback_message.html.erb
+++ b/app/views/managements/shixun_feedback_message.html.erb
@@ -3,7 +3,7 @@
-
+
diff --git a/app/views/managements/shixuns.html.erb b/app/views/managements/shixuns.html.erb
index bd94c78e3..6c14eba73 100644
--- a/app/views/managements/shixuns.html.erb
+++ b/app/views/managements/shixuns.html.erb
@@ -15,7 +15,7 @@
- 搜索
+ 搜索
清除
diff --git a/app/views/managements/unit.html.erb b/app/views/managements/unit.html.erb
index 515218fce..2d33ab934 100644
--- a/app/views/managements/unit.html.erb
+++ b/app/views/managements/unit.html.erb
@@ -1,7 +1,7 @@
<%= form_tag(url_for(unit_managements_path), :id => "unit", :method => "post", :remote => true ) do %>
diff --git a/app/views/managements/update_user.html.erb b/app/views/managements/update_user.html.erb
index 0e110ca32..9a58cc2bc 100644
--- a/app/views/managements/update_user.html.erb
+++ b/app/views/managements/update_user.html.erb
@@ -307,7 +307,7 @@
- 保存
+ 保存
取消
@@ -346,7 +346,7 @@
-
+
diff --git a/app/views/managements/upload_logo.html.erb b/app/views/managements/upload_logo.html.erb
index 45516e2ec..1dec4cacf 100644
--- a/app/views/managements/upload_logo.html.erb
+++ b/app/views/managements/upload_logo.html.erb
@@ -14,7 +14,7 @@
* 单位全称:
- 更改
+ 更改
@@ -81,7 +81,7 @@
取消
- 确定
+ 确定
diff --git a/app/views/managements/users.html.erb b/app/views/managements/users.html.erb
index 253f99dc4..fe80b291a 100644
--- a/app/views/managements/users.html.erb
+++ b/app/views/managements/users.html.erb
@@ -30,7 +30,7 @@
- 搜索
+ 搜索
清除
diff --git a/app/views/managements/users_trial.html.erb b/app/views/managements/users_trial.html.erb
index e3932c533..33236f65b 100644
--- a/app/views/managements/users_trial.html.erb
+++ b/app/views/managements/users_trial.html.erb
@@ -31,7 +31,7 @@
diff --git a/app/views/memos/_form.html.erb b/app/views/memos/_form.html.erb
index 035f8c1ea..f222a1b8c 100644
--- a/app/views/memos/_form.html.erb
+++ b/app/views/memos/_form.html.erb
@@ -51,7 +51,7 @@
<%= render :partial => 'forums/file_form', :locals => {:container => @memo} %>
- 保存
+ 保存
取消
diff --git a/app/views/memos/_memo_all_replies.html.erb b/app/views/memos/_memo_all_replies.html.erb
index 3b9a6ffe1..ae2a0f1e9 100644
--- a/app/views/memos/_memo_all_replies.html.erb
+++ b/app/views/memos/_memo_all_replies.html.erb
@@ -13,7 +13,7 @@
<%#= f.hidden_field :parent_id, :required => true, value: @memo.parent_id %>
- 发送
+ 发送
<% end%>
diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb
index 7a32dd01b..5990059ed 100644
--- a/app/views/memos/show.html.erb
+++ b/app/views/memos/show.html.erb
@@ -5,7 +5,7 @@
- <%= @user.show_name %> > 讨论区
+ <%= @user.show_name %> > 讨论区
@@ -24,7 +24,7 @@
<%= h @memo.subject %>
<% if @memo.sticky %>
- 顶
+ 顶
<% end %>
diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb
index d3493ee30..e90e65b2d 100644
--- a/app/views/messages/_course_show.html.erb
+++ b/app/views/messages/_course_show.html.erb
@@ -47,7 +47,7 @@
<%= @topic.subject %>
<% if @topic.sticky == 1 %>
- 顶
+ 顶
<% end %>
- <% unless get_praise_num(activity)==0 %>
-
<%= get_praise_num(activity) %>
- <% end %>
+
<%= get_praise_num(activity)>0 ? get_praise_num(activity):"" %>
<% else %>
赞
- <% unless get_praise_num(activity)==0 %>
- <%= get_praise_num(activity) %>
- <% end %>
+ <%= get_praise_num(activity)>0 ? get_praise_num(activity):"" %>
<%# num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %>
diff --git a/app/views/praise_tread/praise_minus.js.erb b/app/views/praise_tread/praise_minus.js.erb
index 3b974fe5c..f9906e82d 100644
--- a/app/views/praise_tread/praise_minus.js.erb
+++ b/app/views/praise_tread/praise_minus.js.erb
@@ -8,7 +8,7 @@
<% elsif @type.to_s == 'Memo' %>
$('#praise_count_<%= @obj.id %>').html('<%= j(render :partial => 'praise_tread/activity_praise', :locals => {:activity => @obj, :user_activity_id => @obj.id, :type => "Memo"})%>');
<% else @type.to_s == 'reply' %>
- <% if ((@obj_type == 'JournalsForMessage' && @obj.jour_type == 'HomeworkCommon') || @obj_type == 'Message') && @obj_id == @user_activity_id %>
+ <% if ((@obj_type == 'JournalsForMessage' && @obj.jour_type == 'HomeworkCommon') || @obj_type == 'Message' || @obj_type == 'Discuss') && @obj_id == @user_activity_id %>
$('.reply_praise_count_<%=@user_activity_id %>').html('<%=j(render :partial=> "praise_tread/edu_praise", :locals => {:activity=>@obj, :user_activity_id=>@user_activity_id,:type=>"reply"})%>');
<% else %>
$('.reply_praise_count_<%=@obj_id %>').html('<%=j(render :partial=> "praise_tread/praise", :locals => {:activity=>@obj, :user_activity_id=>@user_activity_id,:type=>"reply"})%>');
diff --git a/app/views/praise_tread/praise_plus.js.erb b/app/views/praise_tread/praise_plus.js.erb
index fe1c72c29..56af5cd45 100644
--- a/app/views/praise_tread/praise_plus.js.erb
+++ b/app/views/praise_tread/praise_plus.js.erb
@@ -12,6 +12,8 @@
$('.reply_praise_count_<%=@user_activity_id %>').html('<%=j(render :partial=> "praise_tread/edu_praise", :locals => {:activity=>@obj, :user_activity_id=>@user_activity_id,:type=>"reply"})%>');
<% elsif @obj_type == 'Memo' %>
$('.reply_praise_count_<%=@user_activity_id %>').html('<%=j(render :partial=> "praise_tread/edu_praise", :locals => {:activity=>@obj, :user_activity_id=>@user_activity_id,:type=>"reply"})%>');
+ <% elsif @obj_type == 'Discuss' %>
+ $('.reply_praise_count_<%=@user_activity_id %>').html('<%=j(render :partial=> "praise_tread/edu_praise", :locals => {:activity=>@obj, :user_activity_id=>@user_activity_id,:type=>"reply"})%>');
<% else %>
$('.reply_praise_count_<%=@obj_id %>').html('<%=j(render :partial=> "praise_tread/praise", :locals => {:activity=>@obj, :user_activity_id=>@user_activity_id,:type=>"reply"})%>');
<% end %>
diff --git a/app/views/school/index.html.erb b/app/views/school/index.html.erb
index 34ab82068..06418d075 100644
--- a/app/views/school/index.html.erb
+++ b/app/views/school/index.html.erb
@@ -83,8 +83,8 @@
- 搜索
-
+ 搜索
+
diff --git a/app/views/school/upload_logo.html.erb b/app/views/school/upload_logo.html.erb
index 1145c3f0a..a499f47c3 100644
--- a/app/views/school/upload_logo.html.erb
+++ b/app/views/school/upload_logo.html.erb
@@ -16,7 +16,7 @@ function showPreview(source) {
<%= image_tag(@school.logo_link, id: "avatar_image", :class=>"school_avatar ml25")%>
-
上传图片
+
上传图片
<%= file_field_tag 'logo',:style => "display:none;", :id => "file", :onchange => "showPreview(this)"%>
学校名称:
@@ -61,8 +61,8 @@ function showPreview(source) {
-
提交
-
取消
+
提交
+
取消
<%#= submit_tag('提交',:class=>'mr5') %>
<%#= submit_tag('取消') %>
@@ -184,7 +184,7 @@ function showPreview(source) {
-
+
diff --git a/app/views/shixuns/_achieve_ways.html.erb b/app/views/shixuns/_achieve_ways.html.erb
index 72471053a..9b87ec8cb 100644
--- a/app/views/shixuns/_achieve_ways.html.erb
+++ b/app/views/shixuns/_achieve_ways.html.erb
@@ -41,7 +41,7 @@
- 确定
+ 确定
取消
diff --git a/app/views/shixuns/_add_collaborators.html.erb b/app/views/shixuns/_add_collaborators.html.erb
index c9bd4543c..bf666c636 100644
--- a/app/views/shixuns/_add_collaborators.html.erb
+++ b/app/views/shixuns/_add_collaborators.html.erb
@@ -29,7 +29,7 @@
取消
- 确定
+ 确定
<% end %>
diff --git a/app/views/shixuns/_apply_mirror.html.erb b/app/views/shixuns/_apply_mirror.html.erb
index 51a02f2f2..3cb0902c4 100644
--- a/app/views/shixuns/_apply_mirror.html.erb
+++ b/app/views/shixuns/_apply_mirror.html.erb
@@ -8,7 +8,7 @@
* 详细描述:
- 确定
+ 确定
取消
diff --git a/app/views/shixuns/_apply_publish_notice.html.erb b/app/views/shixuns/_apply_publish_notice.html.erb
index d0ed1dde3..678d6c0b2 100644
--- a/app/views/shixuns/_apply_publish_notice.html.erb
+++ b/app/views/shixuns/_apply_publish_notice.html.erb
@@ -14,6 +14,6 @@
\ No newline at end of file
diff --git a/app/views/shixuns/_form.html.erb b/app/views/shixuns/_form.html.erb
index e3ec54edd..c871ef233 100644
--- a/app/views/shixuns/_form.html.erb
+++ b/app/views/shixuns/_form.html.erb
@@ -110,7 +110,7 @@
- 提交
+ 提交
<%= link_to "取消", shixuns_path, :class => "task-btn fr mr10" %>
<% end %>
diff --git a/app/views/shixuns/_monitor_tip.html.erb b/app/views/shixuns/_monitor_tip.html.erb
index 537a6d91c..ed8af728e 100644
--- a/app/views/shixuns/_monitor_tip.html.erb
+++ b/app/views/shixuns/_monitor_tip.html.erb
@@ -21,9 +21,9 @@
diff --git a/app/views/shixuns/_search_course_list.html.erb b/app/views/shixuns/_search_course_list.html.erb
index d21194244..65f670163 100644
--- a/app/views/shixuns/_search_course_list.html.erb
+++ b/app/views/shixuns/_search_course_list.html.erb
@@ -22,7 +22,7 @@
- 确定
+ 确定
取消
\ No newline at end of file
diff --git a/app/views/shixuns/_shixun_pob.html.erb b/app/views/shixuns/_shixun_pob.html.erb
index d59c058a2..d2929ab78 100644
--- a/app/views/shixuns/_shixun_pob.html.erb
+++ b/app/views/shixuns/_shixun_pob.html.erb
@@ -9,6 +9,6 @@
diff --git a/app/views/shixuns/_shixun_reply.html.erb b/app/views/shixuns/_shixun_reply.html.erb
new file mode 100644
index 000000000..40d9244ba
--- /dev/null
+++ b/app/views/shixuns/_shixun_reply.html.erb
@@ -0,0 +1,8 @@
+
+ <% unless comment.parent.nil? %>
+
+ <%= render :partial => 'shixuns/shixun_reply', :locals => {:comment => comment.parent, :parent_id => parent_id, :type => type, :user_activity_id => user_activity_id} %>
+
+ <% end %>
+ <%= render :partial => 'shixuns/shixun_reply_detail', :locals => {:comment => comment, :parent_id => parent_id, :type => type, :user_activity_id => user_activity_id} %>
+
\ No newline at end of file
diff --git a/app/views/shixuns/_shixun_reply_detail.html.erb b/app/views/shixuns/_shixun_reply_detail.html.erb
new file mode 100644
index 000000000..57bd65674
--- /dev/null
+++ b/app/views/shixuns/_shixun_reply_detail.html.erb
@@ -0,0 +1,44 @@
+
+
+ <%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "32", :height => "32"), user_path(comment.creator_user), :target => "_blank", :alt => "用户头像" %>
+
+
+
+
+
+
+ <%= link_to comment.creator_user.show_real_name, user_path(comment.creator_user), :class => "content-username hide fl" %>
+
<%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %>
+
+
+ <%= link_to(' 回复'.html_safe,
+ {:controller => 'users',
+ :action => 'reply_to_comment',
+ :reply_id => comment.id,
+ :type => type,
+ :user_activity_id => user_activity_id,
+ :parent_id => parent_id},
+ :remote => true,
+ :method => 'get',:class=>"color-grey",
+ :title => l(:button_reply)) %>|
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/shixuns/shixun_discuss.html.erb b/app/views/shixuns/shixun_discuss.html.erb
new file mode 100644
index 000000000..dad31e9bb
--- /dev/null
+++ b/app/views/shixuns/shixun_discuss.html.erb
@@ -0,0 +1,18 @@
+<%= content_for(:header_tags) do %>
+ <%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
+<% end %>
+
+
\ No newline at end of file
diff --git a/app/views/shixuns/shixun_discuss.js.erb b/app/views/shixuns/shixun_discuss.js.erb
index 81a34c89f..39af37924 100644
--- a/app/views/shixuns/shixun_discuss.js.erb
+++ b/app/views/shixuns/shixun_discuss.js.erb
@@ -2,7 +2,9 @@ $("#shixun_comment_block").replaceWith("<%= j(render :partial => "games/shixun_c
$(".-tab-nav li").removeClass("tab_hover");
$('#tab_nav_4').addClass("tab_hover");
$(".tab-info").hide();
-$('#tab_con_4').show().html("<%= j(render :partial => "games/shixun_comment_list") %>");
+$('#tab_con_4').show();
+$("#game_comment_show").html("<%= j(render :partial => "games/shixun_comment_list") %>");
+
<% if @discusses_count > 0 %>
$("#discusses_count").html("<%= @discusses_count %>");
<% end %>
diff --git a/app/views/student_work/_homework_setting.html.erb b/app/views/student_work/_homework_setting.html.erb
index 3547bc864..81e5b8f3f 100644
--- a/app/views/student_work/_homework_setting.html.erb
+++ b/app/views/student_work/_homework_setting.html.erb
@@ -50,7 +50,7 @@
diff --git a/app/views/student_work/_new_pro_student_work.html.erb b/app/views/student_work/_new_pro_student_work.html.erb
index 9c0d8c3ca..b20d16083 100644
--- a/app/views/student_work/_new_pro_student_work.html.erb
+++ b/app/views/student_work/_new_pro_student_work.html.erb
@@ -66,7 +66,7 @@
- 测试代码
+ 测试代码
@@ -135,7 +135,7 @@
<% unless @is_test %>
- 提交
+ 提交
<%= link_to '取消', student_work_index_path(:homework => @homework.id), :class => 'task-btn fr mr10' %>
<% end %>
\ No newline at end of file
diff --git a/app/views/student_work/_no_teacher_score_notice.html.erb b/app/views/student_work/_no_teacher_score_notice.html.erb
index 9230a0153..dab17b9f3 100644
--- a/app/views/student_work/_no_teacher_score_notice.html.erb
+++ b/app/views/student_work/_no_teacher_score_notice.html.erb
@@ -8,7 +8,7 @@
是否确定提交?
diff --git a/app/views/student_work/_score_appeal_box.html.erb b/app/views/student_work/_score_appeal_box.html.erb
index b10a17e35..6897b3078 100644
--- a/app/views/student_work/_score_appeal_box.html.erb
+++ b/app/views/student_work/_score_appeal_box.html.erb
@@ -19,7 +19,7 @@
diff --git a/app/views/student_work/_student_work_replies.html.erb b/app/views/student_work/_student_work_replies.html.erb
index 3154829fb..814d4df18 100644
--- a/app/views/student_work/_student_work_replies.html.erb
+++ b/app/views/student_work/_student_work_replies.html.erb
@@ -15,7 +15,7 @@
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value => @homework.id %>
- 发布
+ 发布
<% end%>
diff --git a/app/views/student_work/_student_work_score_div.html.erb b/app/views/student_work/_student_work_score_div.html.erb
index b24fde87e..17d8b3436 100644
--- a/app/views/student_work/_student_work_score_div.html.erb
+++ b/app/views/student_work/_student_work_score_div.html.erb
@@ -44,7 +44,7 @@
- 确定
+ 确定
diff --git a/app/views/student_work/_upload_attachment.html.erb b/app/views/student_work/_upload_attachment.html.erb
index 5cedbbcd7..71c8a627c 100644
--- a/app/views/student_work/_upload_attachment.html.erb
+++ b/app/views/student_work/_upload_attachment.html.erb
@@ -16,7 +16,7 @@
-
+
选择文件
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',
@@ -50,7 +50,7 @@
diff --git a/app/views/student_work/edit.html.erb b/app/views/student_work/edit.html.erb
index 47c54f64e..770a40052 100644
--- a/app/views/student_work/edit.html.erb
+++ b/app/views/student_work/edit.html.erb
@@ -121,7 +121,7 @@
<% end %>
- 提交
+ 提交
<%=link_to '取消', student_work_index_path(:homework => @homework.id),:class=>'task-btn fr mr10' %>
<% else %>
diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb
index 56721b607..0d15ffd2d 100644
--- a/app/views/student_work/index.html.erb
+++ b/app/views/student_work/index.html.erb
@@ -2,8 +2,16 @@
<%= javascript_include_tag "/assets/codemirror/codemirror_python_ruby_c" %>
<%= javascript_include_tag "resizeable_table" %>
<%= stylesheet_link_tag "/assets/codemirror/codemirror" %>
+ <%= stylesheet_link_tag '/editormd/css/editormd','/editormd/css/editormd.min.css' %>
+<%= javascript_include_tag '/editormd/lib/marked.min.js','/editormd/lib/prettify.min.js','/editormd/lib/raphael.min.js','/editormd/lib/underscore.min.js','/editormd/lib/sequence-diagram.min.js',
+ '/editormd/lib/flowchart.min.js','/editormd/lib/jquery.flowchart.min.js','/editormd/editormd.js'%>
<%= import_ke(enable_at: true, prettify: false, init_activity: true) %>
<% end %>
+
<% is_group_project_homework = @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
';
+ '确定 ';
pop_box_new(htmlvalue,575,140);
$('#commit-program-work-btn').show();
return;
@@ -314,7 +314,7 @@ function alert_choose_homework_type(id){
'请先选择作业类型
' +
'' +
'' +
'' +
diff --git a/public/stylesheets/css/edu-class.css b/public/stylesheets/css/edu-class.css
index ec1fa7488..0aa962049 100644
--- a/public/stylesheets/css/edu-class.css
+++ b/public/stylesheets/css/edu-class.css
@@ -113,7 +113,7 @@ a:hover.edu-class-right-add{ background-color: rgba(0, 0, 0, 0.4);}
.sy_tab_con_p{ font-size: 16px;text-align: center; margin-bottom:100px; color:#888;}
.sy_classlist{padding: 20px 20px;border-bottom: 1px dashed #e6e6e6;}
.resource_btns_bottom a{ height: 28px; line-height: 28px; padding:0px 15px; border:1px solid #d5d5d5; border-radius:3px; color: #666;}
-.resource_btns_bottom a:hover{background-color: #3498db; color: #fff; }
+.resource_btns_bottom a:hover{background-color: #ff7500; color: #fff; }
.resource_classlist_title a{margin-top:1px;color:#333; display: block; font-size: 16px; font-weight: normal;margin-bottom: 5px; max-width:780px; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
.edu-reference-ma-block{height: 40px; margin: 30px auto; text-align: center; font-size: 16px; color: #9a9a9a;}
diff --git a/public/stylesheets/css/edu-common.css b/public/stylesheets/css/edu-common.css
index fb481a197..755dc112f 100644
--- a/public/stylesheets/css/edu-common.css
+++ b/public/stylesheets/css/edu-common.css
@@ -130,11 +130,10 @@ a.task-btn{cursor: pointer;display: inline-block;font-weight: bold;border: none;
a:hover.task-btn {background: #c3c3c3; color: #666;}
a.task-btn-green{background: #29bd8b; color: #fff!important;}
a:hover.task-btn-green{background: #19b17e;}
-a.task-btn-orange{ background:#fc8675; color:#fff !important;}
-a:hover.task-btn-orange{ background:#fc8675;}
-a.task-btn-blue{background: #3498db; color:#fff!important;}
a.task-btn-orange{background: #FF7500; color:#fff!important;}
-a:hover.task-btn-blue{background: #5faee3;color:#fff;}
+a:hover.task-btn-orange{ background:#ff7500;}
+a.task-btn-blue{background: #199ed8; color:#fff!important;}
+a:hover.task-btn-blue{background: #199ed8;color:#fff;}
a.task-btn-grey{background-color: #d4d6d8; color: #4d555d!important;}
a:hover.task-btn-grey{background-color: #d4d6d8; color: #4d555d;}
a.task-btn-grey-white{background-color: #c2c4c6; color: #fff;}
@@ -198,7 +197,7 @@ a.course-bth-blue{cursor: pointer;background-color:#199ed8 ;color: #ffffff !impo
.break_word_firefox{white-space: pre-wrap !important;word-break: break-all;}
.pre_word{white-space: pre-wrap;word-wrap: break-word;word-break: normal;}
.pr {position:relative;}
-.df {display:flex;}
+.df {display:flex;display: -webkit-flex;display: -ms-flex;}
.w100{width: 100px;}
.w150{width: 150px;}
.w200{width: 200px;}
- 老师回复 - <%= time_from_now child.created_at %> - - <%= render :partial => "discusses/dis_praise", :locals => {:discuss => child} %> - - - <% if User.current.manager_of_shixun?(@shixun) || (User.current == dis.user && dis.children.count == 0) %> - 删除 - <% end %> - +
+ <% if comment.creator_user == User.current || User.current.admin? || User.current.manager_of_shixun?(comment.dis_id) %> + 删除 + <% end %> + | + <%= link_to( + '回复'.html_safe, + {:controller => 'users' ,:action => 'reply_to',:reply_id => comment.id, :type => @game_challenge.class.to_s, :user_activity_id => @game_challenge.id}, + :remote => true, + :method => 'get', + :title => l(:button_reply),:class => "color-grey" + ) %> + | + + <%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> +
-<%= child.content %>
- -