intranet.apps.dashboard package


intranet.apps.dashboard.views module

intranet.apps.dashboard.views.add_widgets_context(request, context)[source]

WIDGETS: * Eighth signup (STUDENT) * Eighth attendance (TEACHER or ADMIN) * Bell schedule (ALL) * Administration (ADMIN) * Links (ALL) * Seniors (STUDENT; graduation countdown if senior, link to destinations otherwise)

intranet.apps.dashboard.views.dashboard_view(request, show_widgets=True, show_expired=False, ignore_dashboard_types=None, show_welcome=False)[source]

Process and show the dashboard, which includes activities, events, and widgets.

intranet.apps.dashboard.views.gen_schedule(user, num_blocks=6, surrounding_blocks=None)[source]

Generate a list of information about a block and a student’s current activity signup.


schedule no_signup_today

intranet.apps.dashboard.views.gen_sponsor_schedule(user, sponsor=None, num_blocks=6, surrounding_blocks=None, given_date=None)[source]

Return a list of EighthScheduledActivitys in which the given user is sponsoring.


activities no_attendance_today num_acts

Return type

Dictionary with

intranet.apps.dashboard.views.get_announcements_list(request, context)[source]

An announcement will be shown if: * It is not expired

  • unless ?show_expired=1

  • It is visible to the user

    • There are no groups on the announcement (so it is public)

    • The user’s groups are in union with the groups on the announcement (at least one matches)

    • The user submitted the announcement directly

    • The user submitted the announcement through a request

    • The user approved the announcement through a request

    • …unless ?show_all=1

An event will be shown if: * It is not expired

  • unless ?show_expired=1

  • It is approved

    • unless an events admin

  • It is visible to the user

    • There are no groups

    • The groups are in union

intranet.apps.dashboard.views.paginate_announcements_list(request, context, items)[source]

*TODO* Migrate to django Paginator (see lostitems)

Module contents