Changeset 1404 for WAeUP_SRP


Ignore:
Timestamp:
10 Feb 2007, 17:02:32 (18 years ago)
Author:
joachim
Message:

fix makeStudentData in WAeUPTool

Location:
WAeUP_SRP/trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTool.py

    r1401 r1404  
    177177    def makeStudentData(self,student_id,email=None,phone_nr=None):
    178178        "create Datastructure for a returning Student"
    179         #import pdb;pdb.set_trace()
     179        import pdb;pdb.set_trace()
    180180        logger = logging.getLogger('Student.CreateData')
    181181        students_folder = self.portal_url.getPortalObject().campus.students
     
    206206            em = 'Certificate %s org-code %s not found\n' % (certcode, certcode_org)
    207207            logger.info(em)
    208         validlevel = False
    209         try:
    210             il = int(level) + 100
    211             level = "%s" % il
    212             validlevel = True
    213         except:
    214             em = '"%(matric_no)s","invalid Level","%(Level)s"' % student
    215             logger.info(em)
    216         if not validlevel:
    217             erg = self.results_import(matric_no = student.matric_no)
    218             level = 'xxx'
    219             if erg:
    220                 level = erg[0].Level
    221             try:
    222                 il = int(level) + 100
    223                 level = "%s" % il
    224                 em = '"%s","fixed Level from results_import","%s"' % (student.matric_no,erg[0].Level)
    225                 logger.info(em)
    226                 validlevel = True
    227             except:
    228                 em = '"%s","invalid Level in results_import","%s"' % (student.matric_no,erg[0].Level)
    229                 logger.info(em)
     208##        validlevel = False
     209##        try:
     210##            il = int(level) + 100
     211##            level = "%s" % il
     212##            validlevel = True
     213##        except:
     214##            em = '"%(matric_no)s","invalid Level","%(Level)s"' % student
     215##            logger.info(em)
     216##        if not validlevel:
     217##            erg = self.results_import(matric_no = student.matric_no)
     218##            level = 'xxx'
     219##            if erg:
     220##                level = erg[0].Level
     221##            try:
     222##                il = int(level) + 100
     223##                level = "%s" % il
     224##                em = '"%s","fixed Level from results_import","%s"' % (student.matric_no,erg[0].Level)
     225##                logger.info(em)
     226##                validlevel = True
     227##            except:
     228##                em = '"%s","invalid Level in results_import","%s"' % (student.matric_no,erg[0].Level)
     229##                logger.info(em)
    230230        matric_no = student.matric_no
    231231        sid = student_id
  • WAeUP_SRP/trunk/profiles/default/layouts/certificate.xml

    r1158 r1404  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="certificate" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/certificate_course.xml

    r556 r1404  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="certificate_course" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/department.xml

    r853 r1404  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="department" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/faculty.xml

    r853 r1404  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="faculty" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_study_course.xml

    r1403 r1404  
    4646 <table>
    4747  <row>
    48    <cell name="study_course"/>
    49   </row>
    50   <row>
    5148   <cell name="current_verdict"/>
    5249  </row>
  • WAeUP_SRP/trunk/profiles/default/schemas/schema.xsl

    r1403 r1404  
    2222            <xsl:sort select="@name"
    2323                      order="ascending" />
    24             <tr>
     24            <xsl:variable name="color">
     25              <xsl:choose>
     26                <xsl:when test="position() mod 2 = 0">
     27                  <xsl:text>#ffffff</xsl:text>
     28                </xsl:when>
     29                <xsl:otherwise>
     30                  <xsl:text>#eeeeee</xsl:text>
     31                </xsl:otherwise>
     32              </xsl:choose>
     33            </xsl:variable>
     34            <tr style="background-color:{$color}">
    2535              <td colspan="">
    2636                <xsl:value-of select="@name"/>
  • WAeUP_SRP/trunk/profiles/default/types/CertificateCourse.xml

    r873 r1404  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="CertificateCourse" meta_type="CPS Flexible Type Information"
    34   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
  • WAeUP_SRP/trunk/profiles/default/types/Course.xml

    r873 r1404  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="Course" meta_type="CPS Flexible Type Information"
    34   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
  • WAeUP_SRP/trunk/profiles/default/types/Department.xml

    r873 r1404  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="Department" meta_type="CPS Flexible Type Information"
    34   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
  • WAeUP_SRP/trunk/profiles/default/types/Faculty.xml

    r873 r1404  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="Faculty" meta_type="CPS Flexible Type Information"
    34   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
  • WAeUP_SRP/trunk/profiles/default/types/types.xsl

    r1403 r1404  
    1010          </xsl:for-each>
    1111        </title>
     12        <link rel="stylesheet" type="text/css" media="all"
     13              href="../xsl.css" />     
    1214      </head>
    1315      <body>
     
    2022        <table>
    2123          <xsl:for-each select="object/property">
    22             <tr>
     24            <xsl:variable name="color">
     25              <xsl:choose>
     26                <xsl:when test="position() mod 2 = 0">
     27                  <xsl:text>#ffffff</xsl:text>
     28                </xsl:when>
     29                <xsl:otherwise>
     30                  <xsl:text>#eeeeee</xsl:text>
     31                </xsl:otherwise>
     32              </xsl:choose>
     33            </xsl:variable>
     34            <tr style="background-color:{$color}">
    2335              <td colspan="">
    24                 <xsl:value-of select="@name"/>  : <xsl:value-of select="text()"/>
     36                <xsl:value-of select="@name"/>
    2537              </td>
    26               <xsl:for-each select="element">
    27                 <td>
    28                   <xsl:value-of select="@value"/>
    29                 </td>
    30               </xsl:for-each>
     38              <td colspan="">
     39                <xsl:value-of select="text()"/>
     40              </td>
     41              <td>
     42                <xsl:for-each select="element">
     43                  <xsl:value-of select="@value"/><br />
     44                </xsl:for-each>
     45              </td>
    3146            </tr>
    3247          </xsl:for-each>
     
    3449        <h1>Alias</h1>
    3550        <table>
     51          <th>From</th><th>To</th>
    3652          <xsl:for-each select="object/alias">
    37             <tr>
     53            <xsl:variable name="color">
     54              <xsl:choose>
     55                <xsl:when test="position() mod 2 = 0">
     56                  <xsl:text>#ffffff</xsl:text>
     57                </xsl:when>
     58                <xsl:otherwise>
     59                  <xsl:text>#eeeeee</xsl:text>
     60                </xsl:otherwise>
     61              </xsl:choose>
     62            </xsl:variable>
     63            <tr style="background-color:{$color}">
    3864              <td colspan="">
    39                 <xsl:value-of select="@from"/>  : <xsl:value-of select="@to"/>
     65                <xsl:value-of select="@from"/>
     66              </td>
     67              <td colspan="">
     68                <xsl:value-of select="@to"/>
    4069              </td>
    4170            </tr>
     
    5483            <xsl:sort select="@action_id"
    5584                      order="ascending" />
    56             <tr>
     85            <xsl:variable name="color">
     86              <xsl:choose>
     87                <xsl:when test="position() mod 2 = 0">
     88                  <xsl:text>#ffffff</xsl:text>
     89                </xsl:when>
     90                <xsl:otherwise>
     91                  <xsl:text>#eeeeee</xsl:text>
     92                </xsl:otherwise>
     93              </xsl:choose>
     94            </xsl:variable>
     95            <tr style="background-color:{$color}">
    5796              <td>
    5897                <xsl:value-of select="@action_id"/>
     
    6099              <td>
    61100                <xsl:value-of select="@title"/>
    62               </td>
    63               <td>
    64                   <xsl:value-of select=""/>
    65101              </td>
    66102              <td>
     
    76112              </xsl:for-each>
    77113            </tr>
     114            <tr style="background-color:{$color}">
     115              <th>url_expression</th>
     116              <td colspan="4">
     117                <xsl:value-of select="@url_expr"/>
     118              </td>
     119            </tr>
     120            <tr style="background-color:{$color}">
     121              <th>condition_expression</th>
     122              <td colspan="4">
     123                <xsl:value-of select="@condition_expr"/>
     124              </td>
     125            </tr>
    78126          </xsl:for-each>
    79127        </table>
  • WAeUP_SRP/trunk/skins/waeup_default/layout_waeup_lib.pt

    r1296 r1404  
    4141                 >
    4242              <tal:block condition="widget/label">
    43               <td width="220px" valign="top" nowrap>
     43              <td width="180px" valign="top" nowrap>
    4444                <span i18n:translate="" tal:condition="widget/is_i18n">
    4545                    <span tal:content="widget/label" />:</span>
  • WAeUP_SRP/trunk/skins/waeup_student/study_course_view.pt

    r1403 r1404  
    2020    </metal:block>
    2121    <metal:main fill-slot="main">
    22       <span tal:omit-tag="" tal:condition="nothing"
     22      <span tal:omit-tag="" tal:condition="python:1"
    2323            tal:content="structure python: info['doc'].render(layout_mode='view')" />
    2424      <table tal:define="sc python: info['course_doc']">
Note: See TracChangeset for help on using the changeset viewer.