普通和分组作业增加子目录

PCqiandao
cxt 5 years ago
parent 74979f72fc
commit 81cb771bcd

@ -1297,7 +1297,7 @@ class CoursesController < ApplicationController
@is_teacher = @user_course_identity < Course::ASSISTANT_PROFESSOR
@course_modules = @course.course_modules.where(hidden: 0)
@hidden_modules = @course.course_modules.where(hidden: 1)
@second_category_type = ["shixun_homework", "graduation", "attachment", "board", "course_group", "video"]
@second_category_type = ["shixun_homework", "graduation", "attachment", "board", "course_group", "video", "common_homework", "group_homework"]
end
def board_list

@ -89,6 +89,10 @@ module CoursesHelper
case category.category_type
when "shixun_homework"
"/classrooms/#{course.id}/shixun_homework/#{category.id}"
when "common_homework"
"/classrooms/#{course.id}/common_homework/#{category.id}"
when "group_homework"
"/classrooms/#{course.id}/group_homework/#{category.id}"
when "graduation"
if category.name == "毕设选题"
"/classrooms/#{course.id}/graduation_topics/#{category.course_module_id}"
@ -107,6 +111,10 @@ module CoursesHelper
case category.category_type
when "shixun_homework"
get_homework_commons_count(course, 4, category.id)
when "common_homework"
get_homework_commons_count(course, 1, category.id)
when "group_homework"
get_homework_commons_count(course, 3, category.id)
when "graduation"
if category.name == "毕设选题"
course.graduation_topics_count

Loading…
Cancel
Save