This commit is contained in:
cxt 2015-12-07 12:27:09 +08:00
parent 8b041fb51a
commit 3fbb7083cd
636 changed files with 28492 additions and 0 deletions

View File

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

View File

@ -0,0 +1,3 @@
// Place all the styles related to the org_subfields controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -0,0 +1,658 @@
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]
include ExerciseHelper
def index
if @course.is_public == 0 && !User.current.member_of_course?(@course)
render_403
return
end
remove_invalid_exercise(@course)
@is_teacher = User.current.allowed_to?(:as_teacher,@course)
if @is_teacher
exercises = @course.exercises.order("created_at asc")
else
exercises = @course.exercises.where(:exercise_status => 2).order("created_at asc")
end
@exercises = paginateHelper exercises,20 #分页
respond_to do |format|
format.html
end
end
def show
unless User.current.member_of_course?(@course)
render_403
return
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?
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)
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
#end
end
def new
option = {
:exercise_name => "",
:course_id => @course.id,
:exercise_status => 1,
:user_id => User.current.id,
:time => "",
:end_time => "",
:publish_time => "",
:exercise_description => "",
:show_result => 1
}
@exercise = Exercise.create option
if @exercise
redirect_to edit_exercise_url @exercise.id
end
end
def create
if params[:exercise]
exercise = Exercise.find(params[:exercise_id]) if params[:exercise_id]
exercise ||= Exercise.new
exercise.exercise_name = params[:exercise][:exercise_name]
exercise.exercise_description = params[:exercise][:exercise_description]
exercise.end_time = Time.at(params[:exercise][:end_time].to_time.to_i + 16*60*60 -1)
exercise.publish_time = params[:exercise][:publish_time]
exercise.user_id = User.current.id
exercise.time = params[:exercise][:time]
exercise.course_id = params[:course_id]
exercise.exercise_status = 1
if exercise.save
@exercise = exercise
respond_to do |format|
format.js
end
end
end
end
def edit
respond_to do |format|
format.html{render :layout => 'base_courses'}
end
end
def update
@exercise.exercise_name = params[:exercise][:exercise_name]
@exercise.exercise_description = params[:exercise][:exercise_description]
@exercise.time = params[:exercise][:time].blank? ? -1 : params[:exercise][:time]
@exercise.end_time = Time.at(params[:exercise][:end_time].to_time.to_i + 16*60*60 -1)
@exercise.publish_time = params[:exercise][:publish_time]
@exercise.show_result = params[:exercise][:show_result].blank? ? 1 : params[:exercise][:show_result]
if @exercise.save
respond_to do |format|
format.js
end
else
render_404
end
end
def destroy
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
if @exercise && @exercise.destroy
if @is_teacher
exercises = Exercise.where("course_id =?", @course.id)
else
exercises = Exercise.where("course_id =? and exercise_status =?", @course.id, 2)
end
@exercises = paginateHelper exercises,20 #分页
respond_to do |format|
format.js
end
end
end
# 统计结果
def statistics_result
@exercise = Exercise.find(params[:id])
exercise_questions = @exercise.exercise_questions
@exercise_questions = paginateHelper exercise_questions, 5
respond_to do |format|
format.html{render :layout => 'base_courses'}
end
end
# 添加题目
# question_type 1单选 2多选 3填空题
def create_exercise_question
question_title = params[:question_title].nil? || params[:question_title].empty? ? l(:label_enter_single_title) : params[:question_title]
option = {
:question_title => question_title,
:question_type => params[:question_type] || 1,
:question_number => params[:question_type] == "1"? @exercise.exercise_questions.where("question_type = 1").count + 1 :
(params[:question_type] == "2" ? (@exercise.exercise_questions.where("question_type = 2").count + 1) :
@exercise.exercise_questions.where("question_type = 3").count + 1),
:question_score => params[:question_score]
}
@exercise_questions = @exercise.exercise_questions.new option
# params[:question_answer] 题目选项
if params[:question_answer]
for i in 1..params[:question_answer].count
answer = (params[:question_answer].values[i-1].nil? || params[:question_answer].values[i-1].empty?) ? l(:label_new_answer) : params[:question_answer].values[i-1]
question_option = {
:choice_position => i,
:choice_text => answer
}
@exercise_questions.exercise_choices.new question_option
end
end
# 如果是插入的话那么从插入的这个id以后的question_num都将要+1
if params[:quest_id]
@is_insert = true
if @exercise_questions.question_type == 1
ExerciseQuestion.where("question_number>? and question_type=?",params[:quest_num].to_i, 1).update_all(" question_number = question_number + 1")
#@exercise.exercise_questions.where("question_number > #{params[:quest_num].to_i} and question_type == 1").update_all(" question_number = question_number + 1")
elsif @exercise_questions.question_type == 2
ExerciseQuestion.where("question_number>? and question_type=?",params[:quest_num].to_i, 2).update_all(" question_number = question_number + 1")
else
ExerciseQuestion.where("question_number>? and question_type=?",params[:quest_num].to_i, 3).update_all(" question_number = question_number + 1")
end
# @exercise_question_num = params[:quest_num].to_i
@exercise_questions.question_number = params[:quest_num].to_i + 1
end
if @exercise_questions.save
# params[:exercise_choice] 标准答案参数
# 问答题标准答案有三个,单独处理
if @exercise_questions.question_type == 3
for i in 1..params[:exercise_choice].count
standart_answer = ExerciseStandardAnswer.new
standart_answer.exercise_question_id = @exercise_questions.id
standart_answer.answer_text = params[:exercise_choice].values[i-1]
standart_answer.save
end
else
standart_answer = ExerciseStandardAnswer.new
standart_answer.exercise_question_id = @exercise_questions.id
if @exercise_questions.question_type == 1
standart_answer.exercise_choice_id = sigle_selection_standard_answer(params[:exercise_choice])
else
standart_answer.exercise_choice_id = multiselect_standard_answer(params[:exercise_choice])
end
standart_answer.save
end
respond_to do |format|
format.js
end
end
end
# 修改题目
# params[:exercise_question] The id of exercise_question
# params[:question_answer] eg:A、B、C选项
def update_exercise_question
@exercise_question = ExerciseQuestion.find params[:exercise_question]
@exercise_question.question_title = params[:question_title].nil? || params[:question_title].empty? ? l(:label_enter_single_title) : params[:question_title]
@exercise_question.question_score = params[:question_score]
# 处理选项:如果选了某个选项,那么则要删除之前的选项
if params[:question_answer]
@exercise_question.exercise_choices.each do |answer|
answer.destroy unless params[:question_answer].keys.include? answer.id.to_s
end
for i in 1..params[:question_answer].count
question = @exercise_question.exercise_choices.find_by_id params[:question_answer].keys[i-1]
answer = (params[:question_answer].values[i-1].nil? || params[:question_answer].values[i-1].empty?) ? l(:label_new_answer) : params[:question_answer].values[i-1]
if question
question.choice_position = i
question.choice_text = answer
question.save
else
question_option = {
:choice_position => i,
:choice_text => answer
}
@exercise_question.exercise_choices.new question_option
end
end
end
# 更新标准答案
if params[:exercise_choice]
if @exercise_question.question_type == 3
# 删除不合理的选项
@exercise_question.exercise_standard_answers.each do |answer|
answer.destroy unless params[:exercise_choice].keys.include? answer.id.to_s
end
for i in 1..params[:exercise_choice].count
# 找到对应的标准答案
question_standart = @exercise_question.exercise_standard_answers.find_by_id params[:exercise_choice].keys[i-1]
# 标准答案值
answer_standart = (params[:exercise_choice].values[i-1].nil? || params[:exercise_choice].values[i-1].empty?) ? l(:label_new_answer) : params[:exercise_choice].values[i-1]
if question_standart
question_standart.answer_text = answer_standart
question_standart.save
else
standart_answer_option = {
:answer_text => answer_standart
}
@exercise_question.exercise_standard_answers.new standart_answer_option
end
end
else
answer_standart = @exercise_question.exercise_standard_answers.first
answer_standart.exercise_choice_id = @exercise_question.question_type == 1 ? sigle_selection_standard_answer(params[:exercise_choice]) : multiselect_standard_answer(params[:exercise_choice])
answer_standart.save
end
@exercise_question.save
respond_to do |format|
format.js
end
end
end
# 删除题目
def delete_exercise_question
@exercise_question = ExerciseQuestion.find params[:exercise_question]
@exercise = @exercise_question.exercise
if @exercise_question.question_type == 1
ExerciseQuestion.where("question_number>? and question_type=?",params[:quest_num].to_i, 1).update_all(" question_number = question_number - 1")
#@exercise.exercise_questions.where("question_number > #{params[:quest_num].to_i} and question_type == 1").update_all(" question_number = question_number + 1")
elsif @exercise_question.question_type == 2
ExerciseQuestion.where("question_number>? and question_type=?",params[:quest_num].to_i, 2).update_all(" question_number = question_number - 1")
else
ExerciseQuestion.where("question_number>? and question_type=?",params[:quest_num].to_i, 3).update_all(" question_number = question_number - 1")
end
# @exercise_question_num = params[:quest_num].to_i
# @exercise_questions.question_number = params[:quest_num].to_i - 1
#
# exercise_questions = @exercise.exercise_questions.where("question_number > #{@exercise_question.question_number}")
# exercise_questions.each do |question|
# question.question_number -= 1
# question.save
# end
if @exercise_question && @exercise_question.destroy
respond_to do |format|
format.js
end
end
end
# 发布试卷
def publish_exercise
@is_teacher = User.current.allowed_to?(:as_teacher,@course)
@index = params[:index]
@exercise.exercise_status = 2
@exercise.publish_time = Time.now
if @exercise.save
#redirect_to exercise_index_url(:course_id=> @course.id)
respond_to do |format|
format.js
end
end
end
# 重新发布试卷
# 重新发布的时候会删除所有的答题
def republish_exercise
@is_teacher = User.current.allowed_to?(:as_teacher,@course)
@index = params[:index]
@exercise.exercise_questions.each do |exercise_question|
exercise_question.exercise_answers.destroy_all
end
@exercise.exercise_users.destroy_all
@exercise.exercise_status = 1
@exercise.publish_time = nil
@exercise.save
respond_to do |format|
format.js
end
end
def student_exercise_list
@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)
@exercise_users_list = @exercise.exercise_users.where('score is not NULL')
@show_all = true;
elsif !@exercise.exercise_users.where(:user_id => User.current.id).empty? && @exercise.end_time > Time.now
@exercise_users_list = @exercise.exercise_users.where("user_id = ? and score is not NULL",User.current.id)
else
@exercise_users_list = []
end
respond_to do |format|
format.html
end
end
# 学生提交答卷,选中答案的过程中提交
def commit_answer
eq = ExerciseQuestion.find(params[:exercise_question_id])
# 已提交过的且是限时的则不允许答题
if (has_commit_exercise?(@exercise.id,User.current.id) && (!User.current.admin?) && @exercise.time != -1) || @exercise.end_time < Time.now
render :json => {:text => "failure"}
return
end
if eq.question_type == 1
# 单选题
ea = ExerciseAnswer.find_by_exercise_question_id_and_user_id(params[:exercise_question_id],User.current.id)
if ea.nil?
# 尚未答该题,添加答案
ea = ExerciseAnswer.new
ea.user_id = User.current.id
ea.exercise_question_id = params[:exercise_question_id]
end
#修改该题对应答案
ea.exercise_choice_id = params[:exercise_choice_id]
if ea.save
# 保存成功返回成功信息及当前以答题百分比
uncomplete_question = get_uncomplete_question(@exercise, User.current)
if uncomplete_question.count < 1
complete = 1;
else
complete = 0;
end
@percent = get_percent(@exercise,User.current)
render :json => {:text => "ok" ,:complete => complete,:percent => format("%.2f" ,@percent)}
else
#返回失败信息
render :json => {:text => "failure"}
end
elsif eq.question_type == 2
#多选题
ea = ExerciseAnswer.find_by_exercise_choice_id_and_user_id(params[:exercise_choice_id],User.current.id)
if ea.nil?
#尚未答该题,添加答案
ea = ExerciseAnswer.new
ea.user_id = User.current.id
ea.exercise_question_id = params[:exercise_question_id]
ea.exercise_choice_id = params[:exercise_choice_id]
if ea.save
uncomplete_question = get_uncomplete_question(@exercise, User.current)
if uncomplete_question.count < 1
complete = 1;
else
complete = 0;
end
@percent = get_percent(@exercise,User.current)
render :json => {:text => "ok",:complete => complete,:percent => format("%.2f" ,@percent)}
else
render :json => {:text => "failure"}
end
else
#pv不为空则当前选项之前已被选择再次点击则是不再选择该项故删除该答案
if ea.delete
@percent = get_percent(@exercise, User.current)
render :json => {:text => "false" ,:percent => format("%.2f" , @percent)}
else
render :json => {:text => "failure"}
end
end
elsif eq.question_type == 3
#单行文本,多行文本题
ea = ExerciseAnswer.find_by_exercise_question_id_and_user_id(params[:exercise_question_id], User.current.id)
if ea.nil?
# ea为空之前尚未答题添加答案
if params[:answer_text].nil? || params[:answer_text].blank?
#用户提交空答案,视作不作答
@percent = get_percent(@exercise,User.current)
render :json => {:text => ea.answer_text,:percent => format("%.2f", @percent)}
else
#添加答案
ea = ExerciseAnswer.new
ea.user_id = User.current.id
ea.exercise_question_id = params[:exercise_question_id]
ea.answer_text = params[:answer_text]
if ea.save
uncomplete_question = get_uncomplete_question(@exercise, User.current)
if uncomplete_question.count < 1
complete = 1;
else
complete = 0;
end
@percent = get_percent(@exercise,User.current)
render :json => {:text => ea.answer_text,:complete => complete,:percent => format("%.2f",@percent)}
else
render :json => {:text => "failure"}
end
end
else
# ea不为空说明用户之前已作答
if params[:answer_text].nil? || params[:answer_text].blank?
# 用户提交空答案,视为删除答案
if ea.delete
@percent = get_percent(@exercise,User.current)
render :json => {:text => ea.answer_text,:percent => format("%.2f", @percent)}
else
render :json => {:text => "failure"}
end
else
#用户修改答案
ea.answer_text = params[:answer_text]
if ea.save
@percent = get_percent(@exercise,User.current)
render :json => {:text => pv.vote_text,:percent => format("%.2f", @percent)}
else
render :json => {:text => "failure"}
end
end
end
else
render :json => {:text => "failure"}
end
end
# 提交问卷
def commit_exercise
# 老师不需要提交
if User.current.allowed_to?(:as_teacher,@course)
if @exercise.publish_time.nil?
@exercise.update_attributes(:show_result => params[:show_result])
@exercise.update_attributes(:exercise_status => 2)
@exercise.update_attributes(:publish_time => Time.now)
redirect_to exercise_url(@exercise)
return
elsif @exercise.publish_time > Time.now
@exercise.update_attributes(:show_result => params[:show_result])
redirect_to exercise_url(@exercise)
return
end
@exercise.update_attributes(:show_result => params[:show_result])
redirect_to exercise_url(@exercise)
# REDO: 提示提交成功
else
# 更新提交状态
cur_exercise_user = ExerciseUser.where("user_id =? and exercise_id=?", User.current, @exercise.id).first
cur_exercise_user.update_attributes(:status => 1)
# 答题过程中需要统计完成量
@uncomplete_question = get_uncomplete_question(@exercise, User.current)
# 获取改学生的考试得分
@score = calculate_student_score(@exercise, User.current)
# @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')
@status = 0 #提交成功
else
@status = 2 #未知错误
end
else
@status = 1 #有未做得必答题
end
respond_to do |format|
format.js
end
end
end
#查看学生的答卷情况
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)
respond_to do |format|
format.html {render :layout => 'base_courses'}
end
end
# 计算学生得分
def calculate_student_score(exercise, user)
score = 0
score1 = 0
score2 = 0
score3 = 0
exercise_qustions = exercise.exercise_questions
exercise_qustions.each do |question|
answer = get_user_answer(question, user)
standard_answer = get_user_standard_answer(question, user)
unless answer.empty?
# 问答题有多个答案
if question.question_type == 3
if standard_answer.include?(answer.first.answer_text)
score1 = score1+ question.question_score unless question.question_score.nil?
end
elsif question.question_type == 1
if answer.first.exercise_choice.choice_position == standard_answer.exercise_choice_id
score2 = score2 + question.question_score unless question.question_score.nil?
end
else
arr = get_mulscore(question, user)
if arr.to_i == standard_answer.exercise_choice_id
score3 = score3 + question.question_score unless question.question_score.nil?
end
# ecs = ExerciseAnswer.where("user_id =? and exercise_question_id =?", user.id, question.id)
# arr = []
# ecs.each do |ec|
# arr << ec.exercise_choice.choice_position
# end
# arr.sort
# arr = arr.join("")
# if arr.to_i == standard_answer.exercise_choice_id
# score3 = score + question.question_score unless question.question_score.nil?
# end
end
end
end
score = score1 + score2 + score3
end
private
# ExerciseUser记录用户是否已提交问卷有对应的记录则已提交没有则新建一个
def get_exercise_user exercise_id,user_id
eu = ExerciseUser.find_by_exercise_id_and_user_id(exercise_id,user_id)
if eu.nil?
eu = ExerciseUser.new
end
eu
end
# 获取当前学生回答问题的答案
def get_user_answer(question,user)
# user_answer = ExerciseAnswer.where("user_id=? and exercise_question_id=?", user.id, question.id).first
user_answer = question.exercise_answers.where("#{ExerciseAnswer.table_name}.user_id = #{user.id}")
user_answer
end
# 获取问题的标准答案
def get_user_standard_answer(question,user)
if question.question_type == 3
standard_answer =[]
question.exercise_standard_answers.each do |answer|
standard_answer << answer.answer_text
end
else
standard_answer = question.exercise_standard_answers.first
end
standard_answer
end
# 是否完成了答题
def get_complete_question(exercise,user)
questions = exercise.exercise_questions
complete_question = []
questions.each do |question|
answers = get_user_answer(question,user)
if !(answers.nil? || answers.count < 1)
complete_question << question
end
end
complete_question
end
# 获取答题百分比
def get_percent exercise,user
complete_count = get_complete_question(exercise,user).count
if exercise.exercise_questions.count == 0
return 0
else
return (complete_count.to_f / exercise.exercise_questions.count.to_f)*100
end
end
def remove_invalid_exercise(course)
exercises = course.exercises.where("exercise_name=?","")
unless exercises.empty?
exercises.each do |exercise|
if exercise.exercise_questions.empty?
exercise.destroy
end
end
end
end
def find_exercise_and_course
@exercise = Exercise.find params[:id]
@course = Course.find @exercise.course_id
rescue Exception => e
render_404
end
def find_course
@course = Course.find params[:course_id]
rescue Exception => e
render_404
end
end

View File

@ -0,0 +1,690 @@
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]
include ExerciseHelper
def index
publish_exercises = Exercise.where("publish_time is not null and exercise_status = 1 and publish_time <=?",Time.now)
publish_exercises.each do |exercise|
exercise.update_column('exercise_status', 2)
course = exercise.course
course.members.each do |m|
exercise.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => 2)
end
end
end_exercises = Exercise.where("end_time <=? and exercise_status = 2",Time.now)
end_exercises.each do |exercise|
exercise.update_column('exercise_status', 3)
end
if @course.is_public == 0 && !User.current.member_of_course?(@course)
render_403
return
end
remove_invalid_exercise(@course)
@is_teacher = User.current.allowed_to?(:as_teacher,@course)
if @is_teacher
exercises = @course.exercises.order("created_at asc")
else
exercises = @course.exercises.where(:exercise_status => 2).order("created_at asc")
end
@exercises = paginateHelper exercises,20 #分页
respond_to do |format|
format.html
end
end
def show
publish_exercises = Exercise.where("publish_time is not null and exercise_status = 1 and publish_time <=?",Time.now)
publish_exercises.each do |exercise|
exercise.update_column('exercise_status', 2)
course = exercise.course
course.members.each do |m|
exercise.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => 2)
end
end
end_exercises = Exercise.where("end_time <=? and exercise_status = 2",Time.now)
end_exercises.each do |exercise|
exercise.update_column('exercise_status', 3)
end
unless User.current.member_of_course?(@course)
render_403
return
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?
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)
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
#end
end
def new
option = {
:exercise_name => "",
:course_id => @course.id,
:exercise_status => 1,
:user_id => User.current.id,
:time => "",
:end_time => "",
:publish_time => "",
:exercise_description => "",
:show_result => 1
}
@exercise = Exercise.create option
if @exercise
redirect_to edit_exercise_url @exercise.id
end
end
def create
if params[:exercise]
exercise = Exercise.find(params[:exercise_id]) if params[:exercise_id]
exercise ||= Exercise.new
exercise.exercise_name = params[:exercise][:exercise_name]
exercise.exercise_description = params[:exercise][:exercise_description]
exercise.end_time = Time.at(params[:exercise][:end_time].to_time.to_i + 16*60*60 -1)
exercise.publish_time = params[:exercise][:publish_time]
exercise.user_id = User.current.id
exercise.time = params[:exercise][:time]
exercise.course_id = params[:course_id]
exercise.exercise_status = 1
if exercise.save
@exercise = exercise
respond_to do |format|
format.js
end
end
end
end
def edit
respond_to do |format|
format.html{render :layout => 'base_courses'}
end
end
def update
@exercise.exercise_name = params[:exercise][:exercise_name]
@exercise.exercise_description = params[:exercise][:exercise_description]
@exercise.time = params[:exercise][:time].blank? ? -1 : params[:exercise][:time]
@exercise.end_time = Time.at(params[:exercise][:end_time].to_time.to_i + 16*60*60 -1)
@exercise.publish_time = params[:exercise][:publish_time]
@exercise.show_result = params[:exercise][:show_result].blank? ? 1 : params[:exercise][:show_result]
if @exercise.save
respond_to do |format|
format.js
end
else
render_404
end
end
def destroy
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
if @exercise && @exercise.destroy
if @is_teacher
exercises = Exercise.where("course_id =?", @course.id)
else
exercises = Exercise.where("course_id =? and exercise_status =?", @course.id, 2)
end
@exercises = paginateHelper exercises,20 #分页
respond_to do |format|
format.js
end
end
end
# 统计结果
def statistics_result
@exercise = Exercise.find(params[:id])
exercise_questions = @exercise.exercise_questions
@exercise_questions = paginateHelper exercise_questions, 5
respond_to do |format|
format.html{render :layout => 'base_courses'}
end
end
# 添加题目
# question_type 1单选 2多选 3填空题
def create_exercise_question
question_title = params[:question_title].nil? || params[:question_title].empty? ? l(:label_enter_single_title) : params[:question_title]
option = {
:question_title => question_title,
:question_type => params[:question_type] || 1,
:question_number => params[:question_type] == "1"? @exercise.exercise_questions.where("question_type = 1").count + 1 :
(params[:question_type] == "2" ? (@exercise.exercise_questions.where("question_type = 2").count + 1) :
@exercise.exercise_questions.where("question_type = 3").count + 1),
:question_score => params[:question_score]
}
@exercise_questions = @exercise.exercise_questions.new option
# params[:question_answer] 题目选项
if params[:question_answer]
for i in 1..params[:question_answer].count
answer = (params[:question_answer].values[i-1].nil? || params[:question_answer].values[i-1].empty?) ? l(:label_new_answer) : params[:question_answer].values[i-1]
question_option = {
:choice_position => i,
:choice_text => answer
}
@exercise_questions.exercise_choices.new question_option
end
end
# 如果是插入的话那么从插入的这个id以后的question_num都将要+1
if params[:quest_id]
@is_insert = true
if @exercise_questions.question_type == 1
ExerciseQuestion.where("question_number>? and question_type=?",params[:quest_num].to_i, 1).update_all(" question_number = question_number + 1")
#@exercise.exercise_questions.where("question_number > #{params[:quest_num].to_i} and question_type == 1").update_all(" question_number = question_number + 1")
elsif @exercise_questions.question_type == 2
ExerciseQuestion.where("question_number>? and question_type=?",params[:quest_num].to_i, 2).update_all(" question_number = question_number + 1")
else
ExerciseQuestion.where("question_number>? and question_type=?",params[:quest_num].to_i, 3).update_all(" question_number = question_number + 1")
end
# @exercise_question_num = params[:quest_num].to_i
@exercise_questions.question_number = params[:quest_num].to_i + 1
end
if @exercise_questions.save
# params[:exercise_choice] 标准答案参数
# 问答题标准答案有三个,单独处理
if @exercise_questions.question_type == 3
for i in 1..params[:exercise_choice].count
standart_answer = ExerciseStandardAnswer.new
standart_answer.exercise_question_id = @exercise_questions.id
standart_answer.answer_text = params[:exercise_choice].values[i-1]
standart_answer.save
end
else
standart_answer = ExerciseStandardAnswer.new
standart_answer.exercise_question_id = @exercise_questions.id
if @exercise_questions.question_type == 1
standart_answer.exercise_choice_id = sigle_selection_standard_answer(params[:exercise_choice])
else
standart_answer.exercise_choice_id = multiselect_standard_answer(params[:exercise_choice])
end
standart_answer.save
end
respond_to do |format|
format.js
end
end
end
# 修改题目
# params[:exercise_question] The id of exercise_question
# params[:question_answer] eg:A、B、C选项
def update_exercise_question
@exercise_question = ExerciseQuestion.find params[:exercise_question]
@exercise_question.question_title = params[:question_title].nil? || params[:question_title].empty? ? l(:label_enter_single_title) : params[:question_title]
@exercise_question.question_score = params[:question_score]
# 处理选项:如果选了某个选项,那么则要删除之前的选项
if params[:question_answer]
@exercise_question.exercise_choices.each do |answer|
answer.destroy unless params[:question_answer].keys.include? answer.id.to_s
end
for i in 1..params[:question_answer].count
question = @exercise_question.exercise_choices.find_by_id params[:question_answer].keys[i-1]
answer = (params[:question_answer].values[i-1].nil? || params[:question_answer].values[i-1].empty?) ? l(:label_new_answer) : params[:question_answer].values[i-1]
if question
question.choice_position = i
question.choice_text = answer
question.save
else
question_option = {
:choice_position => i,
:choice_text => answer
}
@exercise_question.exercise_choices.new question_option
end
end
end
# 更新标准答案
if params[:exercise_choice]
if @exercise_question.question_type == 3
# 删除不合理的选项
@exercise_question.exercise_standard_answers.each do |answer|
answer.destroy unless params[:exercise_choice].keys.include? answer.id.to_s
end
for i in 1..params[:exercise_choice].count
# 找到对应的标准答案
question_standart = @exercise_question.exercise_standard_answers.find_by_id params[:exercise_choice].keys[i-1]
# 标准答案值
answer_standart = (params[:exercise_choice].values[i-1].nil? || params[:exercise_choice].values[i-1].empty?) ? l(:label_new_answer) : params[:exercise_choice].values[i-1]
if question_standart
question_standart.answer_text = answer_standart
question_standart.save
else
standart_answer_option = {
:answer_text => answer_standart
}
@exercise_question.exercise_standard_answers.new standart_answer_option
end
end
else
answer_standart = @exercise_question.exercise_standard_answers.first
answer_standart.exercise_choice_id = @exercise_question.question_type == 1 ? sigle_selection_standard_answer(params[:exercise_choice]) : multiselect_standard_answer(params[:exercise_choice])
answer_standart.save
end
@exercise_question.save
respond_to do |format|
format.js
end
end
end
# 删除题目
def delete_exercise_question
@exercise_question = ExerciseQuestion.find params[:exercise_question]
@exercise = @exercise_question.exercise
if @exercise_question.question_type == 1
ExerciseQuestion.where("question_number>? and question_type=?",params[:quest_num].to_i, 1).update_all(" question_number = question_number - 1")
#@exercise.exercise_questions.where("question_number > #{params[:quest_num].to_i} and question_type == 1").update_all(" question_number = question_number + 1")
elsif @exercise_question.question_type == 2
ExerciseQuestion.where("question_number>? and question_type=?",params[:quest_num].to_i, 2).update_all(" question_number = question_number - 1")
else
ExerciseQuestion.where("question_number>? and question_type=?",params[:quest_num].to_i, 3).update_all(" question_number = question_number - 1")
end
# @exercise_question_num = params[:quest_num].to_i
# @exercise_questions.question_number = params[:quest_num].to_i - 1
#
# exercise_questions = @exercise.exercise_questions.where("question_number > #{@exercise_question.question_number}")
# exercise_questions.each do |question|
# question.question_number -= 1
# question.save
# end
if @exercise_question && @exercise_question.destroy
respond_to do |format|
format.js
end
end
end
# 发布试卷
def publish_exercise
@is_teacher = User.current.allowed_to?(:as_teacher,@course)
@index = params[:index]
@exercise.exercise_status = 2
@exercise.publish_time = Time.now
if @exercise.save
@exercise.course.members.each do |m|
@exercise.course_messages << CourseMessage.create(:user_id =>m.user_id, :course_id => @exercise.course.id, :viewed => false,:status=>2)
end
#redirect_to exercise_index_url(:course_id=> @course.id)
respond_to do |format|
format.js
end
end
end
# 重新发布试卷
# 重新发布的时候会删除所有的答题
def republish_exercise
@is_teacher = User.current.allowed_to?(:as_teacher,@course)
@index = params[:index]
@exercise.exercise_questions.each do |exercise_question|
exercise_question.exercise_answers.destroy_all
end
@exercise.course_messages.destroy_all
@exercise.exercise_users.destroy_all
@exercise.exercise_status = 1
@exercise.publish_time = nil
@exercise.save
respond_to do |format|
format.js
end
end
def student_exercise_list
@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)
@exercise_users_list = @exercise.exercise_users.where('score is not NULL')
@show_all = true;
elsif !@exercise.exercise_users.where(:user_id => User.current.id).empty? && @exercise.end_time > Time.now
@exercise_users_list = @exercise.exercise_users.where("user_id = ? and score is not NULL",User.current.id)
else
@exercise_users_list = []
end
respond_to do |format|
format.html
end
end
# 学生提交答卷,选中答案的过程中提交
def commit_answer
eq = ExerciseQuestion.find(params[:exercise_question_id])
# 已提交过的且是限时的则不允许答题
if (has_commit_exercise?(@exercise.id,User.current.id) && (!User.current.admin?) && @exercise.time != -1) || @exercise.end_time < Time.now
render :json => {:text => "failure"}
return
end
if eq.question_type == 1
# 单选题
ea = ExerciseAnswer.find_by_exercise_question_id_and_user_id(params[:exercise_question_id],User.current.id)
if ea.nil?
# 尚未答该题,添加答案
ea = ExerciseAnswer.new
ea.user_id = User.current.id
ea.exercise_question_id = params[:exercise_question_id]
end
#修改该题对应答案
ea.exercise_choice_id = params[:exercise_choice_id]
if ea.save
# 保存成功返回成功信息及当前以答题百分比
uncomplete_question = get_uncomplete_question(@exercise, User.current)
if uncomplete_question.count < 1
complete = 1;
else
complete = 0;
end
@percent = get_percent(@exercise,User.current)
render :json => {:text => "ok" ,:complete => complete,:percent => format("%.2f" ,@percent)}
else
#返回失败信息
render :json => {:text => "failure"}
end
elsif eq.question_type == 2
#多选题
ea = ExerciseAnswer.find_by_exercise_choice_id_and_user_id(params[:exercise_choice_id],User.current.id)
if ea.nil?
#尚未答该题,添加答案
ea = ExerciseAnswer.new
ea.user_id = User.current.id
ea.exercise_question_id = params[:exercise_question_id]
ea.exercise_choice_id = params[:exercise_choice_id]
if ea.save
uncomplete_question = get_uncomplete_question(@exercise, User.current)
if uncomplete_question.count < 1
complete = 1;
else
complete = 0;
end
@percent = get_percent(@exercise,User.current)
render :json => {:text => "ok",:complete => complete,:percent => format("%.2f" ,@percent)}
else
render :json => {:text => "failure"}
end
else
#pv不为空则当前选项之前已被选择再次点击则是不再选择该项故删除该答案
if ea.delete
@percent = get_percent(@exercise, User.current)
render :json => {:text => "false" ,:percent => format("%.2f" , @percent)}
else
render :json => {:text => "failure"}
end
end
elsif eq.question_type == 3
#单行文本,多行文本题
ea = ExerciseAnswer.find_by_exercise_question_id_and_user_id(params[:exercise_question_id], User.current.id)
if ea.nil?
# ea为空之前尚未答题添加答案
if params[:answer_text].nil? || params[:answer_text].blank?
#用户提交空答案,视作不作答
@percent = get_percent(@exercise,User.current)
render :json => {:text => ea.answer_text,:percent => format("%.2f", @percent)}
else
#添加答案
ea = ExerciseAnswer.new
ea.user_id = User.current.id
ea.exercise_question_id = params[:exercise_question_id]
ea.answer_text = params[:answer_text]
if ea.save
uncomplete_question = get_uncomplete_question(@exercise, User.current)
if uncomplete_question.count < 1
complete = 1;
else
complete = 0;
end
@percent = get_percent(@exercise,User.current)
render :json => {:text => ea.answer_text,:complete => complete,:percent => format("%.2f",@percent)}
else
render :json => {:text => "failure"}
end
end
else
# ea不为空说明用户之前已作答
if params[:answer_text].nil? || params[:answer_text].blank?
# 用户提交空答案,视为删除答案
if ea.delete
@percent = get_percent(@exercise,User.current)
render :json => {:text => ea.answer_text,:percent => format("%.2f", @percent)}
else
render :json => {:text => "failure"}
end
else
#用户修改答案
ea.answer_text = params[:answer_text]
if ea.save
@percent = get_percent(@exercise,User.current)
render :json => {:text => pv.vote_text,:percent => format("%.2f", @percent)}
else
render :json => {:text => "failure"}
end
end
end
else
render :json => {:text => "failure"}
end
end
# 提交问卷
def commit_exercise
# 老师不需要提交
if User.current.allowed_to?(:as_teacher,@course)
if @exercise.publish_time.nil?
@exercise.update_attributes(:show_result => params[:show_result])
@exercise.update_attributes(:exercise_status => 2)
@exercise.update_attributes(:publish_time => Time.now)
course = @exercise.course
course.members.each do |m|
@exercise.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => 2)
end
redirect_to exercise_url(@exercise)
return
elsif @exercise.publish_time > Time.now
@exercise.update_attributes(:show_result => params[:show_result])
redirect_to exercise_url(@exercise)
return
end
@exercise.update_attributes(:show_result => params[:show_result])
redirect_to exercise_url(@exercise)
# REDO: 提示提交成功
else
# 更新提交状态
cur_exercise_user = ExerciseUser.where("user_id =? and exercise_id=?", User.current, @exercise.id).first
cur_exercise_user.update_attributes(:status => 1)
# 答题过程中需要统计完成量
@uncomplete_question = get_uncomplete_question(@exercise, User.current)
# 获取改学生的考试得分
@score = calculate_student_score(@exercise, User.current)
# @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')
@status = 0 #提交成功
else
@status = 2 #未知错误
end
else
@status = 1 #有未做得必答题
end
respond_to do |format|
format.js
end
end
end
#查看学生的答卷情况
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)
respond_to do |format|
format.html {render :layout => 'base_courses'}
end
end
# 计算学生得分
def calculate_student_score(exercise, user)
score = 0
score1 = 0
score2 = 0
score3 = 0
exercise_qustions = exercise.exercise_questions
exercise_qustions.each do |question|
answer = get_user_answer(question, user)
standard_answer = get_user_standard_answer(question, user)
unless answer.empty?
# 问答题有多个答案
if question.question_type == 3
if standard_answer.include?(answer.first.answer_text)
score1 = score1+ question.question_score unless question.question_score.nil?
end
elsif question.question_type == 1
if answer.first.exercise_choice.choice_position == standard_answer.exercise_choice_id
score2 = score2 + question.question_score unless question.question_score.nil?
end
else
arr = get_mulscore(question, user)
if arr.to_i == standard_answer.exercise_choice_id
score3 = score3 + question.question_score unless question.question_score.nil?
end
# ecs = ExerciseAnswer.where("user_id =? and exercise_question_id =?", user.id, question.id)
# arr = []
# ecs.each do |ec|
# arr << ec.exercise_choice.choice_position
# end
# arr.sort
# arr = arr.join("")
# if arr.to_i == standard_answer.exercise_choice_id
# score3 = score + question.question_score unless question.question_score.nil?
# end
end
end
end
score = score1 + score2 + score3
end
private
# ExerciseUser记录用户是否已提交问卷有对应的记录则已提交没有则新建一个
def get_exercise_user exercise_id,user_id
eu = ExerciseUser.find_by_exercise_id_and_user_id(exercise_id,user_id)
if eu.nil?
eu = ExerciseUser.new
end
eu
end
# 获取当前学生回答问题的答案
def get_user_answer(question,user)
# user_answer = ExerciseAnswer.where("user_id=? and exercise_question_id=?", user.id, question.id).first
user_answer = question.exercise_answers.where("#{ExerciseAnswer.table_name}.user_id = #{user.id}")
user_answer
end
# 获取问题的标准答案
def get_user_standard_answer(question,user)
if question.question_type == 3
standard_answer =[]
question.exercise_standard_answers.each do |answer|
standard_answer << answer.answer_text
end
else
standard_answer = question.exercise_standard_answers.first
end
standard_answer
end
# 是否完成了答题
def get_complete_question(exercise,user)
questions = exercise.exercise_questions
complete_question = []
questions.each do |question|
answers = get_user_answer(question,user)
if !(answers.nil? || answers.count < 1)
complete_question << question
end
end
complete_question
end
# 获取答题百分比
def get_percent exercise,user
complete_count = get_complete_question(exercise,user).count
if exercise.exercise_questions.count == 0
return 0
else
return (complete_count.to_f / exercise.exercise_questions.count.to_f)*100
end
end
def remove_invalid_exercise(course)
exercises = course.exercises.where("exercise_name=?","")
unless exercises.empty?
exercises.each do |exercise|
if exercise.exercise_questions.empty?
exercise.destroy
end
end
end
end
def find_exercise_and_course
@exercise = Exercise.find params[:id]
@course = Course.find @exercise.course_id
rescue Exception => e
render_404
end
def find_course
@course = Course.find params[:course_id]
rescue Exception => e
render_404
end
end

View File

@ -0,0 +1,402 @@
class HomeworkCommonController < ApplicationController
require 'net/http'
require 'json'
layout "base_courses"
before_filter :find_course, :only => [:index,:new,:create,:next_step]
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy]
before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment]
before_filter :member_of_course, :only => [:index]
def index
homeworks = @course.homework_commons.order("created_at desc")
@is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course))
@is_student = User.current.logged? && (User.current.admin? || (User.current.member_of_course?(@course) && !@is_teacher))
@homeworks = paginateHelper homeworks,20
respond_to do |format|
format.html
end
end
def new
# @homework_type = "1"
#
# @homework = HomeworkCommon.new
# @homework.safe_attributes = params[:homework_common]
# @homework.late_penalty = 0
# @homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
# @homework.publish_time = Time.now.strftime('%Y-%m-%d')
#
# if @homework_type == "1"
# #匿评作业相关属性
# @homework_detail_manual = HomeworkDetailManual.new
# @homework_detail_manual.ta_proportion = 0.6
# @homework_detail_manual.absence_penalty = 0
# @homework_detail_manual.evaluation_num = 3
# @homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d')
# @homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
# @homework.homework_detail_manual = @homework_detail_manual
# elsif @homework_type == "2"
# #编程作业相关属性
# @homework_detail_programing = HomeworkDetailPrograming.new
# @homework.homework_detail_programing = @homework_detail_programing
# end
respond_to do |format|
format.html
end
end
#新建作业下一步
def next_step
@homework_type = params[:homework_common_type]
@homework = HomeworkCommon.new
@homework.safe_attributes = params[:homework_common]
@homework.late_penalty = 0
@homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
@homework.publish_time = Time.now.strftime('%Y-%m-%d')
if @homework_type == "1"
#匿评作业相关属性
@homework_detail_manual = HomeworkDetailManual.new
@homework_detail_manual.ta_proportion = 0.6
@homework_detail_manual.absence_penalty = 0
@homework_detail_manual.evaluation_num = 3
@homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d')
@homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
@homework.homework_detail_manual = @homework_detail_manual
elsif @homework_type == "2"
#编程作业相关属性
@homework_detail_programing = HomeworkDetailPrograming.new
@homework.homework_detail_programing = @homework_detail_programing
end
respond_to do |format|
format.html
end
end
def create
if params[:homework_common]
homework = HomeworkCommon.new
homework.name = params[:homework_common][:name]
homework.description = params[:homework_common][:description]
homework.end_time = params[:homework_common][:end_time]
homework.publish_time = params[:homework_common][:publish_time]
homework.homework_type = params[:homework_common][:homework_type]
homework.late_penalty = params[:late_penalty]
homework.user_id = User.current.id
homework.course_id = @course.id
homework.save_attachments(params[:attachments])
render_attachment_warning_if_needed(homework)
if homework.homework_type == 2
homework_detail_programing = HomeworkDetailPrograming.new
homework_detail_programing.language = params[:language]
homework_detail_programing.standard_code = params[:standard_code]
homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6
question = {title:homework.name,content:homework.description}
question[:input] = []
question[:output] = []
if params[:input] && params[:output] && params[:result]
params[:input].each do |k,v|
if params[:output].include? k
homework_test = HomeworkTest.new
homework_test.input = v
homework_test.output = params[:output][k]
homework_test.result = params[:result][k]
homework.homework_tests << homework_test
question[:input] << homework_test.input
question[:output] << homework_test.output
end
end
end
# uri = URI('http://test.gitlab.trustie.net/api/questions.json')
# req = Net::HTTP::Post.new(uri, initheader = {'Content-Type' =>'application/json'})
# req.body = question.to_json
# res = Net::HTTP.start(uri.hostname, uri.port) do |http|
# http.request(req)
# end
uri = URI('http://192.168.80.21:8080/api/questions.json')
body = question.to_json
res = Net::HTTP.new(uri.host, uri.port).start do |client|
request = Net::HTTP::Post.new(uri.path)
request.body = body
request["Content-Type"] = "application/json"
client.request(request)
end
result = JSON.parse(res.body)
homework_detail_programing.question_id = result["id"] if result["status"] && result["status"] == 0
homework.homework_detail_programing = homework_detail_programing
else
#匿评作业相关属性
homework_detail_manual = HomeworkDetailManual.new
homework_detail_manual.ta_proportion = params[:ta_proportion] || 0.6
homework_detail_manual.comment_status = 1
homework_detail_manual.evaluation_start = params[:evaluation_start]
homework_detail_manual.evaluation_end = params[:evaluation_end]
homework_detail_manual.evaluation_num = params[:evaluation_num]
homework_detail_manual.absence_penalty = params[:absence_penalty]
homework.homework_detail_manual = homework_detail_manual
end
if homework.save
homework_detail_programing.save if homework_detail_programing
homework_detail_manual.save if homework_detail_manual
respond_to do |format|
format.html {
flash[:notice] = l(:notice_successful_create)
redirect_to homework_common_index_path(:course => @course.id)
}
end
return
end
end
respond_to do |format|
format.html {
flash[:notice] = l(:notice_failed_create)
redirect_to new_homework_common_path(:course => @course.id)
}
end
end
def edit
respond_to do |format|
format.html
end
end
def update
@homework.name = params[:homework_common][:name]
@homework.description = params[:homework_common][:description]
@homework.end_time = params[:homework_common][:end_time]
@homework.publish_time = params[:homework_common][:publish_time]
@homework.homework_type = params[:homework_common][:homework_type] if params[:homework_common][:homework_type]
unless @homework.late_penalty == params[:late_penalty]
@homework.student_works.where("created_at > '#{@homework.end_time} 23:59:59'").each do |student_work|
student_work.late_penalty = params[:late_penalty]
student_work.save
end
@homework.late_penalty = params[:late_penalty]
end
# @homework.course_id = @course.id
#匿评作业相关属性
if @homework.homework_type == 1 && @homework_detail_manual
@homework_detail_manual.ta_proportion = params[:ta_proportion] || 0.6
@homework_detail_manual.evaluation_start = params[:evaluation_start]
@homework_detail_manual.evaluation_end = params[:evaluation_end]
@homework_detail_manual.evaluation_num = params[:evaluation_num]
unless @homework_detail_manual.absence_penalty == params[:absence_penalty]
if @homework_detail_manual.comment_status == 3 #当前作业处于匿评结束状态,修改缺评扣分才会修改每个作品应扣分的值
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"
@homework.student_works.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
student_work.save
end
end
@homework_detail_manual.absence_penalty = params[:absence_penalty]
end
elsif @homework.homework_type == 0 #普通作业缺评扣分为0分每个作品的缺评扣分改为0分防止某些作业在结束匿评之后改为普通作业
@homework.student_works.where("absence_penalty != 0").each do |student_work|
student_work.late_penalty = 0
student_work.save
end
@homework_detail_manual.absence_penalty = 0 if @homework_detail_manual
end
if @homework.homework_type == 2 && @homework_detail_programing #编程作业
@homework_detail_programing.language = params[:language]
@homework_detail_programing.standard_code = params[:standard_code]
@homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6
homework_tests = @homework.homework_tests
#需要删除的测试
ids = homework_tests.map(&:id) - params[:input].keys.map(&:to_i)
ids.each do |id|
homework_test = HomeworkTest.find id
homework_test.destroy if homework_test
end
if params[:input] && params[:output]
params[:input].each do |k,v|
if params[:output].include? k
homework_test = HomeworkTest.find_by_id k
if homework_test #已存在的测试,修改
homework_test.input = v
homework_test.output = params[:output][k]
else #不存在的测试,增加
homework_test = HomeworkTest.new
homework_test.input = v
homework_test.output = params[:output][k]
homework_test.homework_common = @homework
end
homework_test.save
end
end
end
#发送修改作业的请求
question = {title:@homework.name,content:@homework.description}
question[:input] = []
question[:output] = []
@homework.homework_tests.each do |test|
question[:input] << test.input
question[:output] << test.output
end
uri = URI("http://192.168.80.21:8080/api/questions/#{@homework_detail_programing.question_id}.json")
body = question.to_json
res = Net::HTTP.new(uri.host, uri.port).start do |client|
request = Net::HTTP::Put.new(uri.path)
request.body = body
request["Content-Type"] = "application/json"
client.request(request)
end
result = JSON.parse(res.body)
end
@homework.save_attachments(params[:attachments])
render_attachment_warning_if_needed(@homework)
if @homework.save
@homework_detail_manual.save if @homework_detail_manual
@homework_detail_programing.save if @homework_detail_programing
respond_to do |format|
format.html {
flash[:notice] = l(:notice_successful_edit)
redirect_to homework_common_index_path(:course => @course.id)
}
end
return
else
respond_to do |format|
format.html {
flash[:notice] = l(:notice_failed_edit)
redirect_to edit_homework_common_path(@homework)
}
end
end
end
def destroy
if @homework.destroy
respond_to do |format|
format.html {redirect_to homework_common_index_path(:course => @course.id)}
end
end
end
#开启匿评
#statue 1:启动成功2启动失败作业总数大于等于2份时才能启动匿评3:已开启匿评,请务重复开启,4:没有开启匿评的权限
def start_anonymous_comment
@statue =4 and return unless User.current.admin? || User.current.allowed_to?(:as_teacher,@course)
@statue = 5 and return if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
if @homework_detail_manual.comment_status == 1
student_works = @homework.student_works
if student_works && student_works.size >=2
student_works.each_with_index do |work, index|
user = work.user
n = @homework_detail_manual.evaluation_num
n = n < student_works.size ? n : student_works.size - 1
assigned_homeworks = get_assigned_homeworks(student_works, n, index)
assigned_homeworks.each do |h|
student_works_evaluation_distributions = StudentWorksEvaluationDistribution.new(user_id: user.id, student_work_id: h.id)
student_works_evaluation_distributions.save
end
end
@homework_detail_manual.update_column('comment_status', 2)
@statue = 1
else
@statue = 2
end
else
@statue = 3
end
end
#关闭匿评
def stop_anonymous_comment
@homework_detail_manual.update_column('comment_status', 3)
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"
@homework.student_works.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
student_work.save
end
respond_to do |format|
format.js
end
end
#提示
def alert_anonymous_comment
@cur_size = 0
@totle_size = 0
if @homework_detail_manual.comment_status == 1
@totle_size = @course.student.count
@cur_size = @homework.student_works.size
elsif @homework_detail_manual.comment_status == 2
@homework.student_works.map { |work| @totle_size += work.student_works_evaluation_distributions.count}
@cur_size = 0
@homework.student_works.map { |work| @cur_size += work.student_works_scores.where(:reviewer_role => 3).count}
end
@percent = format("%.2f",(@cur_size.to_f / ( @totle_size == 0 ? 1 : @totle_size)) * 100)
respond_to do |format|
format.js
end
end
def programing_test
test = {language:params[:language],src:params[:src],input:[params[:input]],output:[params[:output]]}
@index = params[:index]
uri = URI('http://192.168.80.21:8080/api/realtime.json')
body = test.to_json
res = Net::HTTP.new(uri.host, uri.port).start do |client|
request = Net::HTTP::Post.new(uri.path)
request.body = body
request["Content-Type"] = "application/json"
client.request(request)
end
result = JSON.parse(res.body)
result[:results].each do |re|
@result = re[:status]
end
end
private
#获取课程
def find_course
@course = Course.find params[:course]
rescue
render_404
end
#获取作业
def find_homework
@homework = HomeworkCommon.find params[:id]
@homework_detail_manual = @homework.homework_detail_manual
@homework_detail_programing = @homework.homework_detail_programing
@course = @homework.course
rescue
render_404
end
#是不是课程的老师
def teacher_of_course
render_403 unless User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
end
#当前用户是不是课程的成员
def member_of_course
render_403 unless @course.is_public || User.current.member_of_course?(@course) || User.current.admin?
end
def get_assigned_homeworks(student_works, n, index)
student_works += student_works
student_works[index + 1 .. index + n]
end
end

View File

@ -0,0 +1,297 @@
class HomeworkCommonController < ApplicationController
require 'net/http'
require 'json'
require "base64"
layout "base_courses"
include StudentWorkHelper
before_filter :find_course, :only => [:index,:new,:create]
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy,:start_evaluation_set,:set_evaluation_attr,:score_rule_set,:alert_forbidden_anonymous_comment]
before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment,:start_evaluation_set,:set_evaluation_attr,:score_rule_set,:alert_forbidden_anonymous_comment]
before_filter :member_of_course, :only => [:index]
def index
@new_homework = HomeworkCommon.new
@new_homework.homework_detail_manual = HomeworkDetailManual.new
@new_homework.course = @course
@page = params[:page] ? params[:page].to_i + 1 : 0
@homeworks = @course.homework_commons.order("created_at desc").limit(10).offset(@page * 10)
@is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course))
@is_student = User.current.logged? && (User.current.admin? || (User.current.member_of_course?(@course) && !@is_teacher))
@is_new = params[:is_new]
respond_to do |format|
format.js
format.html
end
end
#新建作业,在个人作业列表创建作业
def new
render_404
end
#新建作业,在个人作业列表创建作业
def create
redirect_to user_homeworks_user_path(User.current.id)
end
def edit
@user = User.current
@is_in_course = params[:is_in_course].to_i
@course_activity = params[:course_activity].to_i
respond_to do |format|
format.html{render :layout => 'new_base_user'}
end
end
def update
if params[:homework_common]
@homework.name = params[:homework_common][:name]
@homework.description = params[:homework_common][:description]
if params[:homework_common][:publish_time] == ""
@homework.publish_time = Date.today
else
@homework.publish_time = params[:homework_common][:publish_time]
end
@homework.end_time = params[:homework_common][:end_time] || Time.now
@homework.course_id = params[:course_id]
homework_detail_manual = @homework.homework_detail_manual || HomeworkDetailManual.new
if @homework.publish_time <= Date.today && homework_detail_manual.comment_status == 0
homework_detail_manual.comment_status = 1
end
homework_detail_manual.evaluation_start = params[:evaluation_start].blank? ? @homework.end_time + 7 : params[:evaluation_start]
homework_detail_manual.evaluation_end = params[:evaluation_end].blank? ? homework_detail_manual.evaluation_start + 7 : params[:evaluation_end]
@homework.save_attachments(params[:attachments])
render_attachment_warning_if_needed(@homework)
#编程作业相关属性
if @homework.homework_type == 2
@homework.homework_detail_programing ||= HomeworkDetailPrograming.new
@homework_detail_programing = @homework.homework_detail_programing
@homework_detail_programing.language = params[:language_type].to_i
@homework.homework_tests.delete_all
inputs = params[:program][:input]
if Array === inputs
inputs.each_with_index do |val, i|
@homework.homework_tests << HomeworkTest.new(
input: val,
output: params[:program][:output][i]
)
end
end
end
if @homework.save
@homework_detail_manual.save if @homework_detail_manual
@homework_detail_programing.save if @homework_detail_programing
if params[:is_in_course] == "1"
redirect_to homework_common_index_path(:course => @course.id)
elsif params[:is_in_course] == "0"
redirect_to user_homeworks_user_path(User.current.id)
elsif params[:is_in_course] == "-1" && params[:course_activity] == "0"
redirect_to user_path(User.current.id)
elsif params[:is_in_course] == "-1" && params[:course_activity] == "1"
redirect_to course_path(@course.id)
end
end
end
end
def destroy
if @homework.destroy
respond_to do |format|
format.html {
if params[:is_in_course] == "1"
redirect_to homework_common_index_path(:course => @course.id)
elsif params[:is_in_course] == "0"
redirect_to user_homeworks_user_path(User.current.id)
elsif params[:is_in_course] == "-1" && params[:course_activity] == "0"
redirect_to user_path(User.current.id)
elsif params[:is_in_course] == "-1" && params[:course_activity] == "1"
redirect_to course_path(@course.id)
end
}
end
end
end
#开启匿评
#statue 1:启动成功2启动失败作业总数大于等于2份时才能启动匿评3:已开启匿评,请务重复开启,4:没有开启匿评的权限
def start_anonymous_comment
@statue = 4 and return unless User.current.admin? || User.current.allowed_to?(:as_teacher,@course)
@statue = 5 and return if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
if @homework_detail_manual.comment_status == 1
student_works = @homework.student_works
if student_works && student_works.size >= 2
student_works.each_with_index do |work, index|
user = work.user
n = @homework_detail_manual.evaluation_num
n = n < student_works.size ? n : student_works.size - 1
assigned_homeworks = get_assigned_homeworks(student_works, n, index)
assigned_homeworks.each do |h|
student_works_evaluation_distributions = StudentWorksEvaluationDistribution.new(user_id: user.id, student_work_id: h.id)
student_works_evaluation_distributions.save
end
end
@homework_detail_manual.update_column('comment_status', 2)
@statue = 1
# 匿评开启消息邮件通知
send_message_anonymous_comment(@homework, m_status = 2)
Mailer.send_mail_anonymous_comment_open(@homework).deliver
else
@statue = 2
end
else
@statue = 3
end
@user_activity_id = params[:user_activity_id].to_i
@is_in_course = params[:is_in_course].to_i
@course_activity = params[:course_activity].to_i
end
#关闭匿评
def stop_anonymous_comment
@homework_detail_manual.update_column('comment_status', 3)
#计算缺评扣分
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"
@homework.student_works.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
student_work.save
end
# 匿评关闭消息邮件通知
send_message_anonymous_comment(@homework, m_status = 3)
Mailer.send_mail_anonymous_comment_close(@homework).deliver
@user_activity_id = params[:user_activity_id].to_i
@is_in_course = params[:is_in_course].to_i
@course_activity = params[:course_activity].to_i
respond_to do |format|
format.js
end
end
# 开启/关闭匿评消息通知
def send_message_anonymous_comment(homework, m_status )
# status 标记匿评状态 1为关闭 0为开启
course = homework.course
course.members.each do |m|
@homework.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => m_status)
end
end
#提示
def alert_anonymous_comment
@cur_size = 0
@totle_size = 0
if @homework_detail_manual.comment_status == 1
@totle_size = @course.student.count
@cur_size = @homework.student_works.size
elsif @homework_detail_manual.comment_status == 2
@homework.student_works.map { |work| @totle_size += work.student_works_evaluation_distributions.count}
@cur_size = 0
@homework.student_works.map { |work| @cur_size += work.student_works_scores.where(:reviewer_role => 3).count}
end
@percent = format("%.2f",(@cur_size.to_f / ( @totle_size == 0 ? 1 : @totle_size)) * 100)
@user_activity_id = params[:user_activity_id].to_i
@is_in_course = params[:is_in_course].to_i
@course_activity = params[:course_activity].to_i
respond_to do |format|
format.js
end
end
def alert_forbidden_anonymous_comment
if params[:user_activity_id]
@user_activity_id = params[:user_activity_id]
else
@user_activity_id = -1
end
@is_in_course = params[:is_in_course] if params[:is_in_course]
@course_activity = params[:course_activity] if params[:course_Activity]
respond_to do |format|
format.js
end
end
def programing_test
test = {language:params[:language],src:Base64.encode64(params[:src]),input:[params[:input]],output:[params[:output]]}
@index = params[:index]
uri = URI('http://192.168.80.21:8080/api/realtime.json')
body = test.to_json
res = Net::HTTP.new(uri.host, uri.port).start do |client|
request = Net::HTTP::Post.new(uri.path)
request.body = body
request["Content-Type"] = "application/json"
client.request(request)
end
result = JSON.parse(res.body)
@err_msg = result["compile_error_msg"]
result["results"].each do |re|
@result = re["status"]
end
end
#启动匿评参数设置
def start_evaluation_set
end
#设置匿评参数
def set_evaluation_attr
if @homework_detail_manual
unless params[:evaluation_start].to_s == @homework_detail_manual.evaluation_start.to_s
@homework_detail_manual.evaluation_start = params[:evaluation_start]
end
unless @homework_detail_manual.evaluation_end.to_s == params[:evaluation_end].to_s
@homework_detail_manual.evaluation_end = params[:evaluation_end]
end
@homework_detail_manual.evaluation_num = params[:evaluation_num]
@homework_detail_manual.save
end
end
#评分设置
def score_rule_set
if params[:user_activity_id]
@user_activity_id = params[:user_activity_id]
else
@user_activity_id = -1
end
@is_in_course = params[:is_in_course]
end
private
#获取课程
def find_course
@course = Course.find params[:course]
rescue
render_404
end
#获取作业
def find_homework
@homework = HomeworkCommon.find params[:id]
@homework_detail_manual = @homework.homework_detail_manual
@homework_detail_programing = @homework.homework_detail_programing
@course = @homework.course
rescue
render_404
end
#是不是课程的老师
def teacher_of_course
render_403 unless User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
end
#当前用户是不是课程的成员
def member_of_course
render_403 unless @course.is_public || User.current.member_of_course?(@course) || User.current.admin?
end
def get_assigned_homeworks(student_works, n, index)
student_works += student_works
student_works[index + 1 .. index + n]
end
end

View File

@ -0,0 +1,298 @@
class HomeworkCommonController < ApplicationController
require 'net/http'
require 'json'
require "base64"
layout "base_courses"
include StudentWorkHelper
before_filter :find_course, :only => [:index,:new,:create]
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy,:start_evaluation_set,:set_evaluation_attr,:score_rule_set,:alert_forbidden_anonymous_comment]
before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment,:start_evaluation_set,:set_evaluation_attr,:score_rule_set,:alert_forbidden_anonymous_comment]
before_filter :member_of_course, :only => [:index]
def index
@new_homework = HomeworkCommon.new
@new_homework.homework_detail_manual = HomeworkDetailManual.new
@new_homework.course = @course
@page = params[:page] ? params[:page].to_i + 1 : 0
@homeworks = @course.homework_commons.order("created_at desc").limit(10).offset(@page * 10)
@is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course))
@is_student = User.current.logged? && (User.current.admin? || (User.current.member_of_course?(@course) && !@is_teacher))
@is_new = params[:is_new]
respond_to do |format|
format.js
format.html
end
end
#新建作业,在个人作业列表创建作业
def new
render_404
end
#新建作业,在个人作业列表创建作业
def create
redirect_to user_homeworks_user_path(User.current.id)
end
def edit
@user = User.current
@is_in_course = params[:is_in_course].to_i
@course_activity = params[:course_activity].to_i
respond_to do |format|
format.html{render :layout => 'new_base_user'}
end
end
def update
if params[:homework_common]
@homework.name = params[:homework_common][:name]
@homework.description = params[:homework_common][:description]
if params[:homework_common][:publish_time] == ""
@homework.publish_time = Date.today
else
@homework.publish_time = params[:homework_common][:publish_time]
end
@homework.end_time = params[:homework_common][:end_time] || Time.now
@homework.course_id = params[:course_id]
homework_detail_manual = @homework.homework_detail_manual || HomeworkDetailManual.new
if @homework.publish_time <= Date.today && homework_detail_manual.comment_status == 0
homework_detail_manual.comment_status = 1
end
homework_detail_manual.evaluation_start = params[:evaluation_start].blank? ? @homework.end_time + 7 : params[:evaluation_start]
homework_detail_manual.evaluation_end = params[:evaluation_end].blank? ? homework_detail_manual.evaluation_start + 7 : params[:evaluation_end]
@homework.save_attachments(params[:attachments])
render_attachment_warning_if_needed(@homework)
#编程作业相关属性
if @homework.homework_type == 2
@homework.homework_detail_programing ||= HomeworkDetailPrograming.new
@homework_detail_programing = @homework.homework_detail_programing
@homework_detail_programing.language = params[:language_type].to_i
@homework.homework_tests.delete_all
inputs = params[:program][:input]
if Array === inputs
inputs.each_with_index do |val, i|
@homework.homework_tests << HomeworkTest.new(
input: val,
output: params[:program][:output][i]
)
end
end
end
if @homework.save
@homework_detail_manual.save if @homework_detail_manual
@homework_detail_programing.save if @homework_detail_programing
if params[:is_in_course] == "1"
redirect_to homework_common_index_path(:course => @course.id)
elsif params[:is_in_course] == "0"
redirect_to user_homeworks_user_path(User.current.id)
elsif params[:is_in_course] == "-1" && params[:course_activity] == "0"
redirect_to user_path(User.current.id)
elsif params[:is_in_course] == "-1" && params[:course_activity] == "1"
redirect_to course_path(@course.id)
end
end
end
end
def destroy
if @homework.destroy
respond_to do |format|
format.html {
if params[:is_in_course] == "1"
redirect_to homework_common_index_path(:course => @course.id)
elsif params[:is_in_course] == "0"
redirect_to user_homeworks_user_path(User.current.id)
elsif params[:is_in_course] == "-1" && params[:course_activity] == "0"
redirect_to user_path(User.current.id)
elsif params[:is_in_course] == "-1" && params[:course_activity] == "1"
redirect_to course_path(@course.id)
end
}
end
end
end
#开启匿评
#statue 1:启动成功2启动失败作业总数大于等于2份时才能启动匿评3:已开启匿评,请务重复开启,4:没有开启匿评的权限
def start_anonymous_comment
@statue = 4 and return unless User.current.admin? || User.current.allowed_to?(:as_teacher,@course)
@statue = 5 and return if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
if @homework_detail_manual.comment_status == 1
student_works = @homework.student_works
if student_works && student_works.size >= 2
student_works.each_with_index do |work, index|
user = work.user
n = @homework_detail_manual.evaluation_num
n = n < student_works.size ? n : student_works.size - 1
assigned_homeworks = get_assigned_homeworks(student_works, n, index)
assigned_homeworks.each do |h|
student_works_evaluation_distributions = StudentWorksEvaluationDistribution.new(user_id: user.id, student_work_id: h.id)
student_works_evaluation_distributions.save
end
end
@homework_detail_manual.update_column('comment_status', 2)
@statue = 1
# 匿评开启消息邮件通知
send_message_anonymous_comment(@homework, m_status = 2)
Mailer.send_mail_anonymous_comment_open(@homework).deliver
else
@statue = 2
end
else
@statue = 3
end
@user_activity_id = params[:user_activity_id].to_i
@is_in_course = params[:is_in_course].to_i
@course_activity = params[:course_activity].to_i
end
#关闭匿评
def stop_anonymous_comment
@homework_detail_manual.update_column('comment_status', 3)
#计算缺评扣分
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"
@homework.student_works.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
student_work.save
end
# 匿评关闭消息邮件通知
send_message_anonymous_comment(@homework, m_status = 3)
Mailer.send_mail_anonymous_comment_close(@homework).deliver
@user_activity_id = params[:user_activity_id].to_i
@is_in_course = params[:is_in_course].to_i
@course_activity = params[:course_activity].to_i
respond_to do |format|
format.js
end
end
# 开启/关闭匿评消息通知
def send_message_anonymous_comment(homework, m_status )
# status 标记匿评状态 1为关闭 0为开启
course = homework.course
course.members.each do |m|
@homework.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => m_status)
end
end
#提示
def alert_anonymous_comment
@cur_size = 0
@totle_size = 0
if @homework_detail_manual.comment_status == 1
@totle_size = @course.student.count
@cur_size = @homework.student_works.size
elsif @homework_detail_manual.comment_status == 2
@homework.student_works.map { |work| @totle_size += work.student_works_evaluation_distributions.count}
@cur_size = 0
@homework.student_works.map { |work| @cur_size += work.student_works_scores.where(:reviewer_role => 3).count}
end
@percent = format("%.2f",(@cur_size.to_f / ( @totle_size == 0 ? 1 : @totle_size)) * 100)
@user_activity_id = params[:user_activity_id].to_i
@is_in_course = params[:is_in_course].to_i
@course_activity = params[:course_activity].to_i
respond_to do |format|
format.js
end
end
def alert_forbidden_anonymous_comment
if params[:user_activity_id]
@user_activity_id = params[:user_activity_id]
else
@user_activity_id = -1
end
@is_in_course = params[:is_in_course] if params[:is_in_course]
@course_activity = params[:course_activity] if params[:course_Activity]
respond_to do |format|
format.js
end
end
def programing_test
test = {language:params[:language],src:Base64.encode64(params[:src]),input:[params[:input]],output:[params[:output]]}
@index = params[:index]
uri = URI('http://192.168.80.21:8080/api/realtime.json')
body = test.to_json
res = Net::HTTP.new(uri.host, uri.port).start do |client|
request = Net::HTTP::Post.new(uri.path)
request.body = body
request["Content-Type"] = "application/json"
client.request(request)
end
result = JSON.parse(res.body)
@err_msg = result["compile_error_msg"]
result["results"].each do |re|
@result = re["status"]
end
end
#启动匿评参数设置
def start_evaluation_set
end
#设置匿评参数
def set_evaluation_attr
if @homework_detail_manual
unless params[:evaluation_start].to_s == @homework_detail_manual.evaluation_start.to_s
@homework_detail_manual.evaluation_start = params[:evaluation_start]
end
unless @homework_detail_manual.evaluation_end.to_s == params[:evaluation_end].to_s
@homework_detail_manual.evaluation_end = params[:evaluation_end]
end
@homework_detail_manual.evaluation_num = params[:evaluation_num]
@homework_detail_manual.save
end
end
#评分设置
def score_rule_set
if params[:user_activity_id]
@user_activity_id = params[:user_activity_id]
else
@user_activity_id = -1
end
@is_in_course = params[:is_in_course]
@course_activity = params[:course_activity].to_i
end
private
#获取课程
def find_course
@course = Course.find params[:course]
rescue
render_404
end
#获取作业
def find_homework
@homework = HomeworkCommon.find params[:id]
@homework_detail_manual = @homework.homework_detail_manual
@homework_detail_programing = @homework.homework_detail_programing
@course = @homework.course
rescue
render_404
end
#是不是课程的老师
def teacher_of_course
render_403 unless User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
end
#当前用户是不是课程的成员
def member_of_course
render_403 unless @course.is_public || User.current.member_of_course?(@course) || User.current.admin?
end
def get_assigned_homeworks(student_works, n, index)
student_works += student_works
student_works[index + 1 .. index + n]
end
end

View File

@ -0,0 +1,20 @@
class OrgSubfieldsController < ApplicationController
def create
@subfield = OrgSubfield.create(:name => params[:name])
@organization = Organization.find(params[:organization_id])
@organization.org_subfields << @subfield
@subfield.update_attributes(:priority => @subfield.id)
end
def destroy
@subfield = OrgSubfield.find(params[:id])
@organization = Organization.find(@subfield.organization_id)
@subfield.destroy
end
def update
@subfield = OrgSubfield.find(params[:id])
@organization = Organization.find(@subfield.organization_id)
@subfield.update_attributes(:name => params[:name])
end
end

View File

@ -0,0 +1,2 @@
module OrgSubfieldsHelper
end

View File

@ -0,0 +1,4 @@
class EditorOfDocument < ActiveRecord::Base
belongs_to :user, :class_name => 'User', :foreign_key => 'editor_id'
belongs_to :org_document_comment
end

View File

@ -0,0 +1,3 @@
class OrgSubfield < ActiveRecord::Base
belongs_to :organization, :foreign_key => :organization_id
end

View File

@ -0,0 +1,127 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%= stylesheet_link_tag 'pleft','prettify','jquery/jquery-ui-1.9.2','header','new_user','repository','org' %>
<%= javascript_include_tag 'cookie','project', 'header','prettify','select_list_move','org'%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>组织主页</title>
<meta charset="utf-8" />
<meta name="description" content="<%= Redmine::Info.app_name %>" />
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= javascript_heads %>
<%= heads_for_theme %>
<link href="css/public.css" rel="stylesheet" type="text/css" />
<link href="css/leftside.css" rel="stylesheet" type="text/css" />
<link href="css/org.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.3.2.js" type="text/javascript"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script>
$(document).ready(function(){
h1 = $(".homepageLeft").height();
if ($("#orgMain").height()< h1) {$("#orgMain").height(h1-42);}
})
</script>
</head>
<body>
<div class="orgContainer">
<div class="orgNav">
<div class="navOrgLogo fl"><a href="javascript:void(0);"><img src="/images/home_logo.png" width="21" height="19" alt="确实Trustie" class="mt3" /></a></div>
<ul>
<li class="navOrgMenu fl"><a href="javascript:void(0);" class="linkGrey8 f14">首页</a></li>
<li class="navOrgMenu fr"><a href="javascript:void(0);" class="linkGrey8 f14">登录</a></li>
<li class="navOrgMenu fr"><a href="javascript:void(0);" class="linkGrey8 f14 mr15">注册</a></li>
</ul>
<!--<div class="navHomepageProfile">
<ul>
<li class="homepageProfileMenuIcon"><a href="javascript:void(0);">
<div class="mt5 mb8"><img src="images/homepageProfileImage.png" width="40" height="40" /></div>
</a>
<ul class="topnav_login_list" style="display:none;">
<li><a href="javascript:void(0);" class="menuGrey">修改资料</a> </li>
<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>
<li><a href="javascript:void(0);" class="menuGrey">退出</a></li>
</ul>
</li>
</ul>
</div>-->
</div>
</div>
<div class="homepageContentContainer">
<div class="homepageContent">
<div class="homepageLeft">
<div class="homepagePortraitContainer">
<!--<div class="pr_info_logo fl mr10 mb5">-->
<div class="pr_info_logo fl fl mr10 mb5" id="homepage_portrait_image">
<%= image_tag(url_to_avatar(@organization),width:"60", height: "60", :id=>'nh_user_tx') %>
<% if User.current.logged?%>
<% if User.current.id == @organization.creator_id %>
<div id="edit_org_file_btn" class="none">
<div class="homepageEditProfile">
<a href="<%= clear_org_avatar_temp_organization_path(@organization) %>" data-remote="true" class="homepageEditProfileIcon"></a>
</div>
</div>
<% end %>
<% end%>
</div>
<div class="orgName fl mb5 f14">
<%= link_to @organization.name, organization_path(@organization.id), :class=>"pr_info_name fl c_dark fb break_word" %>
<% if @organization.is_public? %>
<span class="img_private"><%= l(:label_public)%></span>
<% else %>
<span class="img_private"><%= l(:label_private)%></span>
<% end %>
</div>
<% if User.current.admin_of_org?(@organization) and params[:show_homepage].nil? %>
<a href="<%= setting_organization_path(@organization) %>" class="pr_join_a c_white"><span class="pr_setting"></span>配置</a>
<% end %>
<div class="cl"></div>
<div class="f12 fontGrey3">
<%= link_to '文章', organization_org_document_comments_path(@organization) %>&nbsp;(
<%= link_to OrgDocumentComment.where("organization_id =? and parent_id is null", @organization.id).count, organization_org_document_comments_path(@organization), :class => "linkBlue" %>
)&nbsp;|&nbsp;
<%= link_to '成员', members_organization_path(@organization.id) %>&nbsp;<%= link_to @organization.org_members.count, members_organization_path(@organization.id), :id => 'org_members_count_id', :class => "linkBlue" %>
</div>
</div>
<div class="homepageLeftMenuContainer" id="sub_field_left_lists">
<%= render :partial => "organizations/org_left_subfield_list", :locals => {:organization => @organization} %>
</div>
</div>
<div class="homepageRight" style="margin-top:0px;">
<%= render_flash_messages %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
</div>
</div>
</div>
<div class="cl"></div>
<div id="Footer">
<div class="footerAboutContainer">
<ul class="footerAbout">
<li class="fl"><a href="javascript:void:(0);" class=" f_grey mw20" target="_blank">关于我们</a>|</li>
<li class="fl"><a href="javascript:void:(0);" class=" f_grey mw20" target="_blank">服务协议</a>|</li>
<li class="fl"><a href="javascript:void:(0);" class="f_grey mw20" target="_blank">帮助中心</a>|</li>
<li class="fl"><a href="javascript:void:(0);" class=" f_grey mw20" target="_blank">贴吧交流</a></li>
</ul>
</div>
<div class="cl"></div>
<ul class="copyright mt10">
<li class="fl mr30">Copyright&nbsp;&copy;&nbsp;2007-2015,&nbsp;All Rights Riserved</li>
<li>ICP备09019772</li>
</ul>
</div>
<div id="ajax-modal" style="display:none;"></div>
<div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>
</div>
</body>
</html>

View File

@ -0,0 +1 @@
window.location.href='<%= forum_memo_path(:forum_id=>@memo.forum_id,:id=>@memo.id ) %>'

View File

@ -0,0 +1,5 @@
<% if @flag%>
window.location.href='<%= forum_memo_path(:forum_id=>@memo.forum_id,:id=>@memo.id ) %>'
<%else%>
$("#error").html('内容填写存在错误');
<% end %>

View File

@ -0,0 +1,4 @@
$("#org_subfield_list").html("");
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list',:locals => {:subfields => @organization.org_subfields }) %>");
$("#sub_field_left_lists").html("");
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");

View File

@ -0,0 +1,4 @@
$("#org_subfield_list").html("");
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list',:locals => {:subfields => @organization.org_subfields }) %>");
$("#sub_field_left_lists").html("");
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");

View File

@ -0,0 +1,3 @@
$("#subfield_show_<%= @subfield.id %>").html("<%= @subfield.name %>");
$("#sub_field_left_lists").html("");
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");

View File

@ -0,0 +1,32 @@
<div class="homepageLeftMenuBlock">
<%= link_to "组织首页",organization_path(@organization, :show_homepage => 1), :class => 'homepageMenuText' %>
</div>
<div class="homepageLeftMenuBlock">
<%= link_to "动态",organization_path(organization), :class => "homepageMenuText" %>
</div>
<div class="homepageLeftMenuBlock">
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuProjects').slideToggle();">项目</a>
<%=link_to "", join_project_menu_organization_path(organization),:remote => true, :method => "post", :class => "homepageMenuSetting fr", :title => "关联项目"%>
</div>
<div class="homepageLeftMenuCourses" id="homepageLeftMenuProjects" style="display:<%= organization.projects.count == 0?'none':'' %>">
<ul >
<%= render :partial => 'layouts/org_projects',:locals=>{:projects=>organization.projects.reorder('created_at').uniq.limit(5),:org_id=>organization.id,:page=>1}%>
</ul>
</div>
<div class="homepageLeftMenuBlock">
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuCourses').slideToggle();">课程</a>
<%=link_to "", join_course_menu_organization_path(organization),:remote => true, :method => "post", :class => "homepageMenuSetting fr", :title => "关联课程"%>
</div>
<div class="homepageLeftMenuCourses" id="homepageLeftMenuCourses" style="display:<%= organization.courses.count == 0 ?'none':'' %>">
<ul >
<%= render :partial => 'layouts/org_courses',:locals=>{:courses=>organization.courses.reorder('created_at').uniq.limit(5),:org_id=>organization.id,:page=>1}%>
</ul>
</div>
<% organization.org_subfields.each do |field| %>
<div class="homepageLeftMenuBlock">
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuCourses_#{field.id}').slideToggle();"><%= field.name %></a>
<%=link_to "", :title => "关联#{field.name}"%>
</div>
<div class="homepageLeftMenuCourses" id="homepageLeftMenuField_<%= field.id %>" style="display:none;">
</div>
<% end %>

View File

@ -0,0 +1,71 @@
<div class="resources mt10" id="organization_document_<%= document.id %>">
<div class="homepagePostBrief">
<div class="homepagePostDes" style="width:690px;">
<div class="homepagePostTitle postGrey"><%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id) %></div>
<% unless document.content.blank? %>
<div class="homepagePostIntro" >
<%= document.content.html_safe %>
</div>
<% end %>
<% if params[:show_homepage].nil? %>
<div class="homepagePostDate" style="float:right;">
发布时间:<%= format_activity_day(document.created_at) %> <%= format_time(document.created_at, false) %>
</div>
<div class="cl"></div>
<div class="homepagePostDate" style="float:right;">
最后编辑:<%= User.find(EditorOfDocument.where("org_document_comment_id =?", document.id).order("created_at desc").first.editor_id).realname %>
</div>
<% end %>
<!-- <%# if defined?(home_id) %>
<div style="float:right;">最后编辑:<%#= User.find() %></div>
<%# end %>-->
<% if User.current.admin? || User.current.admin_of_org?(Organization.find(document.organization_id)) || User.current.id == document.creator_id %>
<div class="homepagePostSetting">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li>
<%= form_for('new_form', :url => {:controller => 'organizations', :action => 'cancel_homepage', :id => document.organization_id, :home_id => document.id}, :method => "put", :remote => true) do |f| %>
<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">取消首页</a>
<% end %>
</li>
<li>
<%= link_to "编辑首页", edit_org_document_comment_path(:id => document.id, :organization_id => document.organization_id, :flag => 2), :class => "postOptionLink" %>
</li>
<li>
<%= link_to "删除首页", org_document_comment_path(:id => document.id, :organization_id => document.organization_id), :method => 'delete',
:data => {:confirm => l(:text_are_you_sure)},
:remote => true, :class => 'postOptionLink' %>
</li>
</ul>
</li>
</ul>
</div>
<div class="cl"></div>
<% end %>
</div>
</div>
</div>
<script type="text/javascript">
function expand_reply(container, btnid) {
var target = $(container);
var btn = $(btnid);
if (btn.data('init') == '0') {
btn.data('init', 1);
btn.html('收起回复');
target.show();
} else {
btn.data('init', 0);
btn.html('展开更多');
target.hide();
target.eq(0).show();
target.eq(1).show();
target.eq(2).show();
}
}
</script>

View File

@ -0,0 +1,61 @@
<ul class="orgListRow">
<li class="orgListUser fb">已有栏目</li>
<li class="orgListRole fb">状态</li>
<div class="cl"></div>
</ul>
<ul class="orgListRow">
<li class="orgListUser">组织首页</li>
<li class="orgListUser">默认</li>
<div class="cl"></div>
</ul>
<ul class="orgListRow">
<li class="orgListUser">动态</li>
<li class="orgListUser">默认</li>
<div class="cl"></div>
</ul>
<ul class="orgListRow">
<li class="orgListUser">项目</li>
<li class="orgListUser">默认</li>
<div class="cl"></div>
</ul>
<ul class="orgListRow">
<li class="orgListUser">课程</li>
<li class="orgListUser">默认</li>
<div class="cl"></div>
</ul>
<% subfields.each do |field| %>
<ul class="orgListRow">
<li class="orgListUser"><div id="subfield_show_<%= field.id %>"><%= field.name %></div><div id="subfield_edit_<%= field.id %>" style="display:none;">
<input type="text" name="name" onblur="update_subfield('#subfield_show_<%= field.id %>','#subfield_edit_<%= field.id %>','<%= field.id %>',$(this).val());" value="<%= field.name %>" style="width:70px;" /></div></li>
<li class="orgListUser">新增</li>
<%= link_to "删除",org_subfield_path(field), :method => 'delete',:remote => true, :confirm => "您确定删除吗?", :class => "linkBlue fr mr5" %>
<a href="javascript:void(0);" class="linkBlue fr mr10" onclick="edit('#subfield_show_<%= field.id %>','#subfield_edit_<%= field.id %>');">编辑</a>
<div class="cl"></div>
</ul>
<% end %>
<script>
function edit(show_id, edit_id){
$(show_id).toggle();
$(edit_id).toggle();
$(edit_id).find('input').focus();
$(edit_id).find('input').on('keypress',function(e){
if(e.keyCode == 13){
this.blur();
}
})
}
function update_subfield(show_id, edit_id, field_id, input_value) {
if ($(show_id).html().trim() != input_value.trim()) {
if (confirm('确定修改为' + input_value + "?"))
$.ajax({
url :"/org_subfields/" + field_id + "?name=" + input_value,
type :'put'
});
}
$(show_id).show();
$(edit_id).hide();
// $(edit_id).focus();
}
</script>

View File

@ -0,0 +1 @@
window.location.href = "<%= organization_path(@org) %>";

View File

View File

@ -0,0 +1,108 @@
<% @nav_dispaly_organization_label = 1
@nav_dispaly_forum_label = 1 %>
<%= error_messages_for 'organization' %>
<div class="organization_r_h02">
<h2 class="organization_h2">编辑组织</h2>
</div>
<div class="ml15 mr15" id="orgContent_1">
<!--<div class="orgLogo mb10"><a href="javascript:void(0);"><img src="images/0" width="55" height="55" alt="组织logo" class="mr10 logoBorder fl ml10" /></a>-->
<!--<a href="javascript:void(0);" class="logoEnter fl linkGrey4">上传图片</a>-->
<%#= form_for( @organization,{:controller => 'organizations',:action => 'update',:id=>@organization,:html=>{:id=>'update_org_form',:method=>'put'}}) do %>
<%= labelled_form_for @organization, :html => {:id => "edit_organization_#{@organization.id}"} do |f|%>
<%= render :partial=>"new_org_avatar_form",:locals=> {source:@organization} %>
<!--<div class="cl"></div>-->
<!--</div>-->
<div class="orgRow mb10"><span class="c_red">*&nbsp;</span>组织名称:<input type="text" name="organization[name]" id="organization_name" maxlength="100" onblur="check_uniq(<%=@organization.id %>);" onfocus="$('#check_name_hint').hide()" class="orgNameInput" value="<%= @organization.name%>" />
<div class="cl"></div>
</div>
<div style="margin-left: 80px " id="check_name_hint"></div>
<div class="orgRow mb10"><span class="ml10">组织描述:</span><textarea type="text" name="organization[description]" class="orgDes" id="org_desc" placeholder="最多3000个汉字或6000个英文字符"><%= @organization.description%></textarea>
<div class="cl"></div>
</div>
<div style="margin-left: 80px " id="check_desc_hint"></div>
<!--<div class="orgRow mb10"><span class="ml10">组织URL</span>-->
<!--<div class="w607 fr">https//-->
<!--<input type="text" name="organization[domain]" value="<%= @organization.domain%>" class="orgUrlInput" />-->
<!--.trustie.net<a href="javascript:void(0);" class="linkBlue ml15" style="text-decoration:underline;">申请</a>-->
<!--<p id="apply_hint"></p></div>-->
<!--&lt;!&ndash;class="c_green f12" 您的申请已提交,系统会以消息的形式通知您结果 &ndash;&gt;-->
<!--</div>-->
<!--<div class="cl"></div>-->
<div class="orgRow mb10 mt5"><span style="margin-left:38px;" >公开&nbsp;: </span>
<input type="checkbox" name="organization[is_public]" <%= @organization.is_public ? 'checked': ''%> class="ml3" />
</div>
<a href="javascript:void(0);" class="saveBtn ml80 db fl" onclick="update_org(<%=@organization.id %>);">保存</a>
<% end %>
</div>
<div class="cl"></div>
<% html_title(l(:label_organization_new)) -%>
<script>
function update_org(id){
check_uniq(id);
if( $checkName){
$("#edit_organization_"+id).submit();
}
}
//新建组织
//验证组织名称
function regex_organization_name()
{
var name = $.trim($("#organization_name").val());
if(name.length == 0)
{
$("#organization_name_notice").html('<span class="c_red">名字不能为空<span>').show();
return false;
}
else
{
$("#organization_name_notice").html('').hide();
return true;
}
}
var $checkName = false;
function check_uniq(dom){
if($("#organization_name").val().trim() == ""){
$("#organization_name_notice").html('<span class="c_red">名字不能为空<span>').show();
return;
}
$.get(
'<%= check_uniq_organizations_path%>'+'?org_name='+$("#organization_name").val().trim()
)
}
//提交新建项目
function submit_new_organization()
{
$.get(
'<%= check_uniq_organizations_path%>'+'?org_name='+$("#organization_name").val().trim()
)
if(regex_organization_name() && $checkName)
{
$("#new_organization").submit();
}
}
$(function(){
$('#organization_new_type').change(function(){
var type = $('#organization_new_type').val();
if(type == '1'){
$(this).next().html("<%= l(:label_type_des_development)%>");
}
else if(type == '2'){
$(this).next().html("<%= l(:label_type_des_research)%>");
}
else if(type == '3'){
$(this).next().html("<%= l(:label_type_des_friend)%>");
}
// var p1=$(this).children('option:selected').val("研讨模式:面向小组研究,支持任务分工、论坛交流、资源分享等。");//这就是selected的值
// var p2=$('#param2').val();//获取本页面其他标签的值
})
})
</script>

View File

@ -0,0 +1,35 @@
<div class="resources mt10" id="user_activity_<%= user_activity_id %>">
<div class="homepagePostBrief">
<div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
</div>
<div class="homepagePostDes">
<div class="homepagePostTo break_word mt-4">
<% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %> TO
<%= link_to activity.project.name.to_s+" | 项目附件", project_news_index_path(activity.project), :class => "newsBlue ml15" %>
</div>
<div class="homepagePostTitle break_word hidden fl m_w600">
<%= link_to format_activity_title("#{l(:label_attachment)}: #{activity.filename}"), {:controller => 'attachments', :action => 'show', :id => activity.id}, :class => "problem_tit fl fb" %>
<%#= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %>
</div>
<div class="cl"></div>
<div class="homepagePostDate">
发布时间:<%= format_time(activity.created_on) %>
</div>
<p class="mt5 break_word"><%= textAreailizable act, :description %><br/></p>
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18 table_maxWidth" id="activity_description_<%= user_activity_id %>">
<div id="intro_content_<%= user_activity_id %>">
<%#= activity.description.html_safe %>
</div>
</div>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div>
</div>

View File

@ -0,0 +1,102 @@
<%= javascript_include_tag "/assets/kindeditor/kindeditor", '/assets/kindeditor/pasteimg', "init_activity_KindEditor" %>
<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;}
.ke-inline-block{display: none;}
div.ke-container{float:left;}
</style>
<% unless forge_acts.empty? %>
<% forge_acts.each do |activity| -%>
<script>
function expand_reply(container, btnid) {
var target = $(container);
var btn = $(btnid);
if (btn.data('init') == '0') {
btn.data('init', 1);
btn.html('收起回复');
target.show();
} else {
btn.data('init', 0);
btn.html('展开更多');
target.hide();
target.eq(0).show();
target.eq(1).show();
target.eq(2).show();
}
}
$(function () {
init_activity_KindEditor_data(<%= activity.id%>, null, "87%");
showNormalImage('activity_description_<%= activity.id %>');
if ($("#intro_content_<%= activity.id %>").height() > 360) {
$("#intro_content_show_<%= activity.id %>").show();
}
$("#intro_content_show_<%= activity.id %>").click(function () {
$("#activity_description_<%= activity.id %>").toggleClass("maxh360");
$("#activity_description_<%= activity.id%>").toggleClass("lh18");
$("#intro_content_show_<%= activity.id %>").hide();
$("#intro_content_hide_<%= activity.id %>").show();
});
$("#intro_content_hide_<%= activity.id %>").click(function () {
$("#activity_description_<%= activity.id %>").toggleClass("maxh360");
$("#activity_description_<%= activity.id%>").toggleClass("lh18");
$("#intro_content_hide_<%= activity.id %>").hide();
$("#intro_content_show_<%= activity.id %>").show();
});
});
</script>
<!--创建-->
<% case activity.forge_act_type %>
<% when "ProjectCreateInfo" %>
<%= render :partial => 'projects/project_create', :locals => {:activity => activity, :user_activity_id => activity.id} %>
<!--缺陷动态-->
<% when "Issue" %>
<%= render :partial => 'users/project_issue', :locals => {:activity => activity.forge_act, :user_activity_id => activity.id} %>
<!--message -->
<% when "Message" %>
<%= render :partial => 'users/project_message', :locals => {:activity => activity.forge_act,:user_activity_id =>activity.id} %>
<!--new 新闻-->
<% when "News" %>
<% if !activity.forge_act.nil? and activity.forge_act.project %>
<%= render :partial => 'projects/project_news', :locals => {:activity=>activity.forge_act, :user_activity_id=>activity.id} %>
<% end %>
<!--Attachment -->
<% when "Attachment" %>
<%= render :partial => 'projects/attachment_acts', :locals => {:activity => activity.forge_act, :user_activity_id => activity.id } %>
<!--<div class="problem_main">-->
<!--<a class="problem_pic fl"><%#= image_tag(url_to_avatar(activity.user), :width => "42", :height => "42") %></a>-->
<!--<div class="problem_txt fl mt5 break_word">-->
<!--<a class="problem_name fl ">-->
<!--<%#= h(e.project) if @project.nil? || @project.id != e.project_id %>-->
<!--<%#= link_to h(activity.user), user_path(activity.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%#= l(:label_new_activity) %>-->
<!--</span>-->
<%#= link_to format_activity_title("#{l(:label_attachment)}: #{act.filename}"), {:controller => 'attachments', :action => 'show', :id => act.id}, :class => "problem_tit fl fb" %>
<!--<br/>-->
<!--<p class="mt5 break_word"><#%= textAreailizable act, :description %><br/>-->
<!--<%#= l :label_create_time %>-->
<!--<%#= format_activity_day(act.created_on) %> <%#= format_time(act.created_on, false) %></p>-->
<!--</div>-->
<!--<div class="cl"></div>-->
<!--</div>-->
<% end %>
<% end %>
<% end %>
<% if forge_acts.count == 10 %>
<div id="show_more_forge_activities" class="loadMore mt10 f_grey">展开更多<%= link_to "", project_path(@project.id, :type => type, :page => page), :id => "more_forge_activities_link", :remote => "true", :class => "none" %></div>
<% end %>
<script type="text/javascript">
$("#show_more_forge_activities").mouseover(function () {
$("#more_forge_activities_link").click();
});
</script>

View File

@ -0,0 +1,38 @@
<% project = Project.find(activity.project_id) %>
<% user = User.find(project.user_id)%>
<div class="resources mt10">
<div class="homepagePostBrief">
<div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(user), :width => "50", :height => "50"), user_path(user), :alt => "用户头像" %>
</div>
<div class="homepagePostDes">
<div class="homepagePostTo break_word mt-4">
<% if user.try(:realname) == ' ' %>
<%= link_to user, user_path(user), :class => "newsBlue mr15" %>
<% else %>
<%= link_to user.try(:realname), user_path(user), :class => "newsBlue mr15" %>
<% end %>
TO
<%= link_to project.to_s+" | 项目", project_path(project.id,:host=>Setting.host_course), :class => "newsBlue ml15" %>
</div>
<div class="homepagePostTitle break_word" >
<%= link_to project.name, project_path(project.id,:host=>Setting.host_course), :class => "postGrey" %>
</div>
<div class="homepagePostDate">
创建时间:<%= format_time(project.created_on) %>
</div>
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
</div>

View File

@ -0,0 +1,106 @@
<div class="resources mt10" id="user_activity_<%= user_activity_id %>">
<div class="homepagePostBrief">
<div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
</div>
<div class="homepagePostDes">
<div class="homepagePostTo break_word mt-4">
<% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %> TO
<%= link_to activity.project.name.to_s+" | 项目新闻", project_news_index_path(activity.project), :class => "newsBlue ml15" %>
</div>
<div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"-->
<%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %>
</div>
<% if activity.sticky == 1%>
<span class="sticky_btn_cir ml10">置顶</span>
<% end%>
<div class="cl"></div>
<div class="homepagePostDate">
发布时间:<%= format_time(activity.created_on) %>
</div>
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18 table_maxWidth" id="activity_description_<%= user_activity_id %>">
<div id="intro_content_<%= user_activity_id %>">
<%= activity.description.html_safe %>
</div>
</div>
<div class="cl"></div>
<div id="intro_content_show_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_hide_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div>
<% count=activity.comments.count %>
<div class="homepagePostReply">
<div class="topBorder" style="display: <%= count>0 ? 'none': '' %>"></div>
<div class="homepagePostReplyBanner" style="display: <%= count>0 ? '': 'none' %>">
<div class="homepagePostReplyBannerCount" onclick="expand_reply_input('#reply_input_<%= user_activity_id %>');">
回复(<%= count %>
</div>
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
<%if count>3 %>
<div class="homepagePostReplyBannerMore">
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
展开更多
</a>
</div>
<% end %>
</div>
<% replies_all_i = 0 %>
<% if count > 0 %>
<div class="" id="reply_div_<%= user_activity_id %>">
<ul>
<% activity.comments.reorder("created_on desc").each do |comment| %>
<script type="text/javascript">
$(function(){
showNormalImage('reply_content_<%= comment.id %>');
});
</script>
<% replies_all_i = replies_all_i + 1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "用户头像" %>
</div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher mt-4">
<% if comment.try(:author).try(:realname) == ' ' %>
<%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
<% else %>
<%= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
<% end %>
<%= format_time(comment.created_on) %>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
<%= comment.comments.html_safe %></div>
</div>
<div class="cl"></div>
</li>
<% end %>
</ul>
</div>
<% end %>
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment[comments]"></textarea>
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px; margin-left: 5px;"></div>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%>
</div>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div>
</div>
</div>

View File

@ -0,0 +1 @@
$("#show_more_forge_activities").replaceWith("<%= escape_javascript( render :partial => 'projects/project_activities',:locals => {:forge_acts => @events_pages, :page => @page,:type => @type} )%>");

View File

@ -0,0 +1,28 @@
<% revise_attachment = work.attachments.where("attachtype = 7").first %>
<% if @homework.end_time < Date.today %>
<% if revise_attachment && @is_teacher %>
<div class="resubAtt mb15">
<span class="resubTitle">追加修订附件</span>
</div>
<div class="mb10">
<span class="tit_fb"> 追加附件:</span>
<%= render :partial => 'work_attachments_status', :locals => {:attachments => work.attachments.where("attachtype = 7"), :status => 2} %>
<span class="tit_fb">追加时间:</span><%=format_time revise_attachment.created_on.to_s %>&nbsp;&nbsp;(<%=revise_attachment_status @homework,revise_attachment %>)
</div>
<% end %>
<% if work.user == User.current %>
<div class="resubAtt mb15">
<span class="resubTitle">追加修订附件</span>
</div>
<% if revise_attachment %>
<div class="mb10">
<span class="tit_fb"> 追加附件:</span>
<%= render :partial => 'work_attachments_status', :locals => {:attachments => work.attachments.where("attachtype = 7"), :status => 1} %>
<span class="tit_fb">追加时间:</span><%=format_time revise_attachment.created_on.to_s %>
</div>
<% end %>
<div class="mb10">
<a href="javascript:void(0);" onclick="show_upload();" class="blueCir ml5" title="请选择文件上传">上传附件</a>
</div>
<% end %>
<% end %>

View File

@ -0,0 +1,50 @@
<!--<div class="resourceUploadPopup">-->
<span class="uploadDialogText">上传附件</span>
<!--<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></div>-->
<div class="uploadBoxContainer">
<%= form_tag(revise_attachment_student_work_path(work.id), :multipart => true,:remote => !ie8?,:name=>"upload_form",:id=>'upload_form') do %>
<div>
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
</span>
</div>
<div class="uploadBox" id="uploadReviseBox">
<input type="hidden" name="attachment_type" value="7">
<a href="javascript:void(0);" class="uploadIcon f14" name="button" id="choose_revise_attach" onclick="_file.click();" onmouseover="" style="<%= ie8? ? 'display:none' : ''%>">
<span class="chooseFile">选择文件</span></a>
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',
:class => ie8? ? '':'file_selector',
:multiple => true,
:onchange => 'addReviseInputFiles(this,"'+'upload_files_submit_btn'+'");',
:style => ie8? ? '': 'display:none',
:data => {
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
:upload_path => uploads_path(:format => 'js'),
:description_placeholder => l(:label_optional_description),
:field_is_public => l(:field_is_public),
:are_you_sure => l(:text_are_you_sure),
:file_count => l(:label_file_count),
:lebel_file_uploding => l(:lebel_file_uploding),
:delete_all_files => l(:text_are_you_sure_all)
} %>
<div class="cl"></div>
<!--<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="closeModal();"><%#= l(:button_cancel)%></a>-->
<!--<a id="submit_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%#= l(:button_confirm)%></a>-->
</div>
<div class="uploadResourceIntr">
<div class="uploadResourceName">最多只能上传一个小于<span class="c_red">50MB</span>的附件</div>
</div>
<div class="cl"></div>
<div style="margin-top: 10px" >
<div class="courseSendSubmit">
<%= submit_tag '确定',:onclick=>'submit_files();',:onfocus=>'this.blur()',:id=>'upload_files_submit_btn',:class=>'sendSourceText' %>
</div>
<div class="courseSendCancel">
<a href="javascript:void(0);" id="upload_files_cancle_btn" class="sendSourceText" onclick="closeModal();">取消</a>
</div>
</div>
<% end %>
</div>
<div class="cl"></div>

View File

@ -0,0 +1,33 @@
<div id="popbox02">
<div class="ni_con">
<span class="f16 fontBlue fb">请您确认刚刚上传的作品信息</span>
<p class="f14 mt5">
<span class="fb">作品名称:</span><%=@student_work.name%>
</p>
<p class="f14 mt5">
<span class="fb">作品描述:</span><%=@student_work.description%>
</p>
<p class="mt5">
<span class="fl fb mr30">附</span><span class="fb fl">件:</span>
<% if @student_work.attachments.empty? %>
<span class="fl c_red"><%= "无附件"%></span>
<% else %>
<div class="fl grey_c">
<%= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
</div>
<% end %>
</p>
<div class="cl"></div>
<div class="ni_btn mt10">
<a href="javascript:" class="tijiao" onclick="clickOK();" style="margin-bottom: 15px; margin-left: 55px;" >
确&nbsp;&nbsp;定
</a>
</div>
</div>
</div>
<script type="text/javascript">
function clickOK() {
window.location.href = '<%= student_work_index_url(:homework => @homework.id)%>';
}
</script>

View File

@ -0,0 +1,2 @@
hideModal('#popbox02');
$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => {:container => @student_work, :has_program=>false})%>");

View File

@ -0,0 +1,2 @@
closeModal();
$("#revise_attachment").html('<%= escape_javascript( render :partial => 'revise_attachment' ,:locals=>{ :work => @work})%>');

View File

@ -0,0 +1,80 @@
<% unless all_results.nil? || all_results.empty?%>
<% all_results.each do |item|%>
<% case item.type %>
<% when 'user'%>
<ul class="searchContent">
<li class="fl"></li>
<li class="fl searchContentDes">
<ul class="fl">
<li class="f16 mb5"><a href="<%= user_path(item.id)%>" class="fontGrey3 fl">
<%= item.try(:highlight).try(:login) ? item.highlight.login[0].html_safe : item.login %>
<%if item.firstname.present? || item.lastname.present?%>
(<%= item.try(:highlight).try(:lastname) ? item.highlight.lastname[0].html_safe : item.lastname%>
<%= item.try(:highlight).try(:firstname) ? item.highlight.firstname[0].html_safe : item.firstname %>)
<%end %>
</a>
<div class="mt5 fl"><%= image_tag("search_icon_03.png", :width=>"8", :height=>"16" ,:class=>"fl") %><span class="searchTag"><%= get_user_identity(User.find(item.id).user_extensions.identity) %></span></div>
<div class="cl"></div>
</li>
<li class="fontGrey3 mb5"><%= User.find(item.id).user_extensions && User.find(item.id).user_extensions.brief_introduction.present? ? User.find(item.id).user_extensions.brief_introduction : '这位童鞋很懒,什么也没有留下~'%></li>
<li class="f12 fontGrey2"><span class="mr30">加入时间:<%= format_date( User.find(item.id).created_on)%></span><span class="mr30"><%= User.find(item.id).user_extensions.occupation.present? ? '单位:'+User.find(item.id).user_extensions.occupation : ''%></span></li>
</ul>
</li>
<div class="cl"></div>
</ul>
<% when 'course'%>
<ul class="searchContent">
<li class="fl">
</li>
<li class="fl searchContentDes">
<ul class="fl">
<li class="f16 mb5">
<a href="<%= course_path(item.id)%>" class="fontGrey3 fl"><%= item.try(:highlight).try(:name) ? item.highlight.name[0].html_safe : item.name %></a>
<div class="mt5 fl"><%= image_tag("search_icon_03.png", :width=>"8", :height=>"16" ,:class=>"fl") %><span class="searchTag">课程</span></div>
<div class="cl"></div>
</li>
<li class="fontGrey3 mb5"><%= item.try(:highlight).try(:description) ? item.highlight.description[0].html_safe : item.description %></li>
<li class="f12 fontGrey2"><span class="mr30">教师:<%= User.find(item.tea_id).realname %></span><span class="mr30">授课时间:<%= item.time.to_s + item.term%></span><span class="mr30"><%= User.find(item.tea_id).user_extensions.occupation.present? ? '单位:'+User.find(item.tea_id).user_extensions.occupation : ''%></span></li>
</ul>
</li>
<div class="cl"></div>
</ul>
<% when 'attachment'%>
<ul class="searchContent">
<li class="fl">
</li>
<li class="fl searchContentDes">
<ul class="fl">
<li class="f16 mb5 fontGrey3"><a href="<%= download_named_attachment_path(item.id,item.filename)%>" class="fontGrey3 mr10 fl"><%= item.try(:highlight).try(:filename) ? item.highlight.filename[0].html_safe : item.filename %></a><span class="f12 fl" style="padding-top: 5px">(<%= number_to_human_size(item.filesize)%>)</span>
<div class="mt5 fl"><%= image_tag("search_icon_03.png", :width=>"8", :height=>"16" ,:class=>"fl") %><span class="searchTag">资源</span></div>
<div class="cl"></div>
</li>
<li class="f12 fontGrey2"><span class="mr30">发布者:<%= User.find(item.author_id).login%><%= User.find(item.author_id).realname%></span>
<!--<span class="mr30">职称:<%#= get_technical_title User.find(item.author_id) %></span>-->
<span class="mr30">发布时间:<%= format_date(item.created_on)%></span></li>
</ul>
</li>
<div class="cl"></div>
</ul>
<% when 'project'%>
<ul class="searchContent">
<li class="fl">
</li>
<li class="fl searchContentDes">
<ul class="fl">
<li class="f16 mb5"><a href="<%= project_path(item.id)%>" class="fontGrey3 fl"><%= item.try(:highlight).try(:name) ? item.highlight.name[0].html_safe : item.name %></a>
<div class="mt5 fl"><%= image_tag("search_icon_03.png", :width=>"8", :height=>"16" ,:class=>"fl") %><span class="searchTag">项目</span></div>
<div class="cl"></div>
</li>
<li class="fontGrey3 mb5"><%= item.try(:highlight).try(:description) ? item.highlight.description[0].html_safe : item.description%></li>
<li class="f12 fontGrey2"><span class="mr30">管理人员:<%= item.user_id ? User.find(item.user_id).login : '无' %></span><span class="mr30">创建时间:<%= date_format_local( Project.find(item.id).created_on) %></span></li>
</ul>
</li>
<div class="cl"></div>
</ul>
<%end %>
<% end %>
<div class="pageRoll">
<%= paginate all_results,:params => {:controller => 'welcome', :action => 'search',:search_type=>'all'}%>
</div>
<% end %>

View File

@ -0,0 +1,24 @@
<% unless attachments.nil? || attachments.empty?%>
<% attachments.each do |attachment|%>
<ul class="searchContent">
<li class="fl">
</li>
<li class="fl searchContentDes">
<ul class="fl">
<li class="f16 mb5 fontGrey3">
<a href="<%= download_named_attachment_path(attachment.id,attachment.filename)%>" class="fontGrey3 mr10 fl"><%= attachment.try(:highlight).try(:filename) ? attachment.highlight.filename[0].html_safe : attachment.filename %></a><span class="f12 fl" style="padding-top: 5px">(<%= number_to_human_size(attachment.filesize)%>)</span>
<div class="mt5 fl"><%= image_tag("search_icon_03.png", :width=>"8", :height=>"16" ,:class=>"fl") %><span class="searchTag">资源</span></div>
<div class="cl"></div>
</li>
<li class="f12 fontGrey2"><span class="mr30">发布者:<%= User.find(attachment.author_id).login%><%= User.find(attachment.author_id).realname%></span>
<!--<span class="mr30">职称:<%#= get_technical_title User.find(attachment.author_id) %></span>-->
<span class="mr30">发布时间:<%= format_date(attachment.created_on)%></span></li>
</ul>
</li>
<div class="cl"></div>
</ul>
<% end %>
<div class="pageRoll">
<%= paginate attachments,:params => {:controller => 'welcome', :action => 'search',:search_type=>'attachment'}%>
</div>
<% end %>

View File

@ -0,0 +1,24 @@
<% unless courses.nil? || courses.empty?%>
<% courses.each do |course|%>
<ul class="searchContent">
<li class="fl">
<%= link_to image_tag(url_to_avatar(Course.find(course.id)), :width => "75", :height => "75",:class=>'searchCourseImage'), course_path(course.id), :alt => "课程图片" %>
</li>
<li class="fl searchContentDes">
<ul class="fl">
<li class="f16 mb5">
<a href="<%= course_path(course.id)%>" class="fontGrey3 fl"><%= course.try(:highlight).try(:name) ? course.highlight.name[0].html_safe : course.name %></a>
<div class="mt5 fl"><%= image_tag("search_icon_03.png", :width=>"8", :height=>"16" ,:class=>"fl") %><span class="searchTag">课程</span></div>
<div class="cl"></div>
</li>
<li class="fontGrey3 mb5"><%= course.try(:highlight).try(:description) ? course.highlight.description[0].html_safe : (course.description.present? ? course.description : '暂时没有该课程描述') %></li>
<li class="f12 fontGrey2"><span class="mr30">教师:<%= User.find(course.tea_id).realname %></span><span class="mr30">授课时间:<%= course.time.to_s + course.term%></span><span class="mr30"><%= User.find(course.tea_id).user_extensions.occupation.present? ? '单位:'+User.find(course.tea_id).user_extensions.occupation : ''%></span></li>
</ul>
</li>
<div class="cl"></div>
</ul>
<% end %>
<div class="pageRoll">
<%= paginate courses,:params => {:controller => 'welcome', :action => 'search',:search_type=>'course'}%>
</div>
<% end %>

View File

@ -0,0 +1,24 @@
<% unless projects.nil? || projects.empty?%>
<% projects.each do |project|%>
<ul class="searchContent">
<li class="fl">
<!--<img src="images/homepageImage.jpg" alt="个人图片" width="75" height="75" class="searchCourseImage" />-->
<%= link_to image_tag(url_to_avatar(Project.find(project.id)), :width => "75", :height => "75",:class=>'searchCourseImage'), project_path(project.id), :alt => "项目图片" %>
</li>
<li class="fl searchContentDes">
<ul class="fl">
<li class="f16 mb5"><a href="<%= project_path(project.id)%>" class="fontGrey3 fl"><%= project.try(:highlight).try(:name) ? project.highlight.name[0].html_safe : project.name %></a>
<div class="mt5 fl"><%= image_tag("search_icon_03.png", :width=>"8", :height=>"16" ,:class=>"fl") %><span class="searchTag">项目</span></div>
<div class="cl"></div>
</li>
<li class="fontGrey3 mb5"><%= project.try(:highlight).try(:description) ? project.highlight.description[0].html_safe : project.description%></li>
<li class="f12 fontGrey2"><span class="mr30">管理人员:<%= project.user_id ? User.find(project.user_id).login : '无' %></span><span class="mr30">创建时间:<%= date_format_local( Project.find(project.id).created_on) %></span></li>
</ul>
</li>
<div class="cl"></div>
</ul>
<% end %>
<div class="pageRoll">
<%= paginate projects,:params => {:controller => 'welcome', :action => 'search',:search_type=>'project'}%>
</div>
<% end %>

View File

@ -0,0 +1,24 @@
<% unless users.nil? || users.empty?%>
<% users.each do |user|%>
<ul class="searchContent">
<li class="fl">
<!--<img src="images/homepageImage.jpg" alt="个人图片" width="75" height="75" class="searchCourseImage" />-->
<%= link_to image_tag(url_to_avatar(User.find(user.id)), :width => "75", :height => "75",:class=>'searchCourseImage'), user_path(user.id), :alt => "用户头像" %>
</li>
<li class="fl searchContentDes">
<ul class="fl">
<li class="f16 mb5"><a href="<%= user_path(user.id)%>" class="fontGrey3 fl"><%= user.try(:highlight).try(:login) ? user.highlight.login[0].html_safe : user.login %>(<%= user.try(:highlight).try(:lastname) ? user.highlight.lastname[0].html_safe : user.lastname%><%= user.try(:highlight).try(:firstname) ? user.highlight.firstname[0].html_safe : user.firstname %>)</a>
<div class="mt5 fl"><%= image_tag("search_icon_03.png", :width=>"8", :height=>"16" ,:class=>"fl") %><span class="searchTag"><%= get_user_identity(User.find(user.id).user_extensions.identity) %></span></div>
<div class="cl"></div>
</li>
<li class="fontGrey3 mb5"><%= User.find(user.id).user_extensions && User.find(user.id).user_extensions.brief_introduction.present? ? User.find(user.id).user_extensions.brief_introduction : '这位童鞋很懒,什么也没有留下~'%></li>
<li class="f12 fontGrey2"><span class="mr30">加入时间:<%= format_date( User.find(user.id).created_on)%></span><span class="mr30"><%= User.find(user.id).user_extensions.occupation.present? ? '单位:'+User.find(user.id).user_extensions.occupation : ''%></span></li>
</ul>
</li>
<div class="cl"></div>
</ul>
<% end %>
<div class="pageRoll">
<%= paginate users,:params => {:controller => 'welcome', :action => 'search',:search_type=>'user'}%>
</div>
<% end %>

View File

@ -0,0 +1,100 @@
<script type="text/javascript" language="javascript">
//搜索列表
function g(o){return document.getElementById(o);}
function HoverLi(n){
//如果有N个标签,就将i<=N;
for(var i=1;i<=5;i++){
g('searchBaner_'+i).className='searchBannerNormal';
g('searchContent_'+i).className='undis';g('searchNum_'+i).className="numRed";
g('searchType_'+i).className="fontGrey2 f14";
}
g('searchContent_'+n).className='dis';
g('searchBaner_'+n).className='searchBannerActive';
g('searchNum_'+n).className="c_red";
g('searchType_'+n).className="fontGrey3 f14";
}
function on_click_search(n){
if(n == 1){
search('all')
//$("#searchContent_1").html('<%#= escape_javascript(render :partial => 'search_all_results',:locals => {:alls=> @results})%>');
}else if( n == 2){
//$("#searchContent_2").html('<%#= escape_javascript(render :partial => 'search_user_results',:locals => {:users=>@users})%>');
search('user')
}else if(n == 3){
search('course')
}else if(n == 4){
search('attachment')
}else if(n == 5){
search('project')
}
}
function search(type){
$.ajax({
url:'<%= url_for(:controller => 'welcome',:action=>'search')%>' +'?q=<%= @name %>&search_type='+type,
type:'get',
success:function(data){
}
})
}
$(function(){
if('<%= @search_type%>' == 'all'){
HoverLi(1)
$("#searchContent_1").html('<%= escape_javascript(render :partial => 'search_all_results',:locals => {:all_results=> @alls})%>');
}else if('<%= @search_type%>' == 'user'){
HoverLi(2)
$("#searchContent_2").html('<%= escape_javascript(render :partial => 'search_user_results',:locals => {:users=>@users})%>');
}else if('<%= @search_type%>' == 'course'){
HoverLi(3)
$("#searchContent_3").html('<%= escape_javascript(render :partial => 'search_course_results',:locals => {:courses=>@courses})%>');
}else if('<%= @search_type%>' == 'attachment'){
HoverLi(4)
$("#searchContent_4").html('<%= escape_javascript(render :partial => 'search_attachment_results',:locals => {:attachments=>@attachments})%>');
}else if('<%= @search_type%>' == 'project'){
HoverLi(5)
$("#searchContent_5").html('<%= escape_javascript(render :partial => 'search_project_results',:locals => {:projects=>@projects})%>');
}
})
//如果要做成点击后再转到请将<li>中的onmouseover 改成 onclick;
//]]>
</script>
<script>
//搜索内容自动撑高到整屏
var h1 = $(window).height();
var h2 = $(".homepageContentContainer").height();
</script>
<div class="homepageContentContainer">
<div class="homepageContent">
<div class="blocks mt10 mb10">
<ul id="searchBanner">
<li id="searchBaner_1" class="searchBannerActive" onclick="HoverLi(1);on_click_search(1);"><a href="javascript:void(0);" id="searchType_1" class="fontGrey3 f14">全部<span style="font-weight:normal;"><font id="searchNum_1" class="c_red">(<%= @total_count%>)</font></span></a></li>
<li id="searchBaner_2" onclick="HoverLi(2);on_click_search(2);"><a href="javascript:void(0);" id="searchType_2" class="fontGrey2 f14">用户<span class="numRed" style="font-weight:normal;"><font id="searchNum_2" class="numRed">(<%= @users_count%>)</font></span></a></li>
<li id="searchBaner_3" onclick="HoverLi(3);on_click_search(3);"><a href="javascript:void(0);" id="searchType_3" class="fontGrey2 f14">课程<span style="font-weight:normal;"><font id="searchNum_3" class="numRed">(<%=@course_count%>)</font></span></a></li>
<li id="searchBaner_4" onclick="HoverLi(4);on_click_search(4);"><a href="javascript:void(0);" id="searchType_4" class="fontGrey2 f14">资源<span class="numRed" style="font-weight:normal;"><font id="searchNum_4" class="numRed">(<%= @attach_count%>)</font></span></a></li>
<li id="searchBaner_5" onclick="HoverLi(5);on_click_search(5);"><a href="javascript:void(0);" id="searchType_5" class="fontGrey2 f14">项目<span class="numRed" style="font-weight:normal;"><font id="searchNum_5" class="numRed">(<%= @project_count%>)</font></span></a></li>
<div class="cl"></div>
</ul>
<ul id="searchTips" style="display:none;">
<span class="fontGrey3">没有搜索到相关的内容!</span>
</ul>
<div id="searchContent_1">
</div>
<div id="searchContent_2" class="undis">
<%#= render :partial => 'search_user_results',:locals => {:users=>@users}%>
</div>
<div id="searchContent_3" class="undis">
</div>
<div id="searchContent_4" class="undis">
</div>
<div id="searchContent_5" class="undis">
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,13 @@
<% case @search_type%>
<% when 'all'%>
$("#searchContent_1").html('<%= escape_javascript(render :partial => 'search_all_results',:locals => {:all_results=> @alls})%>');
<% when 'user'%>
$("#searchContent_2").html('<%= escape_javascript(render :partial => 'search_user_results',:locals => {:users=>@users})%>');
<% when 'course'%>
$("#searchContent_3").html('<%= escape_javascript(render :partial => 'search_course_results',:locals => {:courses=>@courses})%>');
<% when 'project'%>
$("#searchContent_5").html('<%= escape_javascript(render :partial => 'search_project_results',:locals => {:projects=>@projects})%>');
<% when 'attachment'%>
$("#searchContent_4").html('<%= escape_javascript(render :partial => 'search_attachment_results',:locals => {:attachments=>@attachments})%>');
<%else%>
<%end %>

View File

@ -0,0 +1,5 @@
class AddIndexToHomeworkCommons < ActiveRecord::Migration
def change
add_index :homework_commons, [:course_id, :id]
end
end

View File

@ -0,0 +1,12 @@
class CreateOrgDocumeEditor < ActiveRecord::Migration
def up
create_table :editor_of_documents do |t|
t.integer :editor_id
t.integer :org_document_comment_id
t.timestamp :created_at
end
end
def down
end
end

View File

@ -0,0 +1,5 @@
class AddIndexToStudentWorks < ActiveRecord::Migration
def change
add_index :student_works, [:homework_common_id, :user_id]
end
end

View File

@ -0,0 +1,12 @@
class CopyDocumentCreatedAtForEditorOfDocument < ActiveRecord::Migration
def up
OrgDocumentComment.all.each do |doc|
if doc.parent.nil?
EditorOfDocument.create(:editor_id => doc.creator_id, :org_document_comment_id => doc.id, :created_at => doc.updated_at)
end
end
end
def down
end
end

View File

@ -0,0 +1,9 @@
# encoding: utf-8
class AddAttachmentType < ActiveRecord::Migration
def up
Attachmentstype.create(typeId:3,typeName:'修订附件')
end
def down
end
end

View File

@ -0,0 +1,5 @@
class AddForkedFromProjectIdToProjects < ActiveRecord::Migration
def change
add_column :projects, :forked_from_project_id, :integer
end
end

View File

@ -0,0 +1,13 @@
class CreateOrgSubfields < ActiveRecord::Migration
def up
create_table :org_subfields do |t|
t.integer :organization_id
t.integer :priority
t.string :name
t.timestamps
end
end
def down
end
end

View File

@ -0,0 +1,5 @@
class AddForkedCountToProjects < ActiveRecord::Migration
def change
add_column :projects, :forked_count, :integer
end
end

View File

@ -0,0 +1 @@
require 'elasticsearch/rails/tasks/import'

View File

@ -0,0 +1,31 @@
namespace :importer do
task :importuser do
ENV['CLASS']='User'
ENV['SCOPE']='indexable'
ENV['FORCE']='y'
ENV['BATCH']='1000'
Rake::Task["elasticsearch:import:model"].invoke
end
task :importproject do
ENV['CLASS']='Project'
ENV['SCOPE']='indexable'
ENV['FORCE']='y'
ENV['BATCH']='1000'
Rake::Task["elasticsearch:import:model"].invoke
end
task :importcourse do
ENV['CLASS']='Course'
ENV['SCOPE']='indexable'
ENV['FORCE']='y'
ENV['BATCH']='1000'
Rake::Task["elasticsearch:import:model"].invoke
end
task :importattachment do
ENV['CLASS']='Attachment'
ENV['SCOPE']='indexable'
ENV['FORCE']='y'
ENV['BATCH']='1000'
Rake::Task["elasticsearch:import:model"].invoke
end
end

View File

@ -0,0 +1,21 @@
#coding=utf-8
#需要在0点以后执行
namespace :exercise_deadline_warn do
desc "exercise deadline warn"
task :deadline_warn => :environment do
#exercise_status 1 未发布 2 已发布 3已截止
exercises = Exercise.where("exercise_status = 2 and date_format(end_time,'%Y-%m-%d')= '#{Date.today}'") #截止日期都是当天 23.59分,所以年月日相等的一定是今晚会截止的测验
exercises.each do |exercise|
course = exercise.course
course.members.each do |m|
#CourseMessage status 1 未发布 status 2 已发布 status 3 已发布快截止了
exercise.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => 3) unless m.user.allowed_to?(:as_teacher,m)
end
# if homework.course_acts.size == 0
# homework.course_acts << CourseActivity.new(:user_id => homework.user_id,:course_id => homework.course_id)
# end
# 邮件通知
#Mailer.run.homework_added(homework)
end
end
end

View File

@ -0,0 +1,22 @@
#coding=utf-8
namespace :exercise_publish do
desc "publish exercise and end exercise"
task :publish => :environment do
exercises = Exercise.where("publish_time is not null and exercise_status = 1 and publish_time <=?",Time.now)
exercises.each do |exercise|
exercise.update_column('exercise_status', 2)
course = exercise.course
course.members.each do |m|
exercise.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => 2)
end
end
end
task :end => :environment do
exercises = Exercise.where("end_time <=? and exercise_status = 2",Time.now)
exercises.each do |exercise|
exercise.update_column('exercise_status', 3)
end
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
public/images/home_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/MathBoldItalic.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-bold-italic"],{119912:[685,0,759,39,724],119913:[669,0,726,42,715],119914:[685,12,701,55,745],119915:[669,0,818,42,790],119916:[669,0,732,42,754],119917:[669,0,635,44,750],119918:[685,12,768,55,768],119919:[669,0,891,42,946],119920:[669,0,502,42,557],119921:[669,12,558,66,646],119922:[669,0,795,42,839],119923:[669,0,744,42,700],119924:[669,0,1016,42,1071],119925:[669,0,869,42,924],119926:[685,16,777,55,755],119927:[669,0,612,42,733],119928:[685,154,810,55,756],119929:[669,0,801,42,784],119930:[685,10,671,55,704],119931:[669,0,568,28,700],119932:[669,10,733,72,810],119933:[669,15,593,66,797],119934:[669,17,925,66,1129],119935:[669,0,808,28,830],119936:[669,0,549,39,725],119937:[669,0,797,66,830],119938:[462,10,581,44,548],119939:[685,8,509,50,487],119940:[462,10,477,44,460],119941:[685,14,595,44,589],119942:[462,10,498,44,459],119943:[685,207,572,44,632],119944:[462,203,527,22,527],119945:[685,10,576,50,543],119946:[620,9,357,55,300],119947:[620,207,431,-18,414],119948:[685,11,580,55,563],119949:[685,9,346,50,310],119950:[467,9,760,33,727],119951:[467,10,559,33,526],119952:[462,10,561,44,539],119953:[469,205,571,-33,554],119954:[462,205,526,44,532],119955:[467,0,441,33,424],119956:[462,11,474,55,419],119957:[592,10,351,44,318],119958:[463,10,535,33,502],119959:[473,14,554,52,539],119960:[473,14,814,52,799],119961:[462,8,587,33,543],119962:[462,205,519,35,522],119963:[462,19,531,35,499]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/BoldItalic/MathBoldItalic.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/MathBoldScript.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-bold-italic"],{120016:[699,21,984,50,955],120017:[699,21,1060,55,985],120018:[699,21,912,60,877],120019:[699,21,991,60,906],120020:[699,21,826,95,791],120021:[699,21,1042,65,1025],120022:[699,21,834,82,799],120023:[699,21,1171,65,1154],120024:[699,21,997,47,977],120025:[699,224,906,19,886],120026:[699,21,1154,45,1130],120027:[699,21,1036,40,1015],120028:[699,21,1300,60,1245],120029:[699,21,1095,60,1078],120030:[699,21,809,72,749],120031:[699,21,1025,55,994],120032:[699,52,809,72,749],120033:[699,21,1048,55,973],120034:[699,21,816,81,781],120035:[699,21,1030,65,1025],120036:[699,21,964,60,904],120037:[699,21,1040,60,1024],120038:[699,21,1320,60,1306],120039:[699,21,1033,64,1010],120040:[699,224,989,60,963],120041:[699,21,996,50,976],120042:[462,14,942,35,865],120043:[699,14,646,60,624],120044:[462,14,764,35,683],120045:[699,14,949,28,912],120046:[462,14,726,35,648],120047:[699,205,768,25,749],120048:[462,224,819,27,771],120049:[699,14,838,55,758],120050:[698,14,558,40,534],120051:[698,224,840,41,823],120052:[699,14,810,55,730],120053:[699,14,650,43,632],120054:[462,14,1137,45,1057],120055:[462,14,851,45,771],120056:[462,14,848,35,780],120057:[462,205,885,25,770],120058:[462,205,913,35,833],120059:[462,0,677,40,648],120060:[557,14,562,51,449],120061:[669,14,618,47,612],120062:[449,14,842,31,762],120063:[458,14,732,40,670],120064:[458,14,1012,40,950],120065:[462,14,820,63,740],120066:[449,224,784,40,711],120067:[493,14,782,61,702]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/BoldItalic/MathBoldScript.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/MathOperators.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-bold-italic"],{8706:[686,10,559,44,559],8722:[297,-209,606,51,555]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/BoldItalic/MathOperators.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/MathSSItalicBold.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-bold-italic"],{120380:[690,0,690,25,665],120381:[676,0,636,80,691],120382:[691,19,723,119,797],120383:[676,0,709,80,772],120384:[676,0,635,80,728],120385:[676,0,582,80,725],120386:[691,19,746,107,785],120387:[676,0,715,80,803],120388:[676,0,440,79,534],120389:[676,96,481,15,574],120390:[676,0,712,80,816],120391:[676,0,603,80,612],120392:[676,0,913,80,1001],120393:[676,18,724,80,812],120394:[692,18,778,106,840],120395:[676,0,581,80,695],120396:[691,176,779,105,839],120397:[676,0,670,80,698],120398:[691,19,554,66,637],120399:[676,0,641,157,785],120400:[676,19,699,123,792],120401:[676,18,690,193,833],120402:[676,15,997,198,1135],120403:[676,0,740,40,853],120404:[676,0,694,188,842],120405:[676,0,653,25,769],120406:[473,14,489,48,507],120407:[676,13,512,51,558],120408:[473,14,462,71,524],120409:[676,14,518,69,625],120410:[473,13,452,71,492],120411:[692,0,340,72,533],120412:[473,206,504,2,599],120413:[676,0,510,55,542],120414:[688,0,245,59,366],120415:[688,202,324,-90,440],120416:[676,0,519,55,599],120417:[676,0,235,55,348],120418:[473,0,776,55,809],120419:[473,0,510,55,542],120420:[473,14,501,72,542],120421:[473,205,512,3,559],120422:[473,205,512,69,574],120423:[473,0,411,55,519],120424:[473,13,385,37,442],120425:[631,12,386,98,447],120426:[462,15,518,81,569],120427:[462,14,462,129,561],120428:[462,14,701,131,798],120429:[462,0,506,20,582],120430:[462,204,472,-27,569],120431:[462,0,441,21,530]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/BoldItalic/MathSSItalicBold.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/SpacingModLetters.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-bold-italic"],{688:[852,-328,380,7,365],689:[841,-329,380,7,365],690:[862,-176,350,24,384],691:[690,-344,389,21,384],692:[690,-344,389,2,365],693:[690,-171,389,2,371],694:[684,-345,390,5,466],695:[690,-331,450,15,467],696:[690,-176,350,11,386],699:[685,-369,333,128,332],704:[690,-240,343,-3,323],705:[690,-240,326,20,364],710:[690,-516,333,40,367],711:[690,-516,333,79,411],728:[678,-516,333,71,387],729:[655,-525,333,163,293],730:[754,-541,333,127,340],731:[44,173,333,-40,189],732:[655,-536,333,48,407],733:[697,-516,333,69,498],736:[684,-190,379,14,423],737:[857,-329,222,2,217],738:[690,-331,280,8,274],739:[690,-335,389,3,387],740:[849,-329,328,9,364],748:[70,167,314,5,309],749:[720,-528,395,5,390],759:[-108,227,333,-74,285]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/BoldItalic/SpacingModLetters.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/AlphaPresentForms.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{64256:[678,207,527,-147,673],64257:[681,207,500,-141,481],64258:[682,204,500,-141,518],64259:[681,207,744,-147,725],64260:[682,207,745,-147,763]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/AlphaPresentForms.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/BoxDrawing.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{9472:[340,-267,708,-11,719],9474:[910,303,708,317,390],9484:[340,303,708,317,720],9488:[340,303,708,-11,390],9492:[910,-267,708,317,720],9496:[910,-267,708,-11,390],9500:[910,303,708,317,719],9508:[910,303,708,-11,390],9516:[340,303,708,-11,719],9524:[910,-267,708,-11,719],9532:[910,303,708,-11,719],9552:[433,-174,708,-11,719],9553:[910,303,708,225,483],9554:[433,303,708,317,720],9555:[340,303,708,225,720],9556:[433,303,708,225,719],9557:[433,303,708,-11,390],9558:[340,303,708,-11,483],9559:[433,303,708,-11,483],9560:[910,-174,708,317,720],9561:[910,-267,708,225,720],9562:[910,-174,708,225,719],9563:[910,-174,708,-11,390],9564:[910,-267,708,-11,483],9565:[910,-174,708,-11,483],9566:[910,303,708,317,720],9567:[910,303,708,225,720],9568:[910,303,708,225,720],9569:[910,303,708,-11,390],9570:[910,303,708,-11,483],9571:[910,303,708,-11,483],9572:[433,303,708,-11,719],9573:[340,303,708,-11,719],9574:[433,303,708,-11,719],9575:[910,-174,708,-11,719],9576:[910,-267,708,-11,719],9577:[910,-174,708,-11,719],9578:[910,303,708,-11,719],9579:[910,303,708,-11,719],9580:[910,303,708,-11,719]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/BoxDrawing.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/CombDiactForSymbols.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{8400:[760,-627,0,-453,-17],8401:[760,-627,0,-426,10],8402:[662,156,0,-300,-234],8406:[760,-548,0,-453,-17],8407:[760,-548,0,-453,-17],8411:[622,-523,0,-453,44],8412:[622,-523,0,-582,114],8413:[725,221,0,-723,223],8417:[760,-548,0,-453,25],8420:[1023,155,0,-970,490],8421:[662,156,0,-430,-24],8422:[662,156,0,-351,-86],8423:[725,178,0,-595,221],8424:[-119,218,0,-462,35],8425:[681,-538,0,-478,55],8426:[419,-87,0,-793,153],8428:[-119,252,0,27,463],8429:[-119,252,0,27,463],8430:[-40,252,0,-453,-17],8431:[-40,252,0,-453,-17]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/CombDiactForSymbols.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/ControlPictures.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{9251:[16,120,500,40,460]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/ControlPictures.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/CurrencySymbols.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{8355:[653,0,611,8,645],8356:[670,8,500,10,517],8359:[653,13,1149,0,1126],8364:[664,12,500,16,538]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/CurrencySymbols.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/Cyrillic.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{1025:[856,0,611,1,631],1026:[653,208,723,70,663],1027:[914,0,569,-36,603],1028:[666,18,657,67,680],1029:[667,18,500,7,498],1030:[653,0,333,-7,382],1031:[856,0,333,-31,433],1032:[653,18,444,-34,463],1033:[653,16,961,-35,901],1034:[653,0,966,-28,906],1035:[653,0,786,70,701],1036:[914,0,621,-28,657],1038:[887,14,656,110,716],1039:[653,179,722,-25,747],1040:[668,0,611,-49,566],1041:[653,0,590,-28,603],1042:[653,0,597,-23,571],1043:[653,0,569,-36,603],1044:[653,179,655,-103,696],1045:[653,0,611,1,631],1046:[661,0,956,-55,972],1047:[668,16,564,9,548],1048:[653,0,708,-25,749],1049:[887,0,708,-25,749],1050:[661,0,621,-28,657],1051:[653,16,699,-35,740],1052:[653,0,814,-33,855],1053:[653,0,708,-26,749],1054:[667,18,712,60,699],1055:[653,0,704,-29,745],1056:[653,0,568,-24,578],1057:[666,18,667,67,690],1058:[653,0,556,70,644],1059:[653,14,656,110,716],1060:[653,0,772,73,758],1061:[653,0,575,-67,617],1062:[653,179,706,-25,747],1063:[653,0,622,54,663],1064:[653,0,936,-14,977],1065:[653,179,936,-14,977],1066:[653,0,695,63,652],1067:[653,0,852,-28,893],1068:[653,0,597,-28,537],1069:[666,18,658,15,636],1070:[666,18,877,-32,850],1071:[653,0,635,-49,676],1072:[441,11,514,23,482],1073:[683,11,498,36,535],1074:[441,11,442,31,423],1075:[441,11,390,1,384],1076:[683,11,489,30,470],1077:[441,11,440,34,422],1078:[441,11,799,0,791],1079:[441,11,376,-18,357],1080:[441,11,527,29,495],1081:[667,11,527,29,495],1082:[441,11,491,18,485],1083:[441,12,474,-44,442],1084:[432,12,633,-45,601],1085:[441,9,504,20,472],1086:[441,11,489,29,470],1087:[441,9,511,19,479],1088:[441,205,483,-77,464],1089:[441,11,441,27,422],1090:[441,9,741,17,709],1091:[441,206,421,-61,389],1092:[683,205,702,29,677],1093:[441,11,444,-35,439],1094:[441,182,527,29,495],1095:[441,9,482,42,450],1096:[441,11,785,31,753],1097:[441,182,785,31,753],1098:[441,11,567,12,528],1099:[441,11,689,50,657],1100:[441,11,471,50,433],1101:[441,11,408,7,391],1102:[441,11,674,21,655],1103:[432,9,481,-25,449],1105:[606,11,440,34,475],1106:[683,208,479,20,448],1107:[664,11,390,1,455],1108:[441,11,428,26,441],1109:[442,13,389,-9,341],1110:[654,11,278,43,258],1111:[606,11,278,43,357],1112:[652,207,278,-172,231],1113:[441,12,679,-44,631],1114:[441,11,697,21,649],1115:[683,9,511,20,479],1116:[664,11,491,18,485],1118:[667,206,421,-61,417],1119:[441,182,527,29,495],1122:[653,0,681,19,621],1123:[683,11,542,13,504],1130:[653,0,953,-55,893],1131:[432,11,741,0,686],1138:[667,18,712,60,699],1139:[441,11,489,29,470],1140:[662,18,646,76,742],1141:[441,18,464,34,528],1168:[783,0,524,-30,622],1169:[507,11,337,42,404]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/Cyrillic.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/EnclosedAlphanum.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{9312:[676,14,684,0,684],9313:[676,14,684,0,684],9314:[676,14,684,0,684],9315:[676,14,684,0,684],9316:[676,14,684,0,684],9317:[676,14,684,0,684],9318:[676,14,684,0,684],9319:[676,14,684,0,684],9320:[676,14,684,0,684],9398:[676,14,684,0,684],9399:[676,14,684,0,684],9400:[676,14,684,0,684],9401:[676,14,684,0,684],9402:[676,14,684,0,684],9403:[676,14,684,0,684],9404:[676,14,684,0,684],9405:[676,14,684,0,684],9406:[676,14,684,0,684],9407:[676,14,684,0,684],9408:[676,14,684,0,684],9409:[676,14,684,0,684],9410:[676,14,684,0,684],9411:[676,14,684,0,684],9412:[676,14,684,0,684],9413:[676,14,684,0,684],9414:[676,14,684,0,684],9415:[676,14,684,0,684],9416:[676,14,684,0,684],9417:[676,14,684,0,684],9418:[676,14,684,0,684],9419:[676,14,684,0,684],9420:[676,14,684,0,684],9421:[676,14,684,0,684],9422:[676,14,684,0,684],9423:[676,14,684,0,684],9424:[676,14,684,0,684],9425:[676,14,684,0,684],9426:[676,14,684,0,684],9427:[676,14,684,0,684],9428:[676,14,684,0,684],9429:[676,14,684,0,684],9430:[676,14,684,0,684],9431:[676,14,684,0,684],9432:[676,14,684,0,684],9433:[676,14,684,0,684],9434:[676,14,684,0,684],9435:[676,14,684,0,684],9436:[676,14,684,0,684],9437:[676,14,684,0,684],9438:[676,14,684,0,684],9439:[676,14,684,0,684],9440:[676,14,684,0,684],9441:[676,14,684,0,684],9442:[676,14,684,0,684],9443:[676,14,684,0,684],9444:[676,14,684,0,684],9445:[676,14,684,0,684],9446:[676,14,684,0,684],9447:[676,14,684,0,684],9448:[676,14,684,0,684],9449:[676,14,684,0,684],9450:[676,14,684,0,684]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/EnclosedAlphanum.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/GeneralPunctuation.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{8208:[257,-191,333,49,282],8209:[257,-191,333,49,282],8210:[258,-192,500,-8,508],8211:[243,-197,500,-6,505],8212:[243,-197,889,-6,894],8216:[666,-436,333,171,310],8217:[666,-436,333,151,290],8218:[101,129,333,44,183],8219:[666,-436,333,169,290],8220:[666,-436,556,166,514],8221:[666,-436,556,151,499],8222:[101,129,556,57,405],8223:[666,-436,556,169,499],8224:[666,159,500,101,488],8225:[666,143,500,22,491],8226:[444,-59,523,70,455],8230:[100,11,889,57,762],8240:[706,19,1117,80,1067],8241:[706,19,1479,80,1429],8249:[403,-37,333,51,281],8250:[403,-37,333,52,282],8254:[820,-770,500,0,500],8260:[676,10,167,-169,337]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/GeneralPunctuation.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/GreekAndCoptic.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{900:[649,-494,289,160,322],901:[649,-494,333,70,387],902:[678,0,611,-51,564],903:[441,-330,333,150,261],904:[678,0,630,7,679],905:[678,0,740,4,821],906:[678,0,350,3,429],908:[678,18,722,58,699],910:[678,0,580,8,725],911:[678,0,762,-6,739],912:[649,11,278,49,387],913:[668,0,611,-51,564],914:[653,0,611,-8,588],917:[653,0,611,-1,634],918:[653,0,556,-6,606],919:[653,0,722,-8,769],921:[653,0,333,-8,384],922:[653,0,667,7,722],924:[653,0,833,-18,872],925:[653,15,667,-20,727],927:[667,18,722,60,699],929:[653,0,611,0,605],932:[653,0,556,59,633],935:[653,0,611,-29,655],938:[856,0,333,-8,460],939:[856,0,556,78,648],940:[649,11,552,27,549],941:[649,11,444,30,425],942:[649,205,474,14,442],943:[649,11,278,49,288],944:[649,10,478,19,446],970:[606,11,278,49,359],971:[606,10,478,19,446],972:[649,11,500,27,468],973:[649,10,478,19,446],974:[649,11,686,27,654],976:[694,10,456,45,436],978:[668,0,596,78,693],984:[667,205,722,60,699],985:[441,205,500,27,468],986:[666,207,673,55,665],987:[458,185,444,30,482],988:[653,0,557,8,645],989:[433,190,487,32,472],990:[773,18,645,19,675],991:[683,0,457,31,445],992:[666,207,708,7,668],993:[552,210,528,93,448],1008:[441,13,533,-16,559],1012:[667,18,722,60,699],1014:[441,11,444,24,414]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/GreekAndCoptic.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/GreekItalic.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{120546:[667,0,717,35,685],120547:[653,0,696,38,686],120548:[653,0,616,38,721],120549:[667,0,596,30,556],120550:[653,0,714,38,734],120551:[653,0,772,60,802],120552:[653,0,873,38,923],120553:[669,11,737,50,712],120554:[653,0,480,38,530],120555:[653,0,762,38,802],120556:[667,0,718,35,686],120557:[653,0,1005,38,1055],120558:[653,0,851,38,901],120559:[653,0,706,52,741],120560:[669,11,732,50,712],120561:[653,0,873,38,923],120562:[653,0,594,38,704],120563:[669,11,737,50,712],120564:[653,0,735,58,760],120565:[653,0,550,25,670],120566:[668,0,613,28,743],120567:[653,0,772,25,747],120568:[653,0,790,25,810],120569:[667,0,670,28,743],120570:[666,0,800,32,777],120571:[653,15,627,42,600],120572:[441,10,524,40,529],120573:[668,183,493,25,518],120574:[441,187,428,35,458],120575:[668,11,463,40,451],120576:[441,11,484,25,444],120577:[668,183,435,40,480],120578:[441,183,460,30,455],120579:[668,11,484,40,474],120580:[441,11,267,50,227],120581:[441,0,534,50,549],120582:[668,16,541,50,511],120583:[428,183,579,30,549],120584:[446,9,452,50,462],120585:[668,183,433,25,443],120586:[441,11,458,40,438],120587:[428,13,558,35,568],120588:[441,183,502,30,472],120589:[490,183,439,35,464],120590:[428,11,537,40,547],120591:[428,5,442,30,472],120592:[439,11,460,30,445],120593:[441,183,666,50,631],120594:[441,202,595,30,645],120595:[441,183,661,30,711],120596:[441,11,681,20,661],120597:[668,11,471,40,471],120598:[441,11,430,40,430],120599:[678,10,554,20,507],120600:[441,13,561,12,587],120601:[668,183,645,40,620],120602:[441,187,509,40,489],120603:[428,11,856,30,866]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/GreekItalic.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/IPAExtensions.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{592:[460,10,444,19,421],593:[460,10,511,17,487],594:[460,10,511,17,487],595:[683,11,500,23,488],596:[441,11,444,30,425],597:[441,160,444,-3,425],598:[683,233,500,15,527],599:[683,13,500,15,748],600:[441,11,444,31,416],601:[441,11,444,31,412],602:[441,11,639,31,639],603:[475,14,444,31,467],604:[475,14,480,31,447],605:[475,14,666,31,666],606:[475,14,490,30,458],607:[441,207,357,-100,340],608:[683,212,714,8,799],609:[482,212,595,8,579],610:[441,11,562,52,562],611:[441,234,444,15,426],612:[450,10,480,4,475],613:[450,242,500,19,478],614:[683,9,500,19,494],615:[683,233,500,-6,494],616:[654,11,278,16,264],617:[454,10,333,51,266],618:[441,0,247,-8,298],619:[683,11,278,4,331],620:[683,11,375,12,366],621:[683,233,252,8,279],622:[683,233,575,41,537],623:[441,9,722,12,704],624:[441,233,722,12,704],625:[441,233,690,12,672],626:[441,233,606,-110,580],627:[441,233,498,14,487],628:[441,8,539,-20,599],629:[441,11,500,27,468],630:[441,6,718,49,738],631:[475,4,668,30,638],632:[683,233,660,30,630],633:[441,0,402,-45,322],634:[683,0,383,-45,384],635:[441,233,353,-45,342],636:[441,233,333,-20,412],637:[441,233,390,24,412],638:[470,0,401,45,424],639:[470,0,338,66,293],640:[464,0,475,25,501],641:[464,0,475,25,581],642:[442,218,389,9,376],643:[683,233,415,-110,577],644:[683,233,453,-110,595],645:[470,233,339,79,355],646:[683,243,439,-62,602],647:[460,97,330,38,296],648:[546,233,278,6,308],649:[441,11,500,9,479],650:[450,10,537,49,552],651:[441,10,500,52,475],652:[441,18,444,20,426],653:[441,18,667,15,648],654:[647,0,444,10,460],655:[464,0,633,62,603],656:[428,218,405,17,429],657:[428,47,393,17,380],658:[450,233,413,21,517],659:[450,305,457,7,544],660:[683,0,500,55,509],661:[683,0,500,55,495],662:[662,14,393,-25,413],663:[441,238,450,24,459],664:[679,17,723,22,704],665:[464,0,460,19,505],666:[475,14,479,20,470],667:[515,11,570,29,650],668:[464,0,572,25,671],669:[652,233,403,-80,394],670:[439,255,463,26,473],671:[464,0,470,25,473],672:[582,209,480,25,666],673:[683,0,500,55,509],674:[683,0,500,55,495],675:[683,13,743,15,741],676:[683,233,743,15,780],677:[683,47,754,15,741],678:[546,11,500,38,523],679:[683,233,517,-32,655],680:[546,16,632,38,612]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/IPAExtensions.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/Latin1Supplement.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{160:[0,0,250,0,0],161:[474,205,389,59,321],162:[560,143,500,77,472],163:[670,8,500,10,517],164:[534,10,500,-22,522],165:[653,0,500,28,605],166:[666,18,275,105,171],167:[666,162,500,53,461],168:[606,-508,333,107,405],169:[666,18,760,41,719],170:[676,-406,276,42,352],171:[403,-37,500,53,445],172:[386,-108,675,86,590],173:[255,-192,333,49,282],174:[666,18,760,41,719],175:[583,-532,333,99,411],176:[676,-390,400,101,387],177:[568,0,675,86,590],178:[676,-271,300,33,324],179:[676,-268,300,43,339],180:[664,-494,333,180,403],181:[428,209,500,-30,497],182:[653,123,559,60,621],183:[310,-199,250,70,181],184:[0,217,333,-30,182],185:[676,-271,300,43,284],186:[676,-406,310,67,362],187:[403,-37,500,55,447],188:[676,10,750,33,736],189:[676,10,750,34,749],190:[676,10,750,23,736],191:[473,205,500,28,367],192:[914,0,611,-51,564],193:[914,0,611,-51,564],194:[911,0,611,-51,564],195:[874,0,611,-51,572],196:[856,0,611,-51,564],197:[957,0,611,-51,564],198:[653,0,889,-27,911],199:[666,217,667,66,689],200:[914,0,611,-1,634],201:[914,0,611,-1,634],202:[911,0,611,-1,634],203:[856,0,611,-1,634],204:[914,0,333,-8,398],205:[914,0,333,-8,414],206:[911,0,333,-8,450],207:[856,0,333,-8,457],208:[653,0,722,-8,700],209:[874,15,667,-20,727],210:[914,18,722,60,699],211:[914,18,722,60,699],212:[911,18,722,60,699],213:[874,18,722,60,699],214:[856,18,722,60,699],215:[497,-8,675,93,582],216:[722,105,722,60,699],217:[914,18,722,102,765],218:[914,18,722,102,765],219:[911,18,722,102,765],220:[856,18,722,102,765],221:[914,0,556,78,633],222:[653,0,611,0,569],223:[679,207,500,-168,493],224:[664,11,501,17,476],225:[664,11,501,17,476],226:[661,11,501,17,497],227:[624,11,501,17,521],228:[606,11,501,17,503],229:[709,11,501,17,476],230:[441,11,667,23,640],231:[441,217,444,26,425],232:[664,11,444,31,414],233:[664,11,444,31,431],234:[661,11,444,31,466],235:[606,11,444,31,475],236:[664,11,278,47,302],237:[664,11,278,47,318],238:[661,11,278,47,351],239:[606,11,278,47,361],240:[683,11,500,27,482],241:[624,9,500,14,488],242:[664,11,500,27,468],243:[664,11,500,27,468],244:[661,11,500,27,468],245:[624,11,500,27,494],246:[606,11,500,27,474],247:[517,11,675,86,590],248:[554,135,500,28,469],249:[664,11,500,42,475],250:[664,11,500,42,475],251:[661,11,500,42,475],252:[606,11,500,42,475],253:[664,206,444,-24,426],254:[683,205,500,-75,469],255:[606,206,444,-24,442]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/Latin1Supplement.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/LatinExtendedA.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{256:[757,0,611,-51,564],257:[543,11,501,17,481],258:[862,0,611,-51,564],259:[650,11,501,17,481],260:[668,169,611,-51,626],261:[441,169,501,17,529],262:[876,18,667,66,689],263:[664,11,444,30,431],264:[875,18,667,66,689],265:[661,11,444,30,427],266:[818,18,667,66,689],267:[606,11,444,30,425],268:[875,18,667,66,689],269:[661,11,444,30,473],270:[875,0,722,-8,700],271:[691,13,609,15,697],272:[653,0,722,-8,700],273:[683,13,500,15,580],274:[757,0,611,-1,634],275:[542,11,444,31,466],276:[866,0,611,-1,634],277:[650,11,444,31,471],278:[818,0,611,-1,634],279:[606,11,444,31,412],280:[653,175,611,-1,634],281:[441,175,444,31,412],282:[875,0,611,-1,634],283:[661,11,444,31,502],284:[877,18,722,52,722],285:[661,206,500,8,471],286:[866,18,722,52,722],287:[650,206,500,8,476],288:[818,18,722,52,722],289:[606,206,500,8,471],290:[666,267,722,52,722],291:[724,206,500,8,471],292:[875,0,722,-8,769],293:[875,9,500,19,478],294:[653,0,722,-8,769],295:[683,9,500,19,478],296:[836,0,333,-8,444],297:[624,11,278,30,357],298:[757,0,333,-8,439],299:[543,11,278,29,341],300:[866,0,333,-8,448],301:[650,11,278,46,347],302:[653,169,333,-8,384],303:[654,169,278,49,303],304:[818,0,333,-8,384],306:[653,18,750,-8,783],307:[654,207,500,49,500],308:[877,18,444,-6,536],309:[661,207,278,-124,353],310:[653,267,667,7,722],311:[683,267,444,14,461],312:[459,0,542,5,601],313:[876,0,556,-8,559],314:[876,11,278,41,348],315:[653,267,556,-8,559],316:[683,267,278,7,279],317:[666,0,556,-8,595],318:[693,11,278,41,448],319:[653,0,556,-8,559],320:[683,11,323,41,386],321:[653,0,556,-8,559],322:[683,11,278,37,307],323:[876,15,667,-20,727],324:[664,9,500,14,474],325:[653,267,667,-20,727],326:[441,267,500,14,474],327:[875,15,667,-20,727],328:[661,9,500,14,475],329:[691,9,577,58,540],330:[666,18,722,-8,700],331:[441,208,500,14,442],332:[757,18,722,60,699],333:[543,11,500,27,511],334:[866,18,722,60,709],335:[650,11,500,27,533],336:[876,18,722,60,720],337:[664,11,500,27,541],338:[666,8,944,49,964],339:[441,12,667,20,646],340:[876,0,611,-13,588],341:[664,0,389,45,412],342:[653,267,611,-13,588],343:[441,267,389,-2,412],344:[875,0,611,-13,588],345:[663,0,389,45,426],346:[876,18,500,17,508],347:[664,13,389,16,403],348:[877,18,500,17,508],349:[661,13,389,16,385],350:[667,217,500,17,508],351:[442,217,389,16,366],352:[875,18,500,17,532],353:[663,13,389,16,426],354:[653,217,556,59,633],355:[546,217,278,-38,296],356:[875,0,556,59,633],357:[693,11,278,38,453],358:[653,0,556,59,633],359:[546,11,278,28,296],360:[836,18,722,102,765],361:[624,11,500,42,475],362:[757,18,722,102,765],363:[543,11,500,42,475],364:[866,18,722,102,765],365:[650,11,500,42,480],366:[907,18,722,102,765],367:[691,11,500,42,475],368:[876,18,722,102,765],369:[664,11,500,42,511],370:[653,169,722,102,765],371:[441,169,500,42,538],372:[877,18,833,71,906],373:[661,18,667,15,648],374:[877,0,556,78,633],375:[661,206,444,-24,426],376:[818,0,556,78,633],377:[876,0,556,-6,606],378:[664,81,389,-2,390],379:[818,0,556,-6,606],380:[606,81,389,-2,380],381:[875,0,556,-6,606],382:[663,81,389,-2,426],383:[683,0,383,13,513]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/LatinExtendedA.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/LatinExtendedAdditional.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{7808:[880,18,833,71,906],7809:[664,18,667,15,648],7810:[876,18,833,71,906],7811:[664,18,667,15,648],7812:[818,18,833,71,906],7813:[606,18,667,15,648],7922:[880,0,556,78,633],7923:[664,206,444,-24,426]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/LatinExtendedAdditional.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/LatinExtendedB.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{384:[683,11,500,23,473],392:[548,11,500,30,577],400:[684,6,667,66,671],402:[706,159,472,-62,494],405:[683,10,672,19,654],409:[683,11,500,14,490],410:[683,11,278,41,279],411:[668,0,490,30,478],414:[441,233,500,14,442],416:[691,18,722,60,783],417:[467,11,534,27,583],421:[669,205,504,-75,472],426:[685,233,340,31,319],427:[546,218,278,-54,296],429:[683,11,310,38,452],431:[765,18,754,102,881],432:[543,11,573,42,607],442:[450,234,500,8,462],443:[676,0,500,12,500],446:[539,12,500,47,453],448:[736,0,170,15,258],449:[736,0,290,15,379],450:[736,0,340,15,429],451:[667,11,333,39,304],496:[661,207,278,-124,397],506:[950,0,611,-51,564],507:[860,11,501,17,476],508:[876,0,889,-27,911],509:[664,11,667,23,640],510:[876,105,722,60,699],511:[664,135,500,28,469]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/LatinExtendedB.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/LetterlikeSymbols.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{8450:[666,18,702,35,702],8453:[676,14,855,47,808],8458:[441,219,738,30,678],8459:[687,15,997,53,991],8461:[653,0,732,17,767],8462:[668,11,513,45,483],8464:[675,15,897,26,888],8466:[687,15,946,33,931],8469:[653,0,727,25,755],8470:[668,15,1046,19,1031],8473:[653,0,687,17,686],8474:[666,71,723,35,713],8475:[687,15,944,34,876],8477:[653,0,687,17,686],8482:[653,-247,980,30,957],8484:[653,0,754,7,750],8492:[687,15,950,34,902],8495:[441,11,627,30,554],8496:[687,15,750,100,734],8497:[680,0,919,43,907],8499:[674,15,1072,38,1056],8500:[441,11,697,30,680],8508:[428,12,635,40,630],8511:[653,0,750,30,780],8517:[653,0,713,17,703],8518:[683,11,581,40,634],8519:[441,11,515,40,485],8520:[653,0,293,27,346],8521:[653,217,341,-104,394]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/LetterlikeSymbols.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/Main.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"]={directory:"General/Italic",family:"STIXGeneral",style:"italic",Ranges:[[160,255,"Latin1Supplement"],[256,383,"LatinExtendedA"],[384,591,"LatinExtendedB"],[592,687,"IPAExtensions"],[688,767,"SpacingModLetters"],[880,1023,"GreekAndCoptic"],[1024,1279,"Cyrillic"],[7680,7935,"LatinExtendedAdditional"],[8192,8303,"GeneralPunctuation"],[8352,8399,"CurrencySymbols"],[8400,8447,"CombDiactForSymbols"],[8448,8527,"LetterlikeSymbols"],[8704,8959,"MathOperators"],[9216,9279,"ControlPictures"],[9312,9471,"EnclosedAlphanum"],[9472,9599,"BoxDrawing"],[64256,64335,"AlphaPresentForms"],[119860,119911,"MathItalic"],[119964,120015,"MathScript"],[120328,120379,"MathSSItalic"],[120484,120485,"ij"],[120546,120603,"GreekItalic"]],32:[0,0,250,0,0],33:[667,11,333,39,304],34:[666,-421,420,144,432],35:[676,0,501,2,540],36:[731,89,500,32,497],37:[706,19,755,80,705],38:[666,18,778,76,723],39:[666,-421,214,132,241],40:[669,181,333,42,315],41:[669,180,333,16,289],42:[666,-255,500,128,492],43:[506,0,675,86,590],44:[101,129,250,-5,135],45:[255,-192,333,49,282],46:[100,11,250,27,138],47:[666,18,278,-65,386],48:[676,7,500,32,497],49:[676,0,500,50,409],50:[676,0,500,12,452],51:[676,7,500,16,465],52:[676,0,500,1,479],53:[666,7,500,15,491],54:[686,7,500,30,521],55:[666,8,500,75,537],56:[676,7,500,30,493],57:[676,17,500,23,492],58:[441,11,333,50,261],59:[441,129,333,26,261],60:[516,10,675,84,592],61:[386,-120,675,86,590],62:[516,10,675,84,592],63:[664,12,500,132,472],64:[666,18,920,118,806],65:[668,0,611,-51,564],66:[653,0,611,-8,588],67:[666,18,667,66,689],68:[653,0,722,-8,700],69:[653,0,611,-1,634],70:[653,0,611,8,645],71:[666,18,722,52,722],72:[653,0,722,-8,769],73:[653,0,333,-8,384],74:[653,18,444,-6,491],75:[653,0,667,7,722],76:[653,0,556,-8,559],77:[653,0,833,-18,872],78:[653,15,667,-20,727],79:[667,18,722,60,699],80:[653,0,611,0,605],81:[666,182,722,59,699],82:[653,0,611,-13,588],83:[667,18,500,17,508],84:[653,0,556,59,633],85:[653,18,722,102,765],86:[653,18,611,76,688],87:[653,18,833,71,906],88:[653,0,611,-29,655],89:[653,0,556,78,633],90:[653,0,556,-6,606],91:[663,153,389,21,391],92:[666,18,278,-41,319],93:[663,153,389,12,382],94:[666,-301,422,0,422],95:[-75,125,500,0,500],96:[664,-492,333,120,311],97:[441,11,501,17,476],98:[683,11,500,23,473],99:[441,11,444,30,425],100:[683,13,500,15,527],101:[441,11,444,31,412],102:[678,207,278,-147,424],103:[441,206,500,8,471],104:[683,9,500,19,478],105:[654,11,278,49,264],106:[652,207,278,-124,279],107:[683,11,444,14,461],108:[683,11,278,41,279],109:[441,9,722,12,704],110:[441,9,500,14,474],111:[441,11,500,27,468],112:[441,205,504,-75,472],113:[441,209,500,25,484],114:[441,0,389,45,412],115:[442,13,389,16,366],116:[546,11,278,38,296],117:[441,11,500,42,475],118:[441,18,444,20,426],119:[441,18,667,15,648],120:[441,11,444,-27,447],121:[441,206,444,-24,426],122:[428,81,389,-2,380],123:[687,177,400,51,407],124:[666,18,275,105,171],125:[687,177,400,-7,349],126:[323,-183,541,40,502],305:[441,11,278,47,235],567:[441,207,278,-124,246],915:[653,0,611,8,645],916:[668,0,611,-32,526],920:[667,18,722,60,699],923:[668,0,611,-51,564],926:[653,0,651,-6,680],928:[653,0,722,-8,769],931:[653,0,620,-6,659],933:[668,0,556,78,648],934:[653,0,741,50,731],936:[667,0,675,77,778],937:[666,0,762,-6,739],945:[441,11,552,27,549],946:[678,205,506,-40,514],947:[435,206,410,19,438],948:[668,11,460,24,460],949:[441,11,444,30,425],950:[683,185,454,30,475],951:[441,205,474,14,442],952:[678,11,480,27,494],953:[441,11,278,49,235],954:[441,13,444,14,465],955:[678,16,458,-12,431],956:[428,205,526,-33,483],957:[441,18,470,20,459],958:[683,185,454,30,446],959:[441,11,500,27,468],960:[428,18,504,19,536],961:[441,205,504,-40,471],962:[441,185,454,30,453],963:[428,11,498,27,531],964:[428,11,410,12,426],965:[441,10,478,19,446],966:[441,205,622,27,590],967:[441,207,457,-108,498],968:[441,205,584,15,668],969:[439,11,686,27,654],977:[678,10,556,19,526],981:[683,205,627,27,595],982:[428,11,792,17,832],1009:[441,205,516,27,484],1013:[441,11,444,30,420],8467:[687,11,579,48,571]};MathJax.OutputJax["HTML-CSS"].initFont("STIXGeneral-italic");MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/Main.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/MathItalic.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{119860:[667,0,717,35,685],119861:[653,0,696,38,686],119862:[659,12,671,50,711],119863:[653,0,790,38,765],119864:[653,0,714,38,734],119865:[653,0,618,38,723],119866:[668,12,734,50,734],119867:[653,0,873,38,923],119868:[653,0,480,38,530],119869:[653,12,540,60,620],119870:[653,0,762,38,802],119871:[653,0,708,38,668],119872:[653,0,1005,38,1055],119873:[653,0,851,38,901],119874:[669,11,732,50,712],119875:[653,0,594,38,704],119876:[667,152,781,50,731],119877:[653,0,740,38,725],119878:[668,10,650,50,680],119879:[653,0,550,25,670],119880:[653,13,705,65,775],119881:[653,16,575,60,760],119882:[653,16,916,60,1101],119883:[653,0,790,25,810],119884:[653,0,535,35,695],119885:[653,0,772,60,802],119886:[441,10,502,40,472],119887:[668,11,470,45,450],119888:[441,11,415,40,400],119889:[668,12,532,40,527],119890:[441,11,445,40,410],119891:[668,187,555,40,615],119892:[441,187,492,20,492],119894:[616,11,311,50,257],119895:[616,187,389,-16,372],119896:[668,11,542,45,527],119897:[668,10,318,45,278],119898:[441,8,710,30,680],119899:[441,8,497,30,467],119900:[441,11,458,40,438],119901:[441,183,489,-30,474],119902:[441,183,458,40,463],119903:[441,0,408,30,393],119904:[441,11,440,50,390],119905:[567,9,313,40,283],119906:[441,9,474,30,444],119907:[458,9,506,72,479],119908:[460,9,775,72,748],119909:[441,9,550,30,510],119910:[440,183,496,30,496],119911:[450,14,499,42,467]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/MathItalic.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/MathOperators.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{8706:[668,11,471,40,471],8722:[286,-220,675,86,590]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/MathOperators.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/MathSSItalic.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{120328:[674,0,666,31,635],120329:[662,0,604,74,641],120330:[676,14,671,96,755],120331:[662,0,692,74,751],120332:[662,0,583,74,678],120333:[662,0,535,74,679],120334:[676,14,695,97,755],120335:[662,0,658,74,749],120336:[662,0,401,59,512],120337:[662,14,398,22,470],120338:[662,0,634,74,729],120339:[662,0,559,74,564],120340:[662,0,843,75,933],120341:[662,14,675,74,766],120342:[676,14,714,99,779],120343:[662,0,525,74,638],120344:[676,175,716,99,779],120345:[662,0,589,74,639],120346:[676,14,541,62,597],120347:[662,0,608,161,748],120348:[662,14,661,117,757],120349:[662,11,654,196,788],120350:[662,11,921,194,1057],120351:[662,0,700,31,806],120352:[662,0,630,186,774],120353:[662,0,637,28,763],120354:[463,10,448,55,467],120355:[684,10,496,74,535],120356:[463,10,456,67,503],120357:[684,11,494,72,600],120358:[463,10,444,69,487],120359:[683,0,336,101,526],120360:[463,216,496,-7,575],120361:[684,0,487,63,510],120362:[679,0,220,69,325],120363:[679,216,254,-118,354],120364:[684,0,453,63,556],120365:[684,0,205,61,313],120366:[464,0,756,65,775],120367:[464,0,487,63,510],120368:[463,10,499,76,536],120369:[464,216,498,14,538],120370:[464,216,498,72,549],120371:[464,0,336,63,439],120372:[463,10,389,61,432],120373:[580,10,291,96,376],120374:[453,11,491,89,536],120375:[453,14,474,143,555],120376:[453,14,702,140,787],120377:[453,0,482,30,544],120378:[453,216,484,-19,565],120379:[453,0,447,25,517]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/MathSSItalic.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/MathScript.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{119964:[674,15,855,31,846],119966:[687,15,797,37,781],119967:[687,15,885,36,818],119970:[687,15,773,83,740],119973:[674,177,802,9,792],119974:[687,15,1009,40,1004],119977:[687,15,970,38,956],119978:[680,15,692,82,663],119979:[687,15,910,38,886],119980:[680,38,692,82,663],119982:[680,15,743,67,701],119983:[687,15,912,43,907],119984:[687,15,842,36,805],119985:[687,15,932,35,922],119986:[687,15,1078,35,1070],119987:[687,15,891,36,873],119988:[687,226,926,91,916],119989:[687,15,932,59,912],119990:[441,11,819,30,758],119991:[687,12,580,47,559],119992:[441,11,662,30,589],119993:[687,11,845,30,827],119995:[687,209,685,27,673],119997:[687,11,753,38,690],119998:[653,11,496,83,484],119999:[653,219,730,9,718],120000:[687,11,726,40,666],120001:[687,11,579,48,571],120002:[441,11,1038,49,978],120003:[441,11,761,49,701],120005:[441,209,773,23,694],120006:[441,209,780,30,743],120007:[444,0,580,48,572],120008:[531,11,515,62,412],120009:[658,11,551,30,532],120010:[424,11,753,30,693],120011:[441,11,618,30,582],120012:[441,11,888,30,852],120013:[441,11,752,65,675],120014:[424,219,658,30,617],120015:[478,11,691,52,617]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/MathScript.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/SpacingModLetters.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{688:[838,-326,378,7,391],689:[838,-326,378,7,414],690:[851,-199,300,44,350],691:[690,-345,320,2,320],692:[690,-345,320,0,318],693:[690,-163,320,0,335],694:[684,-345,390,6,462],695:[690,-327,500,15,515],696:[693,-202,330,16,357],699:[686,-443,333,79,236],704:[690,-295,326,30,307],705:[690,-295,326,23,343],710:[661,-492,333,91,385],711:[661,-492,333,121,426],728:[650,-492,333,117,418],729:[606,-508,333,207,305],730:[707,-508,333,155,355],731:[40,169,333,-20,200],732:[624,-517,333,100,427],733:[664,-494,333,93,486],736:[684,-218,315,23,335],737:[837,-333,220,41,214],738:[691,-335,300,16,290],739:[691,-333,380,4,379],740:[847,-333,318,8,345],748:[70,147,320,15,305],749:[665,-507,405,10,395],759:[-113,220,333,-94,233]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/SpacingModLetters.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/ij.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXGeneral-italic"],{120484:[441,11,278,47,235],120485:[441,207,278,-124,246]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Italic/ij.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/AlphaPresentForms.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXGeneral,{64256:[683,0,605,20,655],64257:[683,0,558,32,523],64258:[683,0,556,31,522],64259:[683,0,832,20,797],64260:[683,0,830,20,796]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Regular/AlphaPresentForms.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Arrows.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXGeneral,{8602:[450,-58,926,60,866],8603:[450,-58,926,60,866],8604:[411,-102,926,70,856],8605:[411,-102,926,70,856],8606:[449,-58,926,70,856],8607:[662,154,511,60,451],8608:[449,-58,926,70,856],8609:[662,154,511,60,451],8610:[449,-58,926,70,856],8611:[449,-58,926,70,856],8612:[450,-57,926,70,857],8613:[662,154,511,60,451],8615:[662,154,511,59,451],8616:[662,154,511,59,451],8619:[553,0,926,70,856],8620:[553,0,926,70,856],8621:[449,-58,1200,49,1151],8622:[450,-58,926,38,888],8623:[662,154,511,60,451],8624:[662,156,463,30,424],8625:[662,156,463,39,433],8626:[662,154,463,25,419],8627:[662,154,463,39,433],8628:[662,154,926,70,856],8629:[662,156,926,70,856],8630:[534,0,926,44,882],8631:[534,0,926,44,882],8632:[732,156,926,55,872],8633:[598,92,926,60,866],8634:[686,116,974,116,858],8635:[686,116,974,116,858],8638:[662,156,511,222,441],8639:[662,156,511,69,288],8642:[662,156,511,222,441],8643:[662,156,511,69,288],8644:[598,92,926,71,856],8645:[662,156,773,31,742],8646:[598,92,926,71,856],8647:[599,92,926,70,856],8648:[662,156,773,41,732],8649:[599,92,926,70,856],8650:[662,156,773,41,732],8651:[539,33,926,70,856],8653:[551,45,926,60,866],8654:[517,10,926,20,906],8655:[551,45,926,60,866],8662:[662,156,926,55,874],8663:[662,156,926,55,874],8664:[662,156,926,55,874],8665:[662,156,926,55,874],8666:[644,139,926,46,852],8667:[645,138,926,74,880],8668:[449,-58,926,60,866],8669:[449,-58,926,60,866],8670:[662,156,511,60,451],8671:[662,156,511,60,451],8672:[449,-58,926,60,866],8673:[662,156,511,60,451],8674:[449,-58,926,60,866],8675:[662,156,511,60,451],8676:[450,-58,926,60,866],8677:[450,-58,926,60,866],8678:[551,45,926,60,866],8679:[662,156,685,45,641],8680:[551,45,926,60,866],8681:[662,156,685,45,641],8682:[690,184,685,45,641],8692:[448,-57,926,70,856],8693:[662,156,773,31,742],8694:[739,232,926,60,866],8695:[450,-58,926,60,866],8696:[450,-58,926,55,861],8697:[450,-58,926,48,878],8698:[450,-58,926,60,866],8699:[450,-58,926,60,866],8700:[450,-58,926,38,888],8701:[449,-57,926,60,866],8702:[449,-57,926,60,866],8703:[449,-57,926,20,906]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Regular/Arrows.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/BBBold.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXGeneral,{120120:[662,0,741,50,691],120121:[662,0,676,70,626],120123:[662,0,722,70,677],120124:[662,0,622,70,567],120125:[662,0,469,70,567],120126:[676,13,706,45,664],120128:[662,0,322,78,244],120129:[662,14,560,40,495],120130:[674,0,735,70,729],120131:[662,0,591,70,571],120132:[662,0,855,70,785],120134:[676,14,760,45,715],120138:[676,14,636,35,597],120139:[662,0,527,20,622],120140:[662,14,698,65,633],120141:[662,0,568,12,653],120142:[662,0,920,12,949],120143:[662,0,768,35,733],120144:[662,0,563,12,685],120146:[460,10,561,45,506],120147:[683,10,565,50,524],120148:[460,10,520,45,475],120149:[683,10,574,45,519],120150:[460,10,523,45,478],120151:[683,0,368,25,431],120152:[460,218,574,45,519],120153:[683,0,544,55,489],120154:[683,0,258,55,203],120155:[683,217,305,-15,250],120156:[683,0,551,50,539],120157:[683,0,258,55,203],120158:[460,0,830,55,775],120159:[460,0,544,55,489],120160:[458,12,553,45,508],120161:[460,218,574,55,529],120162:[460,218,574,45,519],120163:[463,0,301,55,407],120164:[460,10,519,36,483],120165:[633,10,329,20,297],120166:[450,10,544,55,489],120167:[450,0,443,20,479],120168:[450,0,676,20,695],120169:[450,0,560,30,530],120170:[450,218,468,20,510],120171:[450,0,519,43,476],120792:[676,14,540,28,512],120793:[693,0,540,91,355],120794:[676,0,547,48,514],120795:[676,14,540,49,478],120796:[676,0,540,20,524],120797:[662,14,540,35,489],120798:[676,14,540,28,512],120799:[662,0,540,24,511],120800:[676,14,540,28,512],120801:[676,12,540,28,512]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Regular/BBBold.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/BlockElements.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXGeneral,{9600:[910,-304,1213,0,1213],9604:[303,303,1213,0,1213],9608:[910,303,1213,0,1213],9612:[910,303,1212,0,606],9616:[910,303,1212,606,1212],9617:[860,258,1200,0,1200],9618:[874,273,1200,0,1200],9619:[874,273,1200,0,1200]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Regular/BlockElements.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/BoldFraktur.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXGeneral,{120172:[701,25,856,50,805],120173:[701,19,849,50,794],120174:[701,19,773,54,731],120175:[701,19,891,54,836],120176:[701,19,788,54,731],120177:[701,205,803,54,748],120178:[701,19,833,54,781],120179:[701,205,843,42,795],120180:[701,25,790,54,735],120181:[701,205,803,54,748],120182:[701,25,864,42,814],120183:[701,25,699,51,645],120184:[701,25,1133,50,1081],120185:[701,25,862,50,810],120186:[701,19,909,54,854],120187:[701,205,850,50,795],120188:[701,59,930,54,902],120189:[701,25,884,50,841],120190:[701,19,852,54,802],120191:[701,25,793,54,740],120192:[701,25,860,54,809],120193:[701,19,855,50,800],120194:[701,19,1121,50,1066],120195:[701,25,819,50,775],120196:[701,205,837,50,782],120197:[701,195,755,44,703],120198:[475,24,600,55,545],120199:[695,24,559,45,504],120200:[475,24,464,55,412],120201:[694,25,557,48,502],120202:[475,24,476,55,427],120203:[700,214,370,33,352],120204:[475,219,566,55,506],120205:[695,219,576,45,516],120206:[697,24,429,35,379],120207:[697,219,389,40,337],120208:[695,24,456,48,402],120209:[695,24,433,45,379],120210:[475,24,984,40,932],120211:[475,24,696,40,644],120212:[475,24,554,45,499],120213:[593,219,640,36,585],120214:[475,219,574,55,522],120215:[475,24,525,40,493],120216:[643,31,557,52,505],120217:[656,23,438,45,378],120218:[475,24,681,35,629],120219:[593,24,573,55,526],120220:[593,24,850,55,795],120221:[475,209,521,50,489],120222:[593,219,596,55,536],120223:[475,219,484,36,437]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Regular/BoldFraktur.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/BoxDrawing.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXGeneral,{9472:[340,-267,708,-11,719],9474:[910,303,708,317,390],9478:[910,303,708,317,390],9480:[340,-267,708,-11,719],9482:[910,303,708,317,390],9484:[340,303,708,317,720],9488:[340,303,708,-11,390],9492:[910,-267,708,317,720],9496:[910,-267,708,-11,390],9500:[910,303,708,317,719],9508:[910,303,708,-11,390],9516:[340,303,708,-11,719],9524:[910,-267,708,-11,719],9532:[910,303,708,-11,719],9552:[433,-174,708,-11,719],9553:[910,303,708,225,483],9554:[433,303,708,317,720],9555:[340,303,708,225,720],9556:[433,303,708,225,719],9557:[433,303,708,-11,390],9558:[340,303,708,-11,483],9559:[433,303,708,-11,483],9560:[910,-174,708,317,720],9561:[910,-267,708,225,720],9562:[910,-174,708,225,719],9563:[910,-174,708,-11,390],9564:[910,-267,708,-11,483],9565:[910,-174,708,-11,483],9566:[910,303,708,317,720],9567:[910,303,708,225,720],9568:[910,303,708,225,720],9569:[910,303,708,-11,390],9570:[910,303,708,-11,483],9571:[910,303,708,-11,483],9572:[433,303,708,-11,719],9573:[340,303,708,-11,719],9574:[433,303,708,-11,719],9575:[910,-174,708,-11,719],9576:[910,-267,708,-11,719],9577:[910,-174,708,-11,719],9578:[910,303,708,-11,719],9579:[910,303,708,-11,719],9580:[910,303,708,-11,719],9585:[910,303,708,-15,723],9586:[910,303,708,-15,723]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Regular/BoxDrawing.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/CJK.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXGeneral,{12306:[662,0,685,10,672],12336:[417,-93,1412,45,1367]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Regular/CJK.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/CombDiacritMarks.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXGeneral,{773:[820,-770,0,-480,20],777:[751,-492,0,-307,-118],781:[700,-500,0,-250,-195],782:[700,-500,0,-326,-133],783:[678,-507,0,-401,-22],784:[767,-507,0,-373,-92],785:[664,-507,0,-373,-92],786:[745,-502,0,-299,-160],787:[745,-502,0,-299,-160],788:[745,-502,0,-299,-160],789:[745,-502,0,-85,54],790:[-53,224,0,-351,-127],791:[-53,224,0,-371,-147],792:[-53,283,0,-397,-210],793:[-53,283,0,-267,-80],794:[735,-531,0,-380,-80],795:[474,-345,0,-44,51],796:[-71,266,0,-360,-232],797:[-53,240,0,-345,-115],798:[-53,240,0,-345,-115],799:[-53,250,0,-326,-134],800:[-124,168,0,-326,-134],801:[75,287,0,-235,1],802:[75,287,0,-54,182],803:[-118,217,0,-280,-181],804:[-119,218,0,-379,-81],805:[-69,268,0,-329,-130],806:[-110,353,0,-299,-160],807:[0,215,0,-334,-125],808:[0,165,0,-322,-137],809:[-102,234,0,-250,-210],810:[-98,235,0,-385,-73],811:[-110,227,0,-380,-75],812:[-73,240,0,-385,-74],813:[-73,240,0,-385,-74],814:[-68,225,0,-370,-89],815:[-59,216,0,-370,-89],816:[-113,219,0,-395,-65],817:[-141,195,0,-385,-74],818:[-141,191,0,-480,20],819:[-141,300,0,-480,20],820:[320,-214,0,-401,-71],821:[274,-230,0,-384,-78],822:[274,-230,0,-480,20],823:[580,74,0,-380,-41],825:[-71,266,0,-280,-152],826:[-53,190,0,-385,-73],827:[-53,227,0,-313,-147],828:[-65,189,0,-380,-79],829:[715,-525,0,-326,-135],830:[829,-499,0,-283,-177],831:[928,-770,0,-480,20],838:[681,-538,0,-350,-68],839:[-140,292,1,11,323],844:[777,-532,0,-386,-56],857:[-65,367,0,-357,-87],860:[-76,233,0,-373,295],864:[633,-517,0,-395,365],865:[664,-507,0,-373,295],866:[-65,270,0,-395,355]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Regular/CombDiacritMarks.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/CombDiactForSymbols.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXGeneral,{8400:[760,-627,0,-453,-17],8401:[760,-627,0,-453,-17],8402:[662,156,0,-242,-192],8406:[760,-548,0,-453,-17],8411:[622,-523,0,-462,35],8412:[622,-523,0,-600,96],8413:[725,221,0,-723,223],8414:[780,180,0,-730,230],8415:[843,341,0,-840,344],8417:[760,-548,0,-453,25],8420:[1023,155,0,-970,490],8421:[662,156,0,-430,-40],8422:[662,156,0,-335,-102],8423:[725,178,0,-650,166],8424:[-119,218,0,-462,35],8425:[681,-538,0,-480,53],8426:[419,-87,0,-658,118],8427:[756,217,0,-448,193],8428:[-119,252,0,-453,-17],8429:[-119,252,0,-453,-17],8430:[-40,252,0,-453,-17],8431:[-40,252,0,-453,-17],8432:[819,-517,0,-357,-87]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Regular/CombDiactForSymbols.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/ControlPictures.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXGeneral,{9251:[16,120,500,40,460]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Regular/ControlPictures.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/CurrencySymbols.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXGeneral,{8355:[662,0,556,11,546],8356:[676,8,500,12,490],8359:[662,10,1182,16,1141],8364:[664,12,500,38,462]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Regular/CurrencySymbols.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Cyrillic.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXGeneral,{1025:[872,0,629,22,607],1026:[662,189,756,18,700],1027:[928,0,571,19,544],1028:[676,14,651,38,621],1029:[676,14,556,62,510],1030:[662,0,333,18,315],1031:[872,0,333,25,323],1032:[662,14,373,-6,354],1033:[662,14,988,10,954],1034:[662,0,1017,19,983],1035:[662,0,803,18,786],1036:[928,0,690,19,686],1038:[915,15,711,15,694],1039:[662,153,715,19,696],1040:[674,0,713,9,701],1041:[662,0,611,19,577],1042:[662,0,651,19,595],1043:[662,0,571,19,544],1044:[662,153,665,14,646],1045:[662,0,629,22,607],1046:[676,0,1021,8,1013],1047:[676,14,576,28,545],1048:[662,0,723,19,704],1049:[915,0,723,19,704],1050:[676,0,690,19,686],1051:[662,14,683,9,664],1052:[662,0,893,19,871],1053:[662,0,726,19,704],1054:[676,14,729,36,690],1055:[662,0,724,19,705],1056:[662,0,571,19,535],1057:[676,14,677,36,641],1058:[662,0,618,30,592],1059:[662,15,711,15,694],1060:[662,0,769,38,731],1061:[662,0,716,9,703],1062:[662,153,715,19,696],1063:[662,0,657,3,639],1064:[662,0,994,29,965],1065:[662,153,994,29,965],1066:[662,0,737,13,703],1067:[662,0,884,19,865],1068:[662,0,612,19,578],1069:[676,14,651,30,613],1070:[676,14,902,19,863],1071:[662,0,637,3,618],1072:[460,10,450,37,446],1073:[685,10,507,39,478],1074:[450,0,474,24,438],1075:[450,0,394,17,387],1076:[450,137,462,14,439],1077:[460,10,466,38,437],1078:[456,0,721,14,707],1079:[460,10,390,14,357],1080:[450,0,525,23,502],1081:[704,0,525,23,502],1082:[456,0,503,23,495],1083:[450,10,499,8,476],1084:[450,0,617,23,594],1085:[450,0,525,23,502],1086:[460,10,512,35,476],1087:[450,0,525,23,502],1088:[460,217,499,-2,463],1089:[460,10,456,41,428],1090:[450,0,434,8,426],1091:[450,218,491,8,483],1092:[662,217,678,43,635],1093:[450,0,489,14,476],1094:[450,137,525,23,502],1095:[450,0,512,18,489],1096:[450,0,768,23,745],1097:[450,137,768,23,745],1098:[450,0,539,8,507],1099:[450,0,670,23,646],1100:[450,0,457,23,425],1101:[460,10,444,14,410],1102:[460,10,738,23,703],1103:[450,0,471,4,448],1105:[622,10,466,38,437],1106:[683,218,512,6,439],1107:[679,0,394,17,387],1108:[460,10,444,34,430],1109:[459,10,389,49,346],1110:[683,0,278,29,266],1111:[622,0,278,1,299],1112:[683,218,278,-77,187],1113:[450,10,702,8,670],1114:[450,0,721,23,689],1115:[683,0,512,6,499],1116:[679,0,503,23,495],1118:[704,218,491,8,483],1119:[450,137,518,23,495],1122:[662,0,746,26,713],1123:[683,0,539,8,507],1130:[662,0,998,6,992],1131:[450,0,722,14,708],1138:[676,14,729,36,690],1139:[460,10,512,35,476],1140:[676,11,766,16,760],1141:[456,14,539,19,532],1168:[803,0,571,19,544],1169:[558,0,394,17,387]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Regular/Cyrillic.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Dingbats.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXGeneral,{9986:[612,-82,961,35,905],9993:[555,-138,690,34,638],10003:[707,12,755,34,704],10016:[592,87,767,53,714],10026:[613,106,789,35,733],10038:[616,108,695,35,642],10045:[612,108,682,35,626],10098:[719,213,488,188,466],10099:[719,213,488,22,300],10112:[705,14,788,35,733],10113:[705,14,788,35,733],10114:[705,14,788,35,733],10115:[705,14,788,35,733],10116:[705,14,788,35,733],10117:[705,14,788,35,733],10118:[705,14,788,35,733],10119:[705,14,788,35,733],10120:[705,14,788,35,733],10121:[705,14,788,35,733],10122:[705,14,788,35,733],10123:[705,14,788,35,733],10124:[705,14,788,35,733],10125:[705,14,788,35,733],10126:[705,14,788,35,733],10127:[705,14,788,35,733],10128:[705,14,788,35,733],10129:[705,14,788,35,733],10130:[705,14,788,35,733],10131:[705,14,788,35,733],10139:[433,-70,918,35,861]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Regular/Dingbats.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/EnclosedAlphanum.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXGeneral,{9312:[676,14,684,0,684],9313:[676,14,684,0,684],9314:[676,14,684,0,684],9315:[676,14,684,0,684],9316:[676,14,684,0,684],9317:[676,14,684,0,684],9318:[676,14,684,0,684],9319:[676,14,684,0,684],9320:[676,14,684,0,684],9398:[676,14,684,0,684],9399:[676,14,684,0,684],9400:[676,14,684,0,684],9401:[676,14,684,0,684],9402:[676,14,684,0,684],9403:[676,14,684,0,684],9404:[676,14,684,0,684],9405:[676,14,684,0,684],9406:[676,14,684,0,684],9407:[676,14,684,0,684],9408:[676,14,684,0,684],9409:[676,14,684,0,684],9410:[676,14,684,0,684],9411:[676,14,684,0,684],9412:[676,14,684,0,684],9413:[676,14,684,0,684],9414:[676,14,684,0,684],9415:[676,14,684,0,684],9416:[676,14,684,0,684],9417:[676,14,684,0,684],9418:[676,14,684,0,684],9419:[676,14,684,0,684],9420:[676,14,684,0,684],9421:[676,14,684,0,684],9422:[676,14,684,0,684],9423:[676,14,684,0,684],9424:[676,14,684,0,684],9425:[676,14,684,0,684],9426:[676,14,684,0,684],9427:[676,14,684,0,684],9428:[676,14,684,0,684],9429:[676,14,684,0,684],9430:[676,14,684,0,684],9431:[676,14,684,0,684],9432:[676,14,684,0,684],9433:[676,14,684,0,684],9434:[676,14,684,0,684],9435:[676,14,684,0,684],9436:[676,14,684,0,684],9437:[676,14,684,0,684],9438:[676,14,684,0,684],9439:[676,14,684,0,684],9440:[676,14,684,0,684],9441:[676,14,684,0,684],9442:[676,14,684,0,684],9443:[676,14,684,0,684],9444:[676,14,684,0,684],9445:[676,14,684,0,684],9446:[676,14,684,0,684],9447:[676,14,684,0,684],9448:[676,14,684,0,684],9449:[676,14,684,0,684],9450:[676,14,684,0,684]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Regular/EnclosedAlphanum.js");

View File

@ -0,0 +1,19 @@
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Fraktur.js
*
* Copyright (c) 2009-2014 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXGeneral,{120068:[695,22,785,47,742],120069:[704,24,822,48,774],120071:[695,24,868,50,817],120072:[695,24,729,50,678],120073:[695,204,767,50,716],120074:[695,24,806,50,755],120077:[695,204,772,50,721],120078:[695,22,846,50,801],120079:[695,24,669,47,626],120080:[695,22,1083,50,1031],120081:[695,22,827,50,775],120082:[695,24,837,37,786],120083:[695,204,823,40,773],120084:[695,64,865,37,814],120086:[695,24,856,55,801],120087:[695,24,766,47,722],120088:[696,22,787,50,744],120089:[695,24,831,48,781],120090:[695,24,1075,48,1025],120091:[695,31,763,46,735],120092:[695,204,766,47,714],120094:[468,18,530,51,479],120095:[695,18,513,46,462],120096:[468,18,385,57,344],120097:[695,18,506,45,455],120098:[468,18,420,47,379],120099:[694,209,327,27,316],120100:[468,209,499,51,461],120101:[695,209,528,48,476],120102:[694,18,384,42,338],120103:[695,209,345,44,311],120104:[695,18,420,48,368],120105:[695,18,398,46,350],120106:[468,25,910,59,856],120107:[468,25,636,60,582],120108:[468,18,503,50,452],120109:[586,209,555,38,504],120110:[468,209,507,51,459],120111:[468,18,463,38,426],120112:[623,24,518,49,469],120113:[656,18,374,38,337],120114:[478,18,647,60,593],120115:[586,18,515,47,464],120116:[586,25,759,41,708],120117:[468,189,456,45,406],120118:[586,209,516,48,464],120119:[468,209,457,43,407]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Regular/Fraktur.js");

Some files were not shown because too many files have changed in this diff Show More