Changeset 13928
- Timestamp:
- 13 Jun 2016, 01:37:24 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/branches/uli-scores-upload/src/waeup/kofa/students/browser.py
r13927 r13928 19 19 """ 20 20 import csv 21 import sys22 21 import grok 23 22 import pytz 23 import sys 24 24 from cStringIO import StringIO 25 from datetime import datetime 26 from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState 25 27 from urllib import urlencode 26 from datetime import datetime27 from zope.event import notify28 from zope.i18n import translate29 28 from zope.catalog.interfaces import ICatalog 30 29 from zope.component import queryUtility, getUtility, createObject 30 from zope.event import notify 31 from zope.formlib.textwidgets import BytesDisplayWidget 32 from zope.i18n import translate 31 33 from zope.schema.interfaces import ConstraintNotSatisfied, RequiredMissing 32 from zope.formlib.textwidgets import BytesDisplayWidget33 34 from zope.security import checkPermission 34 from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState35 35 from waeup.kofa.accesscodes import ( 36 36 invalidate_accesscode, get_access_code) 37 37 from waeup.kofa.accesscodes.workflow import USED 38 from waeup.kofa.browser.breadcrumbs import Breadcrumb 39 from waeup.kofa.browser.interfaces import ICaptchaManager 38 40 from waeup.kofa.browser.layout import ( 39 41 KofaPage, KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage, 40 42 NullValidator, jsaction, action, UtilityView) 41 from waeup.kofa.browser.breadcrumbs import Breadcrumb42 43 from waeup.kofa.browser.pages import ( 43 44 ContactAdminFormPage, ExportCSVView, doll_up, exports_not_allowed, 44 45 LocalRoleAssignmentUtilityView) 45 from waeup.kofa.browser.interfaces import ICaptchaManager46 46 from waeup.kofa.hostels.hostel import NOT_OCCUPIED 47 47 from waeup.kofa.interfaces import ( … … 50 50 academic_sessions_vocab, IDataCenter, DOCLINK) 51 51 from waeup.kofa.interfaces import MessageFactory as _ 52 from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget53 52 from waeup.kofa.mandates.mandate import PasswordMandate 54 53 from waeup.kofa.university.interfaces import ( 55 54 IDepartment, ICertificate, ICourse) 55 from waeup.kofa.university.certificate import ( 56 VirtualCertificateExportJobContainer) 57 from waeup.kofa.university.department import ( 58 VirtualDepartmentExportJobContainer) 56 59 from waeup.kofa.university.faculty import VirtualFacultyExportJobContainer 57 from waeup.kofa.university.department import VirtualDepartmentExportJobContainer58 60 from waeup.kofa.university.facultiescontainer import ( 59 61 VirtualFacultiesExportJobContainer) 60 from waeup.kofa.university.certificate import (61 VirtualCertificateExportJobContainer,)62 62 from waeup.kofa.university.course import ( 63 63 VirtualCourseExportJobContainer,) … … 65 65 from waeup.kofa.utils.batching import VirtualExportJobContainer 66 66 from waeup.kofa.utils.helpers import get_current_principal, now 67 from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget 67 68 from waeup.kofa.students.interfaces import ( 68 IStudentsContainer, IStudent, 69 IUGStudentClearance,IPGStudentClearance, 69 IStudentsContainer, IStudent, IUGStudentClearance, IPGStudentClearance, 70 70 IStudentPersonal, IStudentPersonalEdit, IStudentBase, IStudentStudyCourse, 71 71 IStudentStudyCourseTransfer, IStudentStudyCourseTranscript, 72 IStudentAccommodation, IStudentStudyLevel, 73 I CourseTicket, ICourseTicketAdd, IStudentPaymentsContainer,74 IStudent OnlinePayment, IStudentPreviousPayment, IStudentBalancePayment,75 I BedTicket, IStudentsUtils, IStudentRequestPW, IStudentTranscript72 IStudentAccommodation, IStudentStudyLevel, ICourseTicket, ICourseTicketAdd, 73 IStudentPaymentsContainer, IStudentOnlinePayment, IStudentPreviousPayment, 74 IStudentBalancePayment, IBedTicket, IStudentsUtils, IStudentRequestPW, 75 IStudentTranscript 76 76 ) 77 77 from waeup.kofa.students.catalog import search, StudentQueryResultItem 78 78 from waeup.kofa.students.vocabularies import StudyLevelSource 79 80 79 from waeup.kofa.students.workflow import ( 81 80 ADMITTED, PAID, CLEARANCE, REQUESTED, RETURNING, CLEARED, REGISTERED, … … 84 83 85 84 86 grok.context(IKofaObject) # Make IKofaObject the default context 85 grok.context(IKofaObject) # Make IKofaObject the default context 86 87 87 88 88 # Save function used for save methods in pages … … 91 91 # Turn list of lists into single list 92 92 if changed_fields: 93 changed_fields = reduce(lambda x, y: x+y, changed_fields.values())93 changed_fields = reduce(lambda x, y: x+y, changed_fields.values()) 94 94 # Inform catalog if certificate has changed 95 95 # (applyData does this only for the context)
Note: See TracChangeset for help on using the changeset viewer.