source: WAeUP_SRP/trunk/skins/waeup_academics/getCourseInfo.py @ 17977

Last change on this file since 17977 was 1380, checked in by joachim, 18 years ago

course registration

M waeup_student/student_index.py
M waeup_student/study_level_view.pt
M waeup_student/getStudyLevelInfo.py
M waeup_student/study_course_view.pt
M waeup_student/getStudyCourseInfo.py
AM waeup_academics/getCourseInfo.py

reindex entry_mode

M waeup_utilities/getFromData_entry_mode.py
M waeup_utilities/reindex_entry_mode.py

  • Property svn:keywords set to Id
File size: 516 bytes
Line 
1## Script (Python) "getCourseInfo"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=code
8##title=
9##
10# $Id: getCourseInfo.py 1380 2007-01-31 16:24:18Z joachim $
11"""
12return course-data from courses_catalog
13"""
14cat = context.courses_catalog
15d = {}
16res = cat(code=code)
17if res:
18    course = res[0]
19    for field in cat.schema():
20        d[field] = getattr(course,field)
21else:
22    for field in cat.schema():
23        d[field] = "-"
24    d['title'] = "unknown"
25    d['code'] = code
26return d
Note: See TracBrowser for help on using the repository browser.