Changeset 731


Ignore:
Timestamp:
20 Oct 2006, 20:18:25 (18 years ago)
Author:
joachim
Message:

add and delete for student_study_level and student_course_result

Location:
WAeUP_SRP/trunk
Files:
3 added
12 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/profiles/default/layouts/student_course_result.xml

    r728 r731  
    77 <property name="flexible_widgets"/>
    88 <property name="validate_values_expr"></property>
     9 <widget name="code" meta_type="CertificateCourseId Widget">
     10  <property name="title">Course Code</property>
     11  <property name="fields">
     12   <element value="code"/>
     13  </property>
     14  <property name="is_required">True</property>
     15  <property name="label">Course Code</property>
     16  <property name="label_edit">Course Code</property>
     17  <property name="readonly_layout_modes"/>
     18  <property name="hidden_layout_modes">
     19   <element value="view"/>
     20   <element value="edit"/>
     21  </property>
     22  <property name="hidden_readonly_layout_modes"/>
     23 </widget>
    924 <widget name="credits" meta_type="Int Widget">
    1025  <property name="title">Credits</property>
     
    1732    <property name="readonly_layout_modes">
    1833      <element value="edit"/>
    19     </property>
     34      <element value="create"/>
     35    </property>
     36  <property name="hidden_layout_modes">
     37   <element value="create"/>
     38  </property>
    2039  <property name="hidden_readonly_layout_modes"/>
    2140 </widget>
     
    3049    <property name="readonly_layout_modes">
    3150      <element value="edit"/>
    32     </property>
    33   <property name="hidden_layout_modes"/>
     51      <element value="create"/>
     52    </property>
     53  <property name="hidden_layout_modes">
     54   <element value="create"/>
     55  </property>
    3456  <property name="hidden_readonly_layout_modes"/>
    3557 </widget>
     
    4264  <property name="label_edit">Course Title</property>
    4365    <property name="readonly_layout_modes">
    44       <element value="edit"/>
    45     </property>
    46   <property name="hidden_layout_modes"/>
     66      <element value="create"/>
     67      <element value="edit"/>
     68    </property>
     69  <property name="hidden_layout_modes">
     70   <element value="create"/>
     71  </property>
    4772  <property name="hidden_readonly_layout_modes"/>
    4873  <property name="display_width">60</property>
     
    93118 </widget>
    94119 <widget name="import_id" meta_type="String Widget">
    95   <property name="title">ID</property>
     120  <property name="title">imported ID</property>
    96121  <property name="fields">
    97122   <element value="import_id"/>
    98123  </property>
    99   <property name="label">ID</property>
    100   <property name="label_edit">ID</property>
    101     <property name="readonly_layout_modes">
    102       <element value="edit"/>
    103     </property>
    104   <property name="hidden_layout_modes"/>
     124  <property name="label">imported ID</property>
     125  <property name="label_edit">imported ID</property>
     126    <property name="readonly_layout_modes">
     127      <element value="edit"/>
     128      <element value="create"/>
     129    </property>
     130  <property name="hidden_layout_modes">
     131   <element value="create"/>
     132  </property>
    105133  <property name="hidden_readonly_layout_modes"/>
    106134 </widget>
     
    112140  <property name="label">Score</property>
    113141  <property name="label_edit">Score</property>
    114   <property name="readonly_layout_modes"/>
     142    <property name="readonly_layout_modes">
     143      <element value="edit"/>
     144      <element value="create"/>
     145    </property>
    115146  <property name="hidden_layout_modes"/>
    116147  <property name="hidden_readonly_layout_modes"/>
     
    140171 <table>
    141172  <row>
     173   <cell name="code"/>
     174  </row>
     175  <row>
    142176   <cell name="title"/>
    143177  </row>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_study_course.xml

    r727 r731  
    77 <property name="flexible_widgets"/>
    88 <property name="validate_values_expr"></property>
     9 <widget name="title" meta_type="String Widget">
     10  <property name="title">Certificate Code</property>
     11  <property name="fields">
     12   <element value="title"/>
     13  </property>
     14  <property name="is_required">True</property>
     15  <property name="label">Certificate</property>
     16  <property name="label_edit">Certificate</property>
     17  <property name="readonly_layout_modes"/>
     18  <property name="hidden_layout_modes"/>
     19  <property name="hidden_readonly_layout_modes"/>
     20 </widget>
    921 <widget name="study_course" meta_type="String Widget">
    1022  <property name="title">Certificate Code</property>
     
    160172 <table>
    161173  <row>
     174   <cell name="title"/>
     175  </row>
     176  <row>
    162177   <cell name="study_course"/>
    163178  </row>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_study_level.xml

    r726 r731  
    1616  <property name="label_edit">Level No</property>
    1717  <property name="readonly_layout_modes"/>
    18   <property name="hidden_layout_modes"/>
     18  <property name="hidden_layout_modes">
     19   <element value="edit"/>
     20   <element value="view"/>
     21  </property>
    1922  <property name="hidden_readonly_layout_modes"/>
    2023 </widget>
     
    8891 <table>
    8992  <row>
     93   <cell name="code"/>
     94  </row>
     95  <row>
    9096   <cell name="session"/>
    9197  </row>
  • WAeUP_SRP/trunk/profiles/default/schemas/student_course_result.xml

    r728 r731  
    11<?xml version="1.0"?>
    22<object name="course_results" meta_type="CPS Schema">
     3 <field name="code" meta_type="CPS String Field"/>
    34 <field name="title" meta_type="CPS String Field"/>
    45 <field name="faculty_code" meta_type="CPS String Field"/>
    56 <field name="department_code" meta_type="CPS String Field"/>
    67 <field name="credits" meta_type="CPS Int Field"/>
     8 <field name="core_or_elective" meta_type="CPS Boolean Field"/>
    79 <field name="passmark" meta_type="CPS Int Field"/>
    810 <field name="ansbook" meta_type="CPS String Field"/>
  • WAeUP_SRP/trunk/profiles/default/schemas/student_study_level.xml

    r725 r731  
    33 <field name="code" meta_type="CPS String Field"/>
    44 <field name="session" meta_type="CPS String Field"/>
    5  <field name="gpa" meta_type="CPS String Field"/>
     5 <field name="gpa" meta_type="CPS Float Field"/>
    66 <field name="status" meta_type="CPS String Field"/>
    77 <field name="verdict" meta_type="CPS String Field"/>
  • WAeUP_SRP/trunk/profiles/default/types/StudentCourseResult.xml

    r729 r731  
    22<object name="StudentCourseResult" meta_type="CPS Flexible Type Information"
    33   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
    4  <property name="title">WAeUP Course Ticket</property>
     4 <property name="title">WAeUP Course Result</property>
    55 <property name="description"></property>
    66 <property name="content_icon"></property>
     
    2727 <property name="cps_is_portlet">False</property>
    2828 <alias from="(Default)" to="academics_document_view"/>
     29 <alias from="create_do" to="waeup_document_create_do"/>
     30 <alias from="created" to="student_course_result_created"/>
    2931 <alias from="view" to="academics_document_view"/>
    3032 <action title="View" action_id="view" category="object"
  • WAeUP_SRP/trunk/profiles/default/types/StudentStudyCourse.xml

    r723 r731  
    4141  <permission value="Modify portal content"/>
    4242 </action>
     43 <action title="Add Level" action_id="new_entry" category="object"
     44    condition_expr=""
     45    url_expr="string:${object/absolute_url}/content_create?type_name=StudentStudyLevel"
     46    visible="True">
     47  <permission value="Add portal content"/>
     48 </action>
    4349</object>
  • WAeUP_SRP/trunk/profiles/default/types/StudentStudyLevel.xml

    r723 r731  
    3030 <alias from="(Default)" to="student_index"/>
    3131 <alias from="create_do" to="waeup_document_create_do"/>
    32  <alias from="created" to="level_created"/>
     32 <alias from="created" to=""/>
    3333 <alias from="view" to="student_index"/>
    3434 <action title="View" action_id="view" category="object" condition_expr=""
     
    3636  <permission value="View"/>
    3737 </action>
     38 <action title="Add Course" action_id="new_entry" category="object"
     39    condition_expr=""
     40    url_expr="string:${object_url}/content_create?type_name=StudentCourseResult"
     41    visible="True">
     42  <permission value="Add portal content"/>
     43 </action>
    3844</object>
  • WAeUP_SRP/trunk/profiles/default/types/StudyLevel.xml

    r574 r731  
    3030 <alias from="(Default)" to="academics_index"/>
    3131 <alias from="create_do" to="waeup_document_create_do"/>
    32  <alias from="created" to="level_created"/>
     32 <alias from="created" to=""/>
    3333 <alias from="view" to="academics_index"/>
    3434 <action title="View" action_id="view" category="object" condition_expr=""
  • WAeUP_SRP/trunk/skins/waeup_default/waeup_document_create_do.py

    r486 r731  
    1010from Products.CMFCore.utils import getToolByName
    1111
    12 if type_name == "StudyLevel":
     12if type_name in ("StudyLevel","StudentStudyLevel"):
    1313    id = datamodel.get('code')
    1414else:
  • WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py

    r727 r731  
    5959with_review = state != "all"
    6060onlyreview = with_review and not term
    61 with_level_results = state.startswith("category") and evalAdvancedQuery is not None
     61with_level_results = state.startswith("category") or\
     62                     state in ('content_addable',) and\
     63                     evalAdvancedQuery is not None
    6264bools = "with_review = %s<br\> onlyreview = %s<br\> with_level_results = %s" % (with_review,onlyreview,with_level_results)
    6365if not term and not with_review:
     
    8789elif onlyreview and with_level_results:
    8890    query_step = 2
    89     query =  Eq('portal_type','StudentStudyLevel') & Eq('review_state',state)
     91    query =  (Eq('portal_type','StudentStudyLevel') |
     92             Eq('portal_type','StudentStudyCourse')) & Eq('review_state',state)
    9093    res = evalAdvancedQuery(query)
    9194elif what == "student_id":
     
    135138        st = "%s*" % term.strip()
    136139    query = Eq('portal_type',pt) & Eq('SearchableText',"%s*" % term.strip().lower())\
    137                 | Eq('portal_type','StudentStudyLevel') & Eq('review_state',state)
     140                | ((Eq('portal_type','StudentStudyLevel') |
     141                   Eq('portal_type','StudentStudyCourse')) & Eq('review_state',state))
    138142    try:
    139143        res = evalAdvancedQuery(query)
     
    149153if res:
    150154    for r in res:
    151         if r.portal_type in ("StudentApplication","StudentPersonal",):
     155        if r.portal_type in ("StudentApplication","StudentPersonal","StudentStudyCourse",):
    152156            student = r.getObject().aq_parent
    153157        elif r.portal_type in ("StudentStudyLevel",):
     
    167171        students.append(context.getStudentInfo(item))
    168172    return context.students_manager_view(rendered = rend,
    169                              psm = "%d matching Students found" % len(items),
     173                             psm = "%d matching Students found QS = %s" % (len(items),query_step),
    170174                             students = students,
    171175                             is_manager = is_manager,
  • WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt

    r723 r731  
    2727                tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
    2828              <td align="left" valign="middle" style="width: 5px;"
    29                   tal:condition="python:0 and is_manager">
     29                  tal:condition="python:1 and is_manager">
    3030                <input type="checkbox" name="ids:list" value="" id="" class="noborder"
    3131                       tal:condition="is_manager"
     
    6363            <td align="left" valign="top" rowspan="3"></td>
    6464            <td align="left" valign="top">
    65               <span tal:condition="python:0 and is_manager">
     65              <span tal:condition="python:1 and is_manager">
    6666                <input type="button" value="button_select_all" class="context"
    6767                       onclick="someJavaScriptFunctionThatWillBeReplaced"
     
    7070                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
    7171                       />
    72                 <input type="submit" name="approve_checked:method"
     72                <input tal:condition="python:0" type="submit" name="approve_checked:method"
    7373                       class="context" value="Approve" />
    74                 <input type="submit" name="retract_checked:method"
     74                <input tal:condition="python:0" type="submit" name="retract_checked:method"
    7575                       class="context" value="Retract" />
    7676                <input type="submit" name="folder_delete:method" value="button_delete"
     
    7979                       (cpsmcat('description_confirm_delete'), )"
    8080                       />
    81                 <input tal:condition="python: context.portal_type not in ('Semester','Certificate')"
     81                <input tal:condition="python: 0"
    8282                       type="submit" name="id_rename_form:method"
    8383                       class="context" value="Change Object ID" i18n:attributes="value"
Note: See TracChangeset for help on using the changeset viewer.