Changeset 3438
- Timestamp:
- 16 Apr 2008, 07:04:19 (17 years ago)
- Location:
- WAeUP_SRP
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/Academics.py
r3379 r3438 633 633 heading += '"category","study_mode","end_level","m_prefix","max_elect","max_pass",' 634 634 heading += '"n_core","nr_years","original_code","probation_credits",' 635 heading += '"promotion_credits","start_level","admin_status" '635 heading += '"promotion_credits","start_level","admin_status","application_category"' 636 636 dataline = '"%(code)s","%(review_state)s","%(title)s","%(faculty_code)s","%(department_code)s",' 637 637 dataline += '"%(category)s","%(study_mode)s","%(end_level)s","%(m_prefix)s","%(max_elect)s","%(max_pass)s",' 638 638 dataline += '"%(n_core)s","%(nr_years)s","%(original_code)s","%(probation_credits)s",' 639 dataline += '"%(promotion_credits)s","%(start_level)s","%(admin_status)s" '639 dataline += '"%(promotion_credits)s","%(start_level)s","%(admin_status)s","%(application_category)s"' 640 640 export.append(heading) 641 641 #import pdb;pdb.set_trace() … … 664 664 di['promotion_credits'] = getattr(certificate_d,'promotion_credits',None) 665 665 di['start_level'] = getattr(certificate_d,'start_level',None) 666 di['application_category'] = getattr(certificate_d,'application_category',None) 666 667 di['code'] = di['code'] or certificate.id 667 668 di['review_state'] = self.portal_workflow.getInfoFor(certificate,'review_state','no_state') -
WAeUP_SRP/base/Widgets.py
r3436 r3438 787 787 self._dict = d 788 788 self._msgids = m 789 789 790 790 def __getitem__(self, key): 791 791 """Get a label for a key.""" … … 849 849 def _getVocabulary(self,datastructure=None): 850 850 if self.REQUEST.traverse_subpath: 851 screening_type = self.REQUEST.traverse_subpath[0]. upper()852 else: 853 screening_type = ' ALL'854 if screening_type in (" ALL","CEST","SANDWICH"):851 screening_type = self.REQUEST.traverse_subpath[0].lower() 852 else: 853 screening_type = 'all' 854 if screening_type in ("all","cest","sandwich"): 855 855 application_category = screening_type 856 856 else: … … 866 866 l = [] 867 867 for k,d in self._v_certificates_docs.items(): 868 if application_category == " ALL":868 if application_category == "all": 869 869 l += (k,self._v_certificates_docs[k].title,k), 870 870 else: … … 873 873 #import ipdb;ipdb.set_trace() 874 874 return VocabularyOnTheFly(l) 875 875 876 876 InitializeClass(ApplicationCourseWidget) 877 877 -
WAeUP_SRP/base/skins/waeup_utilities/fillApplicationCategory.py
r3436 r3438 1 ## Script (Python) " ti_507_resolve"1 ## Script (Python) "fillApplicationCategory" 2 2 ##bind container=container 3 3 ##bind context=context … … 36 36 logger.info('start') 37 37 count = 0 38 not_count = 0 38 39 found = 0 39 40 commit_after = 1000 … … 41 42 certificates = context.portal_catalog.search({'meta_type': "Certificate"}) 42 43 logger.info("found %d certificates" % len(certificates)) 43 cat = {'cos': ' BASIC',44 'cos_cest': ' CEST',45 'cos_sandwich': ' SANDWICH',44 cat = {'cos': 'basic', 45 'cos_cest': 'cest', 46 'cos_sandwich': 'sandwich', 46 47 } 47 48 to_change = {} … … 59 60 logger.info("%s in %s" % (cert.id,','.join(found))) 60 61 count += 1 62 else: 63 not_count += 1 64 logger.info("%s not in vocabularies" % (cert.id,)) 61 65 for cert,d in to_change.items(): 62 66 d['cert_doc'].edit(mapping = d) 63 logger.info("set application_category of %s to %s" % 67 logger.info("set application_category of %s to %s" % 64 68 (cert,d['application_category'])) 65 logger.info(" found %d not in vocabularies" % count)69 logger.info("%d cert codes found, %d not found in vocabularies" % (count,not_count)) -
WAeUP_SRP/uniben/profiles/default/layouts/application_cest.xml
r3436 r3438 474 474 </property> 475 475 <property name="hidden_readonly_layout_modes"/> 476 <property name="vocabulary">cos_cest</property>477 476 <property name="sorted">True</property> 478 477 <property name="css_class_expr">string:row</property> … … 495 494 </property> 496 495 <property name="hidden_readonly_layout_modes"/> 497 <property name="vocabulary">cos_cest</property>498 496 <property name="sorted">True</property> 499 497 <property name="css_class_expr">string:row</property> … … 517 515 <property name="hidden_readonly_layout_modes"/> 518 516 <property name="sorted">True</property> 519 <property name="vocabulary">cos_cest</property>520 517 <property name="css_class_expr">string:row</property> 521 518 </widget> … … 541 538 <property name="hidden_readonly_layout_modes"/> 542 539 <property name="sorted">True</property> 543 <property name="vocabulary">cos_cest</property>544 540 <property name="css_class_expr">string:row</property> 545 541 </widget> -
WAeUP_SRP/uniben/profiles/default/layouts/application_manage.xml
r3436 r3438 646 646 <property name="hidden_readonly_layout_modes"/> 647 647 <property name="sorted">True</property> 648 <property name="vocabulary">cos_combined</property>649 648 <property name="css_class_expr">string:row</property> 650 649 </widget> … … 667 666 <property name="hidden_readonly_layout_modes"/> 668 667 <property name="sorted">True</property> 669 <property name="vocabulary">cos_combined</property>670 668 <property name="css_class_expr">string:row</property> 671 669 </widget> … … 688 686 <property name="hidden_readonly_layout_modes"/> 689 687 <property name="sorted">True</property> 690 <property name="vocabulary">cos_combined</property>691 688 <property name="css_class_expr">string:row</property> 692 689 </widget> … … 710 707 <property name="hidden_readonly_layout_modes"/> 711 708 <property name="sorted">True</property> 712 <property name="vocabulary">cos_combined</property>713 709 <property name="css_class_expr">string:row</property> 714 710 </widget> … … 730 726 <property name="vocabulary">high_qual</property> 731 727 </widget> 732 728 733 729 <widget name="hq_grade" meta_type="Select Widget"> 734 730 <property name="title">Higher Qualification Grade</property> … … 940 936 <property name="hidden_readonly_layout_modes"/> 941 937 </widget> 942 938 943 939 944 940 <widget name="aos" meta_type="Select Widget"> … … 1030 1026 <row> 1031 1027 <cell name="passport" ncols="2"/> 1032 </row> 1028 </row> 1033 1029 <row> 1034 1030 <cell name="aos" ncols="2"/> 1035 </row> 1031 </row> 1036 1032 <row> 1037 1033 <cell name="course1" ncols="2"/> … … 1043 1039 <cell name="course3" ncols="2"/> 1044 1040 </row> 1045 1046 1041 1042 1047 1043 <row> 1048 1044 <cell name="hq_matric_no"/> … … 1063 1059 <cell name="hq_disc"/> 1064 1060 </row> 1065 1061 1066 1062 <row> 1067 1063 <cell name="fst_sit_fname"/> … … 1093 1089 <row> 1094 1090 <cell name="scd_sit_results"/> 1095 </row> 1096 1091 </row> 1092 1097 1093 1098 1094 -
WAeUP_SRP/uniben/profiles/default/layouts/application_pce.xml
r3436 r3438 60 60 <property name="hidden_readonly_layout_modes"/> 61 61 <property name="css_class_expr">string:row</property> 62 <property name="vocabulary">cos</property>63 62 </widget> 64 63 <widget name="course2" meta_type="Application Course Widget"> … … 75 74 <property name="hidden_readonly_layout_modes"/> 76 75 <property name="css_class_expr">string:row</property> 77 <property name="vocabulary">cos</property>78 76 </widget> 79 77 <widget name="course3" meta_type="Application Course Widget"> … … 90 88 <property name="hidden_readonly_layout_modes"/> 91 89 <property name="css_class_expr">string:row</property> 92 <property name="vocabulary">cos</property>93 90 <property name="sorted">True</property> 94 91 </widget> … … 110 107 <property name="hidden_empty">True</property> 111 108 <property name="css_class_expr">string:row</property> 112 <property name="vocabulary">cos</property>113 109 <property name="sorted">True</property> 114 110 </widget> -
WAeUP_SRP/uniben/profiles/default/layouts/application_pde.xml
r3436 r3438 649 649 <property name="hidden_readonly_layout_modes"/> 650 650 <property name="sorted">True</property> 651 <property name="vocabulary">cos</property>652 651 <property name="css_class_expr">string:row</property> 653 652 </widget> … … 670 669 <property name="hidden_readonly_layout_modes"/> 671 670 <property name="sorted">True</property> 672 <property name="vocabulary">cos</property>673 671 <property name="css_class_expr">string:row</property> 674 672 </widget> … … 691 689 <property name="hidden_readonly_layout_modes"/> 692 690 <property name="sorted">True</property> 693 <property name="vocabulary">cos</property>694 691 <property name="css_class_expr">string:row</property> 695 692 </widget> … … 715 712 <property name="hidden_empty">True</property> 716 713 <property name="sorted">True</property> 717 <property name="vocabulary">cos</property>718 714 <property name="css_class_expr">string:row</property> 719 715 </widget> -
WAeUP_SRP/uniben/profiles/default/layouts/application_prence.xml
r3436 r3438 595 595 </property> 596 596 <property name="hidden_readonly_layout_modes"/> 597 <property name="vocabulary">cos</property>598 597 <property name="sorted">True</property> 599 598 <property name="css_class_expr">string:row</property> … … 616 615 </property> 617 616 <property name="hidden_readonly_layout_modes"/> 618 <property name="vocabulary">cos</property>619 617 <property name="sorted">True</property> 620 618 <property name="css_class_expr">string:row</property> … … 638 636 <property name="hidden_readonly_layout_modes"/> 639 637 <property name="sorted">True</property> 640 <property name="vocabulary">cos</property>641 638 <property name="css_class_expr">string:row</property> 642 639 </widget> … … 662 659 <property name="hidden_readonly_layout_modes"/> 663 660 <property name="sorted">True</property> 664 <property name="vocabulary">cos</property>665 661 <property name="css_class_expr">string:row</property> 666 662 </widget> -
WAeUP_SRP/uniben/profiles/default/layouts/application_pume.xml
r3436 r3438 567 567 </property> 568 568 <property name="hidden_readonly_layout_modes"/> 569 <property name="vocabulary">cos</property>570 569 <property name="css_class_expr">string:row</property> 571 570 </widget> … … 588 587 </property> 589 588 <property name="hidden_readonly_layout_modes"/> 590 <property name="vocabulary">cos</property>591 589 <property name="css_class_expr">string:row</property> 592 590 </widget> … … 609 607 <property name="hidden_readonly_layout_modes"/> 610 608 <property name="sorted">True</property> 611 <property name="vocabulary">cos</property>612 609 <property name="css_class_expr">string:row</property> 613 610 </widget> … … 634 631 <property name="hidden_empty">True</property> 635 632 <property name="sorted">True</property> 636 <property name="vocabulary">cos</property>637 633 <property name="css_class_expr">string:row</property> 638 634 </widget> -
WAeUP_SRP/uniben/profiles/default/layouts/application_sandwich.xml
r3436 r3438 474 474 </property> 475 475 <property name="hidden_readonly_layout_modes"/> 476 <property name="vocabulary">cos_sandwich</property>477 476 <property name="sorted">True</property> 478 477 <property name="css_class_expr">string:row</property> … … 495 494 </property> 496 495 <property name="hidden_readonly_layout_modes"/> 497 <property name="vocabulary">cos_sandwich</property>498 496 <property name="sorted">True</property> 499 497 <property name="css_class_expr">string:row</property> … … 517 515 <property name="hidden_readonly_layout_modes"/> 518 516 <property name="sorted">True</property> 519 <property name="vocabulary">cos_sandwich</property>520 517 <property name="css_class_expr">string:row</property> 521 518 </widget> … … 541 538 <property name="hidden_readonly_layout_modes"/> 542 539 <property name="sorted">True</property> 543 <property name="vocabulary">cos_sandwich</property>544 540 <property name="css_class_expr">string:row</property> 545 541 </widget> … … 829 825 <cell name="date_of_birth" ncols="2"/> 830 826 </row> 831 827 832 828 <row> 833 829 <cell name="sex" ncols="2"/> 834 </row> 835 830 </row> 831 836 832 <row> 837 833 <cell name="passport" ncols="2"/> -
WAeUP_SRP/uniben/profiles/default/layouts/import_certificate.xml
r3333 r3438 160 160 <property name="hidden_readonly_layout_modes"/> 161 161 <property name="vocabulary">entry_modes</property> 162 </widget> 163 <widget name="application_category" meta_type="Application Course Widget"> 164 <property name="title">Application Category</property> 165 <property name="fields"> 166 <element value="application_category"/> 167 </property> 168 <property name="label">Application Category</property> 169 <property name="label_edit">Application Category</property> 170 <property name="readonly_layout_modes"/> 171 <property name="hidden_layout_modes"/> 172 <property name="hidden_readonly_layout_modes"/> 162 173 </widget> 163 174 164 175 </object> -
WAeUP_SRP/uniben/profiles/default/schemas/import_certificate.xml
r3333 r3438 16 16 <field name="start_level" meta_type="CPS String Field"/> 17 17 <field name="study_mode" meta_type="CPS String Field"/> 18 <field name="application_category" meta_type="CPS String Field"/> 18 19 </object>
Note: See TracChangeset for help on using the changeset viewer.