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/skins/waeup_student
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • 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.