Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
ec8053b248
|
@ -6,6 +6,7 @@
|
|||
/config/database.yml
|
||||
/config/configuration.yml
|
||||
/config/additional_environment.rb
|
||||
/config/oneapm.yml
|
||||
|
||||
|
||||
/files/*
|
||||
|
|
|
@ -2156,11 +2156,9 @@ class UsersController < ApplicationController
|
|||
@user = User.current
|
||||
if !params[:search].nil?
|
||||
search = "%#{params[:search].to_s.strip.downcase}%"
|
||||
@course = @user.courses.where(" #{Course.table_name}.id = #{params[:search].to_i } or #{Course.table_name}.name like :p",:p=>search)
|
||||
.select { |course| @user.allowed_to?(:as_teacher,course) and course.is_delete == 0 }
|
||||
@course = @user.courses.not_deleted.where(" #{Course.table_name}.id = #{params[:search].to_i } or #{Course.table_name}.name like :p",:p=>search)
|
||||
else
|
||||
@course = @user.courses
|
||||
.select { |course| @user.allowed_to?(:as_teacher,course) and course.is_delete == 0 }
|
||||
@course = @user.courses.not_deleted
|
||||
end
|
||||
@search = params[:search]
|
||||
@type = params[:type]
|
||||
|
@ -2178,7 +2176,7 @@ class UsersController < ApplicationController
|
|||
@user = User.current
|
||||
if !params[:search].nil?
|
||||
search = "%#{params[:search].to_s.strip.downcase}%"
|
||||
@projects = @user.projects.where(" #{Project.table_name}.id = #{params[:search].to_i } or #{Project.table_name}.name like :p",:p=>search)
|
||||
@projects = @user.projects.visible.where(" #{Project.table_name}.id = #{params[:search].to_i } or #{Project.table_name}.name like :p",:p=>search)
|
||||
else
|
||||
@projects = @user.projects.visible
|
||||
end
|
||||
|
|
|
@ -89,7 +89,7 @@ class AtMessage < ActiveRecord::Base
|
|||
status = -1
|
||||
end
|
||||
when 'JournalsForMessage'
|
||||
if at_message.jour && at_message.jour.course
|
||||
if at_message.jour && defined? at_message.jour.course
|
||||
#作业回复
|
||||
shield_type = "Course"
|
||||
container_id = at_message.jour.course.id
|
||||
|
@ -99,7 +99,7 @@ class AtMessage < ActiveRecord::Base
|
|||
else
|
||||
type = "journal_for_message"
|
||||
detail_id = topic.id
|
||||
detail_title = at_message.subject
|
||||
detail_title = at_message.notes
|
||||
end
|
||||
else
|
||||
status = -1
|
||||
|
|
|
@ -17,12 +17,13 @@
|
|||
<div class="cl"></div>
|
||||
<li class="ml45">
|
||||
<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" placeholder="例如:软件工程计算机系A班" onkeyup="regex_course_name('new');">
|
||||
<input type="text" name="course[name]" id="new_course_name" class="courses_input" maxlength="100" placeholder="例如:计算机系2016秋季A班" onkeyup="regex_course_name('new');">
|
||||
<span class="c_red" id="new_course_name_notice" style="display: none;">班级名称不能为空且至少有两个字符</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml125 mb5 fontGrey3"><span class="success-icon mr25">正确示例:计算机系2016秋季A班</span></li>
|
||||
<li class="ml125 mb10 fontGrey3"><span class="error-icon">错误示例:软件工程 - 计算机系2016秋季A班</span></li>
|
||||
<li class="ml125 mt10 mb10 fontGrey2" style="max-width: 544px;">班级是一个由教师、助教(教辅)和学生组成的临时的教学群体,在规定的时间内(如一个学期)完成一门课程规定的教学任务。本质上,一门课程就是一个教学计划。</li>
|
||||
<li class="ml45">
|
||||
<label><span class="c_red">*</span> <%= l(:label_class_period)%> :</label>
|
||||
<input type="text" name="class_period" id="new_class_period" class="hwork_input02" onkeyup="regex_course_class_period('new');" placeholder="例如:54" maxlength="6">
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
<% if type == 'Message' %>
|
||||
<% topic = comment.root %>
|
||||
<% if !topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
|
@ -33,6 +35,7 @@
|
|||
:title => l(:button_reply)) %>
|
||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<% end %>
|
||||
<% if comment.course_destroyable_by?(User.current) || comment.destroyable_by?(User.current) %>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
|
|
Loading…
Reference in New Issue