Package bosco :: Module ranking :: Class CourseValidator
[hide private]
[frames] | no frames]

Class CourseValidator

source code

   object --+        
            |        
CachingObject --+    
                |    
        Validator --+
                    |
                   CourseValidator

Validation strategy for courses.

Instance Methods [hide private]
 
__init__(self, course, cache=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
validate(self, run)
Check if run is a valid run for this course.
source code

Inherited from CachingObject (private): _from_cache, _to_cache

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from Validator: DID_NOT_FINISH, DID_NOT_START, DISQUALIFIED, MISSING_CONTROLS, NOT_COMPLETED, OK

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, course, cache=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • cache - scoreing cache
Overrides: object.__init__
(inherited documentation)

validate(self, run)

source code 

Check if run is a valid run for this course. This only checks if the run is complete has a start punch and a finish punch. It does not check any controls! Override this in subclasses for more usefull validation (and call super() to not duplicate this code).

Overrides: Validator.validate