source: main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studylevelpage.pt @ 7665

Last change on this file since 7665 was 7665, checked in by Henrik Bettermann, 13 years ago

Rename attribute core_or_elective to mandatory.

The following commands in debug mode will fix existing databases:

from zope.component import getUtility
from zope.catalog.interfaces import ICatalog
from zope.intid.interfaces import IIntIds
import transaction
sm = rootfutminna?.getSiteManager()
cat = sm.getUtility(ICatalog, name='certcourses_catalog')
cat.values()[0].documentCount()
results = cat.apply({'course_code':(None,None)})
uidutil = getUtility(IIntIds, context=cat)
for r in results:

... o = uidutil.getObject(r)
... o.mandatory = o.core_or_elective
...

cat = sm.getUtility(ICatalog, name='coursetickets_catalog')
cat.values()[0].documentCount()
results = cat.apply({'code':(None,None)})
uidutil = getUtility(IIntIds, context=cat)
for r in results:

... o = uidutil.getObject(r)
... o.mandatory = o.core_or_elective
...

transaction.commit()

File size: 1.6 KB
Line 
1<table class="form-table">
2<thead>
3</thead>
4<tbody>
5  <tal:block repeat="widget view/widgets">
6    <tr>
7      <td class="fieldname">
8        <span i18n:translate="" tal:content="widget/label">label</span>:
9      </td>
10      <td tal:on-error="default">
11        <div class="widget" tal:content="structure widget">
12          <input type="text" />
13        </div>
14      </td>
15    </tr>
16  </tal:block>
17  <tr>
18    <td>
19      Total Credits:
20    </td>
21    <td>
22      <span tal:replace="view/total_credits">TOTAL</span>
23    </td>
24  </tr>
25</tbody>
26</table>
27
28<h3>Course Tickets</h3>
29
30<table class="display dataTable">
31  <thead>
32    <tr>
33      <th>Sem.</th>
34      <th>Code</th>
35      <th>Title</th>
36      <th>Dept.</th>
37      <th>Fact.</th>
38      <th>Cred.</th>
39      <th>Mand.</th>
40      <th>Score</th>
41      <th>CO</th>
42      <th>Auto</th>
43    </tr>
44  </thead>
45  <tbody>
46    <tr tal:repeat="value context/values" class="gradeC">
47      <td tal:content="value/semester">SEMESTER</td>
48      <td> <a tal:attributes="href value/__name__">
49      <span tal:content="value/code">CODE</span>
50      </a></td>
51      <td tal:content="value/title">TITLE</td>
52      <td tal:content="value/dcode">DEPARTMENT</td>
53      <td tal:content="value/fcode">FACULTY</td>
54      <td tal:content="value/credits">CREDITS</td>
55      <td tal:content="value/mandatory">MANDATORY</td>
56      <td tal:content="value/score">SCORE</td>
57      <td tal:content="value/carry_over">CO</td>
58      <td tal:content="value/automatic">AUTO</td>
59    </tr>
60  </tbody>
61</table>
62
63
64<div tal:condition="python: not len(context.keys())">
65There no tickets added yet.
66</div>
Note: See TracBrowser for help on using the repository browser.