Changeset 1073 for WAeUP_SRP/trunk


Ignore:
Timestamp:
17 Dec 2006, 16:39:44 (18 years ago)
Author:
joachim
Message:

clearance_edit speed improvments.

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/clearance_edit.py

    r1054 r1073  
    3030# (We don't call getEditableContent here, validate does it when needed.)
    3131wftool = context.portal_workflow
    32 info = context.getStudentInfo()
     32info = context.getClearanceInfo()
    3333
    3434
    3535#'Sorry, you are not allowed to access this page!'
    3636if info == None:
    37         #return REQUEST.RESPONSE.redirect(context.portal_url())
    38         return REQUEST.RESPONSE.redirect(context.standard_error_message())
     37  #return REQUEST.RESPONSE.redirect(context.portal_url())
     38  return REQUEST.RESPONSE.redirect(context.standard_error_message())
    3939
    4040
  • WAeUP_SRP/trunk/skins/waeup_student/clearance_edit_form.pt

    r1036 r1073  
    11<metal:block define-macro="clearance_edit_form">
    2 <metal:block tal:define="info context/getStudentInfo">
     2<metal:block tal:define="info context/getClearanceInfo">
    33  <span tal:condition="not: info">
    44    <metal:block use-macro="here/standard_error_message" />
     
    1212           review_state info/review_state;
    1313           clear_review_state info/clear_review_state;
    14            editable python: (is_student and clear_review_state == 'opened' or is_so) and not is_co;
     14           editable python:not is_co and (is_student and clear_review_state == 'opened' or is_so);
    1515           mode python: test(editable,'edit','view');
    1616           layout_id python: test(is_so,'student_clearance','student_clearance_fe');
  • WAeUP_SRP/trunk/skins/waeup_student/search_students.py

    r1071 r1073  
    157157    res = aq_students(query)
    158158    search_set = [r.id for r in res]
    159 if with_review and len(search_set) > 0:
    160     query = In('id',search_set) & Eq('review_state',state)
    161 elif with_review:
     159##if with_review and len(search_set) > 0:
     160##    query = In('id',search_set) & Eq('review_state',state)
     161if with_review:
    162162    query = Eq('review_state',state)
    163163    review_res = evalAdvancedQuery(query)
     
    168168        #review_set.append(pl[pl.index('students') + 1])
    169169        review_set.append(r.getId)
    170 all = review_set
    171170#set_trace()
    172 ##if only_review:
    173 ##    all = review_set
    174 ##elif with_review:
    175 ##    for i in search_set:
    176 ##        if i in review_set:
    177 ##            all.append(i)
    178 ##else:
    179 ##    all = search_set
    180 ####for a in all[:50]:
    181 ####    if a in items:
    182 ####        continue
    183 ####    items.append(a)
     171if only_review:
     172    all = review_set
     173elif with_review:
     174    all = []
     175    for i in search_set:
     176        if i in review_set:
     177            all.append(i)
     178else:
     179    all = search_set
    184180items = all[:500]
    185181students = []
    186 #items.sort()
    187 
    188182if items:
    189183    for item in items:
Note: See TracChangeset for help on using the changeset viewer.