Merge branch 'cxt_course' into develop
Conflicts: db/schema.rb
This commit is contained in:
commit
bdaa9983e3
|
@ -715,6 +715,7 @@ class CoursesController < ApplicationController
|
|||
@trackers = Tracker.sorted.all
|
||||
@course = Course.new
|
||||
@course.safe_attributes = params[:course]
|
||||
@syllabus = Syllabus.where("id = #{params[:syllabus_id].to_i}").first if params[:syllabus_id]
|
||||
# month = Time.now.month
|
||||
render :layout => 'new_base'
|
||||
else
|
||||
|
|
|
@ -131,6 +131,8 @@ class PraiseTreadController < ApplicationController
|
|||
@obj = Bid.find_by_id(id)
|
||||
when 'Contest'
|
||||
@obj = Contest.find_by_id(id)
|
||||
when 'Syllabus'
|
||||
@obj = Syllabus.find_by_id(id)
|
||||
else
|
||||
@obj = nil
|
||||
end
|
||||
|
|
|
@ -1,15 +1,147 @@
|
|||
# encoding: utf-8
|
||||
class SyllabusesController < ApplicationController
|
||||
include ApplicationHelper
|
||||
helper :attachments
|
||||
include AttachmentsHelper
|
||||
include CoursesHelper
|
||||
|
||||
before_filter :is_logged, :only => [:index, :show]
|
||||
before_filter :find_syllabus, :only => [:show]
|
||||
before_filter :is_logged, :only => [:index, :show, :edit, :new, :update, :destroy]
|
||||
before_filter :find_syllabus, :only => [:show, :edit, :update, :destroy, :syllabus_courselist, :edit_syllabus_eng_name, :update_base_info]
|
||||
def index
|
||||
user = User.current
|
||||
@syllabuses = user.syllabuses
|
||||
end
|
||||
|
||||
def show
|
||||
@courses = @syllabus.courses
|
||||
#@courses = @syllabus.courses
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html{render :layout => 'base_syllabus'}
|
||||
format.api
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
@syllabus = Syllabus.new
|
||||
render :layout => 'new_base'
|
||||
end
|
||||
|
||||
def create
|
||||
if User.current.user_extensions.identity
|
||||
@syllabus = Syllabus.new
|
||||
@syllabus.title = params[:title]
|
||||
@syllabus.eng_name = params[:eng_name]
|
||||
@syllabus.user_id = User.current.id
|
||||
@syllabus.description = Message.where("id = 17848").first.nil? ? '' : Message.where("id = 17848").first.content
|
||||
if @syllabus && @syllabus.save
|
||||
respond_to do |format|
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
format.html {redirect_to syllabus_path(@syllabus)}
|
||||
format.api { render :action => 'show', :status => :created, :location => url_for(:controller => 'syllabuses', :action => 'show', :id => @syllabus.id) }
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
flash[:notice] = l(:notice_create_failed)
|
||||
format.html { redirect_to new_syllabus_path } #Added by young
|
||||
format.api { render_validation_errors(@syllabus) }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
respond_to do |format|
|
||||
format.html{render :layout => 'base_syllabus'}
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@syllabus.description = params[:syllabus][:description]
|
||||
@syllabus.des_status = 1
|
||||
@syllabus.save_attachments(params[:attachments])
|
||||
if @syllabus.save
|
||||
if params[:asset_id]
|
||||
ids = params[:asset_id].split(',')
|
||||
update_kindeditor_assets_owner ids,@syllabus.id,OwnerTypeHelper::SYLLABUS
|
||||
end
|
||||
redirect_to syllabus_path(@syllabus)
|
||||
else
|
||||
redirect_to syllabus_path(@syllabus)
|
||||
end
|
||||
end
|
||||
|
||||
#删除课程大纲的描述
|
||||
def destroy
|
||||
if @syllabus && @syllabus.courses.empty?
|
||||
@syllabus.destroy
|
||||
redirect_to user_path(User.current.id)
|
||||
end
|
||||
end
|
||||
|
||||
#班级列表
|
||||
def syllabus_courselist
|
||||
@order, @c_sort,@type = params[:order] || 1, params[:sort] || 1, params[:type] || 1
|
||||
|
||||
#确定 sort_type
|
||||
if @order.to_i == @type.to_i
|
||||
@c_sort = @c_sort.to_i == 1 ? 2 : 1 #1升序 2降序
|
||||
else
|
||||
@c_sort = 2
|
||||
end
|
||||
|
||||
sort_name = "updated_on"
|
||||
sort_type = @c_sort == 1 ? "asc" : "desc"
|
||||
|
||||
@courses = User.current.courses.visible.where("is_delete =? and syllabus_id =?", 0, @syllabus.id).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS #{sort_name}").order("#{sort_name} #{sort_type}")
|
||||
|
||||
#根据 作业+资源数排序
|
||||
if @order.to_i == 2
|
||||
@type = 2
|
||||
@courses.each do |course|
|
||||
course[:infocount] = (User.current.admin? || User.current.allowed_to?(:as_teacher,course)) ? (course.homework_commons.count + visable_attachemnts_incourse(course).count) : (course.homework_commons.where("publish_time <= '#{Date.today}'").count + visable_attachemnts_incourse(course).count)
|
||||
if course[:infocount] < 0
|
||||
course[:infocount] = 0
|
||||
end
|
||||
end
|
||||
@c_sort == 1 ? (@courses = @courses.sort{|x,y| x[:infocount] <=> y[:infocount] }) : (@courses = @courses.sort{|x,y| y[:infocount] <=> x[:infocount]})
|
||||
@courses = sortby_time_countcommon_nosticky @courses,sort_name
|
||||
else
|
||||
@type = 1
|
||||
end
|
||||
|
||||
#分页
|
||||
@limit = 10
|
||||
@is_remote = true
|
||||
@atta_count = @courses.count
|
||||
@atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
|
||||
@offset ||= @atta_pages.offset
|
||||
@courses = paginateHelper @courses,@limit
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html{render :layout => 'base_syllabus'}
|
||||
end
|
||||
end
|
||||
|
||||
#修改英文名称
|
||||
def edit_syllabus_eng_name
|
||||
if @syllabus
|
||||
@syllabus.update_column("eng_name",params[:eng_name])
|
||||
end
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
#编辑属性
|
||||
def update_base_info
|
||||
if @syllabus
|
||||
@syllabus.update_attributes(:credit => params[:credit], :hours => params[:hours], :theory_hours => params[:theory_hours], :practice_hours => params[:practice_hours], :applicable_major => params[:applicable_major], :pre_course => params[:pre_course])
|
||||
@syllabus.update_attributes(:syllabus_type => params[:syllabus_type])
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -13,6 +13,7 @@ class TagsController < ApplicationController
|
|||
include ForumsHelper
|
||||
include AttachmentsHelper
|
||||
include ContestsHelper
|
||||
include SyllabusesHelper
|
||||
include ActsAsTaggableOn::TagsHelper
|
||||
include TagsHelper
|
||||
include FilesHelper
|
||||
|
@ -529,6 +530,8 @@ class TagsController < ApplicationController
|
|||
@obj = Course.find_by_id(@obj_id)
|
||||
when '10'
|
||||
@obj = Attachment.find_by_id(@obj_id)
|
||||
when '11'
|
||||
@obj = Syllabus.find_by_id(@obj_id)
|
||||
else
|
||||
@obj = nil
|
||||
end
|
||||
|
@ -619,6 +622,9 @@ class TagsController < ApplicationController
|
|||
when '9' then
|
||||
@obj = Course.find_by_id(obj_id)
|
||||
@obj_pages, @courses_results, @results_count = for_pagination(get_courses_by_tag(selected_tags))
|
||||
when '11' then
|
||||
@obj = Syllabus.find_by_id(obj_id)
|
||||
@obj_pages, @syllabuses_results, @results_count = for_pagination(get_syllabuses_by_tag(selected_tags))
|
||||
else
|
||||
@obj = nil
|
||||
end
|
||||
|
@ -684,6 +690,8 @@ class TagsController < ApplicationController
|
|||
return 'Course'
|
||||
when '10'
|
||||
return 'Attachment'
|
||||
when '11'
|
||||
return 'Syllabus'
|
||||
else
|
||||
render_error :message => e.message
|
||||
return
|
||||
|
|
|
@ -1367,7 +1367,15 @@ class UsersController < ApplicationController
|
|||
#显示更多用户课程
|
||||
def user_courses4show
|
||||
@page = params[:page].to_i + 1
|
||||
@courses = @user.courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(5).offset(@page * 5)
|
||||
@type = params[:type]
|
||||
if @type == 'User'
|
||||
@courses = @user.courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(5).offset(@page * 5)
|
||||
@all_count = @user.courses.visible.where("is_delete =?", 0).count
|
||||
elsif @type == 'Syllabus'
|
||||
@syllabus = Syllabus.where("id = #{params[:syllabus]}").first
|
||||
@courses = User.current.courses.visible.where("is_delete =? and syllabus_id =?", 0, @syllabus.id).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(5).offset(@page * 5)
|
||||
@all_count = User.current.courses.visible.where("is_delete =? and syllabus_id =?", 0, @syllabus.id).count
|
||||
end
|
||||
end
|
||||
|
||||
#显示更多用户项目
|
||||
|
@ -3176,23 +3184,35 @@ class UsersController < ApplicationController
|
|||
@c_sort = 2
|
||||
end
|
||||
|
||||
sort_name = "updated_on"
|
||||
sort_name = "updated_at"
|
||||
sort_type = @c_sort == 1 ? "asc" : "desc"
|
||||
|
||||
# @courses = @user.courses.visible.where("is_delete =?", 0).order("#{sort_name} #{sort_type}")
|
||||
@courses = @user.courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS #{sort_name}").order("#{sort_name} #{sort_type}")
|
||||
#@courses = @user.courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS #{sort_name}").order("#{sort_name} #{sort_type}")
|
||||
|
||||
@courses = @user.courses.visible.where("is_delete =?", 0)
|
||||
syllabus_ids = @courses.empty? ? '(-1)' : "(" + @courses.map{|course| !course.syllabus_id.nil? && course.syllabus_id}.join(",") + ")"
|
||||
@syllabus = Syllabus.where("id in #{syllabus_ids} or user_id = #{User.current.id}").order("#{sort_name} #{sort_type}")
|
||||
|
||||
#根据 作业+资源数排序
|
||||
if @order.to_i == 2
|
||||
@type = 2
|
||||
@courses.each do |course|
|
||||
course[:infocount] = (User.current.admin? || User.current.allowed_to?(:as_teacher,course)) ? (course.homework_commons.count + visable_attachemnts_incourse(course).count) : (course.homework_commons.where("publish_time <= '#{Date.today}'").count + visable_attachemnts_incourse(course).count)
|
||||
if course[:infocount] < 0
|
||||
course[:infocount] = 0
|
||||
# @courses.each do |course|
|
||||
# course[:infocount] = (User.current.admin? || User.current.allowed_to?(:as_teacher,course)) ? (course.homework_commons.count + visable_attachemnts_incourse(course).count) : (course.homework_commons.where("publish_time <= '#{Date.today}'").count + visable_attachemnts_incourse(course).count)
|
||||
# if course[:infocount] < 0
|
||||
# course[:infocount] = 0
|
||||
# end
|
||||
# end
|
||||
@syllabus.each do |syllabus|
|
||||
count = 0
|
||||
courses = @courses.where("syllabus_id = #{syllabus.id}")
|
||||
courses.each do |c|
|
||||
count += (User.current.admin? || User.current.allowed_to?(:as_teacher,c)) ? (c.homework_commons.count + visable_attachemnts_incourse(c).count) : (c.homework_commons.where("publish_time <= '#{Date.today}'").count + visable_attachemnts_incourse(c).count)
|
||||
end
|
||||
syllabus[:infocount] = count
|
||||
end
|
||||
@c_sort == 1 ? (@courses = @courses.sort{|x,y| x[:infocount] <=> y[:infocount] }) : (@courses = @courses.sort{|x,y| y[:infocount] <=> x[:infocount]})
|
||||
@courses = sortby_time_countcommon_nosticky @courses,sort_name
|
||||
@c_sort == 1 ? (@syllabus = @syllabus.sort{|x,y| x[:infocount] <=> y[:infocount] }) : (@syllabus = @syllabus.sort{|x,y| y[:infocount] <=> x[:infocount]})
|
||||
@syllabus = sortby_time_countcommon_nosticky @syllabus,sort_name
|
||||
else
|
||||
@type = 1
|
||||
end
|
||||
|
@ -3200,10 +3220,10 @@ class UsersController < ApplicationController
|
|||
#分页
|
||||
@limit = 10
|
||||
@is_remote = true
|
||||
@atta_count = @courses.count
|
||||
@atta_count = @syllabus.count
|
||||
@atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
|
||||
@offset ||= @atta_pages.offset
|
||||
@courses = paginateHelper @courses,@limit
|
||||
@syllabus = paginateHelper @syllabus,@limit
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
|
@ -3268,6 +3288,9 @@ class UsersController < ApplicationController
|
|||
when 'News'
|
||||
obj = News.where('id = ?', params[:id].to_i).first
|
||||
@journals = obj.comments.reorder("created_on desc")
|
||||
when 'Syllabus'
|
||||
obj = Syllabus.where('id = ?', params[:id].to_i).first
|
||||
@journals = obj.comments.reorder("created_on desc")
|
||||
when 'JournalsForMessage'
|
||||
obj = JournalsForMessage.where('id = ?', params[:id].to_i).first
|
||||
journals = []
|
||||
|
|
|
@ -264,6 +264,28 @@ class WordsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
#课程大纲的回复
|
||||
def leave_syllabus_message
|
||||
if User.current.logged?
|
||||
@user = User.current
|
||||
@syllabus = Syllabus.find(params[:id]);
|
||||
if params[:comment].size>0 && User.current.logged? && @user
|
||||
feedback = Syllabus.add_syllabus_jour(@user, params[:comment], params[:id])
|
||||
if (feedback.errors.empty?)
|
||||
if params[:asset_id]
|
||||
ids = params[:asset_id].split(',')
|
||||
update_kindeditor_assets_owner ids,feedback[:id],OwnerTypeHelper::JOURNALSFORMESSAGE
|
||||
end
|
||||
redirect_to syllabus_path(@syllabus)
|
||||
else
|
||||
flash[:error] = feedback.errors.full_messages[0]
|
||||
end
|
||||
end
|
||||
else
|
||||
render_403
|
||||
end
|
||||
end
|
||||
|
||||
#作业的回复
|
||||
def leave_homework_message
|
||||
if User.current.logged?
|
||||
|
|
|
@ -671,6 +671,22 @@ module CoursesHelper
|
|||
is_current_term || is_next_term
|
||||
end
|
||||
|
||||
#课程大纲下拉框
|
||||
def syllabus_option
|
||||
type = []
|
||||
option1 = []
|
||||
option1 << "请选择课程"
|
||||
option1 << 0
|
||||
type << option1
|
||||
Syllabus.all.each do |syllabus|
|
||||
option = []
|
||||
option << syllabus.title
|
||||
option << syllabus.id
|
||||
type << option
|
||||
end
|
||||
type
|
||||
end
|
||||
|
||||
#获取课程动态
|
||||
def get_course_activity courses, activities
|
||||
@course_ids=activities.keys()
|
||||
|
@ -777,6 +793,15 @@ module CoursesHelper
|
|||
result
|
||||
end
|
||||
|
||||
def visable_course_homework course
|
||||
if User.current.admin? || User.current.allowed_to?(:as_teacher,course)
|
||||
homework_num = course.homework_commons.count
|
||||
else
|
||||
homework_num = course.homework_commons.where("publish_time <= '#{Date.today}'").count
|
||||
end
|
||||
homework_num
|
||||
end
|
||||
|
||||
def zh_course_role role
|
||||
if role == "TeachingAsistant"
|
||||
result = l(:label_TA)
|
||||
|
|
|
@ -7,5 +7,6 @@ module OwnerTypeHelper
|
|||
BID = 6
|
||||
JOURNALSFORMESSAGE = 7
|
||||
HOMEWORKCOMMON = 8
|
||||
BLOGCOMMENT=9
|
||||
BLOGCOMMENT = 9
|
||||
SYLLABUS = 10
|
||||
end
|
|
@ -1,2 +1,72 @@
|
|||
# encoding: utf-8
|
||||
module SyllabusesHelper
|
||||
def get_syllabuses_by_tag(tag_name)
|
||||
Syllabus.tagged_with(tag_name).order('updated_at desc')
|
||||
end
|
||||
|
||||
def teacher_count syllabus
|
||||
count = 0
|
||||
courses = syllabus.courses
|
||||
unless courses.empty?
|
||||
courses.each do |c|
|
||||
count += TeacherAndAssistantCount c
|
||||
end
|
||||
end
|
||||
count
|
||||
end
|
||||
|
||||
def student_count syllabus
|
||||
count = 0
|
||||
courses = syllabus.courses
|
||||
unless courses.empty?
|
||||
courses.each do |c|
|
||||
count += studentCount c
|
||||
end
|
||||
end
|
||||
count
|
||||
end
|
||||
|
||||
def file_count syllabus
|
||||
count = 0
|
||||
courses = syllabus.courses
|
||||
unless courses.empty?
|
||||
courses.each do |c|
|
||||
count += visable_attachemnts_incourse(c).count
|
||||
end
|
||||
end
|
||||
count
|
||||
end
|
||||
|
||||
#课程性质下拉框
|
||||
def syllabus_type
|
||||
type = []
|
||||
option1 = []
|
||||
option2 = []
|
||||
option3 = []
|
||||
option4 = []
|
||||
option5 = []
|
||||
option6 = []
|
||||
|
||||
option1 << "请选择"
|
||||
option1 << 1
|
||||
option2 << "公共必修课"
|
||||
option2 << 2
|
||||
option3 << "学科必修课"
|
||||
option3 << 3
|
||||
option4 << "专业选修课"
|
||||
option4 << 4
|
||||
option5 << "实践必修课"
|
||||
option5 << 5
|
||||
option6 << "实践选修课"
|
||||
option6 << 6
|
||||
|
||||
type << option1
|
||||
type << option2
|
||||
type << option3
|
||||
type << option4
|
||||
type << option5
|
||||
type << option6
|
||||
|
||||
type
|
||||
end
|
||||
end
|
||||
|
|
|
@ -23,6 +23,8 @@ module TagsHelper
|
|||
@obj= Course.find_by_id(obj_id)
|
||||
when '10'
|
||||
@obj = Attachment.find_by_id(obj_id)
|
||||
when '11'
|
||||
@obj = Syllabus.find_by_id(obj_id)
|
||||
else
|
||||
raise Exception, '[TagsHelper] ===> tag type unknow.'
|
||||
end
|
||||
|
|
|
@ -32,7 +32,7 @@ module UsersHelper
|
|||
def get_resource_type type
|
||||
case type
|
||||
when 'Course'
|
||||
'课程资源'
|
||||
'班级资源'
|
||||
when 'Project'
|
||||
'项目资源'
|
||||
when 'Issue'
|
||||
|
@ -122,11 +122,11 @@ module UsersHelper
|
|||
when 'homework'
|
||||
'作业消息'
|
||||
when 'course_message'
|
||||
'课程讨论'
|
||||
'班级讨论'
|
||||
when 'course_news'
|
||||
'课程通知'
|
||||
'班级通知'
|
||||
when 'poll'
|
||||
'课程问卷'
|
||||
'班级问卷'
|
||||
when 'issue'
|
||||
'项目任务'
|
||||
when 'forge_message'
|
||||
|
|
|
@ -24,6 +24,7 @@ class Attachment < ActiveRecord::Base
|
|||
belongs_to :course, foreign_key: 'container_id', conditions: "attachments.container_type = 'Course'"
|
||||
belongs_to :org_subfield, foreign_key: 'container_id', conditions: "attachements.container_type = 'OrgSubfield'"
|
||||
belongs_to :organization, foreign_key: 'container_id', conditions: "attachements.container_type = 'Organization'"
|
||||
belongs_to :syllabus, foreign_key: 'container_id', conditions: "attachements.container_type = 'Syllabus'"
|
||||
belongs_to :softapplication, foreign_key: 'container_id', conditions: "attachments.container_type = 'Softapplication'"
|
||||
belongs_to :author, :class_name => "User", :foreign_key => "author_id"
|
||||
belongs_to :attachmentstype, :foreign_key => "attachtype",:primary_key => "id"
|
||||
|
|
|
@ -90,7 +90,8 @@ class Course < ActiveRecord::Base
|
|||
'description',
|
||||
'class_period',
|
||||
'open_student',
|
||||
'is_delete'
|
||||
'is_delete',
|
||||
'syllabus_id'
|
||||
|
||||
acts_as_customizable
|
||||
|
||||
|
|
|
@ -1,5 +1,46 @@
|
|||
# encoding: utf-8
|
||||
class Syllabus < ActiveRecord::Base
|
||||
include Redmine::SafeAttributes
|
||||
include ApplicationHelper
|
||||
acts_as_taggable
|
||||
acts_as_attachable
|
||||
has_many_kindeditor_assets :assets, :dependent => :destroy
|
||||
|
||||
belongs_to :user
|
||||
has_many :courses
|
||||
attr_accessible :description, :title
|
||||
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
|
||||
attr_accessible :description, :title, :eng_name, :syllabus_type, :credit, :hours, :theory_hours, :practice_hours, :applicable_major, :pre_course
|
||||
safe_attributes 'title', 'description', 'eng_name', 'syllabus_type', 'credit', 'hours', 'theory_hours', 'practice_hours', 'credit', 'applicable_major', 'pre_course'
|
||||
|
||||
def delete_kindeditor_assets
|
||||
delete_kindeditor_assets_from_disk self.id,OwnerTypeHelper::SYLLABUS
|
||||
end
|
||||
|
||||
def syllabus_type_str
|
||||
case self.syllabus_type
|
||||
when 1
|
||||
type = "公共必修课"
|
||||
when 2
|
||||
type = "学科必修课"
|
||||
when 3
|
||||
type = "专业选修课"
|
||||
when 4
|
||||
type = "实践必修课"
|
||||
when 5
|
||||
type = "实践选修课"
|
||||
end
|
||||
type
|
||||
end
|
||||
|
||||
###添加回复
|
||||
def self.add_syllabus_jour(user, notes, id , options = {})
|
||||
syllabus = Syllabus.find(id)
|
||||
if options.count == 0
|
||||
jfm = syllabus.journals_for_messages.build(:user_id => user.id, :notes => notes, :reply_id => 0)
|
||||
else
|
||||
jfm = syllabus.journals_for_messages.build(options)
|
||||
end
|
||||
jfm.save
|
||||
jfm
|
||||
end
|
||||
end
|
||||
|
|
|
@ -213,6 +213,7 @@ class CoursesService
|
|||
#@course.safe_attributes(current_user,params[:course])
|
||||
#@course.password = params[:course][:password]
|
||||
@course.tea_id = current_user.id
|
||||
@course.syllabus_id = params[:syllabus_id].to_i
|
||||
@course.term = params[:term]
|
||||
@course.time = params[:time]
|
||||
@course.end_term = params[:end_term]
|
||||
|
@ -271,6 +272,7 @@ class CoursesService
|
|||
course.send(:safe_attributes=, params[:course], current_user)
|
||||
#course.safe_attributes = params[:course]
|
||||
#course.password = params[:course][:password]
|
||||
course.syllabus_id = params[:syllabus_id].to_i
|
||||
course.time = params[:time]
|
||||
course.term = params[:term]
|
||||
course.end_time = params[:end_time]
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<%= number_to_human_size(resource.filesize)%>
|
||||
</td>
|
||||
<td style=" text-align: center;">
|
||||
课程资源
|
||||
班级资源
|
||||
</td>
|
||||
<td style=" text-align: center;">
|
||||
<%= format_date(resource.created_on)%>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<div class="homepageRight mt0 ml10">
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">
|
||||
课程问答区
|
||||
班级问答区
|
||||
</div>
|
||||
</div>
|
||||
<div nhname="topic_form">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script type="text/javascript">
|
||||
function submit_copy_course() {
|
||||
if(regex_course_name('new')&®ex_course_class_period('new')&®ex_time_term('new'))
|
||||
if(regex_syllabus_option('new')&®ex_course_name('new')&®ex_course_class_period('new')&®ex_time_term('new'))
|
||||
{
|
||||
$("#new_course").submit();
|
||||
document.getElementById("submit_copy_course").onclick = "";
|
||||
|
@ -51,13 +51,15 @@
|
|||
<!--</span>-->
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> <%= l(:label_tags_syllabus_name)%> :</label>
|
||||
<%= select_tag :syllabus_id,options_for_select(syllabus_option,@course.syllabus_id), {:id=>"new_syllabus_id", :class=>"syllabus_input"} %>
|
||||
<span class="c_red" id="new_syllabus_notice" style="display: none;">请选择课程大纲</span>
|
||||
</li>
|
||||
<li class="ml45">
|
||||
|
||||
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<label><span class="c_red">*</span> <%= l(:label_tags_course_name)%> :</label>
|
||||
<input type="text" name="course[name]" id="new_course_name" class="courses_input grey_border" maxlength="100" onkeyup="regex_course_name('new');" value="<%=@course.name %>">
|
||||
<span class="c_red" id="new_course_name_notice" style="display: none;">课程名称不能为空</span>
|
||||
<span class="c_red" id="new_course_name_notice" style="display: none;">班级名称不能为空</span>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45">
|
||||
<label><span class="c_red">*</span> <%= l(:label_class_period)%> :</label>
|
||||
|
@ -96,7 +98,7 @@
|
|||
<li class=" mb5 ml85">
|
||||
<label >公开 :</label>
|
||||
<input <%= @course.is_public == 1 ? 'checked' : ''%> id="course_is_public" name="course[is_public]" type="checkbox" value="<%=@course.is_public.to_i %>">
|
||||
<span class="c_grey">(选中后课外用户可见该课程,否则仅对课内成员可见)</span>
|
||||
<span class="c_grey">(选中后班级外用户可见该班级,否则仅对班级内成员可见)</span>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="ml85">
|
||||
|
@ -106,13 +108,13 @@
|
|||
<label class="fl">
|
||||
<input name="course_content_type[]" type="checkbox" value="0" class="resourceCopy"/>
|
||||
作业</label>
|
||||
<span class="c_red ml5 fl mb10 w490">复制到新课中的作业将在1个月后发布、2个月后提交截止,请您调整作业的发布时间、截止时间等时间节点。</span>
|
||||
<span class="c_red ml5 fl mb10 w490">复制到新班级中的作业将在1个月后发布、2个月后提交截止,请您调整作业的发布时间、截止时间等时间节点。</span>
|
||||
</li>
|
||||
<li class="sendCourseName fl ml5">
|
||||
<label class="fl">
|
||||
<input name="course_content_type[]" type="checkbox" value="1" class="resourceCopy"/>
|
||||
资源</label>
|
||||
<span class="c_red ml5 fl mb10">复制到新课的资源将在1个月后发布,请您调整资源的发布时间,否则学生可能看不到资源。</span>
|
||||
<span class="c_red ml5 fl mb10">复制到新班级的资源将在1个月后发布,请您调整资源的发布时间,否则学生可能看不到资源。</span>
|
||||
</li>
|
||||
</ul>
|
||||
<!--<ul class="fl" id="copyResource2">
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<ul class="rankList">
|
||||
<h4>
|
||||
<% if (User.current.logged? && course.open_student == 1) || (User.current.member_of_course?(course)) || User.current.admin? %>
|
||||
<%= link_to "课程活跃度", course_member_path(course, :role => 2, :sort_type => 'act_score'), :class => '' %>
|
||||
<%= link_to "班级活跃度", course_member_path(course, :role => 2, :sort_type => 'act_score'), :class => '' %>
|
||||
<% else %>
|
||||
课程活跃度
|
||||
班级活跃度
|
||||
<% end %>
|
||||
<a class="contributor_course" onmouseover ="message_titile_show2($(this),event)" onmouseout ="message_titile_hide2($(this))" style="cursor: pointer; position:relative;">积分规则</a>
|
||||
</h4>
|
||||
|
@ -17,7 +17,7 @@
|
|||
问答回复:回复数 x 1 <br/>
|
||||
作业留言:留言数 x 1 <br/>
|
||||
通知留言:留言数 x 1 <br/>
|
||||
课程留言:留言数 x 1 <br/>
|
||||
班级留言:留言数 x 1 <br/>
|
||||
总得分为以上得分之和</div>
|
||||
</div>
|
||||
<% contributor_course_scor(course.id).each do |contributor_score| %>
|
||||
|
@ -47,7 +47,7 @@
|
|||
通知留言数 x 1 = <%= contributor_score.news_reply_num.to_i %> x 1 = <%= contributor_score.news_reply_num.to_i %></br>
|
||||
<%# end %>
|
||||
<%# unless contributor_score.journal_num.to_i == 0 %>
|
||||
课程留言数 x 1 = <%= contributor_score.journal_num.to_i %> x 1 = <%= contributor_score.journal_num.to_i %></br>
|
||||
班级留言数 x 1 = <%= contributor_score.journal_num.to_i %> x 1 = <%= contributor_score.journal_num.to_i %></br>
|
||||
<%# end %>
|
||||
<%# unless contributor_score.homework_journal_num.to_i == 0 %>
|
||||
<%# end %>
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<ul class="rankList">
|
||||
<h4>
|
||||
<% if (User.current.logged? && course.open_student == 1) || (User.current.member_of_course?(course)) || User.current.admin? %>
|
||||
<%= link_to "课程英雄榜", course_member_path(course, :role => 2), :class => '' %>
|
||||
<%= link_to "班级英雄榜", course_member_path(course, :role => 2), :class => '' %>
|
||||
<% else %>
|
||||
<span>课程英雄榜</span>
|
||||
<span>班级英雄榜</span>
|
||||
<% end %>
|
||||
<a class="contributor_course" onmouseover ="message_titile_show2($(this),event)" onmouseout ="message_titile_hide2($(this))" style="cursor:pointer;">积分规则</a></h4>
|
||||
<div style="cursor:pointer;" class="numIntro undis">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>快速进入课程通道</title>
|
||||
<title>快速进入班级通道</title>
|
||||
<style>
|
||||
#popbox{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff; font-style:normal;}
|
||||
#popbox div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span{ margin:0; padding:0;}
|
||||
|
@ -49,8 +49,8 @@
|
|||
<div id="popbox">
|
||||
<div class="C" >
|
||||
<div class="C_top">
|
||||
<h2>快速加入课程通道</h2>
|
||||
<p>只要持有课程邀请码,就可以快速加入所在课程。课程页面搜索不到的私有课程只能从此通道进入哦!</p>
|
||||
<h2>快速加入班级通道</h2>
|
||||
<p>只要持有班级邀请码,就可以快速加入所在班级。班级页面搜索不到的私有班级只能从此通道进入哦!</p>
|
||||
</div>
|
||||
<div class="C_form">
|
||||
<%= form_tag({:controller => 'courses',
|
||||
|
@ -62,11 +62,11 @@
|
|||
<li>
|
||||
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<span class="tips" style="width: 90px; display: inline-block;">课程邀请码:</span>
|
||||
<span class="tips" style="width: 90px; display: inline-block;">班级邀请码:</span>
|
||||
<input class="width190" style="margin-left: 0px;" name="invite_code" id="object_id" type="text" value="" >
|
||||
<input type="text" style="display: none"/>
|
||||
</li>
|
||||
<li class="mB5">课程邀请码是所在课程页面中显示的邀请码</li>
|
||||
<li class="mB5">班级邀请码是所在班级页面中显示的邀请码</li>
|
||||
<li style="margin-top: 15px;">
|
||||
<span style="margin-right: 5px;"><span style="margin-right:43px;">身</span><span>份</span>:</span>
|
||||
<% if User.current.logged? && User.current.extensions && User.current.extensions.identity == 0%>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
问答回帖数 x 1 = 0 x 1 = 0</br>
|
||||
作业留言数 x 1 = 0 x 1 = 0</br>
|
||||
通知留言数 x 1 = 0 x 1 = 0</br>
|
||||
课程留言数 x 1 = 0 x 1 = 0</br>
|
||||
班级留言数 x 1 = 0 x 1 = 0</br>
|
||||
总得分:0
|
||||
</div>
|
||||
<% else %>
|
||||
|
@ -30,7 +30,7 @@
|
|||
问答回帖数 x 1 = <%= act_score.message_reply_num.to_i %> x 1 = <%= act_score.message_reply_num.to_i %></br>
|
||||
作业留言数 x 1 = <%= act_score.homework_journal_num.to_i %> x 1 = <%= act_score.homework_journal_num.to_i %></br>
|
||||
通知留言数 x 1 = <%= act_score.news_reply_num.to_i %> x 1 = <%= act_score.news_reply_num.to_i %></br>
|
||||
课程留言数 x 1 = <%= act_score.journal_num.to_i %> x 1 = <%= act_score.journal_num.to_i %></br>
|
||||
班级留言数 x 1 = <%= act_score.journal_num.to_i %> x 1 = <%= act_score.journal_num.to_i %></br>
|
||||
总得分:<%=total_score %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -4,12 +4,21 @@
|
|||
<div class="hwork_new">
|
||||
<ul>
|
||||
<%= labelled_form_for @course do |f| %>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> <%= l(:label_tags_syllabus_name)%> :</label>
|
||||
<% if @syllabus.nil? %>
|
||||
<%= select_tag :syllabus_id,options_for_select(syllabus_option,@course.syllabus_id), {:id=>"new_syllabus_id", :class=>"syllabus_input"} %>
|
||||
<% else %>
|
||||
<span><%=@syllabus.title %></span>
|
||||
<input style="display: none;" name="syllabus_id" value="<%=@syllabus.id %>" />
|
||||
<% end %>
|
||||
<span class="c_red" id="new_syllabus_notice" style="display: none;">请选择课程大纲</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45">
|
||||
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<label><span class="c_red">*</span> <%= l(:label_tags_course_name)%> :</label>
|
||||
<input type="text" name="course[name]" id="new_course_name" class="courses_input" maxlength="100" onkeyup="regex_course_name('new');">
|
||||
<span class="c_red" id="new_course_name_notice" style="display: none;">课程名称不能为空且至少有两个字符</span>
|
||||
<span class="c_red" id="new_course_name_notice" style="display: none;">班级名称不能为空且至少有两个字符</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45">
|
||||
|
@ -49,19 +58,19 @@
|
|||
<li class=" mb5 ml80">
|
||||
<label >公开 :</label>
|
||||
<input id="course_is_public" name="course[is_public]" type="checkbox" value="1">
|
||||
<span class="c_grey">(选中后课外用户可见该课程,否则仅对课内成员可见)</span>
|
||||
<span class="c_grey">(选中后班级外用户可见该班级,否则仅对班级内成员可见)</span>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class=" mb5 ml30">
|
||||
<label >学生列表公开 :</label>
|
||||
<input id="course_open_student" name="course[open_student]" type="checkbox" value="1">
|
||||
<span class="c_grey">(选中后课外用户可见学生列表,否则仅对课内成员可见)</span>
|
||||
<span class="c_grey">(选中后班级外用户可见学生列表,否则仅对班级内成员可见)</span>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class=" mb5 ml30">
|
||||
<label >学生上传资源 :</label>
|
||||
<input <%= @course.publish_resource == 1 ? 'checked' : ''%> id="course_publish_resource" name="course[publish_resource]" type="checkbox" />
|
||||
<span class="c_grey">(选中后允许学生上传课程资源,否则不允许)</span>
|
||||
<span class="c_grey">(选中后允许学生上传班级资源,否则不允许)</span>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class=" ml90" >
|
||||
|
|
|
@ -25,16 +25,19 @@
|
|||
<div class="hwork_dis" id="tbc_01" style="padding-top: 10px;">
|
||||
<ul>
|
||||
<%= labelled_form_for @course do |f| %>
|
||||
<li class="ml45 mb10">
|
||||
<li class="ml45 mb10">
|
||||
<%= render :partial => "avatar/new_avatar_form", :locals => {source: @course} %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="ml45">
|
||||
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> <%= l(:label_tags_syllabus_name)%> :</label>
|
||||
<%= select_tag :syllabus_id,options_for_select(syllabus_option,@course.syllabus_id), {:id=>"edit_syllabus_id", :class=>"syllabus_input"} %>
|
||||
<span class="c_red" id="edit_syllabus_notice" style="display: none;">请选择课程大纲</span>
|
||||
</li>
|
||||
<li class="ml45">
|
||||
<label><span class="c_red">*</span> <%= l(:label_tags_course_name)%> :</label>
|
||||
<input type="text" name="course[name]" id="edit_course_name" class="courses_input" maxlength="100" onkeyup="regex_course_name('edit');" value="<%= @course.name%>">
|
||||
<span class="c_red" id="edit_course_name_notice" style="display: none;">课程名称不能为空</span>
|
||||
<span class="c_red" id="edit_course_name_notice" style="display: none;">班级名称不能为空</span>
|
||||
<input type="password" style="top: -100000px;position: fixed;">
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
@ -73,19 +76,19 @@
|
|||
<li class=" mb5 ml80">
|
||||
<label >公开 :</label>
|
||||
<input <%= @course.is_public == 1 ? 'checked' : ''%> id="course_is_public" name="course[is_public]" type="checkbox">
|
||||
<span class="c_grey">(选中后课外用户可见该课程,否则仅对课内成员可见)</span>
|
||||
<span class="c_grey">(选中后班级外用户可见该班级,否则仅对班级内成员可见)</span>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class=" mb5 ml30">
|
||||
<label >学生列表公开 :</label>
|
||||
<input <%= @course.open_student == 1 ? 'checked' : ''%> id="course_open_student" name="course[open_student]" type="checkbox" style="margin-left: 1px;"/>
|
||||
<span class="c_grey">(选中后课外用户可见学生列表,否则仅对课内成员可见)</span>
|
||||
<span class="c_grey">(选中后班级外用户可见学生列表,否则仅对班级内成员可见)</span>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class=" mb5 ml30">
|
||||
<label >学生上传资源 :</label>
|
||||
<input <%= @course.publish_resource == 1 ? 'checked' : ''%> id="course_publish_resource" name="course[publish_resource]" type="checkbox" style="margin-left: 1px;"/>
|
||||
<span class="c_grey">(选中后允许学生上传课程资源,否则不允许)</span>
|
||||
<span class="c_grey">(选中后允许学生上传班级资源,否则不允许)</span>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class=" ml90" >
|
||||
|
@ -96,11 +99,11 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<% if @course.is_delete == 1 %>
|
||||
<div class="mt30"><%=link_to "恢复该课程", renew_course_path(@course) %></div>
|
||||
<div class="mt30"><%=link_to "恢复该班级", renew_course_path(@course) %></div>
|
||||
<% else %>
|
||||
<div class="mt30">
|
||||
<img src="/images/pic_del.gif" class="mr5"><%=link_to "删除该课程", course_path(@course), :method => :delete, :confirm=>"确认要删除该课程吗?" %>
|
||||
<span>(友情提示:删除该课程后如果您想恢复该课程,请联系系统管理员!)</span>
|
||||
<img src="/images/pic_del.gif" class="mr5"><%=link_to "删除该班级", course_path(@course), :method => :delete, :confirm=>"确认要删除该班级吗?" %>
|
||||
<span>(友情提示:删除该班级后如果您想恢复该班级,请联系系统管理员!)</span>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<input type="hidden" value="<%= @type%>" name="type" id="user_activities_type">
|
||||
<div class="homepageRight mt0 ml10">
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">课程动态</div>
|
||||
<div class="NewsBannerName">班级动态</div>
|
||||
<ul class="resourcesSelect">
|
||||
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||
<ul class="homepagePostType">
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<input type="checkbox" name="subjectName" class="mr5" style="vertical-align:middle;" />
|
||||
<span>123456.jpg</span></label>
|
||||
</li>
|
||||
<li class="subjectType fl">课程资源</li>
|
||||
<li class="subjectType fl">班级资源</li>
|
||||
<li class="subjectCount fl">123.0KB</li>
|
||||
<li class="subjectPublisher fl">尹刚</li>
|
||||
<li class="fl subjectDate">2016-01-21</li>
|
||||
|
@ -50,7 +50,7 @@
|
|||
<input type="checkbox" name="subjectName" class="mr5" style="vertical-align:middle;" />
|
||||
<span>123456.jpg</span></label>
|
||||
</li>
|
||||
<li class="subjectType fl">课程资源</li>
|
||||
<li class="subjectType fl">班级资源</li>
|
||||
<li class="subjectCount fl">123.0KB</li>
|
||||
<li class="subjectPublisher fl">尹刚</li>
|
||||
<li class="fl subjectDate">2016-01-21</li>
|
||||
|
@ -61,7 +61,7 @@
|
|||
<input type="checkbox" name="subjectName" class="mr5" style="vertical-align:middle;" />
|
||||
<span>123456.jpg</span></label>
|
||||
</li>
|
||||
<li class="subjectType fl">课程资源</li>
|
||||
<li class="subjectType fl">班级资源</li>
|
||||
<li class="subjectCount fl">123.0KB</li>
|
||||
<li class="subjectPublisher fl">尹刚</li>
|
||||
<li class="fl subjectDate">2016-01-21</li>
|
||||
|
@ -72,7 +72,7 @@
|
|||
<input type="checkbox" name="subjectName" class="mr5" style="vertical-align:middle;" />
|
||||
<span>123456.jpg</span></label>
|
||||
</li>
|
||||
<li class="subjectType fl">课程资源</li>
|
||||
<li class="subjectType fl">班级资源</li>
|
||||
<li class="subjectCount fl">123.0KB</li>
|
||||
<li class="subjectPublisher fl">尹刚</li>
|
||||
<li class="fl subjectDate">2016-01-21</li>
|
||||
|
@ -83,7 +83,7 @@
|
|||
<input type="checkbox" name="subjectName" class="mr5" style="vertical-align:middle;" />
|
||||
<span>123456.jpg</span></label>
|
||||
</li>
|
||||
<li class="subjectType fl">课程资源</li>
|
||||
<li class="subjectType fl">班级资源</li>
|
||||
<li class="subjectCount fl">123.0KB</li>
|
||||
<li class="subjectPublisher fl">尹刚</li>
|
||||
<li class="fl subjectDate">2016-01-21</li>
|
||||
|
@ -94,7 +94,7 @@
|
|||
<input type="checkbox" name="subjectName" class="mr5" style="vertical-align:middle;" />
|
||||
<span>123456.jpg</span></label>
|
||||
</li>
|
||||
<li class="subjectType fl">课程资源</li>
|
||||
<li class="subjectType fl">班级资源</li>
|
||||
<li class="subjectCount fl">123.0KB</li>
|
||||
<li class="subjectPublisher fl">尹刚</li>
|
||||
<li class="fl subjectDate">2016-01-21</li>
|
||||
|
@ -105,7 +105,7 @@
|
|||
<input type="checkbox" name="subjectName" class="mr5" style="vertical-align:middle;" />
|
||||
<span>123456.jpg</span></label>
|
||||
</li>
|
||||
<li class="subjectType fl">课程资源</li>
|
||||
<li class="subjectType fl">班级资源</li>
|
||||
<li class="subjectCount fl">123.0KB</li>
|
||||
<li class="subjectPublisher fl">尹刚</li>
|
||||
<li class="fl subjectDate">2016-01-21</li>
|
||||
|
@ -116,7 +116,7 @@
|
|||
<input type="checkbox" name="subjectName" class="mr5" style="vertical-align:middle;" />
|
||||
<span>123456.jpg</span></label>
|
||||
</li>
|
||||
<li class="subjectType fl">课程资源</li>
|
||||
<li class="subjectType fl">班级资源</li>
|
||||
<li class="subjectCount fl">123.0KB</li>
|
||||
<li class="subjectPublisher fl">尹刚</li>
|
||||
<li class="fl subjectDate">2016-01-21</li>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div id="popbox_upload" style="margin-top: -30px;margin-left: -20px;margin-right: -10px;">
|
||||
<div class="upload_con">
|
||||
<h2>将此课件引入我的课程资源库</h2>
|
||||
<h2>将此课件引入我的班级资源库</h2>
|
||||
<% if error == '403' %>
|
||||
<div class="upload_box">
|
||||
<div style="color: red;">您没有权限引用此资源</div>
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<% name = name%>
|
||||
|
||||
<%= form_tag({controller: :welcome, action: :search },:class=>'navHomepageSearchBox', method: :get) do %>
|
||||
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" id="navHomepageSearchInput" class="navHomepageSearchInput" placeholder="请输入关键词搜索公开的课程、项目、用户、资源以及帖子"/>
|
||||
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" id="navHomepageSearchInput" class="navHomepageSearchInput" placeholder="请输入关键词搜索公开的班级、项目、用户、资源以及帖子"/>
|
||||
<input type="hidden" name="search_type" id="type" value="all"/>
|
||||
<input type="text" style="display: none;"/>
|
||||
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="search_in_header($(this));"></a>
|
||||
|
|
|
@ -8,36 +8,28 @@
|
|||
<% end %>
|
||||
<%= image_tag(url_to_avatar(@course), :width => "60", :height => "60") %>
|
||||
</div>
|
||||
<div class="pr_info_id fl mb5 f14">ID:<%= @course.id %><%= @course.is_public == 0 ? "(私有)" : "(公开)" %>
|
||||
<div class="pr_info_id fl f14">
|
||||
<span class="hidden fl" style="max-width: 90px;" title="<%= @course.name %>"><%= @course.name %></span><span class="fl"><%=@course.is_public == 1 ? '(私有)' : '公开' %></span>
|
||||
</br>
|
||||
<div class="cl"></div>
|
||||
<% if @course.syllabus%>
|
||||
<a class="pr_info_name fb c_dark fl hidden" style="max-width: 120px;" href="<%= Setting.protocol%>://<%= Setting.host_name%>/syllabuses/<%= @course.syllabus_id%>" target="_blank">
|
||||
<%=@course.syllabus.title %>
|
||||
</a>
|
||||
<% end %>
|
||||
<% if is_excellent_course(@course) %>
|
||||
<img src="/images/course/medal.png" alt="精品课程" style="vertical-align:bottom;" class="ml5" />
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="pr_info_id fl f14">
|
||||
<div class="pr_info_id fl f14" style="margin-top: 0px;">
|
||||
<% unless is_teacher %>
|
||||
<div id="join_in_course_header"><%= join_in_course_header(@course, User.current) %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div >
|
||||
<a class="pr_info_name fl c_dark fb" href="http://<%= Setting.host_course%>/courses/<%= @course.id%>" target="_blank"></a>
|
||||
<div>
|
||||
<a class="pr_info_name c_dark fb fl" href="http://<%= Setting.host_course%>/courses/<%= @course.id%>" target="_blank">
|
||||
<%= @course.name %>
|
||||
</a>
|
||||
<span id="course_outline_bar">
|
||||
<% if User.current && @course.tea_id == User.current.id && (@course.outline == 0 || BlogComment.where(:id=>@course.outline).count == 0) %>
|
||||
<a href="javascript:void(0);" title="设置课程大纲" onclick="course_outline('<%= @course.id%>')" class="mr5 syllabusSetting fl"> </a>
|
||||
<% elsif User.current && @course.tea_id == User.current.id && @course.outline != 0 && BlogComment.where(:id=>@course.outline).count != 0 %>
|
||||
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||
<% elsif User.current && @course.tea_id != User.current.id && !@course.is_public? && User.current.member_of_course?(@course) && @course.outline != 0 %>
|
||||
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||
<% elsif User.current && @course.tea_id != User.current.id && @course.is_public? && @course.outline != 0 %>
|
||||
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||
<%else %>
|
||||
<%end %>
|
||||
</span>
|
||||
</div>
|
||||
<span class="f14">邀请码:</span>
|
||||
<span class="f14 fontBlue2"><%=@course.generate_invite_code %></span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="pr_info_foot ">
|
||||
|
@ -52,7 +44,7 @@
|
|||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText boxShadow">
|
||||
<li><%= link_to "课程配置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "postOptionLink" %></li>
|
||||
<li><%= link_to "班级配置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "postOptionLink" %></li>
|
||||
<li><%= link_to @course.is_public == 0 ? "设为公开" : "设为私有", {:controller => 'courses', :action => 'private_or_public', :id => @course},:remote=>true,:confirm=>"您确定要设置为"+(@course.is_public == 0 ? "公开" : "私有")+"吗", :class => "postOptionLink" %></li>
|
||||
<li><%= link_to "复制学期", copy_course_course_path(@course.id),:remote=>true, :class => "postOptionLink" %></li>
|
||||
</ul>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<% elsif ma.course_message_type == "Comment" %>
|
||||
<li><a href="<%=news_path(ma.course_message.commented.id) %>" target="_blank" title="<%=ma.course_message.author.show_name %> 评论了通知:<%=ma.course_message.commented.title%>"><span class="shadowbox_news_user"><%=ma.course_message.author.show_name %> </span>评论了通知:<%= ma.course_message.commented.title%></a></li>
|
||||
<% elsif ma.course_message_type == "HomeworkCommon" && ma.status.nil? %>
|
||||
<li><a href="<%= (!User.current.allowed_to?(:as_teacher, ma.course_message.course) && cur_user_works_for_homework(ma.course_message).nil?) ? new_student_work_path(:homework => ma.course_message.id) : student_work_index_path(:homework => ma.course_message.id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>老师 发布了课程作业:作业标题:<%= ma.course_message.name%>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>老师 </span>发布了课程作业:作业标题:<%= ma.course_message.name%></a></li>
|
||||
<li><a href="<%= (!User.current.allowed_to?(:as_teacher, ma.course_message.course) && cur_user_works_for_homework(ma.course_message).nil?) ? new_student_work_path(:homework => ma.course_message.id) : student_work_index_path(:homework => ma.course_message.id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>老师 发布了班级作业:作业标题:<%= ma.course_message.name%>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>老师 </span>发布了班级作业:作业标题:<%= ma.course_message.name%></a></li>
|
||||
<% elsif ma.course_message_type == "HomeworkCommon" && ma.status == 1 %>
|
||||
<li><a href="<%= student_work_index_path(:homework => ma.course_message.id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>老师 发布的作业:作业标题:<%= ma.course_message.name%>的截止日期快到了"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>老师 </span>发布的作业:作业标题:<%= ma.course_message.name%>的截止日期快到了</a></li>
|
||||
<% elsif ma.course_message_type == "HomeworkCommon" && ma.status == 2 %>
|
||||
|
@ -52,12 +52,12 @@
|
|||
<% elsif ma.course_message_type == "Message" %>
|
||||
<% content = ma.course_message.parent_id.nil? ? ma.course_message.subject : ma.course_message.content.html_safe %>
|
||||
<% href = course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id) %>
|
||||
<li><a href="<%= href %>" target="_blank" title="<%=ma.course_message.author.show_name %> <%= ma.course_message.parent_id.nil? ? "发布了课程帖子:" : "评论了课程帖子:" %><%= content%>"><span class="shadowbox_news_user"><%=ma.course_message.author.show_name %> </span><%= ma.course_message.parent_id.nil? ? "发布了课程帖子:" : "评论了课程帖子:" %><%= content%></a></li>
|
||||
<li><a href="<%= href %>" target="_blank" title="<%=ma.course_message.author.show_name %> <%= ma.course_message.parent_id.nil? ? "发布了班级帖子:" : "评论了班级帖子:" %><%= content%>"><span class="shadowbox_news_user"><%=ma.course_message.author.show_name %> </span><%= ma.course_message.parent_id.nil? ? "发布了班级帖子:" : "评论了班级帖子:" %><%= content%></a></li>
|
||||
<% elsif ma.course_message_type == "StudentWorksScore" %>
|
||||
<li><a href="<%= student_work_index_path(:homework => ma.course_message.student_work.homework_common_id) %>" target="_blank" title="<%=ma.course_message.reviewer_role == 3 ? '匿名用户' : ma.course_message.user.show_name+"老师" %> <%= ma.status == 0 ? "评阅了您的作品:" : "重新评阅了您的作品:" %><%= ma.content.html_safe if !ma.content.nil?%>"><span class="shadowbox_news_user"><%=ma.course_message.reviewer_role == 3 ? '匿名用户' : ma.course_message.user.show_name+"老师" %> </span><%= ma.status == 0 ? "评阅了您的作品:" : "重新评阅了您的作品:" %><%= ma.content.html_safe if !ma.content.nil?%></a></li>
|
||||
<% elsif ma.course_message_type == "JournalsForMessage" %>
|
||||
<% if ma.course_message.jour_type == 'Course' %>
|
||||
<li><a href="<%= course_feedback_path(ma.course_id) %>" target="_blank" title="<%=ma.course_message.user.show_name %> 在课程中留言了:<%= ma.course_message.notes.html_safe%>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %> </span>在课程中留言了:<%= ma.course_message.notes.html_safe%></a></li>
|
||||
<li><a href="<%= course_feedback_path(ma.course_id) %>" target="_blank" title="<%=ma.course_message.user.show_name %> 在班级中留言了:<%= ma.course_message.notes.html_safe%>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %> </span>在班级中留言了:<%= ma.course_message.notes.html_safe%></a></li>
|
||||
<% elsif ma.course_message.jour_type == 'HomeworkCommon' %>
|
||||
<li><a href="<%= homework_common_index_url_in_org(ma.course_id) %>" target="_blank" title="<%=ma.course_message.user.show_name %> <%=ma.course_message.m_parent_id.nil? ? '回复了您的作业:' : '在作业中回复了您:' %><%= ma.course_message.notes.html_safe%>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %> </span><%=ma.course_message.m_parent_id.nil? ? '回复了您的作业:' : '在作业中回复了您:' %><%= ma.course_message.notes.html_safe%></a></li>
|
||||
<% else %>
|
||||
|
@ -70,21 +70,21 @@
|
|||
<% elsif ma.course_message_type == "StudentWork" && ma.status == 2 %>
|
||||
<li><a href="<%=student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>同学 追加新附件了:作业标题:<%=ma.course_message.homework_common.name %>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>同学 </span>追加新附件了:作业标题:<%=ma.course_message.homework_common.name %></a></li>
|
||||
<% elsif ma.course_message_type == "Course" %>
|
||||
<li><a href="<%=course_path(ma.course_message) %>" target="_blank" title="系统提示 您成功创建了课程:课程名称:<%=ma.course_message.name %>"><span class="shadowbox_news_user">系统提示 </span>您成功创建了课程:课程名称:<%=ma.course_message.name %></a></li>
|
||||
<li><a href="<%=course_path(ma.course_message) %>" target="_blank" title="系统提示 您成功创建了班级:班级名称:<%=ma.course_message.name %>"><span class="shadowbox_news_user">系统提示 </span>您成功创建了班级:班级名称:<%=ma.course_message.name %></a></li>
|
||||
<% elsif ma.course_message_type == "JoinCourseRequest" %>
|
||||
<% content = User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content == '9' ? "教师" : "教辅"}" %>
|
||||
<li><a href="<%=user_path(User.find(ma.course_message_id), :course_id => ma.course_id) %>" target="_blank" title="系统提示 您有了新的课程成员申请:<%=content %>"><span class="shadowbox_news_user">系统提示 </span>您有了新的课程成员申请:<%=content %></a></li>
|
||||
<% content = User.find(ma.course_message_id).name+"申请成为班级\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content == '9' ? "教师" : "教辅"}" %>
|
||||
<li><a href="<%=user_path(User.find(ma.course_message_id), :course_id => ma.course_id) %>" target="_blank" title="系统提示 您有了新的班级成员申请:<%=content %>"><span class="shadowbox_news_user">系统提示 </span>您有了新的班级成员申请:<%=content %></a></li>
|
||||
<% elsif ma.course_message_type == "CourseRequestDealResult" %>
|
||||
<% content = ma.status == 1 ? '您申请成为课程"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'申请已通过' : '您申请成为课程"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'的申请被拒绝' %>
|
||||
<li><a href="<%=course_path(Course.find(ma.course_id)) %>" target="_blank" title="系统提示 课程申请进度反馈:<%=content %>"><span class="shadowbox_news_user">系统提示 </span>课程申请进度反馈:<%=content %></a></li>
|
||||
<% content = ma.status == 1 ? '您申请成为班级"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'申请已通过' : '您申请成为班级"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'的申请被拒绝' %>
|
||||
<li><a href="<%=course_path(Course.find(ma.course_id)) %>" target="_blank" title="系统提示 班级申请进度反馈:<%=content %>"><span class="shadowbox_news_user">系统提示 </span>班级申请进度反馈:<%=content %></a></li>
|
||||
<% elsif ma.course_message_type == "JoinCourse" and ma.status == 0 %>
|
||||
<li><a href="<%=course_member_path(ma.course) %>" target="_blank" title="<%=User.find(ma.course_message_id).show_name %> 将您加入了课程:<%=ma.course.name %>"><span class="shadowbox_news_user"><%=User.find(ma.course_message_id).show_name %> </span>将您加入了课程:<%=ma.course.name %></a></li>
|
||||
<li><a href="<%=course_member_path(ma.course) %>" target="_blank" title="<%=User.find(ma.course_message_id).show_name %> 将您加入了班级:<%=ma.course.name %>"><span class="shadowbox_news_user"><%=User.find(ma.course_message_id).show_name %> </span>将您加入了班级:<%=ma.course.name %></a></li>
|
||||
<% elsif ma.course_message_type == "JoinCourse" and ma.status == 1 %>
|
||||
<li><a href="<%=user_path(ma.course_message_id) %>" target="_blank" title="系统提示 您增加了新的课程成员:<%=User.find(ma.course_message_id).login+"("+User.find(ma.course_message_id).show_name+")" %>"><span class="shadowbox_news_user">系统提示 </span>您增加了新的课程成员:<%=User.find(ma.course_message_id).login+"("+User.find(ma.course_message_id).show_name+")" %></a></li>
|
||||
<li><a href="<%=user_path(ma.course_message_id) %>" target="_blank" title="系统提示 您增加了新的班级成员:<%=User.find(ma.course_message_id).login+"("+User.find(ma.course_message_id).show_name+")" %>"><span class="shadowbox_news_user">系统提示 </span>您增加了新的班级成员:<%=User.find(ma.course_message_id).login+"("+User.find(ma.course_message_id).show_name+")" %></a></li>
|
||||
<% elsif ma.course_message_type == "RemoveFromCourse" %>
|
||||
<li><a href="<%=member_course_path(ma.course) %>" target="_blank" title="<%=User.find(ma.course_message_id).show_name %> 将您移出了课程:<%=ma.course.name %>"><span class="shadowbox_news_user"><%=User.find(ma.course_message_id).show_name %> </span>将您移出了课程:<%=ma.course.name %></a></li>
|
||||
<li><a href="<%=member_course_path(ma.course) %>" target="_blank" title="<%=User.find(ma.course_message_id).show_name %> 将您移出了班级:<%=ma.course.name %>"><span class="shadowbox_news_user"><%=User.find(ma.course_message_id).show_name %> </span>将您移出了班级:<%=ma.course.name %></a></li>
|
||||
<% elsif ma.course_message_type == "Exercise" && ma.status == 2 %>
|
||||
<li><a href="<%=exercise_path(:id => ma.course_message.id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>老师 发布了课程测验:测验题目:<%=ma.course_message.exercise_name %>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>老师 </span>发布了课程测验:测验题目:<%=ma.course_message.exercise_name %></a></li>
|
||||
<li><a href="<%=exercise_path(:id => ma.course_message.id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>老师 发布了班级测验:测验题目:<%=ma.course_message.exercise_name %>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>老师 </span>发布了班级测验:测验题目:<%=ma.course_message.exercise_name %></a></li>
|
||||
<% elsif ma.course_message_type == "Exercise" && ma.status == 3 %>
|
||||
<li><a href="<%=exercise_path(:id => ma.course_message.id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>老师 发布的测验:<%=ma.course_message.exercise_name %> 截止时间快到了"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>老师 </span>发布的测验:<%=ma.course_message.exercise_name %> 截止时间快到了</a></li>
|
||||
<% end %>
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
<ul class="syllabus_leftinfo" id="all_syllabus_attr">
|
||||
<% if User.current.logged? && (User.current == syllabus.user || User.current.admin?) %>
|
||||
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);", :class => 'fr', :onclick => "show_edit_base_info();"%>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<li><label >创建教师:</label><span><%=syllabus.user.show_name %></span></li>
|
||||
<% unless syllabus.syllabus_type.nil? || syllabus.syllabus_type == 0 %>
|
||||
<li><label>课程性质:</label><%=syllabus.syllabus_type_str %></li>
|
||||
<% end %>
|
||||
<% unless syllabus.credit.nil? || syllabus.credit == '' %>
|
||||
<li><label>学分:</label><%=syllabus.credit %></li>
|
||||
<% end %>
|
||||
<% unless syllabus.hours.nil? || syllabus.hours == '' %>
|
||||
<li><label>总学时:</label><%=syllabus.hours %></li>
|
||||
<% end %>
|
||||
<% unless syllabus.theory_hours.nil? || syllabus.theory_hours == '' %>
|
||||
<li><label>理论学时:</label><%=syllabus.theory_hours %></li>
|
||||
<% end %>
|
||||
<% unless syllabus.practice_hours.nil? || syllabus.practice_hours == '' %>
|
||||
<li><label>实践学时:</label><%=syllabus.practice_hours %></li>
|
||||
<% end %>
|
||||
<% unless syllabus.applicable_major.nil? || syllabus.applicable_major == '' %>
|
||||
<li><label>适用专业:</label><%=syllabus.applicable_major %></li>
|
||||
<% end %>
|
||||
<% unless syllabus.pre_course.nil? || syllabus.pre_course == '' %>
|
||||
<li><label>先修课程:</label><%=syllabus.pre_course %></li>
|
||||
<% end %>
|
||||
|
||||
<% if syllabus.syllabus_type.nil? || syllabus.syllabus_type == '' %>
|
||||
<li class="none none_attr"><label>课程性质:</label><span class="fontGrey3">空</span></li>
|
||||
<% end %>
|
||||
<% if syllabus.credit.nil? || syllabus.credit == '' %>
|
||||
<li class="none none_attr"><label>学分:</label><span class="fontGrey3">空</span></li>
|
||||
<% end %>
|
||||
<% if syllabus.hours.nil? || syllabus.hours == '' %>
|
||||
<li class="none none_attr"><label>总学时:</label><span class="fontGrey3">空</span></li>
|
||||
<% end %>
|
||||
<% if syllabus.theory_hours.nil? || syllabus.theory_hours == '' %>
|
||||
<li class="none none_attr"><label>理论学时:</label><span class="fontGrey3">空</span></li>
|
||||
<% end %>
|
||||
<% if syllabus.practice_hours.nil? || syllabus.practice_hours == '' %>
|
||||
<li class="none none_attr"><label>实践学时:</label><span class="fontGrey3">空</span></li>
|
||||
<% end %>
|
||||
<% if syllabus.applicable_major.nil? || syllabus.applicable_major == '' %>
|
||||
<li class="none none_attr"><label>适用专业:</label><span class="fontGrey3">空</span></li>
|
||||
<% end %>
|
||||
<% if syllabus.pre_course.nil? || syllabus.pre_course == '' %>
|
||||
<li class="none none_attr"><label>先修课程:</label><span class="fontGrey3">空</span></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% if User.current.logged? && (User.current == syllabus.user || User.current.admin?) %>
|
||||
<span class="homepageLeftMenuMore"><a href="javascript:void(0);" data-init="0" onclick="toggle_all_syllabus_attr();" class="homepageLeftMenuMoreIcon" id="show_all_syllabus_attr"></a></span>
|
||||
<% end %>
|
||||
<script>
|
||||
function show_edit_base_info() {
|
||||
$("#syllabus_base_info").html("<%=escape_javascript(render :partial => 'layouts/syllabus_edit_info', :locals => {:syllabus => @syllabus}) %>");
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,27 @@
|
|||
<ul class="syllabus_leftinfo" id="all_syllabus_attr">
|
||||
<%= form_for('syllabus',:url => update_base_info_syllabus_path(syllabus.id),:remote => true) do |f|%>
|
||||
<a href="javascript:void(0);" onclick="update_syllabus_info();" id="submit_edit_info" class="fr">保存</a>
|
||||
<!--<a href="javascript:void(0);" onclick="reset_syllabus_info();" id="submit_reset_info" class="fr mr10">取消</a>-->
|
||||
<div class="cl"></div>
|
||||
<li><label >创建教师:</label><span><%=syllabus.user.show_name %></span></li>
|
||||
<li><label>课程性质:</label>
|
||||
<%= select_tag :syllabus_type,options_for_select(syllabus_type,syllabus.syllabus_type), {:id=>"syllabus_type_input", :class=>"syllabus_select"} %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li><label >学分:</label>
|
||||
<input id="syllabus_credit_input" class="syllabus_input_min fl" name="credit" placeholder="5" value="<%=syllabus.credit %>"> 学分
|
||||
<span class="none c_red ml5" id="syllabus_credit_notice">请输入正整数</span><div class="cl"></div>
|
||||
</li>
|
||||
<li><label>总学时:</label><input id="syllabus_hours_input" class="syllabus_input_min fl" name="hours" placeholder="50" value="<%=syllabus.hours %>"> 学时
|
||||
<span class="none c_red ml5" id="syllabus_hours_notice">请输入正整数</span><div class="cl"></div>
|
||||
</li>
|
||||
<li><label>理论学时:</label><input id="syllabus_theory_hours_input" class="syllabus_input_min fl" name="theory_hours" placeholder="10" value="<%=syllabus.theory_hours %>"> 学时
|
||||
<span class="none c_red ml5" id="syllabus_theory_hours_notice">请输入正整数</span><div class="cl"></div>
|
||||
</li>
|
||||
<li><label>实践学时:</label><input id="syllabus_practice_hours_input" class="syllabus_input_min fl" name="practice_hours" placeholder="5" value="<%=syllabus.practice_hours %>"> 学时
|
||||
<span class="none c_red ml5" id="syllabus_practice_hours_notice">请输入正整数</span><div class="cl"></div>
|
||||
</li>
|
||||
<li><label>适用专业:</label><input id="syllabus_applicable_major_input" class="syllabus_input fl" name="applicable_major" placeholder="UI设计" value="<%=syllabus.applicable_major %>"><div class="cl"></div></li>
|
||||
<li><label>选修课程:</label><input id="syllabus_pre_course_input" class="syllabus_input fl" name="pre_course" placeholder="工业设计史" value="<%=syllabus.pre_course %>"><div class="cl"></div></li>
|
||||
<% end %>
|
||||
</ul>
|
|
@ -0,0 +1,8 @@
|
|||
<% if syllabus.eng_name && !syllabus.eng_name.empty? %>
|
||||
<span><%= syllabus.eng_name %></span>
|
||||
<% else%>
|
||||
<span class="fontGrey">课程英文名称</span>
|
||||
<% end %>
|
||||
<% if User.current == syllabus.user %>
|
||||
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);", :onclick => "show_edit_eng_name();"%>
|
||||
<% end %>
|
|
@ -0,0 +1,22 @@
|
|||
<% teachers_num = teacher_count @syllabus%>
|
||||
<% students_num = student_count @syllabus%>
|
||||
<% files_num = file_count @syllabus%>
|
||||
<div class="pr_info_logo fl mb5">
|
||||
<%= image_tag("../images/syllabus.jpg",width:"60px", height: "60px") %>
|
||||
</div>
|
||||
<div class="fl ml15">
|
||||
<p class="homepageImageName mb5"><%=@syllabus.title %></p>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<div class="mb5" id="syllabus_eng_name_show">
|
||||
<%= render :partial => 'layouts/syllabus_eng_name', :locals => {:syllabus => @syllabus}%>
|
||||
</div>
|
||||
<textarea class="homepageSignatureTextarea none" placeholder="请编辑英文名称" id="syllabus_eng_name_edit" onblur="edit_syllabus_eng_name('<%= edit_syllabus_eng_name_syllabus_path(@syllabus.id)%>');"><%= @syllabus.eng_name %></textarea>
|
||||
</div>
|
||||
<div class="pr_info_foot ">
|
||||
教师(<a class="info_foot_num c_blue" href="javascript:void(0);" target="_blank" style="cursor: default" title="课程下全部班级的教师数"><%=teachers_num %></a>)<span>|</span>
|
||||
学生(<a class="info_foot_num c_blue" href="javascript:void(0);" target="_blank" style="cursor: default" title="课程下全部班级的学生数"><%=students_num %></a>)<span>|</span>
|
||||
资源(<a class="info_foot_num c_blue" href="javascript:void(0);" target="_blank" style="cursor: default" title="课程下全部班级的资源数"><%=files_num %></a>)</div>
|
||||
<div class="cl"></div>
|
|
@ -52,7 +52,7 @@
|
|||
<% name = name%>
|
||||
|
||||
<%= form_tag({controller: :welcome, action: :search },:class=>'navHomepageSearchBox', method: :get) do %>
|
||||
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" id="navHomepageSearchInput" class="navHomepageSearchInput" placeholder="请输入关键词搜索公开的课程、项目、用户、资源以及帖子" onkeypress="search_in_header_I(event,$(this));"/>
|
||||
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" id="navHomepageSearchInput" class="navHomepageSearchInput" placeholder="请输入关键词搜索公开的班级、项目、用户、资源以及帖子" onkeypress="search_in_header_I(event,$(this));"/>
|
||||
<input type="hidden" name="search_type" id="type" value="all"/>
|
||||
<input type="text" style="display: none;"/>
|
||||
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="search_in_header($(this));"></a>
|
||||
|
|
|
@ -47,7 +47,13 @@
|
|||
<%= link_to "+",course_boards_path(course, :flag => true, :is_new => 1), :class => 'fr fb', :title => '发布帖子',:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% if User.current == @user %>
|
||||
<% if type=='User' && !course.syllabus.nil? %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "所属课程",syllabus_path(course.syllabus_id), :class => 'fl w48',:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if User.current == user %>
|
||||
<li class="subNavRow">
|
||||
<% if count == 0 %>
|
||||
<%= link_to "屏蔽动态", shield_activities_path(:user_id => user.id, :course_id => course.id), :method => 'post',:remote => true %>
|
||||
|
@ -76,15 +82,15 @@
|
|||
</li>
|
||||
<% end %>
|
||||
|
||||
<% if courses.size == 5%>
|
||||
<% if all_count > (page.to_i+1) * 5%>
|
||||
<li class="homepageLeftMenuMore" id="user_show_more_course">
|
||||
<input type="hidden" value="<%= page%>" id="course_page_num">
|
||||
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_course('<%= user_courses4show_user_path(user.id)%>');"></a>
|
||||
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_course('<%= type=='User' ? user_courses4show_user_path(user.id,:type=>type) : user_courses4show_user_path(user.id,:type=>type,:syllabus=>@syllabus.id)%>');"></a>
|
||||
</li>
|
||||
<% end%>
|
||||
|
||||
<script type="text/javascript">
|
||||
var coursecount = <%= @user.courses.visible.where("is_delete =?", 0).count %>;
|
||||
var coursecount = <%= all_count %>;
|
||||
var courseshowcount = document.getElementsByClassName("coursesLineGrey").length;
|
||||
|
||||
if((coursecount <= courseshowcount)&&(coursecount > 5) ){
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
<%# course_model %>
|
||||
<% course_file_num = visable_attachemnts_incourse(@course).count%>
|
||||
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
|
||||
<% if User.current.admin? || User.current.allowed_to?(:as_teacher,@course) %>
|
||||
<% homework_num = @course.homework_commons.count %>
|
||||
<% else %>
|
||||
<% homework_num = @course.homework_commons.where("publish_time <= '#{Date.today}'").count %>
|
||||
<% end %>
|
||||
<% homework_num = visable_course_homework @course %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/html">
|
||||
<head>
|
||||
|
@ -57,12 +54,7 @@
|
|||
<div class="project_info" style="position: relative" id="project_info_<%=@course.id %>">
|
||||
<%=render :partial=>'layouts/project_info' %>
|
||||
</div><!--课程信息 end-->
|
||||
<% if (User.current.logged? && User.current.member_of_course?(@course)) || is_teacher %>
|
||||
<div class="info_box mb10">
|
||||
<p class="f14">邀请码</p>
|
||||
<p class="f14 fontBlue2"><%=@course.generate_invite_code %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="info_box">
|
||||
<ul>
|
||||
<li><%= l(:label_main_teacher)%> : <%= link_to(@course.teacher.lastname+@course.teacher.firstname, user_path(@course.teacher), :class => 'c_dblue') %></li>
|
||||
|
|
|
@ -0,0 +1,140 @@
|
|||
<!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">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title><%= h html_title %></title>
|
||||
<meta name="description" content="<%= Redmine::Info.app_name %>" />
|
||||
<meta name="keywords" content="issue,bug,tracker" />
|
||||
<%= csrf_meta_tag %>
|
||||
<%= favicon %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'syllabus','new_user','prettify','share',:media => 'all' %>
|
||||
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
||||
<%= javascript_heads %>
|
||||
<%= javascript_include_tag "bootstrap","avatars","course",'attachments','prettify','syllabus'%>
|
||||
<%= heads_for_theme %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<%= yield :header_tags -%>
|
||||
<!-- MathJax的配置 -->
|
||||
<script type="text/javascript"
|
||||
src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
|
||||
</script>
|
||||
<!-- 配置 : 在生成的公式图片上去掉Math定义的右键菜单,$$ $$ \( \) \[ \] 中的公式给予显示-->
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
|
||||
showMathMenu: false,
|
||||
showMathMenuMSIE: false,
|
||||
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint();">
|
||||
<% is_current_user = User.current.logged?%>
|
||||
<div class="navContainer">
|
||||
<% if User.current.logged? %>
|
||||
<%= render :partial => 'layouts/logined_header' %>
|
||||
<% else%>
|
||||
<%= render :partial => 'layouts/unlogin_header' %>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="homepageContentContainer">
|
||||
<div class="homepageContent">
|
||||
<div class="homepageLeft">
|
||||
<div class="homepagePortraitContainer mt15">
|
||||
<%=render :partial => 'layouts/syllabus_info' %>
|
||||
</div>
|
||||
<% update_visiti_count @syllabus %>
|
||||
|
||||
<div class="homepageLeftMenuContainer" id="syllabus_base_info">
|
||||
<%= render :partial => 'layouts/syllabus_base_info', :locals => {:syllabus => @syllabus} %>
|
||||
</div>
|
||||
|
||||
<div class="homepageLeftMenuContainer">
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<%=link_to '班级', {:controller => "syllabuses", :action => "syllabus_courselist", :id => @syllabus.id}, :class => 'homepageMenuText' %>
|
||||
<% if is_current_user%>
|
||||
<% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
|
||||
<div class="courseMenu" id="courseMenu">
|
||||
<ul>
|
||||
<li class="courseMenuIcon fr" style="margin-right:10px;" id="courseMenuIcon">
|
||||
<ul class="topnav_course_menu" id="topnav_course_menu">
|
||||
<li>
|
||||
<%= link_to "新建班级", new_course_path(:host=> Setting.host_course, :syllabus_id => @syllabus.id), :class => "menuGrey", :target => '_blank'%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "加入班级",join_private_courses_courses_path,:remote => true,:class => "menuGrey",:method => "post"%>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% else%>
|
||||
<%=link_to "", join_private_courses_courses_path, :class => "homepageMenuSetting fr",:style => "margin-right:10px;", :remote => true, :title => "加入班级"%>
|
||||
<% end%>
|
||||
<% end%>
|
||||
</div>
|
||||
<% courses = User.current.courses.visible.where("is_delete =? and syllabus_id =?", 0, @syllabus.id).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(5) %>
|
||||
<% all_count = User.current.courses.visible.where("is_delete =? and syllabus_id =?", 0, @syllabus.id).count%>
|
||||
<div class="homepageLeftMenuCourses <%= courses.empty? ? 'none' : ''%>">
|
||||
<div class = "leftCoursesList" id="homepageLeftMenuCourses">
|
||||
<ul>
|
||||
<%= render :partial => 'layouts/user_courses', :locals => {:courses => courses,:user => User.current,:all_count => all_count,:type =>'Syllabus',:page => 0} %>
|
||||
</ul>
|
||||
</div>
|
||||
<% if !courses.empty? %>
|
||||
<div class="homepageLeftMenuMore" id="user_hide_course">
|
||||
<a href="javascript:void(0);" class="homepageLeftMenuHideIcon" id="hide_show_courseicon" onclick="leftCourseslistChange();"></a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="project_Label">
|
||||
<h4 class="mb5" >标签:</h4>
|
||||
<div class="tag_h">
|
||||
<%= render :partial => 'tags/syllabus_tag', :locals => {:obj => @syllabus,:object_flag => "11"}%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="fontGrey2 mt10 ml20">访问计数 <%=@syllabus.visits %> (自2016年7月)</div>
|
||||
|
||||
</div><!--left end -->
|
||||
<div class="homepageRight">
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial => 'layouts/new_feedback' %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%= render :partial => 'layouts/footer' %>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div id="ajax-modal" style="display:none;"></div>
|
||||
<div id="ajax-indicator" style="display:none;">
|
||||
<span><%= l(:label_loading) %></span>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('#user_hide_course').hide();
|
||||
});
|
||||
|
||||
$("#courseMenu").mouseenter(function(){
|
||||
$("#topnav_course_menu").show();
|
||||
});
|
||||
$("#courseMenu").mouseleave(function(){
|
||||
$("#topnav_course_menu").hide();
|
||||
});
|
||||
function leftCourseslistChange(){
|
||||
$('#homepageLeftMenuCourses').slideToggle();
|
||||
$('#hide_show_courseicon').toggleClass("homepageLeftMenuHideIcon");
|
||||
$('#hide_show_courseicon').toggleClass("homepageLeftMenuMoreIcon");
|
||||
|
||||
}
|
||||
function show_edit_base_info() {
|
||||
$("#syllabus_base_info").html("<%=escape_javascript(render :partial => 'layouts/syllabus_edit_info', :locals => {:syllabus => @syllabus}) %>");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -203,7 +203,7 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
<% if (get_join_course_count(@user) != 0) %>
|
||||
<li>加入课程 :</li>
|
||||
<li>加入班级 :</li>
|
||||
<% end %>
|
||||
<% if @user.user_extensions.identity == 1 %>
|
||||
<li>参加匿评 :</li>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<%= javascript_heads %>
|
||||
<%= heads_for_theme %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<%= stylesheet_link_tag 'public', 'leftside', 'courses','header','prettify', 'org'%>
|
||||
<%= stylesheet_link_tag 'public', 'leftside', 'courses','header','prettify', 'org', 'syllabus'%>
|
||||
<%= javascript_include_tag "course","header",'prettify' %>
|
||||
<!-- page specific tags -->
|
||||
<%= yield :header_tags -%>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<meta name="keywords" content="issue,bug,tracker" />
|
||||
<%= csrf_meta_tag %>
|
||||
<%= favicon %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'share','new_user', 'user_leftside','prettify','users',:media => 'all' %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'share','new_user', 'user_leftside','prettify','users','syllabus',:media => 'all' %>
|
||||
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
||||
<%= javascript_heads %>
|
||||
<%= javascript_include_tag "bootstrap","avatars","new_user",'attachments','prettify'%>
|
||||
|
@ -198,18 +198,21 @@
|
|||
<li class="courseMenuIcon fr" style="margin-right:10px;" id="courseMenuIcon">
|
||||
<ul class="topnav_course_menu" id="topnav_course_menu">
|
||||
<li>
|
||||
<%= link_to "新建课程", new_course_path(:host=> Setting.host_course), :class => "menuGrey"%>
|
||||
<%= link_to "新建课程", new_syllabus_path(:host=> Setting.host_course), :class => "menuGrey"%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "新建班级", new_course_path(:host=> Setting.host_course), :class => "menuGrey"%>
|
||||
</li>
|
||||
<!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>-->
|
||||
<li>
|
||||
<%= link_to "加入课程",join_private_courses_courses_path,:remote => true,:class => "menuGrey",:method => "post"%>
|
||||
<%= link_to "加入班级",join_private_courses_courses_path,:remote => true,:class => "menuGrey",:method => "post"%>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% else%>
|
||||
<%=link_to "", join_private_courses_courses_path, :class => "homepageMenuSetting fr",:style => "margin-right:10px;", :remote => true, :title => "加入课程"%>
|
||||
<%=link_to "", join_private_courses_courses_path, :class => "homepageMenuSetting fr",:style => "margin-right:10px;", :remote => true, :title => "加入班级"%>
|
||||
<% end%>
|
||||
<% end%>
|
||||
</div>
|
||||
|
@ -227,10 +230,11 @@
|
|||
end
|
||||
%>
|
||||
<% courses = @user.courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(5) %>
|
||||
<% all_count = @user.courses.visible.where("is_delete =?", 0).count%>
|
||||
<div class="homepageLeftMenuCourses <%= courses.empty? ? 'none' : ''%>" >
|
||||
<div class = "leftCoursesList" id="homepageLeftMenuCourses">
|
||||
<ul>
|
||||
<%= render :partial => 'layouts/user_courses', :locals => {:courses => courses,:user => @user, :page => 0} %>
|
||||
<%= render :partial => 'layouts/user_courses', :locals => {:courses => courses,:user => @user,:all_count => all_count,:type =>'User',:page => 0} %>
|
||||
</ul>
|
||||
</div>
|
||||
<% if !courses.empty? %>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<div class="homepageRight mt0 ml10">
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">
|
||||
课程通知
|
||||
班级通知
|
||||
</div>
|
||||
</div>
|
||||
<% if @course && User.current.allowed_to?(:manage_news, @course) %>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<%= link_to activity.try(:teacher).try(:realname), user_url_in_org(activity.tea_id), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
TO
|
||||
<%= link_to activity.name.to_s+" | 课程", course_url_in_org(activity.id), :class => "newsBlue ml15" %>
|
||||
<%= link_to activity.name.to_s+" | 班级", course_url_in_org(activity.id), :class => "newsBlue ml15" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle break_word" >
|
||||
<%= link_to activity.name, course_url_in_org(activity.id), :class => "postGrey" %>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<% else %>
|
||||
<%= link_to activity.try(:user).try(:realname), user_url_in_org(activity.user_id), :class => "newsBlue mr15" %>
|
||||
<% end %> TO <!--+"(课程名称)" -->
|
||||
<%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_url_in_org(activity.course.id), :class => "newsBlue ml15"%>
|
||||
<%= link_to activity.course.name.to_s+" | 班级作业", homework_common_index_url_in_org(activity.course.id), :class => "newsBlue ml15"%>
|
||||
</div>
|
||||
<div class="homepagePostTitle hidden m_w505 fl"> <!--+"(作业名称)"-->
|
||||
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :class => "postGrey"%>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
TO
|
||||
<%= link_to activity.course.name.to_s+" | 课程问答区", course_boards_url_in_org(activity.course.id), :class => "newsBlue ml15 mr5"%>
|
||||
<%= link_to activity.course.name.to_s+" | 班级问答区", course_boards_url_in_org(activity.course.id), :class => "newsBlue ml15 mr5"%>
|
||||
</div>
|
||||
<div class="homepagePostTitle hidden m_w530 fl">
|
||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<% else %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% end %> TO <!--+"(课程名称)"-->
|
||||
<%= link_to activity.course.name.to_s+" | 课程通知", course_news_index_url_in_org(activity.course.id), :class => "newsBlue ml15" %>
|
||||
<%= link_to activity.course.name.to_s+" | 班级通知", course_news_index_url_in_org(activity.course.id), :class => "newsBlue ml15" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"-->
|
||||
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :class => "postGrey" %>
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
<div class="listbox" id="course-list">
|
||||
<h2 class="list-h2">班级列表</h2>
|
||||
<div class="list_title">
|
||||
<div class="category2 fl">
|
||||
<span class="grayTxt ">排序:</span>
|
||||
<%= link_to "时间", {:controller => 'syllabuses', :action => 'syllabus_courselist', :id =>@syllabus, :type => @type, :sort => @c_sort, :order => 1 }, :class => "sortTxt", :remote => true %>
|
||||
<% if @type.to_i == 1 %>
|
||||
<%= link_to "", {:controller => 'syllabuses', :action => 'syllabus_courselist', :id =>@syllabus, :type => @type, :sort => @c_sort, :order => 1 }, :class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} ", :remote => true %>
|
||||
<% end %>
|
||||
<%= link_to "人气", {:controller => 'syllabuses', :action => 'syllabus_courselist', :id =>@syllabus, :type => @type, :sort => @c_sort, :order => 2 }, :class => "sortTxt", :remote => true %>
|
||||
<% if @type.to_i == 2 %>
|
||||
<%= link_to "", {:controller => 'syllabuses', :action => 'syllabus_courselist', :id =>@syllabus, :type => @type, :sort => @c_sort, :order => 2 }, :class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} ", :remote => true %>
|
||||
<% end %>
|
||||
</div>
|
||||
<p class="fr grayTxt">创建老师:<%=@syllabus.user.show_name %><span class="mr10 "></span> 创建时间:<%=format_date @syllabus.created_at %></p>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<div class="bloglistbox">
|
||||
<% if @courses.any? %>
|
||||
<% @courses.each do |course|%>
|
||||
<ul class="list-file">
|
||||
<li>
|
||||
<span class="item_list fl"></span>
|
||||
<%= link_to course.name+"("+current_time_and_term_short(course)+")", course_path(course.id,:host=>Setting.host_course), :class => "list-title fl #{course_endTime_timeout?(course) ? 'c_dark_grey' : ''}",
|
||||
:style => 'color:#000',:id => "show_course_#{course.id}", :target => '_blank', :title => (course.is_public? ? "公开课程:":"私有课程:")+course.name+"("+current_time_and_term(course)+")"%>
|
||||
<% teacher = User.where("id=?",course.tea_id).first%>
|
||||
<span class="fr grayTxt">
|
||||
<%='主讲老师:'+(teacher.try(:realname) != " " ? teacher.lastname + teacher.firstname : teacher.try(:login)) %>
|
||||
</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml15">
|
||||
<!--<span class="grayTxt">创建:<%#= format_time(course.created_at) %></span>-->
|
||||
<span class="grayTxt">更新:<%= format_time(course.updated_on) %></span>
|
||||
<span class="grayTxt">
|
||||
学期: <span><%= current_time_and_term course %></span>
|
||||
</span>
|
||||
<% if User.current.admin? || User.current.allowed_to?(:as_teacher,@course) %>
|
||||
<% homework_num = course.homework_commons.count %>
|
||||
<% else %>
|
||||
<% homework_num = course.homework_commons.where("publish_time <= '#{Date.today}'").count %>
|
||||
<% end %>
|
||||
<p class="list-info fr grayTxt"><span><%= homework_num %></span><span>作业</span><span>|</span><span> <%= visable_attachemnts_incourse(course).count %></span><span>资源</span></p>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<% end %>
|
||||
<div>
|
||||
<ul class="wlist" id="pages" >
|
||||
<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//如果右边的列表比左边的高度低则将右边的高度设为与左边对齐
|
||||
$(function() {
|
||||
var leftHeight = $("#LSide").height() - $(".fontGrey5").height() - 20;
|
||||
var rightHeight = $(".homepageRight").height();
|
||||
if (rightHeight < leftHeight) {
|
||||
var diffHeight = leftHeight - rightHeight;
|
||||
var tmpHeight = $(".listbox").height() + diffHeight;
|
||||
$(".listbox").css("height", tmpHeight);
|
||||
}
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,47 @@
|
|||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false) %>
|
||||
<% end %>
|
||||
<div class="RightBanner" >
|
||||
<p >课程信息</p>
|
||||
</div>
|
||||
<div class="HomeWork">
|
||||
<p class="f16 mb10">课程信息</p>
|
||||
<div class="HomeWorkCon">
|
||||
<%= labelled_form_for @syllabus, :url =>syllabus_path(@syllabus),
|
||||
:html => {:nhname=>'form',:multipart => true, :id => 'syllabus-form'} do |f| %>
|
||||
<div>
|
||||
<div id="syllabus_quote" class="wiki" style="width: 92%;word-break: break-all;word-wrap: break-word;margin-left: 40px;"></div>
|
||||
<%= text_area :quote,:quote,:style => 'display:none' %>
|
||||
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
|
||||
|
||||
<%= f.kindeditor :description, :editor_id => 'syllabus_description_editor',
|
||||
:owner_id => @syllabus.nil? ? 0: @syllabus.id,
|
||||
:owner_type => OwnerTypeHelper::SYLLABUS,
|
||||
:width => '100%',
|
||||
:height => 300,
|
||||
:minHeight=>300,
|
||||
:class => 'talk_text fl',
|
||||
:input_html => { :id => 'syllabus_content',
|
||||
:class => 'talk_text fl',
|
||||
:maxlength => 5000 }
|
||||
%>
|
||||
<div class="cl"></div>
|
||||
<p id="description_notice_span"></p>
|
||||
</div>
|
||||
|
||||
<div class="mt5">
|
||||
<div class="fl" id="syllabus_attachments">
|
||||
<%= render :partial => 'attachments/form_course', :locals => {:container => @syllabus, :isReply => false} %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt5">
|
||||
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick="submit_syllabus();">发送</a>
|
||||
<span class="fr mr10 mt3">或</span>
|
||||
<a href="javascript:void(0);" class="fr mr10 mt3" onclick="window.location.href = '<%=syllabus_path(@syllabus)%>';">取消</a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div><!--HomeWork end-->
|
|
@ -0,0 +1,3 @@
|
|||
$("#syllabus_eng_name_show").html("<%= escape_javascript render :partial => 'layouts/syllabus_eng_name', :locals => {:syllabus => @syllabus} %>");
|
||||
$("#syllabus_eng_name_show").show();
|
||||
$("#syllabus_eng_name_edit").hide();
|
|
@ -0,0 +1,27 @@
|
|||
<div class="project_r_h02">
|
||||
<h2 class="project_h2">新建课程</h2>
|
||||
</div>
|
||||
<div class="hwork_new">
|
||||
<ul>
|
||||
<%= labelled_form_for @syllabus do |f| %>
|
||||
<li class="ml45">
|
||||
<label><span class="c_red">*</span> 课程名称 :</label>
|
||||
<input type="text" name="title" id="new_syllabus_name" class="name_input" placeholder="例如:设计管理" maxlength="100" onkeyup="regex_syllabus_name();">
|
||||
<span class="c_red" id="new_syllabus_name_notice" style="display: none;">课程名称不能为空且至少有两个字符</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45">
|
||||
<label><span class="c_white">*</span> <%= l(:label_tags_course_eng_name)%> :</label>
|
||||
<input type="text" name="eng_name" id="new_syllabus_eng_name" placeholder="例如:Management of design" class="name_input" maxlength="100">
|
||||
<!--<span class="c_red" id="new_course_class_period_notice" style="display: none;"></span>-->
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class=" ml90" >
|
||||
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_new_syllabus();" >提交</a>
|
||||
<%= link_to "取消",user_activities_path(User.current.id),:class => "blue_btn grey_btn fl c_white"%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end%>
|
||||
</ul>
|
||||
</div><!--talknew end-->
|
||||
<div class="cl"></div>
|
|
@ -0,0 +1,93 @@
|
|||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<% end %>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
sd_create_editor_from_data(<%= @syllabus.id %>, null, "100%", "<%= @syllabus.class.to_s %>");
|
||||
});
|
||||
</script>
|
||||
<div class="RightBanner" >
|
||||
<p >课程信息</p>
|
||||
</div>
|
||||
<% if @syllabus.des_status == 1 && @syllabus.courses.empty? %>
|
||||
<div class="syllabusbox_tishi">
|
||||
<% if User.current == @syllabus.user %>
|
||||
<p >您建立的课程还未创建班级,请
|
||||
<%= link_to "新建班级", new_course_path(:host=> Setting.host_course, :syllabus_id => @syllabus.id), :class => "syllabusbox_a_blue", :target => '_blank'%>。
|
||||
</p>
|
||||
<% elsif User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
|
||||
<p >本课程下还未创建班级,请
|
||||
<%= link_to "新建班级", new_course_path(:host=> Setting.host_course, :syllabus_id => @syllabus.id), :class => "syllabusbox_a_blue", :target => '_blank'%>。
|
||||
</p>
|
||||
<% else %>
|
||||
<p >本课程下还未创建班级,敬请期待。
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="<%=@syllabus.des_status == 0 ? 'HomeWork' : 'syllabusbox'%>">
|
||||
<% if @syllabus.des_status == 0%>
|
||||
<% if User.current == @syllabus.user %>
|
||||
<p class="syllabus_info_tishi">您建立的课程尚未填写课程大纲,请完善您的<%=link_to '课程大纲', edit_syllabus_path(@syllabus), :class => 'syllabusbox_a_blue' %>!</p>
|
||||
<% else %>
|
||||
<p class="syllabus_info_tishi"><%=@syllabus.user.show_name %>老师尚未完成课程大纲的编写,敬请期待。</p>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="syllabuscon">
|
||||
<%=@syllabus.description.html_safe %>
|
||||
<div class="mt10" style="font-weight:normal;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @syllabus} %>
|
||||
</div>
|
||||
</div>
|
||||
<% if User.current.logged? && User.current == @syllabus.user%>
|
||||
<div class="homepagePostSetting" style="margin:10px;">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><%=link_to '编辑', edit_syllabus_path(@syllabus), :class => 'postOptionLink'%></li>
|
||||
<% if @syllabus.courses.empty? %>
|
||||
<li><%=link_to '删除', syllabus_path(@syllabus), :class => 'postOptionLink', :method => 'delete', :data => {:confirm => l(:text_are_you_sure)}%></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<div class="fr fontGrey2">更新时间:<%=format_time @syllabus.updated_at %><div></div></div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
||||
<% count=@syllabus.journals_for_messages.count %>
|
||||
<div class="homepagePostReply">
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => @syllabus, :user_activity_id => @syllabus.id} %>
|
||||
|
||||
<% comments = @syllabus.journals_for_messages.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= @syllabus.id %>">
|
||||
<%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @syllabus.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= @syllabus.id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_syllabus_message', :id => @syllabus.id},:method => "post") do |f|%>
|
||||
<div nhname='toolbar_container_<%= @syllabus.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @syllabus.id%>' name="comment"></textarea>
|
||||
<a id="new_message_submit_btn_<%= @syllabus.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= @syllabus.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--回复框 用正式版样式-->
|
||||
</div><!--HomeWork end-->
|
|
@ -0,0 +1 @@
|
|||
<%= render :partial => 'syllabus_course_list'%>
|
|
@ -0,0 +1 @@
|
|||
$("#course-list").replaceWith('<%= escape_javascript( render :partial => 'syllabus_course_list') %>');
|
|
@ -0,0 +1,2 @@
|
|||
$("#syllabus_base_info").html("<%=escape_javascript(render :partial => 'layouts/syllabus_edit_info', :locals => {:syllabus => @syllabus}) %>");
|
||||
$("#syllabus_base_info").html("<%=escape_javascript(render :partial => 'layouts/syllabus_base_info', :locals => {:syllabus => @syllabus}) %>");
|
|
@ -0,0 +1,5 @@
|
|||
<div id="tags">
|
||||
<div id="tags_show">
|
||||
<%= render :partial => "tags/tag_syllabus_new_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,28 @@
|
|||
<% @tags = obj.reload.tag_list %>
|
||||
<% if non_list_all && @tags.size > 0 %>
|
||||
|
||||
<% else %>
|
||||
<!-- 用来显示三大对象的主页中的tag 故是全部显示 -->
|
||||
<% if @tags.size > 0 %>
|
||||
<% @tags.each do |tag| %>
|
||||
<span class="re_tag f_l " id="tag">
|
||||
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id, :class => 'pt5' %>
|
||||
<span class="del">
|
||||
<%= link_to('x', remove_tag_path(:tag_name => tag,:taggable_id => obj.id, :taggable_type => object_flag), :remote => true, :confirm => l(:text_are_you_sure) ) if obj.user == User.current %>
|
||||
</span>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.logged?%>
|
||||
<a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag01').slideToggle();"><%= l(:label_add_tag)%></a>
|
||||
<span id="add_tag01" style="display:none; vertical-align: middle;" class="ml10 f_l">
|
||||
<%= form_for "tag_for_save",:remote=>true,:url=>save_tag_path,:update => "tags_show",:complete => '$("#put-tag-form").slideUp();' do |f| %>
|
||||
<%= f.text_field :name ,:id => "tags_name4",:size=>"20",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:class =>"isTxt w90 f_l" %>
|
||||
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||
<input type="button" class="submit f_l" onclick="$('#tags_name4').parent().submit();" />
|
||||
<% end %>
|
||||
</span>
|
||||
<% end%>
|
|
@ -19,6 +19,9 @@ $('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_project
|
|||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/course_attachment_tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false, :object_flag => @object_flag}) %>');
|
||||
<% elsif @object_flag == '11'%>
|
||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_syllabus_new_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>');
|
||||
<% else%>
|
||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>');
|
||||
|
|
|
@ -38,6 +38,10 @@ $('#tags_name2').val("");
|
|||
$('#tags_name').val("");
|
||||
<% elsif @obj_flag == '10'%>
|
||||
//$("#put-tag-form-<%#=@obj.class%>-<%#=@obj.id%>").hide();
|
||||
<% elsif @obj_flag == '11'%>
|
||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_syllabus_new_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
$('#tags_name4').val("");
|
||||
<% else%>
|
||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<div class="page-header">
|
||||
<div class="jumbotron">
|
||||
<h1>课程作业列表</h1>
|
||||
<h1>班级作业列表</h1>
|
||||
<p class="lead">测试页面提供</p>
|
||||
</div>
|
||||
<% @courses.each do |course| %>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
TO
|
||||
<%= link_to activity.course.name.to_s+" | 课程资源", course_files_path(activity.course), :class => "newsBlue ml15" %>
|
||||
<%= link_to activity.course.name.to_s+" | 班级资源", course_files_path(activity.course), :class => "newsBlue ml15" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle break_word" >
|
||||
<%= link_to activity.filename, course_files_path(activity.course), :class => "postGrey" %>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<%= link_to activity.try(:teacher).try(:realname), user_path(activity.tea_id), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
TO
|
||||
<%= link_to activity.name.to_s+" | 课程", course_path(activity.id,:host=>Setting.host_course), :class => "newsBlue ml15" %>
|
||||
<%= link_to activity.name.to_s+" | 班级", course_path(activity.id,:host=>Setting.host_course), :class => "newsBlue ml15" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle break_word" >
|
||||
<%= link_to activity.name, course_path(activity.id,:host=>Setting.host_course), :class => "postGrey" %>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<td class="td_w70 ">
|
||||
<a href="<%= user_path(item.teacher) %>" title="<%= item.teacher.show_name %>"><%= item.teacher.show_name %></a>
|
||||
</td>
|
||||
<td class="td_w60 ">课程作业:</td>
|
||||
<td class="td_w60 ">班级作业:</td>
|
||||
<td class="td_w110 "><a href="<%=url_for(:controller => 'homework_common', :action => 'index',:course=>item.id, :host=>Setting.host_course)%>"><%= item.homework_commons.count %></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -45,7 +45,7 @@
|
|||
<% elsif User.current.member_of_course? item %>
|
||||
<a href="<%=url_for(:controller => 'homework_common', :action => 'index',:course=>item.id, :host=>Setting.host_course)%>" target="_blank" class="blue_n_btn fr mt20">提交作品</a>
|
||||
<% elsif User.current.logged?%>
|
||||
<%= link_to "加入课程",try_join_path(:object_id => item.id), :class => "blue_n_btn fr mt20", :remote => "true",:id => "try_join_course_link"%>
|
||||
<%= link_to "加入班级",try_join_path(:object_id => item.id), :class => "blue_n_btn fr mt20", :remote => "true",:id => "try_join_course_link"%>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
|
@ -9,7 +9,7 @@
|
|||
<div class="homepagePostTo break_word">
|
||||
<%= link_to activity.user.show_name, user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
TO <!--+"(课程名称)" -->
|
||||
<%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
|
||||
<%= link_to activity.course.name.to_s+" | 班级作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
|
||||
</div>
|
||||
<div class="homepagePostTitle hidden fl m_w505"> <!--+"(作业名称)"-->
|
||||
<%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey"%>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<%= link_to activity.user.show_name, user_path(activity.user_id), :class => "newsBlue mr15" %>
|
||||
TO
|
||||
<% course=Course.find(activity.jour_id) %>
|
||||
<%= link_to course.name.to_s+" | 课程留言", course_feedback_path(course), :class => "newsBlue ml15" %>
|
||||
<%= link_to course.name.to_s+" | 班级留言", course_feedback_path(course), :class => "newsBlue ml15" %>
|
||||
</div>
|
||||
<!--<div class="homepagePostTitle break_word list_style upload_img">
|
||||
<%# if activity.parent %>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<div class="homepagePostTo break_word">
|
||||
<%= link_to activity.author.show_name, user_path(activity.author_id, :host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
TO
|
||||
<%= link_to activity.course.name.to_s+" | 课程问答区", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue ml15 mr5"%>
|
||||
<%= link_to activity.course.name.to_s+" | 班级问答区", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue ml15 mr5"%>
|
||||
</div>
|
||||
<div class="homepagePostTitle hidden m_w530 fl">
|
||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<div class="homepagePostTo break_word">
|
||||
<%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
TO <!--+"(课程名称)"-->
|
||||
<%= link_to activity.course.name.to_s+" | 课程通知", course_news_index_path(activity.course), :class => "newsBlue ml15" %>
|
||||
<%= link_to activity.course.name.to_s+" | 班级通知", course_news_index_path(activity.course), :class => "newsBlue ml15" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"-->
|
||||
<%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %>
|
||||
|
@ -74,7 +74,7 @@
|
|||
<% 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="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
<ul class="homepagePostTypeHomework fl">
|
||||
<li class="f14"><strong>课程消息</strong></li>
|
||||
<li><%= link_to "作业消息", user_message_path(User.current, :type => 'homework'), :class => "homepagePostTypeAssignment postTypeGrey" %></li>
|
||||
<li><%= link_to "课程讨论",user_message_path(User.current, :type => 'course_message'), :class => "homepagePostTypeForum postTypeGrey" %></li>
|
||||
<li><%= link_to "课程通知",user_message_path(User.current, :type => 'course_news'), :class => "homepagePostTypeNotice postTypeGrey" %></li>
|
||||
<li><%= link_to "课程问卷", user_message_path(User.current, :type => 'poll'), :class => "homepagePostTypeQuiz postTypeGrey" %></a></li>
|
||||
<li><%= link_to "班级讨论",user_message_path(User.current, :type => 'course_message'), :class => "homepagePostTypeForum postTypeGrey" %></li>
|
||||
<li><%= link_to "班级通知",user_message_path(User.current, :type => 'course_news'), :class => "homepagePostTypeNotice postTypeGrey" %></li>
|
||||
<li><%= link_to "班级问卷", user_message_path(User.current, :type => 'poll'), :class => "homepagePostTypeQuiz postTypeGrey" %></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了课程作业:</span>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了班级作业:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<% if !User.current.allowed_to?(:as_teacher, ma.course_message.course) && cur_user_works_for_homework(ma.course_message).nil? %>
|
||||
|
@ -65,7 +65,7 @@
|
|||
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.show_name + "老师")%>刚刚发布了一个作业:
|
||||
</p>
|
||||
<ul class="ul_normal_color">
|
||||
<li>课程名称:<%= ma.course_message.course.name %>
|
||||
<li>班级名称:<%= ma.course_message.course.name %>
|
||||
(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
||||
<li>作业标题:<span style="color:Red"><%= ma.course_message.name %></span></li>
|
||||
<li>发布时间:<span style="color:Red;"><%= DateTime.parse(ma.course_message.created_at.to_s).strftime('%Y-%m-%d %H:%M').to_s %></span></li>
|
||||
|
@ -81,7 +81,7 @@
|
|||
<% else %>
|
||||
<p><%= User.current.lastname + User.current.firstname %>同学您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:</p>
|
||||
<ul class="ul_normal_color">
|
||||
<li>课程名称:<%= ma.course_message.course.name %>
|
||||
<li>班级名称:<%= ma.course_message.course.name %>
|
||||
(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
||||
<li>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></li>
|
||||
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %> 23:59</span></li>
|
||||
|
@ -117,7 +117,7 @@
|
|||
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:
|
||||
</p>
|
||||
<ul class="ul_normal_color">
|
||||
<li>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
||||
<li>班级名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
||||
<li>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></li>
|
||||
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %> 23:59</span></li>
|
||||
<li>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %> 23:59</span></li>
|
||||
|
@ -154,7 +154,7 @@
|
|||
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>开启了匿评,作业详情如下:
|
||||
</p>
|
||||
<ul class="ul_normal_color">
|
||||
<li>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
||||
<li>班级名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
||||
<li>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></li>
|
||||
<li>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></li>
|
||||
<li>匿评截止:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 23:59</span></li>
|
||||
|
@ -185,7 +185,7 @@
|
|||
该作业已经关闭了匿评。作业信息如下:
|
||||
</p>
|
||||
<ul class="ul_grey">
|
||||
<li>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
||||
<li>班级名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
||||
<li>作业标题:<%= ma.course_message.name %></li>
|
||||
</ul>
|
||||
<p></p>
|
||||
|
@ -221,7 +221,7 @@
|
|||
|
||||
</p>
|
||||
<ul class="ul_normal_color">
|
||||
<li>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年' + ma.course_message.course.term %>)</li>
|
||||
<li>班级名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年' + ma.course_message.course.term %>)</li>
|
||||
<li>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></li>
|
||||
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time%> 23:59</span></li>
|
||||
</ul>
|
||||
|
@ -292,7 +292,7 @@
|
|||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">
|
||||
<%= ma.course_message.parent_id.nil? ? "发布了课程帖子:" : "评论了课程帖子:" %></span></li>
|
||||
<%= ma.course_message.parent_id.nil? ? "发布了班级帖子:" : "评论了班级帖子:" %></span></li>
|
||||
<% if ma.course_message.parent_id.nil? %>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.course_message.subject, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
|
||||
|
@ -359,7 +359,7 @@
|
|||
<%= ma.course_message.reviewer_role == 3? "匿名用户" : (ma.course_message.user.show_name + "老师")%><%= ma.status == 0? "评阅了您的作品":"重新评阅了您的作品"%>。详情如下:
|
||||
</p>
|
||||
<ul class="ul_normal_color">
|
||||
<li>课程名称:<%= ma.course.name %>(<%= ma.course.time.to_s + '年'+ ma.course.term %>)</li>
|
||||
<li>班级名称:<%= ma.course.name %>(<%= ma.course.time.to_s + '年'+ ma.course.term %>)</li>
|
||||
<li>作业标题:<span style="color:Red;"><%=ma.course_message.student_work.homework_common.name %></span></li>
|
||||
<% content = ma.content.gsub("作业评分:","").split(" 评语:")%>
|
||||
<li>作品评分:<span style="color:Red;"><%= content[0] %>分</span></li>
|
||||
|
@ -384,7 +384,7 @@
|
|||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">在课程中留言了:</span>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">在班级中留言了:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.course_message.notes.html_safe, course_feedback_path(:id => ma.course_id),
|
||||
|
@ -450,7 +450,7 @@
|
|||
<ul class="ul_normal_color">
|
||||
<li>回复内容:<span style="color:red;"><%= ma.course_message.notes %></span></li>
|
||||
<li>您的评论:<span style="color:red;"><%= ma.course_message.jour.comment %></span></li>
|
||||
<li>课程名称:<%= ma.course.name %>(<%= ma.course.time.to_s + '年'+ ma.course.term %>)</li>
|
||||
<li>班级名称:<%= ma.course.name %>(<%= ma.course.time.to_s + '年'+ ma.course.term %>)</li>
|
||||
<li>作业标题:<span style="color:Red;"><%=ma.course_message.jour.student_work.homework_common.name %></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -479,7 +479,7 @@
|
|||
<%= User.current.allowed_to?(:as_teacher,ma.course_message.homework_common.course) ? '老师':'同学'%>您好!由于迟交作业,您及您的作品都不能参与以下作业的匿评。作业详情如下:
|
||||
</p>
|
||||
<ul class="ul_grey">
|
||||
<li>课程名称:<%= ma.course_message.homework_common.course.name %>(<%= ma.course_message.homework_common.course.time.to_s + '年' + ma.course_message.homework_common.course.term %>)</li>
|
||||
<li>班级名称:<%= ma.course_message.homework_common.course.name %>(<%= ma.course_message.homework_common.course.time.to_s + '年' + ma.course_message.homework_common.course.term %>)</li>
|
||||
<li>作业标题:<%= ma.course_message.homework_common.name %></li>
|
||||
<li>提交截止:<%= ma.course_message.homework_common.end_time %> 23:59</li>
|
||||
<li>提交时间:<%= format_time(ma.course_message.created_at) %></li>
|
||||
|
@ -541,29 +541,29 @@
|
|||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">您成功创建了课程:</span>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">您成功创建了班级:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to "课程名称:" + ma.course_message.name, course_path(ma.course_message),
|
||||
<%= link_to "班级名称:" + ma.course_message.name, course_path(ma.course_message),
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</a></li>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<p>
|
||||
<%= User.current.lastname + User.current.firstname %>老师您好!您成功创建了一个课程,详情如下:
|
||||
<%= User.current.lastname + User.current.firstname %>老师您好!您成功创建了一个班级,详情如下:
|
||||
</p>
|
||||
<p>课程名称:<%= ma.course_message.name %></p>
|
||||
<p>班级名称:<%= ma.course_message.name %></p>
|
||||
<p>开课学期:<%= ma.course_message.time.to_s + '年' + ma.course_message.term %></p>
|
||||
<p>课程ID:<span style="color:red;"><%= ma.course_message.id %></span></p>
|
||||
<p>课程密码:<span style="color:red;"><%= ma.course_message.password %></span></p>
|
||||
<p>班级ID:<span style="color:red;"><%= ma.course_message.id %></span></p>
|
||||
<p>班级密码:<span style="color:red;"><%= ma.course_message.password %></span></p>
|
||||
<p>学时总数:<%= ma.course_message.class_period %></p>
|
||||
<p>创建时间:<%= format_time(ma.course_message.created_at) %></p>
|
||||
<p>您可以点击左上角的“配置”按钮,修改课程基本信息,添加及删除课程成员。您也可以把课程ID及密码告诉学生和其他成员,让他们输入ID及密码加入课程。</p>
|
||||
<p>您可以点击左上角的“配置”按钮,修改班级基本信息,添加及删除班级成员。您也可以把邀请码告诉学生和其他成员,让他们输入邀请码加入班级。</p>
|
||||
<% if ma.course_message.is_public %>
|
||||
<p>您的课程是公开的,所有人都能访问您的课程。若不想设置为公开,您可以在配置中设置。</p>
|
||||
<p>您的班级是公开的,所有人都能访问您的班级。若不想设置为公开,您可以在配置中设置。</p>
|
||||
<% else %>
|
||||
<p>您的课程是私有的,非课程成员不能访问您的课程。如果想设置为公开,您可以在配置中设置。</p>
|
||||
<p>您的班级是私有的,非班级成员不能访问您的班级。如果想设置为公开,您可以在配置中设置。</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
|
@ -580,13 +580,13 @@
|
|||
<li class="homepageNewsPubType fl">
|
||||
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">
|
||||
课程申请进度反馈:</span>
|
||||
班级申请进度反馈:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.status == 1 ?
|
||||
'您申请成为课程"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'申请已通过'
|
||||
'您申请成为班级"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'申请已通过'
|
||||
:
|
||||
'您申请成为课程"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'的申请被拒绝', course_path(Course.find(ma.course_id)),
|
||||
'您申请成为班级"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'的申请被拒绝', course_path(Course.find(ma.course_id)),
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
|
@ -595,10 +595,10 @@
|
|||
</li>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<p>
|
||||
<%= User.current.lastname + User.current.firstname %>老师您好!您已成功加入课程<%= Course.find(ma.course_id).name%>。
|
||||
<%= User.current.lastname + User.current.firstname %>老师您好!您已成功加入班级<%= Course.find(ma.course_id).name%>。
|
||||
</p>
|
||||
<p>申请课程:<%= Course.find(ma.course_id).name%></p>
|
||||
<div class="fl">课程描述:</div>
|
||||
<p>申请班级:<%= Course.find(ma.course_id).name%></p>
|
||||
<div class="fl">班级描述:</div>
|
||||
<div class="ml60"><%= Course.find(ma.course_id).description.html_safe %></div>
|
||||
<p>申请职位:<%= ma.content == '9' ? "教师" : "教辅"%></p>
|
||||
</div>
|
||||
|
@ -614,7 +614,7 @@
|
|||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.course_message_id), user_path(User.find(ma.course_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您加入了课程:</span>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您加入了班级:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.course.name, course_member_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
|
@ -625,14 +625,14 @@
|
|||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<% if ma.course.is_public? || User.current.member_of_course?(ma.course) || User.current.admin? %>
|
||||
<% teacher = User.find(ma.course_message_id) %>
|
||||
<p><%= teacher.show_name %>(<%= teacher %>)老师把您加入了课程,详情如下:</p>
|
||||
<p>课程名称:<%= ma.course.name %></p>
|
||||
<p><%= teacher.show_name %>(<%= teacher %>)老师把您加入了班级,详情如下:</p>
|
||||
<p>班级名称:<%= ma.course.name %></p>
|
||||
<p>开课学期:<%= ma.course.time.to_s + '年'+ ma.course.term %></p>
|
||||
<p>课程ID:<%= ma.course.id %></p>
|
||||
<p>班级ID:<%= ma.course.id %></p>
|
||||
<p>课时总数:<%= ma.course.class_period %></p>
|
||||
<% else %>
|
||||
<p>
|
||||
您已经被移出该私有课程,非课程成员没有权限访问私有课程
|
||||
您已经被移出该私有班级,非班级成员没有权限访问私有班级
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
@ -648,7 +648,7 @@
|
|||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">您增加了新的课程成员:</span>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">您增加了新的班级成员:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to User.find(ma.course_message_id).login+"("+(User.find(ma.course_message_id).realname ? User.find(ma.course_message_id).realname : User.find(ma.course_message_id).login) +")", user_path(ma.course_message_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
|
@ -658,15 +658,15 @@
|
|||
</li>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<% if ma.course.is_public? || User.current.member_of_course?(ma.course) || User.current.admin? %>
|
||||
<p>您增加了新的课程成员,详情如下:</p>
|
||||
<p>您增加了新的班级成员,详情如下:</p>
|
||||
<p>成员:<%= User.find(ma.course_message_id).login+"("+(User.find(ma.course_message_id).realname ? User.find(ma.course_message_id).realname : User.find(ma.course_message_id).login) +")" %></p>
|
||||
<p>课程名称:<%= ma.course.name %></p>
|
||||
<p>班级名称:<%= ma.course.name %></p>
|
||||
<p>开课学期:<%= ma.course.time.to_s + '年'+ ma.course.term %></p>
|
||||
<p>课程ID:<%= ma.course.id %></p>
|
||||
<p>班级ID:<%= ma.course.id %></p>
|
||||
<p>课时总数:<%= ma.course.class_period %></p>
|
||||
<% else %>
|
||||
<p>
|
||||
您已经被移出该私有课程,非课程成员没有权限访问私有课程
|
||||
您已经被移出该私有班级,非班级成员没有权限访问私有班级
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
@ -682,7 +682,7 @@
|
|||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.course_message_id), user_path(User.find(ma.course_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您移出了课程:</span>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您移出了班级:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.course.name, member_course_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
|
@ -692,8 +692,8 @@
|
|||
</li>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<% if ma.course.is_public? || User.current.member_of?(ma.course) || User.current.admin? %>
|
||||
<p>您已被<%= User.find(ma.course_message_id).show_name %>老师移出了课程,详情如下:</p>
|
||||
<p>课程名称:<%= ma.course.name %></p>
|
||||
<p>您已被<%= User.find(ma.course_message_id).show_name %>老师移出了班级,详情如下:</p>
|
||||
<p>班级名称:<%= ma.course.name %></p>
|
||||
<p>开课学期:<%= ma.course.time.to_s + '年'+ ma.course.term %></p>
|
||||
<% if !ma.content.nil? %>
|
||||
<p>担任角色:<%= ma.content %></p>
|
||||
|
@ -701,7 +701,7 @@
|
|||
<p>学时总数:<%= ma.course.class_period %></p>
|
||||
<% else %>
|
||||
<p>
|
||||
您已经被移出该私有课程,非课程成员没有权限访问私有课程
|
||||
您已经被移出该私有班级,非班级成员没有权限访问私有班级
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
@ -715,7 +715,7 @@
|
|||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %></a></li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<span><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %></span><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了课程测验 :</span></li>
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %></span><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了班级测验 :</span></li>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to "测验题目:" + ma.course_message.exercise_name, exercise_path(:id => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
|
@ -725,10 +725,10 @@
|
|||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<p>
|
||||
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师':'同学'%>您好!
|
||||
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>发布了课程测验 ,测验详情如下:
|
||||
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>发布了班级测验 ,测验详情如下:
|
||||
</p>
|
||||
<ul class="ul_normal_color">
|
||||
<li>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
||||
<li>班级名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
||||
<li>测验标题:<%= ma.course_message.exercise_name %></li>
|
||||
<!--<li>测验描述:<%#= ma.course_message.exercise_description %></li>-->
|
||||
<!--<li>测验状态:<%#= ma.course_message.exercise_status == 1 ? '未发布':'已发布'%></li>-->
|
||||
|
@ -763,15 +763,15 @@
|
|||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<p>
|
||||
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师':'同学'%>您好!
|
||||
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>发布的课程测验截止时间快到了,测验详情如下:
|
||||
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>发布的班级测验截止时间快到了,测验详情如下:
|
||||
</p>
|
||||
|
||||
<ul class="ul_normal_color">
|
||||
<li>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
||||
<li>班级名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
||||
<li>测验标题:<%= ma.course_message.exercise_name %></li>
|
||||
<li>截止时间:<%= ma.course_message.end_time.to_s.gsub("+0800","").to_datetime.strftime("%Y-%m-%d %H:%M:%S") %></li>
|
||||
<li>答题时长:<%= ma.course_message.time == -1 ? '无限制' : ma.course_message.time.to_s + '分钟' %></li>
|
||||
<p>请及时完成课程测验,辛苦啦!</p>
|
||||
<p>请及时完成班级测验,辛苦啦!</p>
|
||||
</ul>
|
||||
</div>
|
||||
<li class="homepageHomeworkContentWarn fl">截止时间快到啦 </li>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<a href="<%= resource_search_user_path(:id => @user.id, :type => @type, :status => 1, :search => @switch_search) %>" id="resource_type_all" class="resourcesTypeAll resourcesGrey" data-method="get" data-remote="true">全部 </a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<%= resource_search_user_path(:id => @user.id, :type => @type, :status => 2, :search => @switch_search) %>" id="resource_type_course" class="homepagePostTypeAssignment postTypeGrey'" data-method="get" data-remote="true">课程资源 </a>
|
||||
<a href="<%= resource_search_user_path(:id => @user.id, :type => @type, :status => 2, :search => @switch_search) %>" id="resource_type_course" class="homepagePostTypeAssignment postTypeGrey'" data-method="get" data-remote="true">班级资源 </a>
|
||||
<%#= link_to '课程资源' ,user_resource_user_path(:id => @user.id, :type => 2), id="resource_type_course", :remote => true, :method => 'get', :class=> 'homepagePostTypeAssignment postTypeGrey' %>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
@ -0,0 +1,112 @@
|
|||
<div class="syllabus_box" id="course-list">
|
||||
<h2 class="syllabus_h2_top"><span class="icon_course fl mt7 mr5"></span>课程列表</h2>
|
||||
<div class="syllabus_category">
|
||||
<span class="grayTxt fl">排序:</span>
|
||||
<%= link_to "时间", {:controller => 'users', :action => 'user_courselist', :id =>@user, :type => @type, :sort => @c_sort, :order => 1 }, :class => "sortTxt fl", :remote => true %>
|
||||
<% if @type.to_i == 1 %>
|
||||
<%= link_to "", {:controller => 'users', :action => 'user_courselist', :id =>@user, :type => @type, :sort => @c_sort, :order => 1 }, :class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} fl", :remote => true %>
|
||||
<% else %>
|
||||
<%= link_to "", {:controller => 'users', :action => 'user_courselist', :id =>@user, :type => @type, :sort => @c_sort, :order => 1 }, :class => "sortdownbtn sort_no fl", :remote => true %>
|
||||
<% end %>
|
||||
<%= link_to "人气", {:controller => 'users', :action => 'user_courselist', :id =>@user, :type => @type, :sort => @c_sort, :order => 2 }, :class => "sortTxt fl", :remote => true %>
|
||||
<% if @type.to_i == 2 %>
|
||||
<%= link_to "", {:controller => 'users', :action => 'user_courselist', :id =>@user, :type => @type, :sort => @c_sort, :order => 2 }, :class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} fl", :remote => true %>
|
||||
<% else %>
|
||||
<%= link_to "", {:controller => 'users', :action => 'user_courselist', :id =>@user, :type => @type, :sort => @c_sort, :order => 2 }, :class => "sortdownbtn sort_no fl", :remote => true %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<% if @syllabus.any? %>
|
||||
<% @syllabus.each_with_index do |syllabus, index|%>
|
||||
<div class="syllabus_courses_box">
|
||||
<% courses = @courses.where("syllabus_id = #{syllabus.id}").select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS time").order("time desc") %>
|
||||
<div class="syllabus_courses_list">
|
||||
<div class="<%=index == 0 ? 'sy_courses_open' : 'sy_courses_close' %>">
|
||||
<span class="<%=index == 0 ? 'icons_sy_open' : 'icons_sy_close' %> fl mr5"></span>
|
||||
<h3 class="syllabus_courses_title fl"><%=syllabus.title %></h3>
|
||||
</div>
|
||||
<%=link_to '', syllabus_path(syllabus.id), :class => 'icons_sy_setting fr',:target => '_blank', :title => '查看课程' %>
|
||||
<p class="fl sy_p_grey">更新时间:<%=format_date syllabus.updated_at %>
|
||||
<span class="mr10"></span>创建老师:<%=syllabus.user.show_name %>
|
||||
<span class="mr10"></span>班级:<%=courses.count %>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<div class="syllabus_class_box <%=index == 0 ? '' : 'none' %>">
|
||||
<ul id="syllabus_course_ul_<%=syllabus.id %>">
|
||||
<% unless courses.nil? %>
|
||||
<% courses.each_with_index do |course, i| %>
|
||||
<li class="syllabus_class_list <%=i > 2 ? 'none' : '' %>">
|
||||
<a href="<%=course_path(course.id) %>" target="_blank">
|
||||
<span class="icons_sy_cir "></span>
|
||||
<div class="fl">
|
||||
<div class="syllabus_class_w ">
|
||||
<p class="syllabus_class_title fl"><%=course.name %></p>
|
||||
<span class="fr sy_p_grey">主讲老师:<%=course.teacher.show_name %></span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="">
|
||||
<p class="fl grayTxt ">更新:<%=format_date(Time.at(course.time)) %><span class="mr10"></span>学期:<%=current_time_and_term(course) %></p>
|
||||
<p class="list-info fr grayTxt"><span><%=studentCount course %></span><span>学生</span><span>|</span><span><%=visable_course_homework course %></span><span>作业</span><span>|</span><span><%=visable_attachemnts_incourse(@course).count %></span><span>资源</span></p>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="icons_sy_arrow fl mt19 ml10" ></span>
|
||||
<div class="cl"></div>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if courses.count > 3 %>
|
||||
<li class="syllabus_class_list_more" id="syllabus_class_list_more_<%=syllabus.id %>">
|
||||
<a href="javascript:void(0);" id="expand_list_<%=syllabus.id %>" data-init="0" onclick="expand_course_list(<%=syllabus.id %>,'#syllabus_course_ul_<%=syllabus.id %> li','#expand_list_<%=syllabus.id %>',<%=courses.count %>)">共<%=courses.count %>个课程,点击全部展开</a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div><!--syllabus_class_box end-->
|
||||
</div>
|
||||
<% end %>
|
||||
<div>
|
||||
<ul class="wlist" id="pages" >
|
||||
<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//如果右边的列表比左边的高度低则将右边的高度设为与左边对齐
|
||||
$(function() {
|
||||
var leftHeight = $("#LSide").height() - $(".fontGrey5").height() - 20;
|
||||
var rightHeight = $(".homepageRight").height();
|
||||
if (rightHeight < leftHeight) {
|
||||
var diffHeight = leftHeight - rightHeight;
|
||||
var tmpHeight = $(".syllabus_box").height() + diffHeight;
|
||||
$(".syllabus_box").css("height", tmpHeight);
|
||||
}
|
||||
$(".sy_courses_open").toggle(function(){
|
||||
//$(this).hide();
|
||||
$(this).parent().next().hide();
|
||||
$(this).children(":first-child").addClass("icons_sy_close").removeClass("icons_sy_open");
|
||||
//$(this).parent().next().show();
|
||||
},function(){
|
||||
$(this).parent().next().show();
|
||||
$(this).children(":first-child").addClass("icons_sy_open").removeClass("icons_sy_close");
|
||||
});
|
||||
$(".sy_courses_close").toggle(function(){
|
||||
//$(this).hide();
|
||||
$(this).parent().next().show();
|
||||
$(this).children(":first-child").addClass("icons_sy_open").removeClass("icons_sy_close");
|
||||
//$(this).parent().next().show();
|
||||
},function(){
|
||||
$(this).parent().next().hide();
|
||||
$(this).children(":first-child").addClass("icons_sy_close").removeClass("icons_sy_open");
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -17,7 +17,7 @@
|
|||
<!--<li><a href="javascript:void(0);" class="homepagePostTypeNotice postTypeGrey">通知动态</a></li>-->
|
||||
<li><%= link_to "论坛动态", {:controller => "users", :action => "show", :type => "course_message"}, :class => "homepagePostTypeForum postTypeGrey"%>
|
||||
<li><%= link_to "问卷动态", {:controller => "users", :action => "show", :type => "course_poll"}, :class => "homepagePostTypeQuiz postTypeGrey"%>
|
||||
<li><%= link_to "课程留言", {:controller => "users", :action => "show", :type => "course_journals"}, :class =>"homepagePostTypeMessage postTypeGrey"%>
|
||||
<li><%= link_to "班级留言", {:controller => "users", :action => "show", :type => "course_journals"}, :class =>"homepagePostTypeMessage postTypeGrey"%>
|
||||
<!--<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>-->
|
||||
<!--<li><a href="javascript:void(0);" class="homepagePostTypeQuiz postTypeGrey">问卷动态</a></li>-->
|
||||
<% end %>
|
||||
|
|
|
@ -1 +1 @@
|
|||
<%= render :partial => 'users/user_course_list'%>
|
||||
<%= render :partial => 'users/user_syllabus_list'%>
|
||||
|
|
|
@ -1 +1 @@
|
|||
$("#course-list").replaceWith('<%= escape_javascript( render :partial => 'users/user_course_list') %>');
|
||||
$("#course-list").replaceWith('<%= escape_javascript( render :partial => 'users/user_syllabus_list') %>');
|
|
@ -1 +1 @@
|
|||
$("#user_show_more_course").replaceWith("<%= escape_javascript( render :partial => 'layouts/user_courses',:locals => {:courses => @courses,:user => @user, :page => @page} )%>");
|
||||
$("#user_show_more_course").replaceWith("<%= escape_javascript( render :partial => 'layouts/user_courses',:locals => {:courses => @courses,:user => @user,:type=>@type,:page => @page, :all_count => @all_count} )%>");
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<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="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>
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
<% 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 => "课程图片" %>
|
||||
<%= 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="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="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>
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
<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_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>
|
||||
<li id="searchBaner_6" onclick="HoverLi(6);on_click_search(6);"><a href="javascript:void(0);" id="searchType_6" class="fontGrey2 f14">帖子<span class="numRed" style="font-weight:normal;"><font id="searchNum_6" class="numRed">(<%= @memo_count%>)</font></span></a></li>
|
||||
|
|
|
@ -13,7 +13,7 @@ en:
|
|||
|
||||
|
||||
label_homework: Task
|
||||
label_course_news: 课程通知
|
||||
label_course_news: 班级通知
|
||||
label_main_teacher: 主讲教师
|
||||
label_course_term: 开始学期
|
||||
|
||||
|
|
|
@ -10,14 +10,14 @@ zh:
|
|||
#
|
||||
# 课程公共标签
|
||||
#
|
||||
label_course_join_student: 加入课程
|
||||
label_course_exit_student: 退出课程
|
||||
label_course_join_student: 加入班级
|
||||
label_course_exit_student: 退出班级
|
||||
label_course_new: 新建课程
|
||||
label_course_name: 课程名称
|
||||
|
||||
label_homework: 作业
|
||||
label_course_news: 课程通知
|
||||
label_course_mail_news_reply: 课程通知回复
|
||||
label_course_news: 班级通知
|
||||
label_course_mail_news_reply: 班级通知回复
|
||||
label_main_teacher: 主讲教师
|
||||
label_course_term: 开始学期
|
||||
label_isuue_mail_status: 更新了issue状态!
|
||||
|
@ -27,7 +27,7 @@ zh:
|
|||
# 资源库 (课程、项目按类型分)
|
||||
label_course_file: 资源库
|
||||
label_upload_files: 上传资源
|
||||
label_apply_join_course: 申请加入课程
|
||||
label_apply_join_course: 申请加入班级
|
||||
label_apply_for_homework: 申请引用作业
|
||||
#
|
||||
# 课程托管平台主页
|
||||
|
|
|
@ -329,7 +329,7 @@ zh:
|
|||
permission_manage_subtasks: 管理子任务
|
||||
permission_view_journals_for_messages: 查看留言
|
||||
permission_view_courses: 查看课程
|
||||
permission_new_course: 新建课程
|
||||
permission_new_course: 新建班级
|
||||
permission_configure_course: 配置课程
|
||||
permission_close_course: 关闭/重开
|
||||
permission_new_assignment: 新建任务
|
||||
|
@ -354,12 +354,12 @@ zh:
|
|||
permission_as_student: 作为学生
|
||||
permission_paret_in_homework: 加入作业
|
||||
permission_view_homework_attaches: 查看作品附件
|
||||
permission_view_course_journals_for_messages: 查看课程留言
|
||||
view_course_journals_for_messages: 课程留言
|
||||
permission_view_course_journals_for_messages: 查看班级留言
|
||||
view_course_journals_for_messages: 班级留言
|
||||
label_send_course_journals_for_messages: 发布了留言
|
||||
label_send_course_messages: 发布了讨论
|
||||
permission_select_course_modules: 选择课程模块
|
||||
permission_view_course_files: 查看课程资源
|
||||
permission_view_course_files: 查看班级资源
|
||||
permission_add_course: 新建课程
|
||||
permission_edit_course: 编辑课程
|
||||
permission_select_contest_modules: 选择竞赛模块
|
||||
|
@ -485,7 +485,7 @@ zh:
|
|||
label_new_course: 课程列表
|
||||
label_course_all: 课程列表
|
||||
label_excellent_courses_list: 精品课程列表
|
||||
label_course_resource_list: 课程资源列表
|
||||
label_course_resource_list: 班级资源列表
|
||||
label_project_resource_list: 項目资源列表
|
||||
label_teacher_all: 所有教师
|
||||
label_requirement_enterprise_list: 众包列表
|
||||
|
@ -1265,7 +1265,9 @@ zh:
|
|||
|
||||
label_delete_confirm: 确认删除?
|
||||
label_tags_bid: 需求名称
|
||||
label_tags_course_name: 课程名称
|
||||
label_tags_syllabus_name: 课程名称
|
||||
label_tags_course_name: 班级名称
|
||||
label_tags_course_eng_name: 英文名称
|
||||
label_tags_bid_description: 需求描述
|
||||
label_tags_issue_description: 问题描述
|
||||
label_tags_all_objects: 所有
|
||||
|
@ -1536,7 +1538,7 @@ zh:
|
|||
label_my_brief_introduction: 今天的心情如何?留下你的脚印吧~
|
||||
label_time: 年度
|
||||
|
||||
label_main_term: 课程学期
|
||||
label_main_term: 班级学期
|
||||
label_teacher_work_unit: 教师单位
|
||||
label_course_time: 课程年度
|
||||
label_i_new_activity: 有了新活动在
|
||||
|
@ -1692,7 +1694,7 @@ zh:
|
|||
label_new_join_group: 加入当前分班
|
||||
label_new_course_password: 课程密码
|
||||
label_new_course_school: 开课学校
|
||||
label_new_course_description: 课程描述
|
||||
label_new_course_description: 班级描述
|
||||
label_homework_description: 作业描述
|
||||
label_new_join_order: 请输入课程密码
|
||||
label_task_submit_form_accessory: 作业最终以附件形式提交
|
||||
|
@ -1717,7 +1719,7 @@ zh:
|
|||
label_assign_homework: 中布置了作业
|
||||
label_noawards: 未评奖
|
||||
|
||||
label_course_modify_settings: 配置课程
|
||||
label_course_modify_settings: 配置班级
|
||||
label_homework_prompt: 贴心小提示:
|
||||
label_homework_prompt_content: 亲,在这里我们的作业将以项目的形式提交,如果小伙伴们还没有创建项目,请先创建一个项目。项目创建成功后,就可以
|
||||
label_create_homework: 布置了作业:
|
||||
|
@ -1732,13 +1734,13 @@ zh:
|
|||
label_search_by_student_id: 按学号过滤
|
||||
label_institution_name: 单位名称
|
||||
label_duration_time: 授课时间
|
||||
label_course_brief_introduction: 课程简介
|
||||
label_course_brief_introduction: 班级简介
|
||||
field_teacher_name: 教 师
|
||||
|
||||
label_newbie_faq: '新手指引 & 问答'
|
||||
label_hot_project: '热门项目'
|
||||
label_borad_project: 项目讨论区
|
||||
label_borad_course: 课程问答区
|
||||
label_borad_course: 班级问答区
|
||||
label_borad_org_subfield: 资源栏目讨论区
|
||||
view_borad_course: 课程讨论
|
||||
label_memo_create_succ: 发布成功
|
||||
|
@ -1848,7 +1850,7 @@ zh:
|
|||
label_contest_notification: 竞赛通知
|
||||
label_company_name: 组织名
|
||||
|
||||
label_coursefile_sharingarea: 课程资源共享区
|
||||
label_coursefile_sharingarea: 班级资源共享区
|
||||
|
||||
|
||||
label_x_activity:
|
||||
|
@ -1917,7 +1919,7 @@ zh:
|
|||
label_attendingcontestwork_adaptive_system: 系统支持
|
||||
label_attendingcontestwork_download: 作品下载
|
||||
label_course_attendingcontestwork_download: 课件下载
|
||||
label_course_mail_files: 课程资源
|
||||
label_course_mail_files: 班级资源
|
||||
label_attendingcontestwork_developers: 开发人员
|
||||
label_attendingcontestwork_average_scores: 平均评分
|
||||
label_attendingcontestwork_release_time: 发布时间
|
||||
|
@ -1937,7 +1939,7 @@ zh:
|
|||
label_notification: 通知公告
|
||||
label_course_ad_description: 课程模块正在优化中,使用过程中如有问题请您与我们联系,感谢大家的支持!
|
||||
label_course_adcolick: 请点击:
|
||||
label_coursejoin_tip: 提示:加入课程才有权限查看或提交作业,“加入”按钮见课程图标右侧!
|
||||
label_coursejoin_tip: 提示:加入班级才有权限查看或提交作业,“加入”按钮见班级图标右侧!
|
||||
|
||||
# ajax异步验证
|
||||
modal_valid_passing: 可以使用
|
||||
|
@ -2045,7 +2047,7 @@ zh:
|
|||
label_recently_updated_homework: 最近更新了作业
|
||||
label_recently_updated_message: 最近更新了留言
|
||||
label_recently_updated_courseware: 最近更新了课件
|
||||
label_no_courses: 您没有参与任何课程,请搜索课程、加入课程,或者创建课程吧!
|
||||
label_no_courses: 您没有参与任何班级,请搜索班级、加入班级,或者创建班级吧!
|
||||
label_commit_failed: 提交失败
|
||||
label_recently: 最近被
|
||||
label_creat: 创建
|
||||
|
@ -2122,7 +2124,7 @@ zh:
|
|||
|
||||
# 课程推荐
|
||||
label_homework_commont: 作业
|
||||
label_homework_recommendation: 课程推荐
|
||||
label_homework_recommendation: 班级推荐
|
||||
|
||||
#资源
|
||||
label_resource_name: 资源名称
|
||||
|
|
|
@ -1073,6 +1073,20 @@ RedmineApp::Application.routes.draw do
|
|||
|
||||
match 'courses/search'
|
||||
match '/contests/search', :via => [:get, :post]
|
||||
|
||||
#课程大纲路由设置
|
||||
resources :syllabuses do
|
||||
member do
|
||||
match 'syllabus_courselist', :to => 'syllabuses#syllabus_courselist', :via => :get, :as => 'syllabus_courselist'
|
||||
get 'edit_syllabus_eng_name'
|
||||
post 'update_base_info'
|
||||
end
|
||||
|
||||
collection do
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
# add by nwb
|
||||
# 课程路由设置
|
||||
resources :courses do
|
||||
|
@ -1191,6 +1205,7 @@ RedmineApp::Application.routes.draw do
|
|||
match 'projects/:id/feedback', :to => 'projects#feedback', :via => :get, :as => 'project_feedback'
|
||||
match 'project/:id/share', :to => 'projects#share', :as => 'share_show' #share
|
||||
post 'words/:id/leave_user_message', :to => 'words#leave_user_message', :as => "leave_user_message"
|
||||
post 'words/:id/leave_syllabus_message', :to => 'words#leave_syllabus_message', :as => "leave_syllabus_message"
|
||||
post 'words/:id/leave_homework_message', :to => 'words#leave_homework_message', :as => "leave_homework_message"
|
||||
post 'words/:id/reply_to_homework', :to => 'words#reply_to_homework', :as => "reply_to_homework"
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
class AddColumnToSyllabus < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :syllabuses, :eng_name, :string
|
||||
add_column :syllabuses, :type, :integer
|
||||
add_column :syllabuses, :credit, :integer
|
||||
add_column :syllabuses, :hours, :integer
|
||||
add_column :syllabuses, :theory_hours, :integer
|
||||
add_column :syllabuses, :practice_hours, :integer
|
||||
add_column :syllabuses, :applicable_major, :string
|
||||
add_column :syllabuses, :pre_course, :string
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddVisitsToSyllabus < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :syllabuses, :visits, :integer, :default => 0
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddDesStatusToSyllabus < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :syllabuses, :des_status, :integer, :default => 0
|
||||
end
|
||||
end
|
|
@ -0,0 +1,8 @@
|
|||
class RenameSyllabusColumn < ActiveRecord::Migration
|
||||
def up
|
||||
rename_column :syllabuses, :type, :syllabus_type
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
43
db/schema.rb
43
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20160627090316) do
|
||||
ActiveRecord::Schema.define(:version => 20160624032138) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -1823,6 +1823,7 @@ ActiveRecord::Schema.define(:version => 20160627090316) do
|
|||
add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true
|
||||
add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id"
|
||||
|
||||
<<<<<<< .mine
|
||||
create_table "protected_branches", :force => true do |t|
|
||||
t.integer "project_id", :null => false
|
||||
t.string "name", :null => false
|
||||
|
@ -1847,6 +1848,32 @@ ActiveRecord::Schema.define(:version => 20160627090316) do
|
|||
t.string "sonar_name"
|
||||
end
|
||||
|
||||
=======
|
||||
create_table "quality_analyses", :force => true do |t|
|
||||
t.integer "project_id"
|
||||
t.string "author_login"
|
||||
t.string "rep_identifier"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "sonar_version", :default => 0
|
||||
t.string "path"
|
||||
t.string "branch"
|
||||
t.string "language"
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
>>>>>>> .theirs
|
||||
create_table "queries", :force => true do |t|
|
||||
t.integer "project_id"
|
||||
t.string "name", :default => "", :null => false
|
||||
|
@ -2211,8 +2238,18 @@ ActiveRecord::Schema.define(:version => 20160627090316) do
|
|||
t.string "title"
|
||||
t.text "description"
|
||||
t.integer "user_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "eng_name"
|
||||
t.integer "syllabus_type"
|
||||
t.integer "credit"
|
||||
t.integer "hours"
|
||||
t.integer "theory_hours"
|
||||
t.integer "practice_hours"
|
||||
t.string "applicable_major"
|
||||
t.string "pre_course"
|
||||
t.integer "visits", :default => 0
|
||||
t.integer "des_status", :default => 0
|
||||
end
|
||||
|
||||
add_index "syllabuses", ["user_id"], :name => "index_syllabuses_on_user_id"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="text-nowrap v-top">来 源:</td>
|
||||
<td>{{discussion.course_project_name}} | 课程问答区</td>
|
||||
<td>{{discussion.course_project_name}} | 班级问答区</td>
|
||||
</tr></table>
|
||||
<div class="f13 c-grey3 mt10 text-control post-all-content" ng-bind-html="discussion.content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="text-nowrap v-top">来 源:</td>
|
||||
<td>{{news.course_name}} | 课程通知</td>
|
||||
<td>{{news.course_name}} | 班级通知</td>
|
||||
</tr></table>
|
||||
<div class="f13 c-grey3 mt10 text-control post-all-content" ng-bind-html="news.description|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
|
@ -1545,15 +1545,23 @@ function show_edit_file_description(id) {
|
|||
$("#file_description_edit_"+id).focus();
|
||||
}
|
||||
|
||||
//编辑资源描述之后提交
|
||||
function edit_file_description(url,id){
|
||||
$.get(
|
||||
url,
|
||||
{id: id ,description: $("#file_description_edit_"+id).val() },
|
||||
function (data) {
|
||||
|
||||
}
|
||||
);
|
||||
//展开课程大纲列表中的班级
|
||||
function expand_course_list(id, target, btnid, count) {
|
||||
var target = $(target);
|
||||
var btn = $(btnid);
|
||||
if(btn.data('init')=='0'){
|
||||
btn.data('init',1);
|
||||
btn.html('点击收起');
|
||||
target.show();
|
||||
}else{
|
||||
btn.data('init',0);
|
||||
btn.html('共'+count+ '个课程,点击全部展开');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
target.eq(2).show();
|
||||
btn.parent().show();
|
||||
}
|
||||
}
|
||||
//删除组织成员
|
||||
function ifDeleteOrgMember(id,name){
|
||||
|
|
|
@ -182,10 +182,26 @@ function regex_course_password(str)
|
|||
return false;
|
||||
}
|
||||
}
|
||||
//验证课程大纲
|
||||
function regex_syllabus_option(str) {
|
||||
if(document.getElementById(str + "_syllabus_id")) {
|
||||
var obj = document.getElementById(str + "_syllabus_id");
|
||||
var syllabus = obj.options[obj.selectedIndex];
|
||||
if(parseInt(syllabus.value) == 0) {
|
||||
$("#"+str+"_syllabus_notice").show();
|
||||
return false;
|
||||
} else{
|
||||
$("#"+str+"_syllabus_notice").hide();
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//提交新建课程
|
||||
function submit_new_course()
|
||||
{
|
||||
if(regex_course_name('new')&®ex_course_class_period('new')&®ex_time_term('new'))
|
||||
if(regex_syllabus_option('new')&®ex_course_name('new')&®ex_course_class_period('new')&®ex_time_term('new'))
|
||||
{
|
||||
$("#new_course").submit();
|
||||
}
|
||||
|
@ -193,11 +209,35 @@ function submit_new_course()
|
|||
|
||||
function submit_edit_course(id)
|
||||
{
|
||||
if(regex_course_name('edit')&®ex_course_class_period('edit')&®ex_time_term('edit'))
|
||||
if(regex_syllabus_option('edit')&®ex_course_name('edit')&®ex_course_class_period('edit')&®ex_time_term('edit'))
|
||||
{
|
||||
$("#edit_course_"+id).submit();
|
||||
}
|
||||
}
|
||||
|
||||
//新建课程大纲
|
||||
function submit_new_syllabus()
|
||||
{
|
||||
if(regex_syllabus_name())
|
||||
{
|
||||
$("#new_syllabus").submit();
|
||||
}
|
||||
}
|
||||
|
||||
function regex_syllabus_name() {
|
||||
var name = $.trim($("#new_syllabus_name").val());
|
||||
if(name.length < 2)
|
||||
{
|
||||
$("#new_syllabus_name_notice").show();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#new_syllabus_name_notice").hide();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//课程讨论区
|
||||
function regexTopicSubject() {
|
||||
var name = $("#message_subject").val();
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
//显示更多的班级
|
||||
function show_more_course(url){
|
||||
$.get(
|
||||
url,
|
||||
{ page: $("#course_page_num").val() },
|
||||
function (data) {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function regex_sylla_description() {
|
||||
syllabus_description_editor.sync();
|
||||
var name = syllabus_description_editor.html();
|
||||
if (name.length == 0) {
|
||||
$("#description_notice_span").text("描述不能为空");
|
||||
$("#description_notice_span").css('color', '#ff0000');
|
||||
$("#description_notice_span").focus();
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
$("#description_notice_span").text("填写正确");
|
||||
$("#description_notice_span").css('color', '#008000');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function submit_syllabus() {
|
||||
if (regex_sylla_description()) {
|
||||
$("#syllabus-form").submit();
|
||||
}
|
||||
}
|
||||
|
||||
//编辑英文名称
|
||||
function show_edit_eng_name() {
|
||||
$("#syllabus_eng_name_show").hide();
|
||||
$("#syllabus_eng_name_edit").show();
|
||||
$("#syllabus_eng_name_edit").focus();
|
||||
}
|
||||
|
||||
//编辑英文名称之后提交
|
||||
function edit_syllabus_eng_name(url){
|
||||
$.get(
|
||||
url,
|
||||
{ eng_name: $("#syllabus_eng_name_edit").val() },
|
||||
function (data) {
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
//编辑资源描述之后提交
|
||||
function edit_file_description(url,id){
|
||||
$.get(
|
||||
url,
|
||||
{id: id ,description: $("#file_description_edit_"+id).val() },
|
||||
function (data) {
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
//展开所有属性
|
||||
function toggle_all_syllabus_attr(){
|
||||
var btn = $("#show_all_syllabus_attr");
|
||||
var target = $("#all_syllabus_attr li");
|
||||
var none = $("#all_syllabus_attr li.none_attr");
|
||||
if(btn.data('init')=='0'){
|
||||
btn.data('init',1);
|
||||
btn.removeClass('homepageLeftMenuMoreIcon');
|
||||
btn.addClass('homepageLeftMenuHideIcon');
|
||||
target.show();
|
||||
}else{
|
||||
btn.data('init',0);
|
||||
btn.addClass('homepageLeftMenuMoreIcon');
|
||||
btn.removeClass('homepageLeftMenuHideIcon');
|
||||
none.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function update_syllabus_info(){
|
||||
if(regex_syllabus_credit('credit') && regex_syllabus_credit('hours') && regex_syllabus_credit('theory_hours') && regex_syllabus_credit('practice_hours')) {
|
||||
$("#submit_edit_info").parent().submit();
|
||||
}
|
||||
}
|
||||
|
||||
function regex_syllabus_credit(str){
|
||||
var num = $.trim($("#syllabus_"+str+"_input").val());
|
||||
var regex = /^\d*$/;
|
||||
if(num.length > 0)
|
||||
{
|
||||
if (regex.test(num)) {
|
||||
if(parseInt(num) > 0)
|
||||
{
|
||||
$("#syllabus_"+str+"_notice").hide();
|
||||
return true;
|
||||
} else
|
||||
{
|
||||
$("#syllabus_"+str+"_notice").show();
|
||||
$("#syllabus_"+str+"_input").focus();
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
$("#syllabus_"+str+"_notice").show();
|
||||
$("#syllabus_"+str+"_input").focus();
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -1270,7 +1270,7 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
|
|||
.relatePImage {display:block; margin:0 auto;}
|
||||
|
||||
/*上传资源弹窗*/
|
||||
.resourceUploadPopup {width:400px; height:auto; border:3px solid #269ac9 !important; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-200px; z-index:1000;}
|
||||
.resourceUploadPopup {width:400px; height:auto; border:3px solid #269ac9 !important; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:fixed; top:50%; left:50%; margin-left:-200px; z-index:1000;}
|
||||
.uploadDialogText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; width:140px; display:inline-block; font-weight: bold;}
|
||||
.uploadBoxContainer {height:33px; line-height:33px; margin-top:10px; position:relative}
|
||||
.uploadBox {width:100px; height:33px; line-height:33px; text-align:center; vertical-align:middle; background-color:#269ac9; border-radius:3px; float:left; margin-right:12px;}
|
||||
|
@ -1427,3 +1427,5 @@ a.pages-big{ width:50px;}
|
|||
.W420 {width:420px;}
|
||||
.W300 {width:300px !important;}
|
||||
.W600{ width:600px;}
|
||||
|
||||
.syllabus_input {width: 290px; border: 1px solid #64bdd9; height: 30px;}
|
||||
|
|
|
@ -0,0 +1,156 @@
|
|||
/****标签(和资源库的tag样式一致)***/
|
||||
.project_Label{ width:218px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px; border:1px solid #dddddd;}
|
||||
.project_Label_New {width:218px; padding-left:10px; background:#fff; margin-top:15px; margin-bottom:10px;}
|
||||
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
|
||||
.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
|
||||
.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
|
||||
.re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; }
|
||||
.re_tag a{ color:#0d90c3;}
|
||||
.tag_h{ }
|
||||
.tag_h span,.tag_h a{ margin-bottom:5px;}
|
||||
/*信息*/
|
||||
.project_info{ background:#fff; padding:10px 8px; width:222px; margin-bottom:10px; border:1px solid #dddddd;}
|
||||
.pr_info_id{ width:137px; color:#5a5a5a; font-size:14px; margin-top:5px;}
|
||||
.pr_info_logo{ border:1px solid #eaeaea; width:60px; height:60px; padding:1px;}
|
||||
.pr_info_logo:hover{ border:1px solid #297fb8; }
|
||||
|
||||
/*课程大纲*/
|
||||
input.syllabus_input{
|
||||
border:none;
|
||||
width:150px;
|
||||
height:25px;
|
||||
line-height:25px;
|
||||
color:#333;
|
||||
}
|
||||
input.syllabus_input_min{
|
||||
border:none;
|
||||
width:30px;
|
||||
height:25px;
|
||||
line-height:25px;
|
||||
color:#333;
|
||||
}
|
||||
.syllabus_select{
|
||||
border:1px solid #ccc;
|
||||
margin-left:5px;
|
||||
}
|
||||
.syllabus_leftinfo {
|
||||
margin:10px 10px 0 10px;
|
||||
width:220px;
|
||||
}
|
||||
.syllabus_leftinfo li{
|
||||
line-height:25px;
|
||||
}
|
||||
.syllabus_leftinfo label{
|
||||
display:block;
|
||||
width:60px;
|
||||
text-align:right;
|
||||
float:left;
|
||||
line-height:25px;
|
||||
}
|
||||
.syllabusbox{
|
||||
position:relative;
|
||||
width: 718px;
|
||||
color: #4b4b4b;
|
||||
padding:30px 15px;
|
||||
margin-bottom: 10px;
|
||||
background: #fff;
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
.syllabuscon_title{
|
||||
color:#000; text-align:center;
|
||||
}
|
||||
.syllabuscon_txt p{
|
||||
font-size:14px;
|
||||
line-height:1.9;
|
||||
color:#000;
|
||||
}
|
||||
.syllabuscon_txt_title{
|
||||
font-weight:bold;
|
||||
margin:10px 0;
|
||||
}
|
||||
.syllabusbox_tishi{
|
||||
font-size:14px;
|
||||
width:733px;
|
||||
color:#cb7c01;
|
||||
padding:10px 0 0 15px;
|
||||
margin-bottom:10px;
|
||||
background:#fff7d1;
|
||||
border:1px solid #fcd9b4;
|
||||
height:34px;
|
||||
}
|
||||
a.syllabusbox_a_blue{
|
||||
color:#3b94d6 !important;
|
||||
}
|
||||
.syllabus_leftinfo p{
|
||||
line-height:25px;
|
||||
width:150px;
|
||||
overflow:hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow:ellipsis;
|
||||
}
|
||||
.syllabus_info_tishi{
|
||||
font-size:16px;
|
||||
width:400px;
|
||||
margin:100px auto;
|
||||
}
|
||||
.syllabus_info_tishi a{
|
||||
color:#3b94d6;
|
||||
}
|
||||
|
||||
/*课程大纲-课程列表*/
|
||||
.icon_course{ background: url(../images/syllabus/icons_syllabus.png) 0 -35px no-repeat; width:18px; height:15px; display:block;}
|
||||
.icons_sy_open{background: url(../images/syllabus/icons_syllabus.png) 0 -53px no-repeat; width:20px; height:23px; display:block; cursor:pointer; }
|
||||
.icons_sy_close{background: url(../images/syllabus/icons_syllabus.png) -26px -53px no-repeat; width:20px; height:23px; display:block; }
|
||||
.syllabus_courses_box {position:relative;}
|
||||
.icons_sy_setting{background: url(../images/syllabus/icons_syllabus.png) -51px -33px no-repeat; width:20px; height:20px; display:block; position:absolute; right:10px; top:10px; }
|
||||
.icons_sy_setting:hover{background: url(../images/syllabus/icons_syllabus.png) -25px -33px no-repeat; }
|
||||
.icons_sy_cir{background: url(../images/syllabus/icons_syllabus.png) 0px -82px no-repeat; width:15px; height:15px; display:block; position:absolute; left:-8px; top:25px;}
|
||||
.icons_sy_arrow{background: url(../images/syllabus/icons_syllabus.png) -31px -81px no-repeat; width:20px; height:20px; display:block; }
|
||||
.syllabus_h2_top{ font-size:18px; color:#333; font-weight:normal; padding:10px 15px;border-bottom:1px solid #e7e7e7; }
|
||||
.syllabus_category{ padding:10px 15px; background-color:#f6f6f6; border-bottom:1px solid #e7e7e7;}
|
||||
.syllabus_box{ width:750px; border:1px solid #e7e7e7; background-color:#fff;}
|
||||
.syllabus_courses_list{ padding:15px; border-bottom:1px solid #e7e7e7; cursor:pointer;}
|
||||
.syllabus_courses_list:hover{ background:#f6fafd;}
|
||||
.syllabus_courses_title{ font-size:16px; color:#333; width:650px; font-weight:normal;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
||||
.sy_p_grey{ margin-left:25px; color:#888; margin-top:5px; font-size:12px;}
|
||||
.syllabus_class_box{ padding-left:30px; background:#f6f6f6;}
|
||||
.syllabus_class_list{ padding:12px 0 12px 15px; height:44px;border-left:1px solid #e7e7e7;border-bottom:1px solid #e7e7e7; position:relative;}
|
||||
.syllabus_class_list:hover{ background:#ececec;}
|
||||
.syllabus_class_list_more{padding:8px; text-align:center;border-left:1px solid #e7e7e7;border-bottom:1px solid #e7e7e7;}
|
||||
.syllabus_class_list_more:hover{ background:#ececec;}
|
||||
.syllabus_class_list_more a{ color:#ff7e00;}
|
||||
.syllabus_class_title{ font-size:14px; color:#333; width:500px; margin-bottom:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
||||
.syllabus_class_w{ width:650px;}
|
||||
.dis {display:block;}
|
||||
.undis {display:none;}
|
||||
|
||||
/*班级列表界面(用的博客列表的样式)*/
|
||||
.listbox{ width:730px; background-color:#fff; border:1px solid #ddd; padding:10px; }
|
||||
.bloglistbox{ min-height:690px;}
|
||||
.list-h2{ font-size:16px; font-weight:bold; color:#000; padding-bottom:5px;}
|
||||
.category2{ }
|
||||
.list_title{padding:10px 0; border-bottom:1px solid #ddd;}
|
||||
.category2 a,.category2 span{ float:left; margin-right:5px;}
|
||||
.grayTxt{ color:#9093a6;}
|
||||
.sortTxt{ color:#000;}
|
||||
.sortTxt:hover{ color:#28be6c;}
|
||||
a.sortupbtn{ background: url(../images/syllabus/icons_syllabus.png) 0 3px no-repeat; width:12px; height:17px; display:block; margin-right:10px; cursor:pointer;}
|
||||
a.sortdownbtn{ background: url(../images/syllabus/icons_syllabus.png) 0 -12px no-repeat; width:12px; height:17px; display:block;cursor:pointer; }
|
||||
a.sort_no{ background: url(../images/syllabus/icons_syllabus.png) -16px -12px no-repeat; width:12px; height:17px; display:block;cursor:pointer; }
|
||||
.item_list{ display:block; width:5px; height:5px;-webkit-border-radius: 25px;border-radius:25px; background-color:#adadad; margin:10px 10px 0 0;}
|
||||
a.list-title{ font-size:14px; font-weight: bold; color:#000;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; width:708px;}
|
||||
a:hover.list-title{ color:#269ac9;}
|
||||
.c_red{ font-weight:normal; font-size:12px;}
|
||||
.list-file{ padding:10px 0; border-bottom:1px dashed #ddd;}
|
||||
.list-file li{ line-height:1.9;}
|
||||
.list-info span{ margin-left:5px;}
|
||||
.pages a{ display:block; border:1px solid #d1d1d1; color:#888; float:left; width:30px; text-align:center; padding:3px 0; line-height:1.9; margin-right:5px; }
|
||||
.pages a:hover{ background-color:#3b94d6; border:1px solid #3b94d6; color:#fff;}
|
||||
a.pages-big{ width:50px;}
|
||||
.pages .active{ background-color:#3b94d6; border:1px solid #3b94d6; color:#fff;}
|
||||
.pages{width:330px; margin:20px auto 10px;}
|
||||
a.course-title{ font-size:14px; font-weight: bold; color:#000;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; width:590px;}
|
||||
a:hover.course-title{ color:#269ac9;}
|
||||
|
||||
/*新建页面*/
|
||||
.name_input{ border:1px solid #64bdd9; height:16px; width:310px; background:#fff; margin-bottom:10px; padding:5px;}
|
Loading…
Reference in New Issue