coachings : Managing coachings

The lino_xl.lib.coachings plugin adds functionality for managing "coachings". It is currently used in Lino Welfare only.

Coaching

When a given site user engages as "coach" in regular, structured conversation with a given "client" during a given period.

(German "Begleitung", French "intervention")

For example in Lino Welfare that user is a social assistant.

Coaching type

The "type" of a coaching. In Lino Welfare this is named a "Service".

Can be used for expressing different types of responsibilities. For example in Lino Welfare they differentiate "General Social Service" "Integration Service" and "Debt mediation".

A tested document

This is a tested document. The following instructions are used for initialization:

>>> import lino
>>> lino.startup('lino_book.projects.avanti1.settings.doctests')
>>> from lino.api.doctest import *

Coachings

class lino_xl.lib.coachings.Coaching

Django model to represent a coaching.

user
client
type
end_date
start_date
primary

Whether this coaching is primary. Enabling this field will automatically make the other coachings non-primary.

See The primary coach

ending
class lino_xl.lib.coachings.Coachings

A table showing a set of coachings.

class lino_xl.lib.coachings.CoachingsByClient

The Coachings table in a clients detail.

class lino_xl.lib.coachings.CoachingsByUser

Coachables

class lino_xl.lib.coachings.Coachable

Base class for coachable client. The model specified as client_model must implement this.

get_coachings(self, period=None, *args, **flt)

Return a queryset with the coachings of this client. If period is not None, it must be a tuple of two date objects. Any additional arguments are applied as filter of the queryset.

get_primary_coach(self)

Return the one and only primary coach of this client (or None if there's less or more than one).

setup_auto_event(self, evt)

Implements EventGenerator.setup_auto_event.

This implements the rule that suggested evaluation events should be for the currently responsible coach if the contract's author no longer coaches that client. This is relevant if coach changes while contract is active.

The currently responsible coach is the user for which there is a coaching which has does_integ set to True..

Coaching types

class lino_xl.lib.coachings.CoachingType

Django model to represent a coaching.

does_integ

Whether coachings of this type are to be considered as integration work.

This is used when generating calendar events for evaluation meetings (see lino_xl.lib.coaching.Coachable.setup_auto_event())

class lino_xl.lib.coachings.CoachingTypes

Coaching endings

class lino_xl.lib.coachings.CoachingEnding

A Coaching termination reason expresses why a coaching has been terminated.

class lino_xl.lib.coachings.CoachingEndings

A list of reasons expressing why a coaching was ended.

Miscellaneous

class lino_xl.lib.coachings.CoachingsUser

A user who has access to basic coachings functionality.

class lino_xl.lib.coachings.CoachingsStaff

A user who can configure coachings functionality.

class lino_xl.lib.coachings.ClientChecker
class lino_xl.lib.coachings.ClientCoachingsChecker

Coached clients should not be obsolete. Only coached clients should have active coachings.

Injects

The lino_xl.lib.coachings plugin injects the following fields into models of other plugins.

class users.User
coaching_type

The coaching type used for new coachings of this user.

coaching_supervisor

Notify me when a coach has been assigned.

The primary coach

Every client should have a primary coach. This is the main responsible coach for that client.

Lino verifies that there's at most one primary coach per client. When you check the primary field of one coaching, Lino automatically unchecks it on any other coachings of that client.

Reality is even a bit more complicated: when multiple_primary_coachings is set to True, the uniqueness of the primary coaching is no longer just per client but per client and coaching type. As a result you can have multiple primary coachings per client.