Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ReinoutWW committed Jan 21, 2025
2 parents 6f3c47a + 4be4911 commit 6488c41
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
8 changes: 4 additions & 4 deletions HAN.Repositories/CourseComponentRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public override void Add(TEntity entity)
if (entity == null)
throw new ArgumentNullException(nameof(entity));

entity.EvlIds = ValidateAndResolveEvlIds(entity.EvlIds);
entity.FileIds = ValidateAndResolveFileIds(entity.FileIds);
entity.EvlIds = ValidateEvls(entity.EvlIds);
entity.FileIds = ValidateFiles(entity.FileIds);

Entity.Add(entity);
_context.SaveChanges();
Expand Down Expand Up @@ -111,7 +111,7 @@ public void AddFileToCourseComponent(int courseComponentId, int fileId)
}
}

private List<int> ValidateAndResolveEvlIds(List<int> evlIds)
private List<int> ValidateEvls(List<int> evlIds)
{
if (evlIds == null)
throw new ArgumentNullException(nameof(evlIds));
Expand All @@ -126,7 +126,7 @@ private List<int> ValidateAndResolveEvlIds(List<int> evlIds)
return evlIds;
}

private List<int> ValidateAndResolveFileIds(List<int> fileIds)
private List<int> ValidateFiles(List<int> fileIds)
{
if (fileIds == null)
throw new ArgumentNullException(nameof(fileIds));
Expand Down
4 changes: 0 additions & 4 deletions HAN.Services/CourseValidationService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using HAN.Services.DTOs;
using HAN.Services.DTOs.CourseComponents;
using HAN.Services.Interfaces;
using HAN.Services.Validation;

Expand All @@ -8,18 +7,15 @@ namespace HAN.Services;
public class CourseValidationService : ICourseValidationService
{
private readonly ICourseService _courseService;
private readonly CourseComponentService _courseComponentService;
private readonly ICourseCompletenessValidator _completenessValidator;
private readonly ICourseOrderValidator _orderValidator;

public CourseValidationService(
ICourseService courseService,
CourseComponentService courseComponentService,
ICourseCompletenessValidator completenessValidator,
ICourseOrderValidator orderValidator)
{
_courseService = courseService;
_courseComponentService = courseComponentService;
_completenessValidator = completenessValidator;
_orderValidator = orderValidator;
}
Expand Down
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ This project is a course generator and validator system.
It is a project for the course I-OOSE at the HAN University of Applied Sciences.

## Architecture
![Design-phase-ClassDiagram-Page-9 drawio (1)](https://github.com/user-attachments/assets/d0fe015c-3091-4917-b92d-c4c4e63e3599)
![Design-phase-ClassDiagram-Page-9 drawio (2)](https://github.com/user-attachments/assets/048613d3-8df4-4275-b0f1-0bb635575135)


> [!IMPORTANT]
> Since the architecture is experimental, it's currently already deprecated, and will be changed over time.
Expand All @@ -22,6 +23,27 @@ It is a project for the course I-OOSE at the HAN University of Applied Sciences.
[![GitHub](https://img.shields.io/badge/GitHub-Code_Hosting-181717?style=for-the-badge&logo=github&logoColor=white)](https://github.com/)
[![Obsidian](https://img.shields.io/badge/Obsidian-Knowledge_Management-483699?style=for-the-badge&logo=obsidian&logoColor=white)](https://obsidian.md/)

## Preview

### Home
![image](https://github.com/user-attachments/assets/589f6a74-44b3-404f-8d7c-e8a373c01f9d)

### Easily create schedules!
![image](https://github.com/user-attachments/assets/afcfddbd-c9c2-439e-a179-fe3bf7d01348)

### And get instant feedback on your courses' schedule quality!
![image](https://github.com/user-attachments/assets/b18fdab6-54e0-4b7a-bac0-53b0ea4d79c0)

### Save grades directly in Blockchain to ensure transparancy!
![image](https://github.com/user-attachments/assets/b74d0e72-d001-4e5c-bdc6-9ef06796db9f)

### Then, you can always see your Blockchain history
![image](https://github.com/user-attachments/assets/1c698172-75cf-40dc-a1f5-9a4f5af3e3d4)

### And, always live monitoring on the Blockchain network!
![image](https://github.com/user-attachments/assets/6f0f88f1-cc14-4280-83a7-d07bf86c457f)


## Authors
- [Reinout Wijnholds](https://github.com/ReinoutWW)
- [Wob Jelsma](https://github.com/wobedydob)

0 comments on commit 6488c41

Please sign in to comment.