Office hours card

Which faculty and teaching assistants are in their office hours now, when each one is next in, and the room to find them.

Category: Schools. Tags: Schools and campuses, Schedules, Wayfinding and directories.

Previews

Office hours
Canvas
Office hours
Corner
Office hours
Chip

Views and forms

Views: canvas, corner, chip. Canvas forms: landscape, portrait, square, strip.

Card views, themes and publishing. Browse the gallery.

Data and privacy

This card uses its configured properties and live card data.

Only the hours and rooms the department publishes.

Properties

For theme, background, accent and position, see Common properties.

Set static properties in params. Bind data to a project card data key for live values; that document holds only dynamic properties. Without a data key, put the complete configuration in params. Nested rows describe the contents of their parent property.

Static properties

NameTypeDefaultValues and limitsDescription
titlestring"Office hours"maxLength: 40
soonMinutesinteger60minimum: 5; maximum: 240Hours starting within this many minutes read as starting soon.
sortstring"status""status", "feed"status lists who is in first, then who is next; feed keeps the order given.
showCoursebooleantrue
hour12booleanfalse
timeZonestring, nullnull

Dynamic properties

NameTypeDefaultValues and limitsDescription
peoplearray[]maxItems: 24Faculty and teaching assistants with their weekly office hours.
people[].namestringminLength: 1; maxLength: 40; Required
people[].rolestringmaxLength: 30Professor, TA, advisor.
people[].coursestringmaxLength: 30CPSC 110.
people[].roomstringmaxLength: 24ICICS 304.
people[].hoursarraymaxItems: 10The weekly office hours.
people[].hours[].daysarraymaxItems: 7Weekdays; empty means every day.
people[].hours[].startstringmaxLength: 5; RequiredHH:MM in the screen's zone.
people[].hours[].endstringmaxLength: 5; Required
people[].awaybooleanfalseOut for now whatever the hours say; note says why.
people[].notestringmaxLength: 40At a conference until Friday.

Canvas example

Add this item to a playlist page’s primitives. Publish the playlist and assign a screen.

{
  "id": "office-hours",
  "primitive": "card",
  "card": "office-hours",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "office-hours-main"
}

Write live data

Create this document before showing the card, then replace it to update the screen without republishing. Use the same project as the playlist. Supply your API authorization through the environment; see API authentication.

curl --request PUT "https://api.screenrig.ai/api/card-data/office-hours-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"people":[]}}'