changes in lva und beispiele

change
This commit is contained in:
Andreas Stephanides
2014-01-22 12:33:07 +01:00
parent 723182c69f
commit 783b9f41c9
12 changed files with 265 additions and 23 deletions

View File

@@ -38,7 +38,7 @@ class Lva < ActiveRecord::Base
ERLAUBTE_TYPEN = ['VO', 'UE', 'VU', 'LU', 'SE', 'andere'];
has_paper_trail # Versionsverfolgung
attr_accessible :desc, :ects, :lvanr, :name, :stunden, :modul_ids, :semester_ids, :pruefungsinformation, :lernaufwand, :typ, :lecturer_ids
has_and_belongs_to_many :modul # Gehört zu einem Modul
has_and_belongs_to_many :modul,:uniq=>true # Gehört zu einem Modul
has_and_belongs_to_many :semester
#Gehört zu einem Semester( derzeit nicht implementiert)
has_many :beispiele , :class_name => "Beispiel"
@@ -89,7 +89,8 @@ class Lva < ActiveRecord::Base
self.name=hash["course"]["title"][I18n.locale.to_s]
self.pruefungsinformation= hash["course"]["examinationModalities"][I18n.locale.to_s]
self.desc= hash["course"]["objective"][I18n.locale.to_s]+hash["course"]["teachingContent"][I18n.locale.to_s]
self.typ=hash["course"]["courseType"]
self.stunden=hash["course"]["weeklyHours"]
end