Merge branch 'develop' into szzh
This commit is contained in:
commit
3752cc62cd
4
Gemfile
4
Gemfile
|
@ -44,7 +44,9 @@ group :development do
|
|||
gem 'grape-swagger'
|
||||
gem 'better_errors', '~> 1.1.0'
|
||||
gem 'rack-mini-profiler', '~> 0.9.3'
|
||||
gem 'win32console'
|
||||
if RUBY_PLATFORM =~ /w32/
|
||||
gem 'win32console'
|
||||
end
|
||||
end
|
||||
|
||||
group :development, :test do
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
class ExerciseController < ApplicationController
|
||||
layout "base_courses"
|
||||
|
||||
before_filter :find_exercise_and_course, :only => [:create_exercise_question, :edit, :update, :show, :destroy, :commit_exercise, :commit_answer,:publish_exercise,:republish_exercise,:show_student_result]
|
||||
before_filter :find_course, :only => [:index,:new,:create,:student_exercise_list]
|
||||
before_filter :find_exercise_and_course, :only => [:create_exercise_question, :edit, :update, :show, :destroy,
|
||||
:commit_exercise, :commit_answer,:publish_exercise,:republish_exercise,
|
||||
:show_student_result,:student_exercise_list]
|
||||
before_filter :find_course, :only => [:index,:new,:create]
|
||||
include ExerciseHelper
|
||||
|
||||
def index
|
||||
|
@ -27,7 +29,7 @@ class ExerciseController < ApplicationController
|
|||
if @is_teacher || User.current.admin?
|
||||
exercises = @course.exercises.order("created_at asc")
|
||||
else
|
||||
exercises = @course.exercises.where(:exercise_status => 2).order("created_at asc")
|
||||
exercises = @course.exercises.where("exercise_status <> 1").order("created_at asc")
|
||||
end
|
||||
@exercises = paginateHelper exercises,20 #分页
|
||||
respond_to do |format|
|
||||
|
@ -54,41 +56,26 @@ class ExerciseController < ApplicationController
|
|||
end
|
||||
@exercise = Exercise.find params[:id]
|
||||
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
|
||||
if @exercise.exercise_status != 2 && (!(User.current.allowed_to?(:as_teacher,@course) || User.current.admin?))
|
||||
render_403
|
||||
return
|
||||
end
|
||||
exercise_end = @exercise.end_time > Time.now
|
||||
if @exercise.time == -1
|
||||
@can_edit_excercise = exercise_end
|
||||
else
|
||||
@can_edit_excercise = (!has_commit_exercise?(@exercise.id,User.current.id)&& exercise_end) || User.current.admin?
|
||||
@can_edit_excercise = !has_commit_exercise?(@exercise.id,User.current.id)&& exercise_end
|
||||
end
|
||||
@exercise_user = ExerciseUser.where("user_id=? and exercise_id=?", User.current.id, @exercise.id).first
|
||||
# 学生点击的时候即创建关联,自动保存
|
||||
#eu = ExerciseUser.create(:user_id => User.current, :exercise_id => @exercise.id, :start_at => Time.now, :status => false)
|
||||
|
||||
# 已提交问卷的用户不能再访问该界面
|
||||
=begin
|
||||
if has_commit_exercise?(@exercise.id, User.current.id) && (!User.current.admin?)
|
||||
respond_to do |format|
|
||||
format.html {render :layout => 'base_courses'}
|
||||
end
|
||||
else
|
||||
=end
|
||||
if !@is_teacher && !has_click_exercise?(@exercise.id, User.current.id)
|
||||
unless @is_teacher
|
||||
@exercise_user = ExerciseUser.where("user_id=? and exercise_id=?", User.current.id, @exercise.id).first
|
||||
if @exercise_user.nil?
|
||||
eu = ExerciseUser.create(:user_id => User.current.id, :exercise_id => @exercise.id, :start_at => Time.now, :status => false)
|
||||
@exercise_user = ExerciseUser.where("user_id=? and exercise_id=?", User.current.id, @exercise.id).first
|
||||
end
|
||||
# @percent = get_percent(@exercise,User.current)
|
||||
exercise_questions = @exercise.exercise_questions
|
||||
@exercise_questions = paginateHelper exercise_questions,5 #分页
|
||||
score = calculate_student_score(@exercise, User.current)
|
||||
eu = get_exercise_user(@exercise.id, User.current.id)
|
||||
eu.update_attributes(:score => score)
|
||||
respond_to do |format|
|
||||
format.html {render :layout => 'base_courses'}
|
||||
end
|
||||
@exercise_user.update_attributes(:score => score)
|
||||
end
|
||||
# @percent = get_percent(@exercise,User.current)
|
||||
@exercise_questions = @exercise.exercise_questions
|
||||
respond_to do |format|
|
||||
format.html {render :layout => 'base_courses'}
|
||||
end
|
||||
#end
|
||||
end
|
||||
|
||||
|
@ -369,8 +356,20 @@ class ExerciseController < ApplicationController
|
|||
end
|
||||
|
||||
def student_exercise_list
|
||||
=begin
|
||||
if @exercise.end_time <= Time.now
|
||||
@course.student.each do |student|
|
||||
if ExerciseUser.where("user_id = ? && exercise_id = ?",student.student_id,@exercise.id).empty?
|
||||
ExerciseUser.create(:user_id => student.student_id, :exercise_id => @exercise.id, :start_at => @exercise.end_time, :status => true,:score=>0)
|
||||
end
|
||||
|
||||
s_score = calculate_student_score(@exercise, student.student)
|
||||
exercise_user = ExerciseUser.where("user_id =? and exercise_id=?", student.student_id, @exercise.id).first
|
||||
exercise_user.update_attributes(:score => s_score)
|
||||
end
|
||||
end
|
||||
=end
|
||||
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
|
||||
@exercise = Exercise.find params[:id]
|
||||
@all_exercises = @course.exercises.where("exercise_status > 1").order("created_at desc")
|
||||
@exercise_count = @exercise.exercise_users.where('score is not NULL').count
|
||||
if @is_teacher || (!@exercise.exercise_users.where(:user_id => User.current.id).empty? && @exercise.end_time <= Time.now)
|
||||
|
@ -537,12 +536,9 @@ class ExerciseController < ApplicationController
|
|||
# @score = 100
|
||||
if @uncomplete_question.count < 1
|
||||
# 查看是否有已提交记录
|
||||
eu = get_exercise_user(@exercise.id, User.current.id)
|
||||
eu.user_id = User.current.id
|
||||
eu.exercise_id = @exercise.id
|
||||
eu.score = @score
|
||||
if eu.save
|
||||
#redirect_to poll_index_path(:polls_group_id => @course.id,:polls_type => 'Course')
|
||||
cur_exercise_user.score = @score
|
||||
if cur_exercise_user.save
|
||||
#redirect_to poll_index_path(:polls_group_id => @course.id,:polls_type => 'Course')
|
||||
@status = 0 #提交成功
|
||||
else
|
||||
@status = 2 #未知错误
|
||||
|
@ -550,6 +546,7 @@ class ExerciseController < ApplicationController
|
|||
else
|
||||
@status = 1 #有未做得必答题
|
||||
end
|
||||
@save = params[:save].to_i if params[:save]
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
@ -560,11 +557,11 @@ class ExerciseController < ApplicationController
|
|||
def show_student_result
|
||||
@user = User.find params[:user_id]
|
||||
@can_edit_excercise = false
|
||||
@exercise_user = ExerciseUser.where("user_id =? and exercise_id=?", @user.id, @exercise.id).first
|
||||
@exercise_questions = @exercise.exercise_questions
|
||||
score = calculate_student_score(@exercise, @user)
|
||||
eu = get_exercise_user(@exercise.id, @user.id)
|
||||
eu.update_attributes(:score => score)
|
||||
@exercise_user = ExerciseUser.where("user_id =? and exercise_id=?", @user.id, @exercise.id).first
|
||||
respond_to do |format|
|
||||
format.html {render :layout => 'base_courses'}
|
||||
end
|
||||
|
@ -582,15 +579,15 @@ class ExerciseController < ApplicationController
|
|||
standard_answer = get_user_standard_answer(question, user)
|
||||
unless answer.empty?
|
||||
# 问答题有多个答案
|
||||
if question.question_type == 3
|
||||
if question.question_type == 3 && !standard_answer.empty?
|
||||
if standard_answer.include?(answer.first.answer_text)
|
||||
score1 = score1+ question.question_score unless question.question_score.nil?
|
||||
end
|
||||
elsif question.question_type == 1
|
||||
elsif question.question_type == 1 && !standard_answer.nil?
|
||||
if answer.first.exercise_choice.choice_position == standard_answer.exercise_choice_id
|
||||
score2 = score2 + question.question_score unless question.question_score.nil?
|
||||
end
|
||||
else
|
||||
elsif question.question_type == 2 && !standard_answer.nil?
|
||||
arr = get_mulscore(question, user)
|
||||
if arr.to_i == standard_answer.exercise_choice_id
|
||||
score3 = score3 + question.question_score unless question.question_score.nil?
|
||||
|
|
|
@ -142,6 +142,13 @@ class IssuesController < ApplicationController
|
|||
@project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'#by young
|
||||
@available_watchers = (@issue.project.users.sort + @issue.watcher_users).uniq
|
||||
|
||||
#id name email
|
||||
#1. issues list persons
|
||||
#2. project persons
|
||||
@at_persons = @journals.map(&:user) + @issue.project.users
|
||||
@at_persons = @at_persons.uniq{|u| u.id}.delete_if{|u| u.id == User.current.id}
|
||||
@at_persons = nil
|
||||
|
||||
respond_to do |format|``
|
||||
format.html {
|
||||
retrieve_previous_and_next_issue_ids
|
||||
|
|
|
@ -1934,6 +1934,8 @@ module ApplicationHelper
|
|||
candown = true
|
||||
elsif attachment.container.class.to_s=="StudentWork"
|
||||
candown = true
|
||||
elsif attachment.container.class.to_s=="BlogComment"
|
||||
candown = true
|
||||
elsif attachment.container.class.to_s == "User"
|
||||
candown = (attachment.is_public == 1 || attachment.is_public == true || attachment.author_id == User.current.id)
|
||||
elsif attachment.container_type == "Bid" && attachment.container && attachment.container.courses
|
||||
|
@ -2659,4 +2661,38 @@ int main(int argc, char** argv){
|
|||
true
|
||||
end
|
||||
end
|
||||
|
||||
def import_ke(default_opt={})
|
||||
opt = {enable_at: true, prettify: false, init_activity: false}.merge default_opt
|
||||
ss = ''
|
||||
if opt[:enable_at]
|
||||
ss = '<script type="text/javascript">'
|
||||
ss += 'window.atPersonLists = [];'
|
||||
|
||||
@at_persons && @at_persons.each_with_index do |person,index|
|
||||
ss += "var o = {id: #{index}, name: '#{person.show_name}', login: '#{person.login}', searchKey: '#{person.get_at_show_name}'};"
|
||||
ss += "atPersonLists.push(o);"
|
||||
end
|
||||
|
||||
ss += "</script>"
|
||||
end
|
||||
|
||||
ss += javascript_include_tag("/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg')
|
||||
if opt[:enable_at]
|
||||
ss += javascript_include_tag('/assets/kindeditor/at/jquery.caret.min.js', '/assets/kindeditor/at/jquery.atwho.js', '/assets/kindeditor/at/config.js')
|
||||
ss += stylesheet_link_tag("/assets/kindeditor/at/jquery.atwho.css")
|
||||
end
|
||||
|
||||
if opt[:prettify]
|
||||
ss += javascript_include_tag 'prettify'
|
||||
ss += stylesheet_link_tag 'prettify'
|
||||
end
|
||||
|
||||
if opt[:init_activity]
|
||||
ss += javascript_include_tag "init_activity_KindEditor"
|
||||
end
|
||||
|
||||
ss.html_safe
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -267,7 +267,7 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
|
||||
# 课程成员得分(英雄榜)
|
||||
def act_as_student_score
|
||||
unless self.user.allowed_to?(:as_teacher, self.jour)
|
||||
if !self.user.allowed_to?(:as_teacher, self.jour) && self.jour_type == "Course"
|
||||
course_member_score(self.jour_id, self.user_id, "JournalForMessage")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,10 +18,28 @@ class Memo < ActiveRecord::Base
|
|||
#elasticsearch kaminari init
|
||||
Kaminari::Hooks.init
|
||||
Elasticsearch::Model::Response::Response.__send__ :include, Elasticsearch::Model::Response::Pagination::Kaminari
|
||||
settings index: { number_of_shards: 5 } do
|
||||
settings index: {
|
||||
number_of_shards: 5 ,
|
||||
analysis: {
|
||||
char_filter: {
|
||||
and_filter: {
|
||||
type: "mapping",
|
||||
mappings: [ "&=> and "]
|
||||
}
|
||||
},
|
||||
analyzer: {
|
||||
my_analyzer: {
|
||||
type: 'custom',
|
||||
tokenizer: 'standard',
|
||||
filter: ['classic'],
|
||||
char_filter: ['html_strip']
|
||||
}
|
||||
}
|
||||
}
|
||||
} do
|
||||
mappings dynamic: 'false' do
|
||||
indexes :subject, analyzer: 'smartcn',index_options: 'offsets'
|
||||
indexes :content, analyzer: 'smartcn',index_options: 'offsets'
|
||||
indexes :subject, analyzer: 'smartcn',index_options: 'offsets'#, char_filter: 'html_strip'
|
||||
indexes :content, analyzer:'my_analyzer',index_options: 'offsets',search_analyzer: 'smartcn'
|
||||
indexes :updated_at,index:"not_analyzed" ,type:'date'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -410,10 +410,14 @@ class User < Principal
|
|||
else
|
||||
name = lastname+firstname
|
||||
end
|
||||
name = name.empty? || name.nil? ? login : name
|
||||
name
|
||||
name.empty? || name.nil? ? login : name
|
||||
end
|
||||
## end
|
||||
|
||||
def get_at_show_name
|
||||
name = show_name
|
||||
name = "#{name} #{self.login}" if name != self.login
|
||||
end
|
||||
|
||||
#added by nie
|
||||
def count_new_journal_reply
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false) %>
|
||||
<% end %>
|
||||
<h3 style="float: left">
|
||||
<%=l(:label_system_message)%>
|
||||
</h3><br/>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'prettify','/assets/kindeditor/pasteimg' %>
|
||||
<%= stylesheet_link_tag 'prettify'%>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: true) %>
|
||||
<% end %>
|
||||
|
||||
<%= labelled_form_for @bid,:html => { :multipart => true } do |f| %>
|
||||
<%= render :partial => 'new_homework_form', :locals => { :bid => @bid, :bid_id => "edit_bid_#{@bid.id}",:f=>f,:edit_mode => true} %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' ,'blog' %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false) %>
|
||||
<%= javascript_include_tag 'blog' %>
|
||||
<% end %>
|
||||
|
||||
<div class="resources mt10">
|
||||
<div id="new_course_topic">
|
||||
<div class="homepagePostBrief c_grey">
|
||||
<div>
|
||||
<input type="text" value="<%= article.title%>" name="blog_comment[title]" id="message_subject" class="InputBox w713" maxlength="255" onkeyup="regexTopicSubject();" placeholder="发布文章,请先输入文章标题" " />
|
||||
<input type="text" value="<%= article.title%>" name="blog_comment[title]" id="message_subject" class="InputBox w713" maxlength="255" onkeyup="regexTopicSubject();" placeholder="发布文章,请先输入文章标题" />
|
||||
<p id="subjectmsg"></p>
|
||||
</div>
|
||||
<div id="topic_editor" style="display: block;">
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' ,'blog' %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false) %>
|
||||
<%= javascript_include_tag 'blog' %>
|
||||
<% end %>
|
||||
<div class="resources mt10">
|
||||
<div id="new_course_topic">
|
||||
<div class="homepagePostBrief c_grey">
|
||||
<div>
|
||||
<input type="text" name="blog_comment[title]" id="message_subject" class="InputBox w713" maxlength="255" onfocus="$('#topic_editor').show()" onkeyup="regexTopicSubject();" placeholder="发布文章,请先输入文章标题" " >
|
||||
<input type="text" name="blog_comment[title]" id="message_subject" class="InputBox w713" maxlength="255" onfocus="$('#topic_editor').show()" onkeyup="regexTopicSubject();" placeholder="发布文章,请先输入文章标题" >
|
||||
<p id="subjectmsg"></p>
|
||||
</div>
|
||||
<div id="topic_editor" style="display: none;">
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false) %>
|
||||
<% end %>
|
||||
<li>
|
||||
<div style="display: none ;" class="fl"><label><span class="c_red">*</span> <%= l(:field_subject) %> :</label></div>
|
||||
<div style="display: none;"><%= f.text_field :title, { size: 60, id: "message_subject",:class=>"talk_input w585 fl" }.merge({ hidden: "hidden"}) %></div>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor",'blog' %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false) %>
|
||||
<%= javascript_include_tag "init_activity_KindEditor",'blog' %>
|
||||
<% end %>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor", '/assets/kindeditor/pasteimg', "init_activity_KindEditor" %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false) %>
|
||||
<%= javascript_include_tag "init_activity_KindEditor" %>
|
||||
<% end %>
|
||||
|
||||
<style type="text/css">
|
||||
/*回复框*/
|
||||
.homepagePostReplyInputContainer .ke-toolbar {display: none; width: 400px; border: none; background: none; padding: 0px 0px;}
|
||||
|
|
|
@ -27,8 +27,7 @@
|
|||
else if (window.attachEvent)
|
||||
window.attachEvent("onload", buildsubmenus)
|
||||
</script>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<%#= javascript_include_tag "/assets/kindeditor/kindeditor-min" %>
|
||||
<%= import_ke(enable_at: false, prettify: false) %>
|
||||
|
||||
|
||||
<%= render :partial => 'blogs/article_list', :locals => {:blog=>@user.blog,:topics => @user.blog.articles.reorder("#{BlogComment.table_name}.sticky desc,#{BlogComment.table_name}.created_on desc"), :page => 0, :user => @user} %>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false) %>
|
||||
<% end %>
|
||||
|
||||
<%= error_messages_for 'message' %>
|
||||
<div class="resources mt10">
|
||||
<div id="new_course_topic">
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor", '/assets/kindeditor/pasteimg', "init_activity_KindEditor" %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false) %>
|
||||
<%= javascript_include_tag "init_activity_KindEditor" %>
|
||||
<% end %>
|
||||
|
||||
<style type="text/css">
|
||||
/*回复框*/
|
||||
.homepagePostReplyInputContainer .ke-toolbar {display: none; width: 400px; border: none; background: none; padding: 0px 0px;}
|
||||
|
|
|
@ -27,8 +27,9 @@
|
|||
else if (window.attachEvent)
|
||||
window.attachEvent("onload", buildsubmenus)
|
||||
</script>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<%#= javascript_include_tag "/assets/kindeditor/kindeditor-min" %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false) %>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor", '/assets/kindeditor/pasteimg', "init_activity_KindEditor" %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
<style type="text/css">
|
||||
/*回复框*/
|
||||
div.ke-toolbar {
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<style type="text/css">
|
||||
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
||||
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
|
||||
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
||||
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
||||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||
div.ke-toolbar .ke-outline{border:none;}
|
||||
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
||||
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
|
||||
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
||||
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
||||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||
div.ke-toolbar .ke-outline{border:none;}
|
||||
|
||||
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
|
||||
div.recall_con{width:570px;}
|
||||
div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
|
||||
/*.ke-container{height: 80px !important;}*/
|
||||
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
|
||||
div.recall_con{width:570px;}
|
||||
div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
|
||||
/*.ke-container{height: 80px !important;}*/
|
||||
</style>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor" %>
|
||||
<script >
|
||||
|
@ -20,11 +20,11 @@
|
|||
<h4><%= l(:label_leave_message) %></h4>
|
||||
|
||||
<% if !User.current.logged?%>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
<hr/>
|
||||
</div>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
<hr/>
|
||||
</div>
|
||||
<% else %>
|
||||
<div nhname='new_message_' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_course_message'}, :html=>{:id => "course_feedback_new"},:method => "post") do |f|%>
|
||||
|
@ -55,37 +55,37 @@
|
|||
$("#submit_feedback_course").one('click',function() {
|
||||
$("#course_feedback_new").submit();
|
||||
});
|
||||
KindEditor.ready(function(K){
|
||||
$("a[nhname='reply_btn']").live('click',function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.container = $(this).parent('div').parent('div');
|
||||
params.div_form = $(">.respond-form",params.container);
|
||||
params.form = $("form",params.div_form);
|
||||
params.textarea = $("textarea[name='user_notes']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
|
||||
params.height = 55;
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
}
|
||||
params.cancel_btn.click();
|
||||
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||
setTimeout(function(){
|
||||
if(!params.div_form.is(':hidden')){
|
||||
params.textarea.show();
|
||||
params.textarea.focus();
|
||||
params.textarea.hide();
|
||||
}
|
||||
},300);
|
||||
params.textarea.data('init',1);
|
||||
});
|
||||
KindEditor.ready(function(K){
|
||||
$("a[nhname='reply_btn']").live('click',function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.container = $(this).parent('div').parent('div');
|
||||
params.div_form = $(">.respond-form",params.container);
|
||||
params.form = $("form",params.div_form);
|
||||
params.textarea = $("textarea[name='user_notes']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
|
||||
params.height = 55;
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
}
|
||||
params.cancel_btn.click();
|
||||
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||
setTimeout(function(){
|
||||
if(!params.div_form.is(':hidden')){
|
||||
params.textarea.show();
|
||||
params.textarea.focus();
|
||||
params.textarea.hide();
|
||||
}
|
||||
},300);
|
||||
params.textarea.data('init',1);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor",'blog' %>
|
||||
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<%= javascript_include_tag 'blog' %>
|
||||
<% end %>
|
||||
|
||||
<style type="text/css">
|
||||
/*回复框*/
|
||||
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
||||
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
|
||||
span.ke-toolbar-icon-url{background-image:url("/images/public_icon.png")}
|
||||
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
||||
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
||||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||
|
@ -191,7 +196,7 @@
|
|||
<div class="homepagePostReplyInputContainer" style="margin-top: 8px">
|
||||
<div nhname='new_message_<%= @article.id%>' style="display:none;">
|
||||
<%= form_for 'blog_comment',:url => {:action => 'reply',:controller => 'blog_comments',:user_id=>@article.author.id,:blog_id=>@article.blog_id, :id => @article.id},:method => "post",:html => {:multipart => true, :id => 'message_form'} do |f|%>
|
||||
<input type="hidden" name="course_id" value="<%= @course.id%>"
|
||||
<input type="hidden" name="course_id" value="<%= @course.id%>">
|
||||
<input type="hidden" name="blog_comment[title]" value="RE:<%= @article.title%>">
|
||||
<input type="hidden" name="blog_comment[sticky]" value="0">
|
||||
<input type="hidden" name="quote[quote]" value="">
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
<div id="popbox" style="text-align: center;margin-top: 25px">
|
||||
<% if status == 0 && exercise.time != -1%>
|
||||
<% if @save == 1 %>
|
||||
<h3 style="font-weight: normal;color: green">保存成功,测验日期截止前您还可以继续答题。</h3>
|
||||
<%= link_to "确定", exercise_index_path(:course_id => @course.id),:class => 'commit'%>
|
||||
<% elsif status == 0 && exercise.time != -1%>
|
||||
<h3 style="font-weight: normal;color: green">提交成功!您的分数是:<%=@score %>分。</h3>
|
||||
<%= link_to "确定", exercise_path(),:class => 'commit'%>
|
||||
<% elsif status == 0 && Time.parse(format_time(exercise.end_time)).strftime("%Y-%m-%d %H:%M:%S") > Time.now.strftime("%Y-%m-%d %H:%M:%S") %>
|
||||
<h3 style="font-weight: normal;color: green">提交成功!</h3>
|
||||
<h3 style="font-weight: normal;color: green">提交成功,测验日期截止前您还可以修改,祝您考高分。</h3>
|
||||
<%= link_to "确定", exercise_index_path(:course_id => @course.id),:class => 'commit'%>
|
||||
<% elsif status == 1 && Time.parse(format_time(exercise.end_time)).strftime("%Y-%m-%d %H:%M:%S") > Time.now.strftime("%Y-%m-%d %H:%M:%S")%>
|
||||
<h3 style="font-weight: normal;color: red">保存成功!</h3>
|
||||
<h3 style="font-weight: normal;color: red">提交成功,您还有未完成的题目,测验日期截止前您还可以继续答题,祝您考高分。</h3>
|
||||
<%= link_to "确定",exercise_index_path(:course_id => @course.id),:class => 'commit'%>
|
||||
<% elsif status == 1 && Time.parse(format_time(exercise.end_time)).strftime("%Y-%m-%d %H:%M:%S") <= Time.now.strftime("%Y-%m-%d %H:%M:%S")%>
|
||||
<h3 style="font-weight: normal;color: red">时间已到!</h3>
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
<!--<li><%#= link_to "导出", export_exercise_exercise_path(exercise.id,:format => "xls"), :class => "polls_de fr ml5"%></li>-->
|
||||
<%# end%>
|
||||
<% if exercise.exercise_status == 1 %>
|
||||
<li><a href="javascript:" class="pollsbtn btn_pu fr mr5" onclick="exercise_submit(<%= exercise.id%>,<%= exercise.exercise_name.length %>,<%=index.to_i %>);">发布试卷</a></li>
|
||||
<li><a href="javascript:" class="pollsbtn btn_pu fr mr10 ml5" onclick="exercise_submit(<%= exercise.id%>,<%= exercise.exercise_name.length %>,<%=index.to_i %>);">发布试卷</a></li>
|
||||
<% elsif exercise.exercise_status == 2%>
|
||||
<li><a href="javascript:" class="pollsbtn btn_de fr mr5" onclick="republish_exercise(<%= exercise.id%>,<%=index.to_i %>);">取消发布</a></li>
|
||||
<li><a href="javascript:" class="pollsbtn btn_de fr mr10 ml5" onclick="republish_exercise(<%= exercise.id%>,<%=index.to_i %>);">取消发布</a></li>
|
||||
<% else%>
|
||||
<li class="pollsbtn fr mr10 pollsbtn_grey" style="margin-left: 5px;" >发布试卷</li>
|
||||
<li class="pollsbtn fr mr10 pollsbtn_grey ml5">发布试卷</li>
|
||||
<% end%>
|
||||
|
||||
<% if exercise.exercise_status == 1%>
|
||||
|
@ -42,18 +42,24 @@
|
|||
<% if exercise.exercise_status == 1 %>
|
||||
<li><%= link_to l(:button_edit), edit_exercise_path(exercise.id), :class => "polls_de fr ml10"%></li>
|
||||
<li class="polls_date fr"><%=exercise.publish_time.nil? ? "未发布" : "将于"+format_time(exercise.publish_time.to_s)+"发布"%></li>
|
||||
<% else%>
|
||||
<% elsif exercise.exercise_status == 2 %>
|
||||
<li class="polls_de_grey fr ml10" title="未发布的试卷才能进行编辑">编辑</li>
|
||||
<li class="polls_date fr">已发布</li>
|
||||
<% else %>
|
||||
<li class="polls_de_grey fr ml10" title="未发布的试卷才能进行编辑">编辑</li>
|
||||
<li class="polls_date fr">已截止</li>
|
||||
<% end%>
|
||||
|
||||
<% else%>
|
||||
<% if exercise.exercise_status == 2%>
|
||||
<% if exercise.exercise_status != 1%>
|
||||
<%# if has_commit%>
|
||||
<!--li><%#= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_st fl c_dblue" %></li>
|
||||
<li class="pollsbtn_tip fl ml5">已答</li-->
|
||||
<%#else%>
|
||||
<%= link_to (index.to_i+1).to_s+". "+exercise_name, exercise_path(exercise.id), :class => "polls_title polls_title_st fl c_dblue"%>
|
||||
<%= link_to (index.to_i+1).to_s+". "+exercise_name, exercise_path(exercise.id), :class => "polls_title polls_title_st fl c_dblue"%>
|
||||
<% if exercise.end_time <= Time.now && has_commit_exercise?(exercise.id, User.current.id) %>
|
||||
<li class="pollsbtn_tip fl ml5">已答</li>
|
||||
<% end %>
|
||||
<%#end%>
|
||||
<% end%>
|
||||
<li class="polls_date fr mr10">截止时间:<%= format_time(exercise.end_time.to_s)%></li>
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
$("#RSide").removeAttr("id");
|
||||
$("#homework_page_right").css("min-height",$("#LSide").height()-30);
|
||||
$("#Container").css("width","1000px");
|
||||
<%uncomplete_question =get_uncomplete_question(exercise, User.current) %>;
|
||||
<% if (uncomplete_question.count < 1) %>
|
||||
$("#exercise_submit_btn").html("提交");
|
||||
<% end %>
|
||||
var end_time = <%=exercise.end_time.to_i%>;
|
||||
getTime(end_time);
|
||||
/*start_time = new Date();
|
||||
|
@ -104,11 +100,6 @@
|
|||
{
|
||||
obj.checked = false;
|
||||
}
|
||||
if(dataObj.complete == 1) {
|
||||
$("#exercise_submit_btn").html("提交");
|
||||
} else {
|
||||
$("#exercise_submit_btn").html("保存");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -163,11 +154,6 @@
|
|||
{
|
||||
obj.checked = false;
|
||||
}
|
||||
if(dataObj.complete == 1) {
|
||||
$("#exercise_submit_btn").html("提交");
|
||||
} else {
|
||||
$("#exercise_submit_btn").html("保存");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -210,11 +196,6 @@
|
|||
success: function (data) {
|
||||
var dataObj = eval(data);
|
||||
obj.value = dataObj.text;
|
||||
if(dataObj.complete == 1) {
|
||||
$("#exercise_submit_btn").html("提交");
|
||||
} else {
|
||||
$("#exercise_submit_btn").html("保存");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -228,7 +209,8 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<div class="ur_buttons">
|
||||
<%= link_to "保存",commit_exercise_exercise_path(exercise),:id=>"exercise_submit_btn", :method => :post,:class => "ur_button_submit",:style => "margin-left:80px;",:format => 'js',:remote=>true %>
|
||||
<%= link_to "保存",commit_exercise_exercise_path(exercise,:save => 1),:id=>"exercise_submit_btn", :method => :post,:class => "ur_button_submit",:format => 'js',:remote=>true %>
|
||||
<%= link_to "提交",commit_exercise_exercise_path(exercise), :data => {:confirm => "您确定要提交吗?"},:id=>"exercise_submit_btn", :method => :post,:class => "ur_button_submit",:style => "margin-left:20px;",:format => 'js',:remote=>true %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<!--contentbox end-->
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
<% else %>
|
||||
×
|
||||
<% end %></span><br />
|
||||
标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) %>
|
||||
标准答案:<%= convert_to_char(standard_answer.first.exercise_choice_id.to_s) if !standard_answer.empty? %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="ur_inputs">
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<div>
|
||||
<div class="testEditTitle"> 第<%= list_index+1%>题:<%= exercise_question.question_title %> (<%= exercise_question.question_score %>分)
|
||||
<br />
|
||||
标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) %>
|
||||
标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) if exercise_question.exercise_standard_answers.first %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="ur_inputs">
|
||||
|
@ -64,7 +64,7 @@
|
|||
<div>
|
||||
<div class="testEditTitle"> 第<%= list_index+1%>题:<%= exercise_question.question_title %> (<%= exercise_question.question_score %>分)
|
||||
<br />
|
||||
标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) %>
|
||||
标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) if exercise_question.exercise_standard_answers.first%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="ur_inputs">
|
||||
|
|
|
@ -35,17 +35,19 @@
|
|||
});
|
||||
$(function(){
|
||||
<% if Time.parse(h(@exercise.end_time)).strftime("%Y-%m-%d-%H-%M-%S") <= Time.now.strftime("%Y-%m-%d-%H-%M-%S") %>
|
||||
$("#show_student_result_div").on('click',show_result);
|
||||
$("#show_student_result_div_<%= exercise.id%>").on('click',function() {
|
||||
window.location.href = '<%=show_student_result_exercise_path(@exercise,:user_id => exercise.user_id) %>';
|
||||
});
|
||||
<% else %>
|
||||
$("#show_student_result_div").attr("title","截止日期未到,暂不能查看学生答题结果");
|
||||
$("#student_name_id").attr("title","截止日期未到,暂不能查看学生答题结果");
|
||||
$("#student_id_id").attr("title","截止日期未到,暂不能查看学生答题结果");
|
||||
$("#student_class_id").attr("title","截止日期未到,暂不能查看学生答题结果");
|
||||
$("#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() {
|
||||
window.location.href = '<%=show_student_result_exercise_path(@exercise,:user_id => exercise.user.id) %>';
|
||||
}
|
||||
/*function show_result(id) {
|
||||
window.location.href = '<%#=show_student_result_exercise_path(@exercise,:user_id => exercise.user.id) %>';
|
||||
}*/
|
||||
</script>
|
||||
<ul class="hworkListRow" id="student_work_<%= exercise.id%>">
|
||||
<li class="hworkList340 width530">
|
||||
|
@ -53,16 +55,16 @@
|
|||
<li class="hworkPortrait mt15 mr10">
|
||||
<%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40"),user_activities_path(exercise.user)) %>
|
||||
</li>
|
||||
<div id="show_student_result_div" style="cursor: pointer;" class="student_work_<%= exercise.id%>">
|
||||
<div id="show_student_result_div_<%= exercise.id%>" style="cursor: pointer;" class="student_work_<%= exercise.id%>">
|
||||
<li>
|
||||
<ul class="mt10 fl">
|
||||
<li class="hworkStName mr15 mt16" title="姓名" id="student_name_id">
|
||||
<li class="hworkStName mr15 mt16" title="姓名" id="student_name_<%= exercise.id%>">
|
||||
<%=exercise.user.show_name %>
|
||||
</li>
|
||||
<li class="hworkStID mr10 mt16" title="学号" id="student_id_id">
|
||||
<li class="hworkStID mr10 mt16" title="学号" id="student_id_<%= exercise.id%>">
|
||||
<%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%>
|
||||
</li>
|
||||
<li class="hworkStID mt16" title="班级" id="student_class_id">
|
||||
<li class="hworkStID mt16" title="班级" id="student_class_<%= exercise.id%>">
|
||||
--
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'commit_alert',:locals => {:status => @status,:exercise =>@exercise}) %>');
|
||||
showModal('ajax-modal', '270px');
|
||||
$('#ajax-modal').css('height','110px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
"<a href='javascript:' onclick='hidden_atert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
|
|
|
@ -1 +1,9 @@
|
|||
<%= render :partial => 'exercise_form'%>
|
||||
<%= render :partial => 'exercise_form'%>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
<% if @exercise.exercise_name != "" && @exercise.end_time != "" %>
|
||||
$("#polls_head_show").show();
|
||||
$("#polls_head_edit").hide();
|
||||
<% end %>
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<%= javascript_include_tag 'new_user' %>
|
||||
<% end %>
|
||||
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' ,'new_user' %>
|
||||
<script>
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
<% @nav_dispaly_forum_label = 1%>
|
||||
<!-- added by fq -->
|
||||
<h1 style="margin-top: 2%; margin-left: 49%"><%= l :label_forum_new %></h1>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<%= render 'form_create_mode' %>
|
||||
|
||||
<%#= link_to l(:button_back), forums_path %>
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<%= javascript_include_tag 'new_user','/assets/kindeditor/pasteimg','/assets/kindeditor/kindeditor' %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<%= javascript_include_tag 'new_user' %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<div class="postRightContainer">
|
||||
<div id="create_memo_div" style="display: none">
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true} do |f| %>
|
||||
<%= error_messages_for 'issue', 'time_entry' %>
|
||||
<%= render :partial => 'conflict' if @conflict %>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<% column_content = ( query.inline_columns.map {|column| "#{column_content_new(column, issue)}"}) %>
|
||||
<% unless issue.author.nil? || issue.author.name == "Anonymous" %>
|
||||
<span class ="<%= get_issue_type(column_content[1])[0] %>" title="<%= get_issue_type(column_content[1])[1] %>"></span>
|
||||
<div class="problem_txt fl">
|
||||
<div class="problem_txt fl w600">
|
||||
<%= link_to issue.author.name, user_path(issue.author), :class => "problem_name c_orange fl" %>
|
||||
<span class="fl"><%= l(:label_post_on_issue) %>(<%= "#{raw column_content[2]}" %>):</span>
|
||||
<div class="problem_tit_div fl break_word">
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<div class="project_r_h" xmlns="http://www.w3.org/1999/html">
|
||||
<h2 class="project_h2"><%= l(:label_issue_new) %></h2>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: true) %>
|
||||
<% end %>
|
||||
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= l(:label_issue_edit) %></h2>
|
||||
</div>
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<div class="footerAboutContainer">
|
||||
<ul class="footerAbout">
|
||||
<li class="fl"><a href="javascript:void:(0);" class="f_grey mw20" target="_blank"><%= l(:label_about_us)%></a>|</li>
|
||||
<li class="fl"><a href="http://forge.trustie.net/projects/2/feedback" class="f_grey mw20" target="_blank"><%= l(:label_contact_us)%></a>|</li>
|
||||
<li class="fl"><a href="https://forge.trustie.net/projects/2/feedback" class="f_grey mw20" target="_blank"><%= l(:label_contact_us)%></a>|</li>
|
||||
<li class="fl"><a href="javascript:void:(0);" class="f_grey mw20" target="_blank"><%= l(:label_recruitment_information)%></a>|</li>
|
||||
<li class="fl"><a href="http://forge.trustie.net/forums/1/memos/1168" class="f_grey mw20" target="_blank"><%= l(:label_surpport_group)%></a>|</li>
|
||||
<li class="fl"><%= link_to l(:label_surpport_group), "https://#{Setting.host_name}/forums/1/memos/1168", :class => "f_grey mw20", :target=>"_blank" %>|</li>
|
||||
<li class="fl"><a href="javascript:void:(0);" class="f_grey mw20" target="_blank"><%= l(:label_forums)%></a>|</li>
|
||||
<li class="fl"><a href="javascript:void:(0);" class="f_grey ml20" target="_blank"><%= l(:label_language)%></a>
|
||||
<select class="languageBox">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<li class="fl"><a href="<%= about_us_path %>" class="f_grey mw20" target="_blank"><%= l(:label_about_us)%></a>|</li>
|
||||
<li class="fl"><a href="<%= agreement_path %>" class="f_grey mw20" target="_blank">服务协议</a>|</li>
|
||||
<li class="fl" style="display: none"><span class="f_grey mw20" title="暂未开放"><%= l(:label_recruitment_information)%></span>|</li>
|
||||
<li class="fl"><a href="http://forge.trustie.net/forums/1/memos/1168" class="f_grey mw20" target="_blank"><%= l(:label_surpport_group)%></a>|</li>
|
||||
<li class="fl"><%= link_to l(:label_surpport_group), "https://#{Setting.host_name}/forums/1/memos/1168", :class => "f_grey mw20", :target=>"_blank" %>|</li>
|
||||
<li class="fl"><a href="<%= forums_path(:reorder_complex=>'desc')%>" class="f_grey mw20" target="_blank" ><%= l(:label_forums)%></a></li>
|
||||
|
||||
</ul>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<%= link_to "作业", user_homeworks_user_path(User.current.id), :class => "c_white f16 db p10"%>
|
||||
</li>
|
||||
<li class="navHomepageMenu fl mr30">
|
||||
<a href="http://forge.trustie.net/forums/1/memos/1168" class="c_white f16 db p10">帮助中心</a>
|
||||
<%= link_to "帮助中心", "https://#{Setting.host_name}/forums/1/memos/1168", :class =>"c_white f16 db p10" %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<div class="fl">
|
||||
<ul>
|
||||
<li class="navHomepageMenu fl mr40">
|
||||
<a href="http://forge.trustie.net/forums/1/memos/1168" class="c_white f16 p10">帮助中心</a>
|
||||
<%= link_to "帮助中心", "https://#{Setting.host_name}/forums/1/memos/1168", :class =>"c_white f16 db p10" %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -188,10 +188,10 @@
|
|||
<%= link_to( "", new_poll_path(:polls_type => "Course",:polls_group_id => @course.id), :class => 'courseMenuSetting', :title =>"#{l(:label_new_poll)}") if is_teacher %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% unless show_nav?(User.current.allowed_to?(:as_teacher,@course)? @course.exercises.count : @course.exercises.where("exercise_status=2").count) %>
|
||||
<% unless show_nav?(User.current.allowed_to?(:as_teacher,@course)? @course.exercises.count : @course.exercises.where("exercise_status <> 1").count) %>
|
||||
<div class="subNav">
|
||||
<%= link_to "在线测验", exercise_index_path(:course_id => @course.id), :class => " f14 c_blue02"%>
|
||||
<%= link_to "(#{User.current.allowed_to?(:as_teacher,@course)? @course.exercises.count : @course.exercises.where("exercise_status=2").count})", exercise_index_path(:course_id => @course.id), :class => "subnav_num c_orange" %>
|
||||
<%= link_to "(#{User.current.allowed_to?(:as_teacher,@course)? @course.exercises.count : @course.exercises.where("exercise_status <> 1").count})", exercise_index_path(:course_id => @course.id), :class => "subnav_num c_orange" %>
|
||||
<%= link_to( "", new_exercise_path(:course_id => @course.id), :class => 'courseMenuSetting', :title =>"新建试卷") if is_teacher %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','application','prettify', 'nyan','leftside', :media => 'all' %>
|
||||
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
||||
<%= javascript_include_tag('jquery-1.8.3-ui-1.9.2-ujs-2.0.3', 'application', 'jquery.colorbox-min') %>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' ,'prettify' %>
|
||||
|
||||
<%= import_ke(enable_at: false, prettify: true, init_activity: false) %>
|
||||
|
||||
|
||||
<%= heads_for_theme %>
|
||||
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<%= heads_for_theme %>
|
||||
<%= stylesheet_link_tag 'public', 'pleft', 'project','prettify','jquery/jquery-ui-1.9.2','header','repository' %>
|
||||
<%= javascript_include_tag 'cookie','project', 'header','prettify','select_list_move','attachments' %>
|
||||
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<!-- page specific tags -->
|
||||
<%= yield :header_tags -%>
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
<%= javascript_include_tag 'new_user','/assets/kindeditor/pasteimg','/assets/kindeditor/kindeditor'%>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<%= javascript_include_tag 'new_user' %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function check_and_submit(){
|
||||
|
|
|
@ -4,8 +4,12 @@
|
|||
@nav_dispaly_main_contest_label = 1 %>
|
||||
<% @nav_dispaly_forum_label = 1%>
|
||||
<!-- <h1>New memo</h1> -->
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<div class="top-content">
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<div class="top-content">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="info_font" style="width: 240px; color: #15bccf"><%= l(:label_projects_community)%></td>
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor","forum" %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<%= javascript_include_tag 'forum' %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
/*回复框*/
|
||||
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor" %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
<%= error_messages_for 'message' %>
|
||||
<% replying ||= false %>
|
||||
<% extra_option = replying ? { hidden: "hidden"} : { maxlength: 200 } %>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
<li>
|
||||
<label><span class="c_red">*</span> <%= l(:field_title) %> :</label>
|
||||
<input type="text" name="news[title]" class="hwork_input" id="news_title" size="60" onkeyup="regexTitle();" maxlength="60" placeholder="60个字符以内" value="<%= is_new ? '' : @news.title %>">
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= l(:label_course_news) %></h2>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
<li>
|
||||
<label style="float: left"><span class="c_red">*</span> <%= l(:field_title) %> :</label>
|
||||
<input type="text" name="news[title]" class="hwork_input_news fl" id="news_title" width="576px" onblur="regexTitle();" maxlength="60" placeholder="60个字符以内" value="<%= is_new ? '' : @news.title %>">
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= l(:label_course_news) %></h2>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg'%>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
function check_org_title()
|
||||
{
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg'%>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
function check_org_title(title)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor" %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
<style type="text/css">
|
||||
/*回复框*/
|
||||
.homepagePostReplyInputContainer .ke-toolbar {display: none; width: 400px; border: none; background: none; padding: 0px 0px;}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg'%>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
function check_org_title()
|
||||
{
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<%= javascript_include_tag "jquery.infinitescroll.js" %>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor" %>
|
||||
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
<style type="text/css">
|
||||
/*回复框*/
|
||||
.homepagePostReplyInputContainer .ke-toolbar {display: none; width: 400px; border: none; background: none; padding: 0px 0px;}
|
||||
|
|
|
@ -11,7 +11,10 @@
|
|||
div.recall_con{width:570px;}
|
||||
div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
|
||||
</style>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
<div class="msg_box" id='leave-message' nhname='new_message' style="height:auto;">
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<h4><%= l(:label_user_response) %></h4>
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<% if @repository.supports_cat? %>
|
||||
<%= link_to_if action_name != 'entry', l(:button_view), {:action => 'entry', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> |
|
||||
<% end %>
|
||||
<% if @repository.supports_annotate? %>
|
||||
<%= link_to_if action_name != 'annotate', l(:button_annotate), {:action => 'annotate', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> |
|
||||
<% end %>
|
||||
<%# if @repository.supports_annotate? %>
|
||||
<%#= link_to_if action_name != 'annotate', l(:button_annotate), {:action => 'annotate', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %>
|
||||
<%# end %>
|
||||
<%= link_to(l(:button_download),
|
||||
{:action => 'raw', :id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
<span class="fr mr5"><font class="fb ml2 mr2 vl_commit">
|
||||
|
||||
<%=link_to"全部提交次数", {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev,:page=>1 ,:commit_count =>"#{@changesets_all_count}"} %></font>
|
||||
<%=link_to"提交明细", {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev,:page=>1 ,:commit_count =>"#{@changesets_all_count}"} %></font>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,11 @@
|
|||
<div class="ni_con_work">
|
||||
<p>
|
||||
当前作业
|
||||
<span class="c_pink">已开启匿评</span>
|
||||
<% if @homework.homework_detail_manual.comment_status == 2 %>
|
||||
<span class="c_pink">已开启匿评</span>
|
||||
<% elsif @homework.homework_detail_manual.comment_status == 3 %>
|
||||
<span class="c_pink">已关闭匿评</span>
|
||||
<% end %>
|
||||
您提交作品后将
|
||||
<span class="c_pink">不会收到任何匿评作品</span>,
|
||||
您的作品也
|
||||
|
|
|
@ -46,7 +46,12 @@
|
|||
<% if @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<li>
|
||||
<span class="tit_fb"> 关联项目:</span>
|
||||
<%= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
|
||||
<% if work.project.is_public || User.current.member_of?(work.project) || User.current.admin? %>
|
||||
<%= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
|
||||
<% else %>
|
||||
<span title ="该项目是私有的"><%=work.project.name %></span>
|
||||
<% end %>
|
||||
<%#= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
|
||||
<span class="ml5">(综合评分:<font class="c_red"><%=work.project.project_score.score.to_i %></font>)</span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
<span class="c_red">系统提示:该作业要求各组长提交作品,提交作品时请添加组成员。谢谢配合!</span>
|
||||
<% end %>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<% if activity.homework_type == 3 && !is_teacher && activity.homework_detail_group.base_on_project == 1 %>
|
||||
<% if activity.homework_type == 3 && !is_teacher && activity.homework_detail_group.base_on_project == 1 && User.current.member_of_course?(activity.course)%>
|
||||
<% projects = cur_user_projects_for_homework activity %>
|
||||
<% works = cur_user_works_for_homework activity %>
|
||||
<% if works.nil? && projects.nil? %>
|
||||
|
@ -105,8 +105,8 @@
|
|||
</div>
|
||||
<% activity.student_work_projects.where("is_leader = 1").each do |pro| %>
|
||||
<div class="mr10 mb10 fl">
|
||||
<% project = Project.find pro.project_id || User.current.member_of?(project) || User.current.admin? %>
|
||||
<% if project.is_public || project.user_id == User.current.id %>
|
||||
<% project = Project.find pro.project_id %>
|
||||
<% if project.is_public || User.current.member_of?(project) || User.current.admin?%>
|
||||
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:alt =>"项目头像" %>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius") %>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor" %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
<style type="text/css">
|
||||
/*回复框*/
|
||||
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<span class="c_red">系统提示:该作业要求各组长<%=link_to "创建项目", new_project_path(:host=>Setting.host_name),:class=>"c_red",:title=>"新建项目",:style=>"text-decoration:underline;"%>,组成员加入项目,然后由组长关联项目。谢谢配合!</span>
|
||||
<% end %>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<% if homework_common.homework_type == 3 && !is_teacher && homework_common.homework_detail_group.base_on_project == 1%>
|
||||
<% if homework_common.homework_type == 3 && !is_teacher && homework_common.homework_detail_group.base_on_project == 1 && User.current.member_of_course?(homework_common.course) %>
|
||||
<% projects = cur_user_projects_for_homework homework_common %>
|
||||
<% works = cur_user_works_for_homework homework_common %>
|
||||
<% if works.nil? && projects.nil? %>
|
||||
|
@ -108,8 +108,8 @@
|
|||
<% homework_common.student_work_projects.where("is_leader = 1").each do |pro| %>
|
||||
<div class="mr10 mb10 fl">
|
||||
<% project = Project.find pro.project_id %>
|
||||
<% if project.is_public == 1 || User.current.member_of?(project) || User.current.admin? %>
|
||||
<%=link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name) %>
|
||||
<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
|
||||
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:alt =>"项目头像" %>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius") %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg'%>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
|
||||
<%= javascript_include_tag 'homework','baiduTemplate' %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor" %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
<style type="text/css">
|
||||
/*回复框*/
|
||||
.homepagePostReplyInputContainer .ke-toolbar {display: none; width: 400px; border: none; background: none; padding: 0px 0px;}
|
||||
|
|
|
@ -11,7 +11,10 @@
|
|||
div.recall_con{width:570px;}
|
||||
div.recall_con .reply_btn{margin-left:555px;margin-top:5px;}
|
||||
</style>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
<div class="dis">
|
||||
<div class="msg_box" id='leave-message'>
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor","user" %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<%= javascript_include_tag "user" %>
|
||||
<% end %>
|
||||
|
||||
<style type="text/css">
|
||||
/*回复框*/
|
||||
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||
|
|
|
@ -1,235 +0,0 @@
|
|||
# = Redmine configuration file
|
||||
#
|
||||
# Each environment has it's own configuration options. If you are only
|
||||
# running in production, only the production block needs to be configured.
|
||||
# Environment specific configuration options override the default ones.
|
||||
#
|
||||
# Note that this file needs to be a valid YAML file.
|
||||
# DO NOT USE TABS! Use 2 spaces instead of tabs for identation.
|
||||
#
|
||||
# == Outgoing email settings (email_delivery setting)
|
||||
#
|
||||
# === Common configurations
|
||||
#
|
||||
# ==== Sendmail command
|
||||
#
|
||||
# production:
|
||||
# email_delivery:
|
||||
# delivery_method: :sendmail
|
||||
#
|
||||
# ==== Simple SMTP server at localhost
|
||||
#
|
||||
# production:
|
||||
# email_delivery:
|
||||
# delivery_method: :smtp
|
||||
# smtp_settings:
|
||||
# address: smtp.163.com
|
||||
# port: 25
|
||||
#
|
||||
# ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com
|
||||
#
|
||||
# production:
|
||||
# email_delivery:
|
||||
# delivery_method: :smtp
|
||||
# smtp_settings:
|
||||
# address: smtp.gmail.com
|
||||
# port: 587
|
||||
# authentication: :login
|
||||
# domain: 'foo.com'
|
||||
# user_name: senluowanxiangt@gmail.com
|
||||
# password: 1913TXBja
|
||||
#
|
||||
# ==== SMTP server at example.com using PLAIN authentication
|
||||
#
|
||||
# production:
|
||||
# email_delivery:
|
||||
# delivery_method: :smtp
|
||||
# smtp_settings:
|
||||
# address: smtp.gmail.com
|
||||
# port: 587
|
||||
# authentication: :plain
|
||||
# domain: 'example.com'
|
||||
# user_name: senluowanxiangt@gmail.com
|
||||
# password: 1913TXBja
|
||||
#
|
||||
# ==== SMTP server at using TLS (GMail)
|
||||
#
|
||||
# This might require some additional configuration. See the guides at:
|
||||
# http://www.redmine.org/projects/redmine/wiki/EmailConfiguration
|
||||
#
|
||||
# production:
|
||||
# email_delivery:
|
||||
# delivery_method: :smtp
|
||||
# smtp_settings:
|
||||
# enable_starttls_auto: true
|
||||
# address: smtp.gmail.com
|
||||
# port: 587
|
||||
# domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
|
||||
# authentication: :plain
|
||||
# user_name: senluowanxiangt@gmail.com
|
||||
# password: 1913TXBja
|
||||
#
|
||||
#
|
||||
# === More configuration options
|
||||
#
|
||||
# See the "Configuration options" at the following website for a list of the
|
||||
# full options allowed:
|
||||
#
|
||||
# http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer
|
||||
|
||||
|
||||
|
||||
default:
|
||||
email_delivery:
|
||||
delivery_method: :smtp
|
||||
smtp_settings:
|
||||
address: mail.trustie.net
|
||||
port: 25
|
||||
domain: mail.trustie.net
|
||||
authentication: :login
|
||||
user_name: "mail@trustie.net"
|
||||
password: "loong2010"
|
||||
|
||||
# Absolute path to the directory where attachments are stored.
|
||||
# The default is the 'files' directory in your Redmine instance.
|
||||
# Your Redmine instance needs to have write permission on this
|
||||
# directory.
|
||||
# Examples:
|
||||
# attachments_storage_path: /var/redmine/files
|
||||
# attachments_storage_path: D:/redmine/files
|
||||
attachments_storage_path:
|
||||
|
||||
# Configuration of the autologin cookie.
|
||||
# autologin_cookie_name: the name of the cookie (default: autologin)
|
||||
# autologin_cookie_path: the cookie path (default: /)
|
||||
# autologin_cookie_secure: true sets the cookie secure flag (default: false)
|
||||
autologin_cookie_name: "autologin_trustie"
|
||||
autologin_cookie_path:
|
||||
autologin_cookie_secure:
|
||||
|
||||
# Configuration of SCM executable command.
|
||||
#
|
||||
# Absolute path (e.g. /usr/local/bin/hg) or command name (e.g. hg.exe, bzr.exe)
|
||||
# On Windows + CRuby, *.cmd, *.bat (e.g. hg.cmd, bzr.bat) does not work.
|
||||
#
|
||||
# On Windows + JRuby 1.6.2, path which contains spaces does not work.
|
||||
# For example, "C:\Program Files\TortoiseHg\hg.exe".
|
||||
# If you want to this feature, you need to install to the path which does not contains spaces.
|
||||
# For example, "C:\TortoiseHg\hg.exe".
|
||||
#
|
||||
# Examples:
|
||||
# scm_subversion_command: svn # (default: svn)
|
||||
# scm_mercurial_command: C:\Program Files\TortoiseHg\hg.exe # (default: hg)
|
||||
# scm_git_command: /usr/local/bin/git # (default: git)
|
||||
# scm_cvs_command: cvs # (default: cvs)
|
||||
# scm_bazaar_command: bzr.exe # (default: bzr)
|
||||
# scm_darcs_command: darcs-1.0.9-i386-linux # (default: darcs)
|
||||
#
|
||||
scm_subversion_command:
|
||||
scm_mercurial_command:
|
||||
scm_git_command:
|
||||
scm_cvs_command:
|
||||
scm_bazaar_command:
|
||||
scm_darcs_command:
|
||||
|
||||
# Absolute path to the SCM commands errors (stderr) log file.
|
||||
# The default is to log in the 'log' directory of your Redmine instance.
|
||||
# Example:
|
||||
# scm_stderr_log_file: /var/log/redmine_scm_stderr.log
|
||||
scm_stderr_log_file:
|
||||
|
||||
# Key used to encrypt sensitive data in the database (SCM and LDAP passwords).
|
||||
# If you don't want to enable data encryption, just leave it blank.
|
||||
# WARNING: losing/changing this key will make encrypted data unreadable.
|
||||
#
|
||||
# If you want to encrypt existing passwords in your database:
|
||||
# * set the cipher key here in your configuration file
|
||||
# * encrypt data using 'rake db:encrypt RAILS_ENV=production'
|
||||
#
|
||||
# If you have encrypted data and want to change this key, you have to:
|
||||
# * decrypt data using 'rake db:decrypt RAILS_ENV=production' first
|
||||
# * change the cipher key here in your configuration file
|
||||
# * encrypt data using 'rake db:encrypt RAILS_ENV=production'
|
||||
database_cipher_key:
|
||||
|
||||
# Set this to false to disable plugins' assets mirroring on startup.
|
||||
# You can use `rake redmine:plugins:assets` to manually mirror assets
|
||||
# to public/plugin_assets when you install/upgrade a Redmine plugin.
|
||||
#
|
||||
#mirror_plugins_assets_on_startup: false
|
||||
|
||||
# Your secret key for verifying cookie session data integrity. If you
|
||||
# change this key, all old sessions will become invalid! Make sure the
|
||||
# secret is at least 30 characters and all random, no regular words or
|
||||
# you'll be exposed to dictionary attacks.
|
||||
#
|
||||
# If you have a load-balancing Redmine cluster, you have to use the
|
||||
# same secret token on each machine.
|
||||
#secret_token: 'change it to a long random string'
|
||||
|
||||
# Absolute path (e.g. /usr/bin/convert, c:/im/convert.exe) to
|
||||
# the ImageMagick's `convert` binary. Used to generate attachment thumbnails.
|
||||
imagemagick_convert_command: '/home/pdl/redmine-2.3.2-0/common/bin/convert'
|
||||
|
||||
# Configuration of RMagcik font.
|
||||
#
|
||||
# Redmine uses RMagcik in order to export gantt png.
|
||||
# You don't need this setting if you don't install RMagcik.
|
||||
#
|
||||
# In CJK (Chinese, Japanese and Korean),
|
||||
# in order to show CJK characters correctly,
|
||||
# you need to set this configuration.
|
||||
#
|
||||
# Because there is no standard font across platforms in CJK,
|
||||
# you need to set a font installed in your server.
|
||||
#
|
||||
# This setting is not necessary in non CJK.
|
||||
#
|
||||
# Examples for Japanese:
|
||||
# Windows:
|
||||
# rmagick_font_path: C:\windows\fonts\msgothic.ttc
|
||||
# Linux:
|
||||
# rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
|
||||
#
|
||||
rmagick_font_path:
|
||||
|
||||
# Maximum number of simultaneous AJAX uploads
|
||||
#max_concurrent_ajax_uploads: 2
|
||||
#pic_types: "bmp,jpeg,jpg,png,gif"
|
||||
|
||||
repository_root_path: '/tmp/htdocs'
|
||||
judge_server: 'http://judge.trustie.net/'
|
||||
|
||||
# Git's url
|
||||
gitlab_address: 'http://gitfast.trustie.net'
|
||||
|
||||
# specific configuration options for production environment
|
||||
# that overrides the default ones
|
||||
production:
|
||||
# CJK support
|
||||
rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
|
||||
judge_server: 'http://192.168.80.21:8080/'
|
||||
repository_root_path: '/home/pdl/redmine-2.3.2-0/apache2/htdocs'
|
||||
cookie_domain: ".trustie.net"
|
||||
email_delivery:
|
||||
delivery_method: :smtp
|
||||
smtp_settings:
|
||||
address: mail.trustie.net
|
||||
port: 25
|
||||
domain: mail.trustie.net
|
||||
authentication: :login
|
||||
user_name: "mail@trustie.net"
|
||||
password: "loong2010"
|
||||
|
||||
# specific configuration options for development environment
|
||||
# that overrides the default ones
|
||||
development:
|
||||
email_delivery:
|
||||
delivery_method: :smtp
|
||||
smtp_settings:
|
||||
address: mail.trustie.net
|
||||
port: 25
|
||||
domain: mail.trustie.net
|
||||
authentication: :login
|
||||
user_name: "mail@trustie.net"
|
||||
password: "loong2010"
|
|
@ -1,9 +0,0 @@
|
|||
Gitlab.configure do |config|
|
||||
# config.endpoint = 'http://192.168.41.130:3000/trustie/api/v3' # API endpoint URL, default: ENV['GITLAB_API_ENDPOINT']
|
||||
# config.private_token = 'cK15gUDwvt8EEkzwQ_63' # user's private token, default: ENV['GITLAB_API_PRIVATE_TOKEN']
|
||||
config.endpoint = 'http://gitfast.trustie.net/api/v3' # API endpoint URL, default: ENV['GITLAB_API_ENDPOINT']
|
||||
config.private_token = 'fPc_gBmEiSANve8TCfxW' # user's private token, default: ENV['GITLAB_API_PRIVATE_TOKEN']
|
||||
# Optional
|
||||
# config.user_agent = 'Custom User Agent' # user agent, default: 'Gitlab Ruby Gem [version]'
|
||||
# config.sudo = 'user' # username for sudo mode, default: nil
|
||||
end
|
|
@ -0,0 +1,13 @@
|
|||
class DeleteValidateCourseContributor < ActiveRecord::Migration
|
||||
def up
|
||||
course_contributors = CourseContributorScore.where("course_id>? and created_at<? ", 450, "2015-12-15 19:51:48")
|
||||
course_contributors.delete_all
|
||||
c170 = CourseContributorScore.where("course_id =?", 170)
|
||||
c170.delete_all
|
||||
c436 = CourseContributorScore.where("course_id =?", 436)
|
||||
c436.delete_all
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -0,0 +1,9 @@
|
|||
class DeleteExerciseUser < ActiveRecord::Migration
|
||||
def up
|
||||
eus=ExerciseUser.where("score is null and status=?",0)
|
||||
eus.delete_all
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -0,0 +1,15 @@
|
|||
class DeleteValidProject < ActiveRecord::Migration
|
||||
def up
|
||||
projects = Project.where("project_type =?", 1)
|
||||
begin
|
||||
projects.each do |p|
|
||||
p.delete
|
||||
end
|
||||
rescue => e
|
||||
logger.error "Delete project failed ====>#{e}"
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20151209085942) do
|
||||
ActiveRecord::Schema.define(:version => 20151217051447) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
|
|
@ -58,6 +58,23 @@ class Gitlab::Client
|
|||
end
|
||||
alias_method :repo_commits, :commits
|
||||
|
||||
# Gets a list of project commits.
|
||||
#
|
||||
# @example
|
||||
# Gitlab.commits('viking')
|
||||
# Gitlab.repo_commits('gitlab', :ref_name => 'api')
|
||||
#
|
||||
# @param [Integer] project The ID of a project.
|
||||
# @param [Hash] options A customizable set of options.
|
||||
# @option options [String] :ref_name The branch or tag name of a project repository.
|
||||
# @option options [Integer] :page The page number.
|
||||
# @option options [Integer] :per_page The number of results per page.
|
||||
# @return [Array<Gitlab::ObjectifiedHash>]
|
||||
def commits_total_count(project, options={})
|
||||
get("/projects/#{project}/repository/commits_total_count", :query => options)
|
||||
end
|
||||
alias_method :repo_commits, :commits_total_count
|
||||
|
||||
# Gets a specific commit identified by the commit hash or name of a branch or tag.
|
||||
#
|
||||
# @example
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
module RailsKindeditor
|
||||
module Helper
|
||||
EVAL_STR = %Q|eval(function(){ if(typeof enablePasteImg ==='function'){enablePasteImg(self);} if(typeof enableAt ==='function'){enableAt(self);} this.loadPlugin("autoheight")})|
|
||||
|
||||
def kindeditor_tag(name, content = nil, options = {})
|
||||
id = sanitize_to_id(name)
|
||||
|
@ -9,7 +10,7 @@ module RailsKindeditor
|
|||
output << text_area_tag(name, content, input_html)
|
||||
output << javascript_tag(js_replace(id, options.merge(window_onload: 'true',
|
||||
:autoHeightMode=>true,
|
||||
afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight")})',
|
||||
afterCreate: EVAL_STR,
|
||||
emotionsBasePath: 'http://' + Setting.host_name
|
||||
)))
|
||||
end
|
||||
|
@ -22,7 +23,7 @@ module RailsKindeditor
|
|||
output_buffer << build_text_area_tag(name, method, self, options, input_html)
|
||||
output_buffer << javascript_tag(js_replace(input_html['id'],options.merge(window_onload: 'true',
|
||||
:autoHeightMode=>true,
|
||||
afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight")})',
|
||||
afterCreate: EVAL_STR,
|
||||
emotionsBasePath: 'http://' + Setting.host_name
|
||||
)))
|
||||
end
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
function enableAt(_editor) {
|
||||
var editor = _editor;
|
||||
if(editor.edit == undefined || editor.edit.iframe == undefined){
|
||||
return;
|
||||
}
|
||||
|
||||
var ifr = editor.edit.iframe[0];
|
||||
var doc = ifr.contentDocument || iframe.contentWindow.document;
|
||||
var ifrBody = doc.body;
|
||||
ifrBody.contentEditable = true;
|
||||
console.log("enable at");
|
||||
|
||||
$.fn.atwho.debug = true;
|
||||
if(!atPersonLists){
|
||||
return;
|
||||
}
|
||||
var names = atPersonLists;
|
||||
|
||||
//var names = ["Jacob","Isabella","Ethan","Emma","Michael","Olivia","Alexander","Sophia","William","Ava","Joshua","Emily","Daniel","Madison","Jayden","Abigail","Noah","Chloe","你好","你你你", "가"];
|
||||
//
|
||||
//var names = $.map(names,function(value,i) {
|
||||
// return {'id':i,'name':value,'email':value+"@email.com"};
|
||||
//});
|
||||
|
||||
var at_config = {
|
||||
at: "@",
|
||||
data: names,
|
||||
insertTpl: '<span style="color:#269ac9">@${name}(${login})</span>',
|
||||
displayTpl: "<li>${name} <small>${login}</small></li>",
|
||||
searchKey: 'searchKey',
|
||||
limit: 200
|
||||
}
|
||||
|
||||
$inputor = $(ifrBody).atwho(at_config);
|
||||
window.aaa= $inputor;
|
||||
$inputor.caret('pos', 47);
|
||||
$inputor.focus().atwho('run');
|
||||
};
|
|
@ -0,0 +1,49 @@
|
|||
.atwho-view {
|
||||
position:absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: none;
|
||||
margin-top: 18px;
|
||||
background: white;
|
||||
color: black;
|
||||
border: 1px solid #DDD;
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 0 5px rgba(0,0,0,0.1);
|
||||
min-width: 120px;
|
||||
max-height: 200px;
|
||||
overflow: auto;
|
||||
z-index: 11110 !important;
|
||||
}
|
||||
|
||||
.atwho-view .cur {
|
||||
background: #3366FF;
|
||||
color: white;
|
||||
}
|
||||
.atwho-view .cur small {
|
||||
color: white;
|
||||
}
|
||||
.atwho-view strong {
|
||||
color: #3366FF;
|
||||
}
|
||||
.atwho-view .cur strong {
|
||||
color: white;
|
||||
font:bold;
|
||||
}
|
||||
.atwho-view ul {
|
||||
/* width: 100px; */
|
||||
list-style:none;
|
||||
padding:0;
|
||||
margin:auto;
|
||||
}
|
||||
.atwho-view ul li {
|
||||
display: block;
|
||||
padding: 5px 10px;
|
||||
border-bottom: 1px solid #DDD;
|
||||
cursor: pointer;
|
||||
/* border-top: 1px solid #C8C8C8; */
|
||||
}
|
||||
.atwho-view small {
|
||||
font-size: smaller;
|
||||
color: #777;
|
||||
font-weight: normal;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -598,11 +598,11 @@ function regex_evaluation_end(){
|
|||
}
|
||||
var evaluation_start_time = new Date(evaluation_start);
|
||||
var evaluation_end_time = new Date(evaluation_end);
|
||||
if(evaluation_end_time > evaluation_start_time){
|
||||
if(evaluation_end_time >= evaluation_start_time){
|
||||
$("#homework_evaluation_end_time").text("");
|
||||
return true;
|
||||
}else{
|
||||
$("#homework_evaluation_end_time").text("关闭匿评日期必须大于开启匿评日期");
|
||||
$("#homework_evaluation_end_time").text("关闭匿评日期不能小于开启匿评日期");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1387,4 +1387,4 @@ function submit_course_feedback() {
|
|||
$("#course_feedback_new").submit();
|
||||
var flag = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -213,11 +213,11 @@ function regex_evaluation_end(){
|
|||
}
|
||||
var evaluation_start_time = new Date(evaluation_start);
|
||||
var evaluation_end_time = new Date(evaluation_end);
|
||||
if(evaluation_end_time > evaluation_start_time){
|
||||
if(evaluation_end_time >= evaluation_start_time){
|
||||
$("#homework_evaluation_end_time").text("");
|
||||
return true;
|
||||
}else{
|
||||
$("#homework_evaluation_end_time").text("关闭匿评日期必须大于开启匿评日期");
|
||||
$("#homework_evaluation_end_time").text("关闭匿评日期不能小于开启匿评日期");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ a:hover.btn_pu{ background:#3cb761;}
|
|||
|
||||
/*问卷提交时弹出框*/
|
||||
.alert_box{width:250px;height:180px;position:fixed !important;z-index:100;left:60%;top:65%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
|
||||
.commit{height: 28px;display: block;width: 80px;color: #fff !important;background: #15bccf;text-align: center;padding-top: 4px;margin-left: 60px;margin-top: 4px;margin-right: 10px;}
|
||||
.commit{font-size: 1.2em;height: 28px;display: block;width: 80px;color: #fff !important;background: #15bccf;text-align: center;padding-top: 4px;margin-left: 70px;margin-top: 4px;margin-right: 10px;}
|
||||
/******确定弹框***********/
|
||||
.poll_alert_form{width:140px;height:180px;position:fixed;z-index:100;left:50%;top:50%;margin:-100px 0 0 -150px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
|
||||
.polls_alert_btn_box{width: 100%;margin: 0 auto;padding-left: 45px;}
|
||||
|
|
|
@ -145,7 +145,7 @@ h4{ font-size:14px; color:#3b3b3b;}
|
|||
.w583{ width:583px;}
|
||||
.w350{ width:350px;}
|
||||
.w610{ width:610px;}
|
||||
.w600{ width:600px;}
|
||||
.w600{ width:600px !important;}
|
||||
.h20{height: 20px;}
|
||||
.h22{ height:22px;}
|
||||
.h26{ height:26px;}
|
||||
|
|
Loading…
Reference in New Issue