Last change
on this file since 7705 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.4 KB
|
Line | |
---|
1 | <form action="." tal:attributes="action request/URL" method="POST"
|
---|
2 | enctype="multipart/form-data">
|
---|
3 |
|
---|
4 | <h3>Course Tickets (Total Credits: <span tal:replace="view/total_credits">TOTAL</span>)</h3>
|
---|
5 | <table class="display dataTableManage">
|
---|
6 | <thead>
|
---|
7 | <tr>
|
---|
8 | <th> </th>
|
---|
9 | <th>Sem.</th>
|
---|
10 | <th>Code</th>
|
---|
11 | <th>Title</th>
|
---|
12 | <th>Department</th>
|
---|
13 | <th>Faculty</th>
|
---|
14 | <th>Credits</th>
|
---|
15 | <th>Score</th>
|
---|
16 | <th>CO</th>
|
---|
17 | </tr>
|
---|
18 | </thead>
|
---|
19 | <tbody>
|
---|
20 | <tr tal:repeat="value context/values" class="gradeC">
|
---|
21 | <td>
|
---|
22 | <input type="checkbox" name="val_id"
|
---|
23 | tal:attributes="value value/__name__"
|
---|
24 | tal:condition="not: value/mandatory" />
|
---|
25 | </td>
|
---|
26 | <td tal:content="value/semester">SEMESTER</td>
|
---|
27 | <td> <a tal:attributes="href value/__name__">
|
---|
28 | <span tal:content="value/code">CODE</span>
|
---|
29 | </a></td>
|
---|
30 | <td tal:content="value/title">TITLE</td>
|
---|
31 | <td tal:content="value/dcode">DEPARTMENT</td>
|
---|
32 | <td tal:content="value/fcode">FACULTY</td>
|
---|
33 | <td tal:content="value/credits">CREDITS</td>
|
---|
34 | <td tal:content="value/score">SCORE</td>
|
---|
35 | <td tal:content="value/carry_over">CO</td>
|
---|
36 | </tr>
|
---|
37 | </tbody>
|
---|
38 | </table>
|
---|
39 |
|
---|
40 | <div tal:condition="view/availableActions">
|
---|
41 | <span tal:repeat="action view/actions"
|
---|
42 | tal:omit-tag="">
|
---|
43 | <input tal:replace="structure action/render"/>
|
---|
44 | </span>
|
---|
45 | </div>
|
---|
46 |
|
---|
47 | </form>
|
---|
48 |
|
---|
49 |
|
---|
50 |
|
---|
Note: See
TracBrowser for help on using the repository browser.