Skip to content

Results format

Michal Hozza edited this page Oct 28, 2019 · 1 revision

Results internal format is a json like this:

{
  "cols": cols,
  "rows": rows
}

cols

[
  {
    "key": key,
    "name": display_name,
    "task": task_info
  },
  ...
]

key

Column id (e.g. task number, or "sum" for summary column).

display_name

Column display name (Usually a task number, or ∑).

task_info (optional)

{
  "id": task_id,
  "name": task_name
}

task_id

Id of the task in db (used for linking the task from the column header).

name

Name of the task (displayed when hovering the column header).

rows

[
  {
    "rank": rank,
    "user": user_info
    "active": active,
    "cell_list": cell_list
  },
  ...
]

rank

Rank of the user in the results page.

user_info

{
  "id": user_id,
  "name": user_full_name,
  "year": school_year,
  "school": school_info
  "username": username
}

user_id

Id of the user in DB (can be used to link to the user profile from results page), currently unused.

user_full_name

Full name of the user as displayed in the results page.

school_year

School year of the user.

school_info

{
  "id": school_id,
  "name": school_short_name,
  "verbose_name": school_full_name
},

school_id

Id of the school in DB.

school_short_name

School name abbreviation, displayed in the result page.

school_ifull_name

Full school name, displayed vhen hovering the shool name in the results page.

active

If the user is eligible for the results page. If active is false, the row is considered ignored.

cell_list

[
  {
    "active": active,
    "points": total_points,
    "auto_points": testing_points,
    "manual_points": reviewer_points
  },
]

active

Whether this cell is included in total. If false, the cell is grayed out.

Note that the total is also a cell, and it's not computed automatically based on this information.

total_points

Sum of auto_points and manual_points. This is displayed as a cell value.

testing_points

Points from automatic testing. Displayed when hovering the cell.

reviewer_points

Points from manual review, granted by the reviewer. Displayed when hovering the cell.