Пример #1
0
 def init(self):
     SchoolBaseModule.init(self)
     ComputerSanitizer.instance = self
     self._italc = ITALC_Manager()
     self._random = Random()
     self._random.seed()
     self._lessons = SchoolLessons()
     self._ruleEndAt = None
     self._load_plugins()
Пример #2
0
 def init(self):
     global CUPSPDF_DIR, CUPSPDF_USERSUBDIR
     SchoolBaseModule.init(self)
     CUPSPDF_DIR, CUPSPDF_USERSUBDIR = os.path.normpath(
         ucr.get('cups/cups-pdf/directory',
                 '/var/spool/cups-pdf/%U')).split('%U')
     # create directory if it does not exist
     try:
         if not os.path.exists(CUPSPDF_DIR):
             os.makedirs(DISTRIBUTION_DATA_PATH, 0o755)
     except (OSError, IOError) as exc:
         MODULE.error('error occured while creating %s: %s' %
                      (CUPSPDF_DIR, exc))
     self.fqdn = '%s.%s' % (ucr.get('hostname'), ucr.get('domainname'))
     self.pw_callback_bad_password = False
Пример #3
0
    def __init__(self):
        SchoolBaseModule.__init__(self)

        self._examUserPrefix = ucr.get(
            'ucsschool/ldap/default/userprefix/exam', 'exam-')
        self._examGroupExcludeRegEx = None
        try:
            value = ucr.get('ucsschool/exam/group/ldap/blacklist/regex', '')
            if value.strip():
                self._examGroupExcludeRegEx = re.compile(value, re.I)
        except Exception as ex:
            MODULE.error(
                'Failed to get/compile regexp provided by ucsschool/exam/group/ldap/blacklist/regex: %s'
                % (ex, ))

        # cache objects
        self._udm_modules = dict()
        self._examGroup = None
        self._examUserContainerDN = None
Пример #4
0
 def init(self):
     SchoolBaseModule.init(self)
     self._lessons = SchoolLessons()
Пример #5
0
 def init(self):
     SchoolBaseModule.init(self)
     # initiate paths for data distribution
     util.distribution.initPaths()
Пример #6
0
 def __init__(self):
     SchoolBaseModule.__init__(self)
     self._tmpDir = None
     self._progress_state = util.Progress()
     self._lessons = SchoolLessons()
Пример #7
0
	def __init__(self):
		SchoolBaseModule.__init__(self)
		self._tmpDir = None