Add course code.
This commit is contained in:
parent
004926ce87
commit
1d3bf5d9c9
|
@ -33,6 +33,7 @@ class PersonalCoursesController < ApplicationController
|
||||||
fields_to_show = [
|
fields_to_show = [
|
||||||
"year",
|
"year",
|
||||||
"course_category",
|
"course_category",
|
||||||
|
"course_code",
|
||||||
"title",
|
"title",
|
||||||
"objective",
|
"objective",
|
||||||
"course_semester",
|
"course_semester",
|
||||||
|
|
|
@ -9,6 +9,7 @@ class Course
|
||||||
field :objective, localize: true
|
field :objective, localize: true
|
||||||
field :year, type: Integer
|
field :year, type: Integer
|
||||||
field :student_ids, type: Array, default: []
|
field :student_ids, type: Array, default: []
|
||||||
|
field :course_code, type: String, default: ""
|
||||||
has_many :course_syllabus_files, :dependent => :destroy, :autosave => true
|
has_many :course_syllabus_files, :dependent => :destroy, :autosave => true
|
||||||
has_many :course_progress_files, :dependent => :destroy, :autosave => true
|
has_many :course_progress_files, :dependent => :destroy, :autosave => true
|
||||||
has_many :course_activity_files, :dependent => :destroy, :autosave => true
|
has_many :course_activity_files, :dependent => :destroy, :autosave => true
|
||||||
|
@ -65,6 +66,7 @@ class Course
|
||||||
|
|
||||||
fields_to_show = [
|
fields_to_show = [
|
||||||
"course_category",
|
"course_category",
|
||||||
|
"course_code",
|
||||||
"title",
|
"title",
|
||||||
"year",
|
"year",
|
||||||
]
|
]
|
||||||
|
|
|
@ -40,7 +40,13 @@
|
||||||
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
||||||
|
|
||||||
<div class="<%= locale %> tab-pane fade <%= ( i == 0 ) ? "in active" : '' %>">
|
<div class="<%= locale %> tab-pane fade <%= ( i == 0 ) ? "in active" : '' %>">
|
||||||
|
<!-- course code -->
|
||||||
|
<div class="control-group input-title">
|
||||||
|
<label class="control-label muted"><%= t("personal_course.course_code") %></label>
|
||||||
|
<div class="controls">
|
||||||
|
<%= f.text_field :course_code, class: "input-block-level", placeholder: t("personal_course.course_code"), value: (@course.course_code rescue nil) %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- course title-->
|
<!-- course title-->
|
||||||
<div class="control-group input-title">
|
<div class="control-group input-title">
|
||||||
<label class="control-label muted"><%= t("personal_course.title") %></label>
|
<label class="control-label muted"><%= t("personal_course.title") %></label>
|
||||||
|
|
|
@ -5,6 +5,7 @@ en:
|
||||||
courses: Courses
|
courses: Courses
|
||||||
course: Course
|
course: Course
|
||||||
personal_course:
|
personal_course:
|
||||||
|
course_code: Course Code
|
||||||
already_deliver: Already deliver
|
already_deliver: Already deliver
|
||||||
assignment_management: Assignments management
|
assignment_management: Assignments management
|
||||||
assign_date_hint: Student can only see this assignment after assign date.
|
assign_date_hint: Student can only see this assignment after assign date.
|
||||||
|
|
|
@ -5,6 +5,7 @@ zh_tw:
|
||||||
courses: 教學資料
|
courses: 教學資料
|
||||||
course: 教學資料
|
course: 教學資料
|
||||||
personal_course:
|
personal_course:
|
||||||
|
course_code: 課程代碼
|
||||||
already_deliver: 已繳交
|
already_deliver: 已繳交
|
||||||
assignment_management: 作業管理
|
assignment_management: 作業管理
|
||||||
assign_date_hint: 學生使用介面將在指派日期才會出現此筆作業。
|
assign_date_hint: 學生使用介面將在指派日期才會出現此筆作業。
|
||||||
|
|
Loading…
Reference in New Issue