Changeset 369 for WAeUP_SRP


Ignore:
Timestamp:
14 Aug 2006, 07:23:44 (18 years ago)
Author:
joachim
Message:

added fields bank_code and degree_grade, fixed import.

M profiles/default/schemas/faculty.xml
M profiles/default/layouts/faculty.xml
M Academics.py

Location:
WAeUP_SRP/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Academics.py

    r368 r369  
    7373                f = getattr(self,fid)
    7474                d = {'Title': faculty['Description']}
    75                 f.getContent().edit(mapping=d)
    7675            else:
    77                 if not no_import:
    78                     no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
    79                     no_import.write('"Session","FacultyCode","Description","CollegeCode","FacultyKey","Status","degree_grade","Bankcode"\n')
    80                 logger.info('Faculty with ID %(FacultyCode)s %(Description)s already exists' % faculty)
    81                 no_import.write('"%(Session)s","%(FacultyCode)s","%(Description)s","%(CollegeCode)s","%(FacultyKey)s","%(Status)s","%(degree_grade)s","%(Bankcode)s"\n' % faculty)
     76                d = {}
     77##                if not no_import:
     78##                    no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
     79##                    no_import.write('"Session","FacultyCode","Description","CollegeCode","FacultyKey","Status","degree_grade","Bankcode"\n')
     80##                logger.info('Faculty with ID %(FacultyCode)s %(Description)s already exists' % faculty)
     81##                no_import.write('"%(Session)s","%(FacultyCode)s","%(Description)s","%(CollegeCode)s","%(FacultyKey)s","%(Status)s","%(degree_grade)s","%(Bankcode)s"\n' % faculty)
     82            d['bank_code'] = faculty.get("Bankcode")
     83            d["degree_grade"] = faculty.get("degree_grade")
     84            f.getContent().edit(mapping=d)
    8285        return self.academics.academics_contents()
    8386    ###)
  • WAeUP_SRP/trunk/profiles/default/layouts/faculty.xml

    r290 r369  
    2828  <property name="size_max">200</property>
    2929 </widget>
     30 <widget name="bank_code" meta_type="String Widget">
     31  <property name="title">Bank Code</property>
     32  <property name="fields">
     33   <element value="bank_code"/>
     34  </property>
     35  <property name="label">Bank Code</property>
     36  <property name="label_edit">Bank Code</property>
     37  <property name="readonly_layout_modes"/>
     38  <property name="hidden_layout_modes"/>
     39  <property name="hidden_readonly_layout_modes"/>
     40 </widget>
     41 <widget name="degree_grade" meta_type="String Widget">
     42  <property name="title">Degree Grade</property>
     43  <property name="fields">
     44   <element value="degree_grade"/>
     45  </property>
     46  <property name="label">Degree Grade</property>
     47  <property name="label_edit">Degree Grade</property>
     48  <property name="readonly_layout_modes"/>
     49  <property name="hidden_layout_modes"/>
     50  <property name="hidden_readonly_layout_modes"/>
     51 </widget>
    3052 <widget name="institution_type" meta_type="Select Widget">
    3153  <property name="title">Type of Institution</property>
     
    5072   <cell name="Description"/>
    5173  </row>
     74  <row>
     75   <cell name="bank_code"/>
     76  </row>
     77  <row>
     78   <cell name="degree_grade"/>
     79  </row>
    5280 </table>
    5381</object>
  • WAeUP_SRP/trunk/profiles/default/schemas/faculty.xml

    r290 r369  
    11<?xml version="1.0"?>
    22<object name="faculty" meta_type="CPS Schema">
     3 <field name="bank_code" meta_type="CPS String Field"/>
     4 <field name="degree_grade" meta_type="CPS String Field"/>
    35 <field name="institution_type" meta_type="CPS String Field"/>
    46</object>
Note: See TracChangeset for help on using the changeset viewer.