uw.local.teaching.webui.ta package

Submodules

uw.local.teaching.webui.ta.admin module

Course admin unit-related TA assignment display routines.

These are functions related to displaying TA information for course admin units.

uw.local.teaching.webui.ta.admin.format_admins(cursor, admins, roles)[source]
uw.local.teaching.webui.ta.admin.render_admin_job_details(cursor, unit, term, admin, ems_roles={}, ta_roles={}, prefix='', display_prefix='')[source]

Render job assignments for an offering as HTML.

All students assigned jobs with the specified term and admin unit will be listed, along with their positions. If editable is True then form elements will be included for editing the job assignments. Otherwise, the display is intended for clients and will be adjusted appropriately depending on the visibility state of assignments for the term.

uw.local.teaching.webui.ta.entitlement module

TA entitlement-related user interface implementation.

This module implements the Web user interface for managing TA entitlements.

uw.local.teaching.webui.ta.entitlement.format_entitlement_cancellation(e, h)[source]
uw.local.teaching.webui.ta.entitlement.format_entitlement_description(e)[source]
uw.local.teaching.webui.ta.entitlement.format_entitlement_time(cursor, e)[source]
uw.local.teaching.webui.ta.entitlement.format_entitlement_units(e)[source]
uw.local.teaching.webui.ta.entitlement.render_entitlement_schedule(cursor, unit_code)[source]
uw.local.teaching.webui.ta.entitlement.render_entitlements(cursor, unit, term, person, roles, url_prefix='')[source]

Renders the TA Entitlement section

Parameters
  • term – Object respresenting a uw term.

  • person – A database row representing a particular student.

  • url_prefix

Returns

a list of HTML elements for the TA entitlement section. The section provides forms for TA scholarship or override entitlements as well as TA assignment history.

uw.local.teaching.webui.ta.eval module

GRAD TA Evluation UI

Implements the Grad TA evaluation process online

uw.local.teaching.webui.ta.eval.render_ta_eval(cursor, taeval, editable, confidential=True)[source]

Renders TA evaluation form

Parameters
  • cursor – DB connection cursor.

  • taeval – A databse row representing a TA evaluation.

  • editable (bool) – Whether the evaluation is editable.

Returns

an html list containing a view or editable TA evaluation.

uw.local.teaching.webui.ta.eval.render_ta_index(cursor, term, admin, roles, prefix='')[source]

Render as HTML the TA assignments for an offering.

Parameters
  • cursor – DB connection cursor.

  • term – Object representing a UW term.

  • admin – A database row representing an admin unit.

  • roles – A list of user roles for a particular admin unit.

  • prefix – The URL prefix to use for links to TA evaluations.

Returns

An HTML fragment representing the list of TA assignments.

uw.local.teaching.webui.ta.planner module

TA planner display implementation.

The TA planner is an overall view of TA assignments for a term.

uw.local.teaching.webui.ta.position module

Position management UI implementation.

This module implements the Web user interface for managing available job positions.

uw.local.teaching.webui.ta.position.format_positions(cursor, prefix, admins, roles)[source]

uw.local.teaching.webui.ta.setup module

Per-term TA assignment setup.

This is the implementation of the form for adjusting the “tentative” and “final” dates which control release of TA information to course staff and TAs.

uw.local.teaching.webui.ta.student module

Student-related TA assignment display routines.

These are functions related to displaying TA information for students.

uw.local.teaching.webui.ta.student.cannot_remove(r)[source]

Determine whether a student can be removed from the list.

Parameters

r – a database row representing a student, as passed to format_students.

This attempts to require a student to be in some sense “blank” before they can be removed to avoid accidentally deleting important information.

uw.local.teaching.webui.ta.student.format_citizenship(r)[source]

Format a citizenship status in a convenient form.

Parameters

r – a database row representing a student, as passed to format_students.

All that matters for TA assignment is whether the person is here on a student permit. Accordingly, we display “Visa” if so, otherwise the column remains blank.

uw.local.teaching.webui.ta.student.format_plans(cursor, term_id, person_id)[source]

Format a student’s plans in a convenient form.

Parameters

cursor – DB connection cursor.

Displays all the plan codes, with each equipped with a title attribute to allow seeing the plan description when hovering the mouse cursor over it.

uw.local.teaching.webui.ta.student.format_students(cursor, unit, prefix, students, roles, current_term=None)[source]

Format a table of graduate students with TA assignment information.

Parameters
  • cursor – DB connection cursor.

  • prefix – URL prefix for links to individual student pages.

  • students – the student records, typically row objects obtained from the database.

  • roles – A list of user roles for a particular unit

  • current_term – the current term, or None if the table should leave out the columns that are relative to a current term.

uw.local.teaching.webui.ta.student.format_supervision(cursor, term_id, person_id)[source]

Format a student’s supervisors in a convenient form.

Parameters
  • cursor – DB connection cursor.

  • term_id – The academic term of interest.

  • person_id – The identity of the student.

A better-formatted version of the query:

WITH t AS (
SELECT *
FROM std_term_grad_supervision NATURAL JOIN std_grad_supervisor
WHERE (term_id, uw_id) = ([[term_id]], (select uw_id::quest_uw_id from person_identity_complete where person_id = [[person_id]]))
)
SELECT t.*, person_id AS supervisor_person_id
FROM t LEFT JOIN person_identity_complete AS pic ON (pic.uw_id = t.supervisor_uw_id::text);
ORDER BY supervisor_seq
uw.local.teaching.webui.ta.student.get_students(cursor, unit, term, where=None)[source]
uw.local.teaching.webui.ta.student.render_assignment_controls(cursor, unit, term, person, student, table)[source]
uw.local.teaching.webui.ta.student.student_render_assignments(cursor, remote_identity, show_ta_history)[source]

uw.local.teaching.webui.ta.ta module

Main menu UI implementation for TA management.

This includes the main menu and the per-term menu.

uw.local.teaching.webui.ta.ta.render_ta_eval_list(cursor, ta_evals, first_column_name, overall_rating=False)[source]

uw.local.teaching.webui.ta.ui module

UI-related utility routines for TA management.

These are functions to generate fragments of HTML that are useful throughout the TA management portion of the application.

uw.local.teaching.webui.ta.ui.format_actual(actual, planned, label=False)[source]

Format an actual number of units, noting differences from plan.

Parameters
  • actual – the actual number of TA units currently assigned.

  • planned – the planned number of TA units to assign, or None.

  • label (bool) – whether or not to label the number as being units.

Note that the actual number of units cannot be None. If the actual and planned units are the same, simply format the actual units using format_units. Otherwise, append a span indicating if the plan is missing (None), or if the actual units are over or under the planned units.

uw.local.teaching.webui.ta.ui.format_entitlement(units, label=False)[source]

Format a number of TA units which is an entitlement.

Parameters
  • units – the number of TA units, or None.

  • label (bool) – whether or not to label the number as being units.

If the number of units is negative, highlight it in red. Otherwise, this is no different from format_units.

uw.local.teaching.webui.ta.ui.format_units(units, label=False)[source]

Format a number of TA units.

Parameters
  • units – the number of TA units, or None.

  • label (bool) – whether or not to label the number as being units.

An input of None results in returning None. Otherwise, the number is formatted; if label is True, then “unit” or “units” as appropriate is appended.

Module contents

TA management interface implementation.

This module implements the Web user interface for managing TA assignments.