Skip to content
This repository has been archived by the owner on Sep 4, 2023. It is now read-only.

Commit

Permalink
Link submission query with competence profile endpoint (#79)
Browse files Browse the repository at this point in the history
* Added Professional development

* Rename namespace to correspond with coding guidelines

* Separate records into different files

* Rename Value to Name to correspond with domain

* Rename Value to Level to correspond with domain

* Add professional skills to domain

* Add short name to architectural layer and professional skills

* Rename properties in competence profile random data filler

* Rename CompetenceProfileOutcome to ProfessionalTaskOutcome

* Add Professional skill outcome to competence profile

* Use singular name

* Use id references instead of name values

* Use type keyword

* Add submissions from all courses from student to competence profile transformation

* Fix merge issues

* Add task and skill outcomes to competence profile return type

* Fetch terms from canvas

* Remove redundant imports

* Change default application url

* Prevent browser from launching on every restart

* Cleanup code

* Add filter enrolment term function

* Add terms to competence profile

* Remove unused terms function

* Added filter on professional outcomes and sorting

* Removed unused things

* V0.1

* Defining colors for elements

* Remove obsolete styling

* Update pnpm lock file

* Add Vue router

* Resolve ESLint warnings

* Add authorization view and controller

* Use controller templating for route

* A lot of stuff

* A lot of stuff

* Working

* Set it all to vue 3 supported format

* Fix import path

* Add CORS policy

* Realtime user data

* Add terms to competence profile

* Cleanup code and improve competence profile converter

* Filter on PostedAt value

---------

Co-authored-by: Tara <tarawillink@gmail.com>
Co-authored-by: Sven <svenroermond@hotmail.com>
Co-authored-by: Neal Geilen <info@nealgeilen.nl>
  • Loading branch information
4 people committed May 26, 2023
1 parent c607762 commit 2fb0033
Show file tree
Hide file tree
Showing 29 changed files with 341 additions and 138 deletions.
11 changes: 11 additions & 0 deletions Epsilon.Abstractions/Component/ICompetenceProfileConverter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Epsilon.Abstractions.Model;
using Epsilon.Canvas.Abstractions.Model;
using Epsilon.Canvas.Abstractions.Model.GraphQl;
using Epsilon.Canvas.Abstractions.QueryResponse;

namespace Epsilon.Abstractions.Component;

public interface ICompetenceProfileConverter
{
public CompetenceProfile ConvertFrom(GetAllUserCoursesSubmissionOutcomes getAllUserCoursesSubmissionOutcomes, IEnumerable<EnrollmentTerm> terms);
}
8 changes: 6 additions & 2 deletions Epsilon.Abstractions/Model/CompetenceProfile.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
using Epsilon.Canvas.Abstractions.Model;

namespace Epsilon.Abstractions.Model;

public record CompetenceProfile(
HboIDomain HboIDomain,
IEnumerable<CompetenceProfileOutcome> CompetenceProfileOutcomes
IHboIDomain HboIDomain,
IEnumerable<ProfessionalTaskResult> ProfessionalTaskOutcomes,
IEnumerable<ProfessionalSkillResult> ProfessionalSkillOutcomes,
IEnumerable<EnrollmentTerm> Terms
);
9 changes: 0 additions & 9 deletions Epsilon.Abstractions/Model/CompetenceProfileOutcome.cs

This file was deleted.

38 changes: 0 additions & 38 deletions Epsilon.Abstractions/Model/HboIDomain.cs

This file was deleted.

8 changes: 0 additions & 8 deletions Epsilon.Canvas.Abstractions/Model/GraphQL/AssessmentRating.cs

This file was deleted.

8 changes: 0 additions & 8 deletions Epsilon.Canvas.Abstractions/Model/GraphQL/Assignment.cs

This file was deleted.

8 changes: 0 additions & 8 deletions Epsilon.Canvas.Abstractions/Model/GraphQL/Course.cs

This file was deleted.

7 changes: 0 additions & 7 deletions Epsilon.Canvas.Abstractions/Model/GraphQL/Module.cs

This file was deleted.

8 changes: 0 additions & 8 deletions Epsilon.Canvas.Abstractions/Model/GraphQL/Node.cs

This file was deleted.

7 changes: 0 additions & 7 deletions Epsilon.Canvas.Abstractions/Model/GraphQL/Outcome.cs

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions Epsilon.Canvas.Abstractions/Model/GraphQL/User.cs

This file was deleted.

4 changes: 2 additions & 2 deletions Epsilon.Canvas.Abstractions/Model/GraphQl/AssessmentRating.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Text.Json.Serialization;

namespace Epsilon.Canvas.Abstractions.Model.GraphQL;
namespace Epsilon.Canvas.Abstractions.Model.GraphQl;

public record AssessmentRating(
[property: JsonPropertyName("points")] double? Points,
[property: JsonPropertyName("points")] double? Points,
[property: JsonPropertyName("outcome")] Outcome? Outcome
);
4 changes: 2 additions & 2 deletions Epsilon.Canvas.Abstractions/Model/GraphQl/Assignment.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Text.Json.Serialization;

namespace Epsilon.Canvas.Abstractions.Model.GraphQL;
namespace Epsilon.Canvas.Abstractions.Model.GraphQl;

public record Assignment(
[property: JsonPropertyName("name")] string Name,
[property: JsonPropertyName("name")] string? Name,
[property: JsonPropertyName("modules")] List<Module>? Modules
);
4 changes: 2 additions & 2 deletions Epsilon.Canvas.Abstractions/Model/GraphQl/Course.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Text.Json.Serialization;

namespace Epsilon.Canvas.Abstractions.Model.GraphQL;
namespace Epsilon.Canvas.Abstractions.Model.GraphQl;

public record Course(
[property: JsonPropertyName("name")] string Name,
[property: JsonPropertyName("name")] string? Name,
[property: JsonPropertyName("submissionsConnection")] SubmissionsConnection? SubmissionsConnection
);
4 changes: 4 additions & 0 deletions Epsilon.Canvas.Abstractions/Model/GraphQl/Module.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
using System.Text.Json.Serialization;

<<<<<<< HEAD
namespace Epsilon.Canvas.Abstractions.Model.GraphQL;
=======
namespace Epsilon.Canvas.Abstractions.Model.GraphQl;
>>>>>>> f6062a3 (Link submission query with competence profile endpoint (#79))

public record Module(
[property: JsonPropertyName("name")] string Name
Expand Down
6 changes: 4 additions & 2 deletions Epsilon.Canvas.Abstractions/Model/GraphQl/Outcome.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using System.Text.Json.Serialization;

namespace Epsilon.Canvas.Abstractions.Model.GraphQL;
namespace Epsilon.Canvas.Abstractions.Model.GraphQl;

public record Outcome(
[property: JsonPropertyName("title")] string? Title
[property: JsonPropertyName("_id")] int Id,
[property: JsonPropertyName("title")] string? Title,
[property: JsonPropertyName("masteryPoints")] double? MasteryPoints
);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Text.Json.Serialization;

namespace Epsilon.Canvas.Abstractions.Model.GraphQL;
namespace Epsilon.Canvas.Abstractions.Model.GraphQl;

public record RubricAssessmentNode(
[property: JsonPropertyName("assessmentRatings")] List<AssessmentRating>? AssessmentRatings,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
using System.Text.Json.Serialization;

<<<<<<< HEAD
namespace Epsilon.Canvas.Abstractions.Model.GraphQL;
=======
namespace Epsilon.Canvas.Abstractions.Model.GraphQl;
>>>>>>> f6062a3 (Link submission query with competence profile endpoint (#79))

public record RubricAssessmentsConnection(
[property: JsonPropertyName("nodes")] List<RubricAssessmentNode>? Nodes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
using System.Text.Json.Serialization;

<<<<<<< HEAD
namespace Epsilon.Canvas.Abstractions.Model.GraphQL;

public record SubmissionsConnection(
[property: JsonPropertyName("nodes")] List<Node>? Nodes
=======
namespace Epsilon.Canvas.Abstractions.Model.GraphQl;

public record SubmissionsConnection(
[property: JsonPropertyName("nodes")] List<SubmissionsConnectionNode>? Nodes
>>>>>>> f6062a3 (Link submission query with competence profile endpoint (#79))
);
7 changes: 7 additions & 0 deletions Epsilon.Canvas.Abstractions/Model/GraphQl/User.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
using System.Text.Json.Serialization;

<<<<<<< HEAD
namespace Epsilon.Canvas.Abstractions.Model.GraphQL;

public record User(
[property: JsonPropertyName("name")] string Name
=======
namespace Epsilon.Canvas.Abstractions.Model.GraphQl;

public record User(
[property: JsonPropertyName("name")] string? Name
>>>>>>> f6062a3 (Link submission query with competence profile endpoint (#79))
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System.Text.Json.Serialization;
using Epsilon.Canvas.Abstractions.Model.GraphQl;

namespace Epsilon.Canvas.Abstractions.QueryResponse;

public record GetAllUserCoursesSubmissionOutcomes(
[property: JsonPropertyName("data")] GetAllUserCoursesSubmissionOutcomes.CourseData? Data
)
{
public record CourseData(
[property: JsonPropertyName("allCourses")] List<Course>? Courses
);
};
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Text.Json.Serialization;
using Epsilon.Canvas.Abstractions.Model.GraphQL;
using Epsilon.Canvas.Abstractions.Model.GraphQl;

namespace Epsilon.Canvas.Abstractions.QueryResponse;

public record GetUserSubmissionOutcomes(
[property: JsonPropertyName("data")] GetUserSubmissionOutcomes.CourseData? Data
public record GetUserCourseSubmissionOutcomes(
[property: JsonPropertyName("data")] GetUserCourseSubmissionOutcomes.CourseData? Data
)
{
public record CourseData(
Expand Down
35 changes: 33 additions & 2 deletions Epsilon.Canvas/QueryConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

public static class QueryConstants
{
public const string GetUserSubmissionOutcomes = @"
query GetUserSubmissionOutcomes {
public const string GetUserCourseSubmissionOutcomes = @"
query GetUserCourseSubmissionOutcomes {
course(id: $courseId) {
name
submissionsConnection {
Expand Down Expand Up @@ -32,4 +32,35 @@ query GetUserSubmissionOutcomes {
}
}
";

public const string GetAllUserCoursesSubmissionOutcomes = @"
query GetAllUserCoursesSubmissionOutcomes {
allCourses {
name
submissionsConnection(studentIds: $studentIds) {
nodes {
assignment {
name
}
postedAt
rubricAssessmentsConnection {
nodes {
assessmentRatings {
points
outcome {
_id
title
masteryPoints
}
}
user {
name
}
}
}
}
}
}
}
";
}
Loading

0 comments on commit 2fb0033

Please sign in to comment.