Skip to content

Onlineweb apps events

melwil edited this page Oct 14, 2014 · 8 revisions

Events is one of the most important apps we have. The design of onlineweb4 is made to put events back in focus.


Event components

PDFCreator


Eligibility

Signup for events is controlled for each user by calling:

AttendanceEvent.is_eligible_for_signup(user)

This method will return a dictionary with at least a key named 'status', which will be True or False. Since the eligible method is quite complicated, the dictionary will also return some helper data.

{
    'status': True/False,
    'message': 'Empty if True, explanation if False.',
    'offset': datetime.datetime, # object with the delayed registration_start
    'status_code': 200-500,
}

Status codes

The status codes are modelled after HTTP.

  • 2XX = successful
  • 200 - Event has no rule_bundles, and user is member
  • 201 - Guest attendance enabled
  • 210 - User satisfies FieldOfStudyRule
  • 211 - User satisfies GradeRule
  • 212 - User satisfies UserGroupRule
  • 4XX = client error (user related)
  • 400 - Event has no rule_bundles, and user is not member
  • 401 - User has an offset signup due to Marks
  • 402 - User will get access in the future. Different from 501 since a rule allows access.
  • 410 - User does not satisfy FieldOfStudyRule
  • 411 - User does not satisfy GradeRule
  • 412 - User does not satisfy UserGroupRule
  • 420 - User has an offset signup due to FieldOfStudyRule
  • 421 - User has an offset signup due to GradeRule
  • 422 - User has an offset signup due to UserGroupRule
  • 430 - User has an offset signup due to Marks + FieldOfStudyRule
  • 431 - User has an offset signup due to Marks + GradeRule
  • 432 - User has an offset signup due to Marks + UserGroupRule
  • 5XX = server error (event related)
  • 501 - Registration is not opened yet
  • 502 - Registration is closed
  • 503 - Event is full