请选择发送的课程选择

This commit is contained in:
sw 2015-09-02 10:13:41 +08:00
parent 59b42e2b33
commit b0060fc03b
2 changed files with 4 additions and 5 deletions

View File

@ -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+""

View File

@ -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">