Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development: Add competency information to metrics DTO #8601

Conversation

MaximilianAnzinger
Copy link
Contributor

@MaximilianAnzinger MaximilianAnzinger commented May 15, 2024

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) database calls.
  • I strictly followed the server coding and design guidelines.
  • I documented the Java code using JavaDoc style.

Motivation and Context

Adds necessary information to the metrics dto to fetch all required data for the new dashboard with only one REST-call.

Review Progress

Performance Review

  • I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance

Code Review

  • Code Review 1
  • Code Review 2

@github-actions github-actions bot added tests server Pull requests that update Java code. (Added Automatically!) labels May 15, 2024
@MaximilianAnzinger MaximilianAnzinger changed the base branch from develop to hd3-develop May 15, 2024 15:14
@FelixTJDietrich
Copy link
Contributor

FelixTJDietrich commented May 15, 2024

For reference, this is how it currently looks like:

{
  "exerciseMetrics" : {
    "exerciseInformation" : {
      "1" : {
        "id" : 1,
        "shortName" : "W1E1",
        "title" : "Exercise 1",
        "start" : "2024-05-07T12:57:00Z",
        "due" : "2024-05-08T12:57:00Z",
        "maxPoints" : 10.0,
        "type" : "de.tum.in.www1.artemis.domain.ProgrammingExercise"
      },
      "2" : {
        "id" : 2,
        "title" : "W1E2",
        "start" : "2024-05-07T12:58:00Z",
        "due" : "2024-05-07T14:58:00Z",
        "maxPoints" : 10.0,
        "type" : "de.tum.in.www1.artemis.domain.TextExercise"
      },
      "3" : {
        "id" : 3,
        "title" : "Text Exercise 2",
        "start" : "2024-05-13T08:14:00Z",
        "due" : "2024-05-13T08:16:00Z",
        "maxPoints" : 100.0,
        "type" : "de.tum.in.www1.artemis.domain.TextExercise"
      },
      "4" : {
        "id" : 4,
        "title" : "W2 asdasdf",
        "start" : "2024-05-13T13:34:00Z",
        "due" : "2024-05-13T13:35:00Z",
        "maxPoints" : 50.0,
        "type" : "de.tum.in.www1.artemis.domain.TextExercise"
      }
    },
    "averageScore" : {
      "1" : 0.0,
      "2" : 60.0,
      "3" : 65.1,
      "4" : 50.0
    },
    "averageLatestSubmission" : {
      "1" : 3.295138888888889,
      "2" : 36.986111111111114,
      "3" : 49.166666666666664,
      "4" : 91.66666666666667
    }
  },
  "lectureUnitStudentMetricsDTO" : {
    "lectureUnitInformation" : {
      "1" : {
        "id" : 1,
        "name" : "Amazing Text",
        "releaseDate" : "2024-05-15T16:14:00Z",
        "type" : "de.tum.in.www1.artemis.domain.lecture.TextUnit"
      },
      "2" : {
        "id" : 2,
        "name" : "Visit Google",
        "releaseDate" : "2024-05-15T16:14:00Z",
        "type" : "de.tum.in.www1.artemis.domain.lecture.OnlineUnit"
      }
    }
  },
  "competencyMetrics" : {
    "competencyInformation" : {
      "1" : {
        "id" : 1,
        "title" : "Test Competency 1",
        "softDueDate" : "2024-05-14T08:43:00Z",
        "optional" : false
      },
      "2" : {
        "id" : 2,
        "title" : "Test Competency 2",
        "optional" : false
      }
    },
    "exercises" : {
      "1" : [ 1, 2 ],
      "2" : [ 2 ]
    },
    "lectureUnits" : {
      "1" : [ 1 ],
      "2" : [ 2 ]
    }
  }
}

Looks good as far as I can see, I think this contains everything except completed and progress.
@MaximilianAnzinger with progress you mean the mastery of the competency?

Copy link
Contributor

@kaancayli kaancayli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have left some comments, but in general, we need to address the following points that are currently missing:

  • Include details of the exercises that belong to a competency (required for the exercise row component in the client).
  • Include details of the lecture units that belong to a competency.
  • Mark each exercise as completed or not (this is crucial for suggesting the next objective).
  • Mark each lecture unit as completed or not (this is also crucial for suggesting the next objective).
  • Include user progress information for a competency (important for displaying mastery and progress information).

Additionally, returning only the IDs of lecture units and exercises may result in unnecessary REST calls.

Aside from these points, the changes look good.

@MaximilianAnzinger
Copy link
Contributor Author

@kaancayli Thank you for your review.

Some remarks / questions:

  • Include details of the exercises that belong to a competency (required for the exercise row component in the client).

The DTO contains those already or are there any specific details you're missing?

Additionally, returning only the IDs of lecture units and exercises may result in unnecessary REST calls.

We do not only return the IDs. (see LectureUnitInformationDTO)

@MaximilianAnzinger MaximilianAnzinger marked this pull request as ready for review May 16, 2024 09:19
@MaximilianAnzinger MaximilianAnzinger requested a review from a team as a code owner May 16, 2024 09:19
Copy link
Contributor

@kaancayli kaancayli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good.

@kaancayli
Copy link
Contributor

kaancayli commented May 16, 2024

@MaximilianAnzinger Approved, since @FelixTJDietrich will work later on "Next objective" part of the competencies

@FelixTJDietrich FelixTJDietrich changed the title Development Add competency information to metrics dto Development: Add competency information to metrics DTO May 16, 2024
Copy link
Contributor

@FelixTJDietrich FelixTJDietrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also don't see any issues. I think we are potentially getting more exercise information now since there might be some linked to competencies. But I anyways have to do a fix later for the exercise statistics to filter out exercises where the due date has not passed.

Code looks good :) Thanks 🙏

@FelixTJDietrich FelixTJDietrich merged commit 3707543 into hd3-develop May 16, 2024
20 of 25 checks passed
@FelixTJDietrich FelixTJDietrich deleted the feature/adaptive-learning/add-competency-information-to-metrics-dto branch May 16, 2024 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review server Pull requests that update Java code. (Added Automatically!) tests
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

None yet

3 participants