class documentation

class WebApp:

Constructor: WebApp()

View In Hierarchy

Web application main class, suitable as cherrypy root.

Method __call__ Called by cherrypy for the / root page.
Method __init__ Initialise WebApp.
Method cached_item Return a cached item in the response.
Method courses The entry point for all paths starting with /courses .
Method kurs_redaktion Content management of a course.
Method kurs_redaktion_delete Handler method to be called by kurs_redaktion().
Method kurs_redaktion_get Handler method to be called by kurs_redaktion().
Method kurs_redaktion_post Handler method to be called by kurs_redaktion().
Method learning_contents_redaktion_put PUT: Update the learning contents list of a course.
Method lerninhalt_redaktion Content management of a learning content.
Method lerninhalt_redaktion_delete Handler method to be called by lerninhalt_redaktion().
Method lerninhalt_redaktion_get Handler method to be called by lerninhalt_redaktion().
Method lerninhalt_redaktion_post Handler method to be called by lerninhalt_redaktion().
Method redaktion The content management frontend for Luna LMS, and a dispatcher for all subordinate endpoints.
Method redaktion_get Handler method to be called by redaktion().
Method redaktion_post Handler method to be called by redaktion().
Method static_page Read a static page from the directory 'pages', and render it.
Method variant_redaktion Content management of a variant.
Method variant_redaktion_delete Handler method to be called by variant_redaktion().
Method view The view for Luna LMS, displaying learning content.
Instance Variable exposed Undocumented
Instance Variable storage Undocumented
Method _cp_dispatch Custom dispatch for static pages in the 'pages' directory.
def __call__(self):

Called by cherrypy for the / root page.

def __init__(self):

Initialise WebApp.

def cached_item(self, course_id, path, file_format, data):

Return a cached item in the response. This method is meant to be called from _cp_dispatch() only. It will redirect when called directly.

@cherrypy.expose
def courses(self, *args, **kwargs):

The entry point for all paths starting with /courses .

def kurs_redaktion(self, course_id, learning_content_title='', _method=''):

Content management of a course. This method will dispatch the handling of the request by method.

def kurs_redaktion_delete(self, course_id):

Handler method to be called by kurs_redaktion(). DELETE: Check and handle a deletion.

def kurs_redaktion_get(self, course_id, message):

Handler method to be called by kurs_redaktion(). GET: Display the content management frontend.

def kurs_redaktion_post(self, course_id, learning_content_title):

Handler method to be called by kurs_redaktion(). POST: Create a new learning content using the learning_content_title, and then display the content management frontend.

def learning_contents_redaktion_put(self, course_id, learning_contents, _method):

PUT: Update the learning contents list of a course.

def lerninhalt_redaktion(self, course_id, learning_content_id, filename='', content='', _method=''):

Content management of a learning content. This method will dispatch the handling of the request by method.

def lerninhalt_redaktion_delete(self, course_id, learning_content_id):

Handler method to be called by lerninhalt_redaktion(). DELETE: Check and handle a deletion.

def lerninhalt_redaktion_get(self, course_id, learning_content_id, message):

Handler method to be called by lerninhalt_redaktion(). GET: Display the content management frontend.

def lerninhalt_redaktion_post(self, course_id, learning_content_id, filename, content):

Handler method to be called by lerninhalt_redaktion(). POST: Create a new variant using filename and content, and then display the content management frontend. content can be used to upload a file, or a directory of files. In this case, filename will be taken from content.filename .

@cherrypy.expose
def redaktion(self, *args, title='', filename='', content='', _method='', learning_contents=''):

The content management frontend for Luna LMS, and a dispatcher for all subordinate endpoints. This method will dispatch any requests to subordinate endpoints to appropriate handlers.

def redaktion_get(self, message=''):

Handler method to be called by redaktion(). GET: Display the content management frontend.

def redaktion_post(self, args, title):

Handler method to be called by redaktion(). POST: Create a new course using the title, and then display the content management frontend.

@cherrypy.expose
def static_page(self, page):

Read a static page from the directory 'pages', and render it. This method is meant to be called from _cp_dispatch() only. It will redirect when called directly.

def variant_redaktion(self, course_id, learning_content_id, variant_id, filename='', content='', _method=''):

Content management of a variant. This method will dispatch the handling of the request by method. DELETE: Delete the variant.

def variant_redaktion_delete(self, course_id, learning_content_id, variant_id):

Handler method to be called by variant_redaktion(). DELETE: Check and handle a deletion.

@cherrypy.expose
def view(self, course_id, learning_content_id='', modus=''):

The view for Luna LMS, displaying learning content. By default, a learning content will display any HTML file present as a variant.

exposed: bool =

Undocumented

storage =

Undocumented

def _cp_dispatch(self, vpath):

Custom dispatch for static pages in the 'pages' directory.