7. Courses¶
7.1. Models¶
7.1.1. Diagram¶
7.1.2. Summary¶
Address (id, street, plz, city, country) |
|
BankAccount (id, iban, bank_name, …) |
|
Confirmation (id, subscription, date, mail) |
|
Course (id, name, type, subscription_type, …) |
|
CourseSubscriptionType |
|
CourseSuccession (id, predecessor, successor) |
|
CourseType (id, name, level, couple_course) |
|
Gender |
|
IrregularLesson (id, course, date, time_from, …) |
|
LessonDetails (id, room) |
|
MatchingState |
|
Offering (*args, **kwargs) |
An offering is a list of courses to be offered in the given period |
OfferingType |
|
PaymentMethod |
|
Period (id, name, date_from, date_to) |
|
PeriodCancellation (id, name, period, date) |
|
RegularLesson (id, course, weekday, …) |
|
RegularLessonException (id, regular_lesson, …) |
|
Rejection (id, subscription, date, reason, …) |
|
RejectionReason |
|
Residence |
|
Room (id, name, address, url, contact_info) |
|
Song (id, title, artist, length, speed, …) |
|
StudentStatus |
|
Style (id, name, parent_style, …) |
|
Subscribe (id, user, course, date, partner, …) |
|
SubscribeState |
|
Teach (id, teacher, course, welcomed, hourly_wage) |
|
TeachLesson (id, teacher, lesson, hourly_wage) |
|
TeacherWelcome (id, teach, date, mail) |
|
UserProfile (user, language, legi, gender, …) |
|
Voucher (id, purpose, percentage, key, …) |
|
VoucherPurpose (id, name, description) |
|
Weekday |
7.1.3. Details¶
7.2. Services¶
7.2.1. Summary¶
Course (id, name, type, subscription_type, …) |
|
CourseManager () |
|
DEFAULT_BODY_HEIGHT |
int(x=0) -> integer int(x, base=10) -> integer |
Http404 |
|
HttpResponseServerError ([content]) |
|
INVALID_TITLE_CHARS |
Compiled regular expression objects |
IrregularLesson (id, course, date, time_from, …) |
|
MESSAGE_NO_PARTNER_SET |
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |
MatchingState |
|
NoPartnerException |
|
ObjectDoesNotExist |
The requested object does not exist |
Offering (*args, **kwargs) |
An offering is a list of courses to be offered in the given period |
OfferingType |
|
Prefetch (lookup[, queryset, to_attr]) |
|
Q (*args[, _connector, _negated]) |
Encapsulate filters as objects that can then be combined logically (using & and |). |
RegularLesson (id, course, weekday, …) |
|
RegularLessonException (id, regular_lesson, …) |
|
Subscribe (id, user, course, date, partner, …) |
|
SurveyInstance (id, survey, email_template, …) |
|
TranslationUtils |
|
User (*args, **kwargs) |
Users within the Django authentication system are represented by this model. |
UserProfile (user, language, legi, gender, …) |
|
Voucher (id, purpose, percentage, key, …) |
|
Weekday |
|
breakup_couple (subscriptions, request) |
|
calculate_relevant_experience (user, course) |
finds a list of courses the “user” did already and that are somehow relevant for “course” |
clean_username (name) |
first try to find ascii similar character, then strip away disallowed characters still left |
confirm_subscription (subscription[, …]) |
sends a confirmation mail if subscription is confirmed (by some other method) and no confirmation mail was sent before |
confirm_subscriptions (subscriptions[, …]) |
|
copy_course (course[, to, set_preceeding_course]) |
|
correct_matching_state_to_couple (subscriptions) |
|
create_course_info (course) |
|
create_user_info (user) |
|
date |
date(year, month, day) –> date object |
detect_rejection_reason (subscription) |
detect the reason why the subscription is rejected :return: the reason as constant from Rejection.Reason |
export (export_format, title, data[, multiple]) |
|
export_subscriptions (course_ids, export_format) |
|
export_summary |
exports a summary of all offerings with room usage, course/subscription numbers |
export_teacher_payment_information |
Exports a summary of the given offerings concerning payment of teachers. |
find_unused_username_variant (name[, ignore]) |
|
format_prices (price_with_legi, …[, …]) |
|
generate_voucher_pdf (vouchers) |
|
get_all_offerings () |
|
get_current_active_offering () |
|
get_historic_offerings ([offering_type]) |
|
get_offerings_to_display ([request, …]) |
return offerings that have display flag on and order them by start date in ascending order |
get_or_create_userprofile (user) |
|
get_sections (offering[, course_filter]) |
|
get_subsequent_offering () |
|
get_upcoming_courses_without_offering () |
|
log |
Instances of the Logger class represent a single logging channel. |
match_partners (subscriptions[, request]) |
|
model_attribute_language_fallback (model, …) |
|
reject_subscription (subscription[, reason, …]) |
sends a rejection mail if subscription is rejected (by some other method) and no rejection mail was sent before |
reject_subscriptions (subscriptions[, …]) |
same as reject_subscription, but for multiple subscriptions at once |
reverse (viewname[, urlconf, args, kwargs, …]) |
|
send_course_email (data, courses) |
|
send_online_payment_successful (subscription) |
|
send_participation_confirmation (subscription) |
|
send_payment_reminder (subscription) |
|
send_rejection (subscription, reason) |
|
send_sorry_for_incorrect_reminder (subscription) |
|
send_subscription_confirmation (subscription) |
|
send_teacher_welcome (teach) |
|
send_vouchers (data, recipients) |
|
settings |
A lazy proxy for either global Django settings or a custom settings object. |
subscribe (course_id, data) |
Actually enrols a user or a pair of users in a course |
unconfirm_subscriptions (subscriptions[, request]) |
|
unmatch_partners (subscriptions, request) |
|
unreject_subscriptions (subscriptions[, request]) |
|
update_user (user, user_data) |
|
welcome_teacher (teach) |
|
welcome_teachers (courses, request) |
|
welcome_teachers_reset_flag (courses, request) |
7.2.2. Details¶
-
courses.services.
calculate_relevant_experience
(user, course)[source]¶ finds a list of courses the “user” did already and that are somehow relevant for “course”
-
courses.services.
clean_username
(name)[source]¶ first try to find ascii similar character, then strip away disallowed characters still left
-
courses.services.
confirm_subscription
(subscription, request=None, allow_single_in_couple_course=False)[source]¶ sends a confirmation mail if subscription is confirmed (by some other method) and no confirmation mail was sent before
-
courses.services.
export_summary
()[source]¶ exports a summary of all offerings with room usage, course/subscription numbers
-
courses.services.
export_teacher_payment_information
()[source]¶ Exports a summary of the given
offerings
concerning payment of teachers.Contains profile data relevant for payment of teachers and how many lesson at what rate to be paid.
Parameters: - export_format – export format
- offerings – offerings to include in summary
Returns: response or
None
if format not supported
-
courses.services.
get_offerings_to_display
(request=None, force_preview=False, only_regular_offerings=False)[source]¶ return offerings that have display flag on and order them by start date in ascending order
-
courses.services.
reject_subscription
(subscription, reason=None, send_email=True)[source]¶ sends a rejection mail if subscription is rejected (by some other method) and no rejection mail was sent before