Skip to content

Add Competency dashboard to Aspects #387

Open
0 of 8 issues completed
Open

Description

@crathbun428

Summary

As an administrator or course team member, I want to be able to view data for the competencies on my instance, so I can view and report out on competency mastery data for my instance.

Problem Statement

With Competencies being added to the platform in the Willow release, administrators and course teams will need to be able to view competency mastery data so that they can monitor and report out on competency attainment for their instance.

Acceptance Criteria

A new Competency dashboard exists in Superset that can be filtered by Organization, Competency, Course, or Pathway (Note: Competencies will not be tied to pathways in Willow; however, Competencies will be tied to courses - which could represent items in a pathway). All of the charts and tables should update based on how the dashboard has been filtered.

Note: I've included a rough low-fidelity mockup that I used Claude to help me create below. This mockup should be used to help with questions about layout.

Image

Sub-issues

Sub-issues

0 of 8 Issues completed
Loading 8 sub-issues

Activity

  1. added
    epic
    willow
    on Aug 13, 2026
  2. moved this to Backlog - Is resourced in Open edX Roadmapon Aug 13, 2026
  3. moved this to All Epics - no status in Data Working Groupon Aug 13, 2026
  4. felipemontoya commented on Nov 11, 2026

    @felipemontoya
    Member

    I worked on the competency dashboard today, explored different options and reached some results that I'm sharing here with the overall goal of confirming that the approach I'm taking is correct. Also to ask for guidance on some product questions.

    I published the work on the different repos as draft PRs to not draw much attention yet.

    openedx/openedx-core#932
    openedx/platform-plugin-aspects#279
    openedx/aspects-dbt#184
    openedx/tutor-contrib-aspects#1392
    openedx/xapi-db-load#289

    The overall shape is the same as what we did for Pathways.

    • Learner status sinks

      • student_competency_status -> The main sink that holds the mastery status for a student (sadly only 2/3 possibilities).
      • student_competency_criteria_group_status -> needed to link course attempts. Those carry the "Not demonstrated" status. I could not get those from the student_competency_status alone
    • openedx-core -> The same kind of thing we did in pathways, but this time for competency status.

    • xapi-db-load

    • aspects-dbt -> I think I missed this during the pathways work, but it adds tables that keep only the latest dump of each row.

    • tutor-contrib-aspects -> The CI and the dashboards. I don't expect to merge what I have right now, but I want to share some screenshots for you to get an idea.

    Big overarching questions:

    1. Confirm: learner status reaches ClickHouse through sinks, like enrollments

    We discussed this for the pathways work and in general the end status is what we definitely don't want to lose if the event stream is down or must be reconstructed.

    1. How should Aspects know a taxonomy is a competency taxonomy?

    For reasons beyond our control, CompetencyTaxonomy uses multi-table inheritance, so post_save is sent with the child class as sender and we don't get the taxonomy at all or the information that it is a CompetencyTaxonomy. I see two roads ahead:

    A: extend the existing taxonomy sink to listen to the subclass and add a taxonomy_type.
    B: a new competency_taxonomy sink with its own table.

    I'm not a fan of either of those, but I lean towards B. The CBE team chose a different table and wrote an ADR (openedx_learning 0002) about it where they explicitly rejected the taxonomy type field. Aspects would follow suit.

    1. [Product] Do the status charts count learners or learner-course pairs?

    Core only stores "Not Demonstrated" per course, never per competency, because a learner can still demonstrate it in another course. So we must choose:

    Per learner (what the mockup shows): each learner counts once, and we derive "Not Demonstrated" when every course they took for that competency ended in it. That means we would do a calculation in aspects that is not done in core and its limited to the courses where the learner is enrolled.
    Per course: all four states come straight from core, but a learner in two courses counts twice, and the totals won't match the learner table.

    Here I need guidance I dont have a particular preference. Also I can explain in more detail if you want.

    Side questions

    • Is a mastery openedx-event (and xAPI statement) worth adding in this project? I don't need it for the work ahead, just making sure that we are letting others connect to stable extension points.
    • Should dashboards show the rule behind a criterion?
      • For example "requires ≥ 80% on Midterm" next to a competency or criterion. I thought it was nice, but it requires more backend work to get that information into Clickhouse.

    @crathbun428 @bmtcril

    Here is how the dashboard looks right now in my dev:
    Dashboard__student_competency_status__only

  5. bmtcril commented on Nov 13, 2026

    @bmtcril
    Contributor

    @felipemontoya I think the design and direction are good, thanks for pulling everything together into one place! I've got some answers for your questions and a few things I noticed in the review.

    Your questions

    1. Status through sinks: agreed. Same reasoning as enrollments. It is the end state we cannot afford
      to lose.

    2. Taxonomy type: I'd lean toward A, but I'm not married to it:

    • We need a listener on the subclass whichever option we pick.
    • Once that listener exists, a taxonomy_type column on the same row is a small step. Option B adds a
      second table and a join, and still needs the listener.
    • I think does follow the CBE team's lead in terms of the implementation. ADR 0013 rejects a type field
      on the Taxonomy model, but the platform's serializer derives taxonomy_type anyway. Our sink
      serializer is a consumer in the same position as that.

    One gotcha with A: sink inserts are positional CSV and run with input_format_allow_errors_num=1. So
    the new column has to go last, with a default, and the plugin and migration have to ship together as a
    breaking change, as with pathways. Otherwise the rows will probably be silently dropped.

    1. Learners or learner-course pairs: I'll leave that one to @crathbun428 . One technical input. Core refuses
      to store "Not Demonstrated" per competency on purpose. The check constraint says a learner can still
      demonstrate it in another course. If Aspects derives it, we are publishing a status that core does not have.
      A possible suggestion- learner counts use core's competency statuses as they are, and a separate
      per-course chart, labelled as "per course", shows Not Demonstrated.

    I think we only need a mastery event and xAPI statement if we have a desire to show aggregated time
    series data about "mastery in general" like if someone wanted a "student mastery accomplishments
    per day" over a semester. It seems likely someone will want that someday and it would be nice not to
    not have to replay or synthesize events for it. So if we have time both would be great, if not then maybe
    just the tracking log for the time being?

    Random things Claude and I found in the PRs

    I know they're in draft so I'm just leaving them here in case they're helpful.

    1. Migration numbers collide with #1384. Both PRs add revision 0042 with down_revision = "0041".
      The description of #1392 says it is stacked on the pathway PR, but the branch is on main. Once #1384
      merges these need to become 0043 and 0044.

    2. parent_group_id Nullable(Int64) never holds NULL. The sink writes None as a quoted empty
      string, and ClickHouse reads that as 0 (checked on 25.8). So a root group has parent_group_id = 0,
      and the dbt and source docs that say "null for a root group" are wrong. I'd make it a plain Int64
      with 0 for roots, which is what tag.parent already does, and update the docs and the xapi-db-load
      table definition to match.

    3. "Statuses only rise" holds today but core does not promise it. ADR 0004 Decision 6 lets a staff
      edit lower a status, and Decision 5 adds a manual recalculation. Neither exists in core yet. Two things
      follow:

      • The tables cope, because the latest dump wins. But those future paths must send post_save too, or
        ClickHouse keeps the old value. A note on openedx-core#932 would help whoever builds them.
      • "modified on a Demonstrated row is the mastery date" should be described as true today, not as
        an invariant. Time to mastery depends on it.
    4. The group sink writes root, course and leaf rows, and only course rows are used. The dataset
      filters on group_level = 'course', and xapi-db-load only generates course rows. Every raise is one
      Celery task and one single-row insert, so this is about three times the volume we need, and it peaks
      during a course-wide regrade. Can the sink skip the other levels until something needs them? If we
      keep them:

      • get_course_key walks group.parent for a leaf, which adds queries per row in a --force
        backfill. select_related would need group__parent__course.
      • A group can be archived in core. Its status rows stay and keep counting. Is that what we want
        on the dashboard?
    5. Sort key on the dbt models. order_by="(id)" dedupes correctly, but no query filters on id,
      so every read scans the table. The natural keys are just as unique and are what the charts filter
      on: (tag_id, actor_id) for the competency status, and (course_key, tag_id, actor_id, group_id) for
      the group status. dim_most_recent_enrollment does the same with (org, course_key, actor_id).
      Two smaller points:

      • Readers need FINAL, as dim_most_recent_course_tags uses on the tag models.
      • status could be LowCardinality(String), like course_enrollment.mode.

      Using ReplacingMergeTree(time_last_dumped) with a parsed DateTime64 version is a good change from
      the join-on-max pattern in the tag models. 👍

  6. crathbun428 commented on Nov 13, 2026

    @crathbun428
    Author

    Great questions, @felipemontoya!

    _[Product] Do the status charts count learners or learner-course pairs?
    Core only stores "Not Demonstrated" per course, never per competency, because a learner can still demonstrate it in another course. So we must choose:

    Per learner (what the mockup shows): each learner counts once, and we derive "Not Demonstrated" when every course they took for that competency ended in it. That means we would do a calculation in aspects that is not done in core and its limited to the courses where the learner is enrolled.
    Per course: all four states come straight from core, but a learner in two courses counts twice, and the totals won't match the learner table.

    Here I need guidance I dont have a particular preference. Also I can explain in more detail if you want._

    This is an excellent question, and I can see how it presents us with some challenges. My understanding is that for most it does not matter which course a learner masters something, only that they mastered it. And in the future, someone may have "mastered" something off platform and we'll want it to be reflected/known by the platform somehow. My gut would say that if a learner... did not master the competency in one course and then mastered it elsewhere, I would count that they mastered it. Same scenario if they partially attempted a competency in one course and then mastered the same competency in another, I'd want to count their status as "Demonstrated mastery". I think the rule is essentially: The highest status is what is counted where the statuses from lowest to highest are as follows: Available, Not Demonstrated, Partially Attempted, Demonstrated. I'm thinking this can apply to the visualizations and learner table in the dashboard, but please let me know if you have any follow-up questions or concerns about this or if there are edge cases I'm not thinking of...

    This presents us with a couple of problems though:

    1. If the user filters the dashboard by a specific course.... should they only see the learner's competency mastery details in the context of the course they filtered...?
    2. If the user only has access to one course and the learner has mastered this competency elsewhere on the instance... should they only see the learner's competency mastery details in the context of the course they have access to...?
      Let me see if I can get some detail on what the user would expect in these scenarios....

    Should dashboards show the rule behind a criterion?
    For example "requires ≥ 80% on Midterm" next to a competency or criterion. I thought it was nice, but it requires more backend work to get that information into Clickhouse.

    Great question! I think so - I have a question out to the competency team about this, but most likely, yes, we'll want to include this.

    Re: The screenshot you shared
    So far the dashboard is looking good - there may be some tweaks needed to the headers/labeling based on the changes I'm proposing that are in front of the competency team now, but so far so good on the dashboard you've built. I also am waffling about the idea of the competency path. On one hand, I like that it gives the user all the information, on the other hand its less clean looking than showing the rightmost competency in the path only. I'm going to need to think on this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    aspectsepicwillow

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions