Skip to content

Commit 56ff1e2

Browse files
author
Binon
committed
Added Progress option
1 parent b089d86 commit 56ff1e2

File tree

3 files changed

+47
-2
lines changed

3 files changed

+47
-2
lines changed

LearningHub.Nhs.WebUI/Models/MoodleCourseResponseViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ public class MoodleCourseResponseViewModel
133133
public bool? Hidden { get; set; }
134134

135135
/// <summary>
136-
/// Gets or sets the overview files.
136+
/// Gets or sets the list of overview files.
137137
/// </summary>
138-
public List<object> OverviewFiles { get; set; }
138+
public List<MoodleOverviewFileViewModel> OverviewFiles { get; set; }
139139

140140
/// <summary>
141141
/// Gets or sets a value indicating whether activity dates are shown.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
namespace LearningHub.Nhs.WebUI.Models
2+
{
3+
/// <summary>
4+
/// MoodleOverviewFileViewModel.
5+
/// </summary>
6+
public class MoodleOverviewFileViewModel
7+
{
8+
/// <summary>
9+
/// Gets or sets the file name.
10+
/// </summary>
11+
public string? FileName { get; set; }
12+
13+
/// <summary>
14+
/// Gets or sets the file path.
15+
/// </summary>
16+
public string? FilePath { get; set; }
17+
18+
/// <summary>
19+
/// Gets or sets the file size in bytes.
20+
/// </summary>
21+
public int FileSize { get; set; }
22+
23+
/// <summary>
24+
/// Gets or sets the file URL.
25+
/// </summary>
26+
public string? FileUrl { get; set; }
27+
28+
/// <summary>
29+
/// Gets or sets the time the file was modified (Unix timestamp).
30+
/// </summary>
31+
public long TimeModified { get; set; }
32+
33+
/// <summary>
34+
/// Gets or sets the MIME type of the file.
35+
/// </summary>
36+
public string? MimeType { get; set; }
37+
}
38+
}

LearningHub.Nhs.WebUI/Views/Home/_CourseEnrolled.cshtml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@
5555
@UtilityHelper.StripHtmlFromString(Model.Summary)
5656
</div>
5757

58+
<div class="line-clamp-3 nhsuk-u-margin-bottom-2point5">
59+
@if (@Model?.Progress != null)
60+
{
61+
<div>Progress: @Model.Progress%</div>
62+
}
63+
</div>
64+
5865
<div class="line-clamp-3 nhsuk-u-margin-bottom-2point5">
5966
Completed: @Model.CourseCompletionViewModel?.CompletionStatus?.Completed
6067

0 commit comments

Comments
 (0)