请选择发送的课程选择
This commit is contained in:
parent
59b42e2b33
commit
b0060fc03b
|
@ -544,6 +544,10 @@ module UsersHelper
|
|||
#获取指定用户作为老师的课程
|
||||
def get_as_teacher_courses user
|
||||
type = []
|
||||
option = []
|
||||
option << "请选择发布作业的课程"
|
||||
option << -1
|
||||
type << option
|
||||
user.courses.select{|c| user.allowed_to?(:as_teacher,c)}.each do |course|
|
||||
option = []
|
||||
option << course.name+"("+course.time.to_s+course.term+")"
|
||||
|
|
|
@ -74,11 +74,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<script type="text/javascript">
|
||||
$(function (){
|
||||
$("#course_id").append("<option value='-1' id='option_select' hidden selected>请选择发布作业的课程</option>");
|
||||
});
|
||||
</script>
|
||||
|
||||
<script id="t:test-answer-list" type="text/html">
|
||||
<div class="mt10">
|
||||
|
|
Loading…
Reference in New Issue