Oups, add a lot of missing files
This commit is contained in:
parent
d234d83df8
commit
061e73722f
21 changed files with 937 additions and 2 deletions
31
modules/qcm/Course.py
Normal file
31
modules/qcm/Course.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# coding=utf-8
|
||||
|
||||
COURSES = None
|
||||
|
||||
class Course:
|
||||
def __init__(self, iden):
|
||||
global COURSES
|
||||
if iden in COURSES.index:
|
||||
self.node = COURSES.index[iden]
|
||||
else:
|
||||
self.node = { "code":"N/A", "name":"N/A", "branch":"N/A" }
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
return self.node["xml:id"]
|
||||
|
||||
@property
|
||||
def code(self):
|
||||
return self.node["code"]
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return self.node["name"]
|
||||
|
||||
@property
|
||||
def branch(self):
|
||||
return self.node["branch"]
|
||||
|
||||
@property
|
||||
def validated(self):
|
||||
return int(self.node["validated"]) > 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue