Class challenge card

Class against class: lanes with a runner for each class racing to a goal on reading minutes, attendance or a fundraiser, with the leader marked, the total together and the time left.

Category: Schools. Tags: Schools and campuses, Leaderboards and standings, Recognition.

Previews

Class challenge
Canvas
Class challenge
Corner
Class challenge
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.

A class is a name, never a student.

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
formatstring"number""number", "percent", "money"How values show: a number with its unit, a percentage or an amount of money.
unitstring""maxLength: 12The unit after a number, for example min or books.
currencystring"$"maxLength: 3The symbol before an amount of money.
scaleFromnumber0minimum: 0; maximum: 99999999Where the bars start, so close values (attendance of 94 to 98 percent) still show a difference.
showTotalbooleantrueShow the total of all classes (the average for percentages) and the countdown.
timeZonestring, nullnull

Dynamic properties

NameTypeDefaultValues and limitsDescription
titlestring"Class challenge"maxLength: 40The heading, for example Reading challenge.
classesarray[]minItems: 0; maxItems: 10The classes and their values. Rank, bar lengths and the leader come from the values. A class is a name, never a student.
classes[].namestringminLength: 1; maxLength: 48; Required
classes[].valuenumberminimum: 0; maximum: 99999999; Required
classes[].colorstringpattern: "^#[0-9A-Fa-f]{6}$"The class colour as #RRGGBB. Absent, the class takes a colour from the theme.
goalnumber0minimum: 0; maximum: 99999999The target. 0 sets none.
goalForstring"each""each", "total"each: every class races to the goal. total: the classes reach it together.
endsAtstring""maxLength: 40ISO 8601 instant the challenge ends (a time without an offset is wall time in the screen's zone). Empty shows no countdown.

Canvas example

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

{
  "id": "class-challenge",
  "primitive": "card",
  "card": "class-challenge",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "class-challenge-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/class-challenge-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"title":"Class challenge","classes":[],"goal":0,"goalFor":"each","endsAt":""}}'