Skip to content

Commit 7646cd2

Browse files
committed
April Maintenance Updates
This includes updating GoldSim to OnTopic 5.1.0, which includes quite a few bug fixes as well as some performance improvements. This enabled us to make further performance improvements by changing how we model topic associations, thus only mapping the properties we need for the association, instead of the entire view model associated with the target content type. Finally, this corresponds to the release of the GoldSim Courses subsite, and thus includes a number of final updates to the course styles, based on feedback from the final review.
2 parents bb87278 + a4b0f15 commit 7646cd2

35 files changed

+3481
-5351
lines changed

Areas/Courses/Controllers/CoursesController.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ namespace GoldSim.Web.Courses.Controllers {
2222
/// Provides common processing for GoldSim courseware.
2323
/// </summary>
2424
[Area("Courses")]
25-
[Authorize]
2625
public class CoursesController : TopicController {
2726

2827
/*==========================================================================================================================
@@ -44,7 +43,7 @@ ITopicMappingService topicMappingService
4443
| GET: INDEX (VIEW TOPIC)
4544
\-------------------------------------------------------------------------------------------------------------------------*/
4645
/// <inheritdoc />
47-
[HttpGet]
46+
[HttpGet, HttpHead]
4847
[ValidateTopic]
4948
public async override Task<IActionResult> IndexAsync(string path) {
5049

Areas/Courses/Views/ContentTypes/Lesson.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
ViewBag.Title = Model.Title;
55
}
66

7-
<nav class="cell hide-for-small-only medium-2">
7+
<nav class="cell show-for-large large-2">
88
<vc:lesson-list />
99
</nav>
1010

11-
<section class="panel cell small-12 medium-10">
11+
<section class="panel cell medium-12 large-10">
1212
<h1>@Model.Title</h1>
1313
@Html.Raw(Model.Body)
1414

Areas/Courses/Views/Layout/_Layout.cshtml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222

2323
<!-- Logo -->
2424
<div class="title-bar-middle logo centered">
25-
<a href="/"><img src="/Images/Logo.svg" alt="GoldSim Technology Group" class="logo" /></a>
25+
<a href="/Courses/">
26+
<img src="/Images/Logo.svg" alt="GoldSim Technology Group" class="logo" />
27+
<span class="logotype">Courses</span>
28+
</a>
2629
</div>
2730

2831
<!-- Site Search -->

Areas/Courses/Views/Shared/Components/UnitList/Default.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
<nav role="navigation" class="unit-list track-progress">
77
<div class="grid-container">
88
<div class="grid-x">
9-
<ol>
9+
<ul>
1010
@foreach (var topic in Model.NavigationRoot.Children) {
1111
<li class="@topic.GetCssClass()">
1212
<a href="@topic.WebPath">
1313
@(topic.ShortTitle?? topic.Title)
1414
</a>
1515
</li>
1616
}
17-
</ol>
17+
</ul>
1818
</div>
1919
</div>
2020
</nav>

Areas/Forms/Controllers/FormsController.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public async Task<IActionResult> ProcessForm<T>(
134134
/// <summary>
135135
/// Request a trial of the product.
136136
/// </summary>
137-
[HttpGet]
137+
[HttpGet, HttpHead]
138138
[ValidateTopic]
139139
public async Task<IActionResult> TrialAsync() =>
140140
View(await CreateViewModel<TrialFormBindingModel>().ConfigureAwait(true));
@@ -150,7 +150,7 @@ public async Task<IActionResult> TrialAsync(TrialFormBindingModel bindingModel)
150150
/// <summary>
151151
/// Request a demonstration of the product.
152152
/// </summary>
153-
[HttpGet]
153+
[HttpGet, HttpHead]
154154
[ValidateTopic]
155155
public async Task<IActionResult> DemoAsync() =>
156156
View(await CreateViewModel<DemoFormBindingModel>().ConfigureAwait(true));
@@ -166,7 +166,7 @@ public async Task<IActionResult> DemoAsync(DemoFormBindingModel bindingModel) =>
166166
/// <summary>
167167
/// Request a quote for the product
168168
/// </summary>
169-
[HttpGet]
169+
[HttpGet, HttpHead]
170170
[ValidateTopic]
171171
public async Task<IActionResult> QuoteAsync() =>
172172
View(await CreateViewModel<QuoteFormBindingModel>().ConfigureAwait(true));
@@ -182,7 +182,7 @@ public async Task<IActionResult> QuoteAsync(QuoteFormBindingModel bindingModel)
182182
/// <summary>
183183
/// Request to purchase a license of the product
184184
/// </summary>
185-
[HttpGet]
185+
[HttpGet, HttpHead]
186186
[ValidateTopic]
187187
public async Task<IActionResult> PurchaseAsync() =>
188188
View(await CreateViewModel<PurchaseFormBindingModel>().ConfigureAwait(true));
@@ -198,7 +198,7 @@ public async Task<IActionResult> PurchaseAsync(PurchaseFormBindingModel bindingM
198198
/// <summary>
199199
/// Signup for the GoldSim newsletter
200200
/// </summary>
201-
[HttpGet]
201+
[HttpGet, HttpHead]
202202
[ValidateTopic]
203203
public async Task<IActionResult> NewsletterAsync() =>
204204
View(await CreateViewModel<NewsletterFormBindingModel>().ConfigureAwait(true));
@@ -214,7 +214,7 @@ public async Task<IActionResult> NewsletterAsync(NewsletterFormBindingModel bind
214214
/// <summary>
215215
/// Request an academic license of the product for faculty.
216216
/// </summary>
217-
[HttpGet]
217+
[HttpGet, HttpHead]
218218
[ValidateTopic]
219219
public async Task<IActionResult> InstructorAcademicAsync()
220220
=> View(await CreateViewModel<InstructorAcademicFormBindingModel>().ConfigureAwait(true));
@@ -230,7 +230,7 @@ public async Task<IActionResult> InstructorAcademicAsync(InstructorAcademicFormB
230230
/// <summary>
231231
/// Request an academic license of the product for faculty.
232232
/// </summary>
233-
[HttpGet]
233+
[HttpGet, HttpHead]
234234
[ValidateTopic]
235235
public async Task<IActionResult> StudentAcademicAsync() =>
236236
View(await CreateViewModel<StudentAcademicFormBindingModel>().ConfigureAwait(true));
@@ -246,7 +246,7 @@ public async Task<IActionResult> StudentAcademicAsync(StudentAcademicFormBinding
246246
/// <summary>
247247
/// Request an academic license of the product for faculty.
248248
/// </summary>
249-
[HttpGet]
249+
[HttpGet, HttpHead]
250250
[ValidateTopic]
251251
public async Task<IActionResult> UserConferenceAsync() =>
252252
View(await CreateViewModel<UserConferenceFormBindingModel>().ConfigureAwait(true));
@@ -262,7 +262,7 @@ public async Task<IActionResult> UserConferenceAsync(UserConferenceFormBindingMo
262262
/// <summary>
263263
/// Signup for a training session with GoldSim.
264264
/// </summary>
265-
[HttpGet]
265+
[HttpGet, HttpHead]
266266
[ValidateTopic]
267267
public async Task<IActionResult> TrainingAsync() =>
268268
View(await CreateViewModel<TrainingFormBindingModel>().ConfigureAwait(true));
@@ -278,7 +278,7 @@ public async Task<IActionResult> TrainingAsync(TrainingFormBindingModel bindingM
278278
/// <summary>
279279
/// Given an email address, ensures that it doesn't contain any of the public email domains.
280280
/// </summary>
281-
[HttpGet]
281+
[HttpGet, HttpHead]
282282
public IActionResult VerifyEmail([Bind(Prefix="BindingModel.Email")] string email) {
283283
if (String.IsNullOrWhiteSpace(email)) return Json(data: true);
284284
var domains = TopicRepository.Load("Root:Configuration:Metadata:GenericEmailDomains:LookupList").Children;

Areas/Payments/Controllers/PaymentsController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ ISmtpService smtpService
9191
/// optionally, a <see cref="PaymentFormBindingModel"/>.
9292
/// </summary>
9393
/// <returns>A fully mapped <see cref="PaymentsTopicViewModel"/>.</returns>
94-
[HttpGet]
94+
[HttpGet, HttpHead]
9595
public async Task<PaymentsTopicViewModel> GetViewModel(PaymentFormBindingModel bindingModel = null) {
9696

9797
/*------------------------------------------------------------------------------------------------------------------------

Configuration/rewriteRules.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@
5454
</rule>
5555

5656
<!-- SUBSECTION REDIRECTS -->
57+
<rule name="Course Redirect (Temporary)" stopProcessing="true">
58+
<match url="^Courses/BasicCourse/(.*?)$" ignoreCase="true" />
59+
<action type="Redirect" url="/Courses/BasicGoldSim/{R:1}" appendQueryString="false" redirectType="Permanent" />
60+
</rule>
5761
<rule name="Application Areas Redirects" stopProcessing="true">
5862
<match url="^Web/Applications/([a-z]*)Systems/(.*?)$" ignoreCase="true" />
5963
<action type="Redirect" url="/Web/Applications/Areas/{R:1}Systems/{R:2}" appendQueryString="false" redirectType="Permanent" />

GoldSim.Web.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
</PropertyGroup>
2121

2222
<ItemGroup>
23-
<PackageReference Include="Braintree" Version="5.4.0" />
23+
<PackageReference Include="Braintree" Version="5.5.0" />
2424
<PackageReference Include="EPPlus" Version="[4.5.3.3,5)" />
25-
<PackageReference Include="Postmark" Version="4.5.0" />
26-
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
27-
<PackageReference Include="OnTopic.All" Version="5.0.0" />
28-
<PackageReference Include="OnTopic.Editor.AspNetCore.All" Version="5.0.0" />
25+
<PackageReference Include="Postmark" Version="4.5.2" />
26+
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
27+
<PackageReference Include="OnTopic.All" Version="5.1.0" />
28+
<PackageReference Include="OnTopic.Editor.AspNetCore.All" Version="5.1.0" />
2929
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.17.0" />
30-
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.4" />
31-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.4" />
30+
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.5" />
31+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.5" />
3232
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="5.0.3">
3333
<PrivateAssets>all</PrivateAssets>
3434
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*==============================================================================================================================
2+
| Author Ignia, LLC
3+
| Client GoldSim
4+
| Project Website
5+
\=============================================================================================================================*/
6+
using System;
7+
using OnTopic.ViewModels;
8+
9+
namespace GoldSim.Web.Models.Associations {
10+
11+
/*============================================================================================================================
12+
| CLASS: ASSOCIATED CONTENT ITEM VIEW MODEL
13+
\---------------------------------------------------------------------------------------------------------------------------*/
14+
/// <summary>
15+
/// Provides a model for tracking associations to <see cref="ContentItemTopicViewModel"/>s. This model supports navigable
16+
/// lists.
17+
/// </summary>
18+
public record AssociatedContentItemViewModel: AssociatedTopicViewModel {
19+
20+
/*==========================================================================================================================
21+
| KEY
22+
\-------------------------------------------------------------------------------------------------------------------------*/
23+
/// <inheritdoc/>
24+
public string Key { get; init; }
25+
26+
/*==========================================================================================================================
27+
| LEARN MORE (URL)
28+
\-------------------------------------------------------------------------------------------------------------------------*/
29+
/// <summary>
30+
/// Provides an optional link for the <see cref="AssociatedTopicViewModel"/>.
31+
/// </summary>
32+
public Uri LearnMoreUrl { get; init; }
33+
34+
} // Interface
35+
} // Namespace
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*==============================================================================================================================
2+
| Author Ignia, LLC
3+
| Client GoldSim
4+
| Project Website
5+
\=============================================================================================================================*/
6+
using OnTopic.Models;
7+
8+
namespace GoldSim.Web.Models.Associations {
9+
10+
/*============================================================================================================================
11+
| CLASS: ASSOCIATED TOPIC VIEW MODEL
12+
\---------------------------------------------------------------------------------------------------------------------------*/
13+
/// <summary>
14+
/// Provides a model for tracking associations to topics. This model supports both card formats as well as navigable lists.
15+
/// </summary>
16+
public record AssociatedTopicViewModel: INavigableTopicViewModel {
17+
18+
/*==========================================================================================================================
19+
| WEB PATH
20+
\-------------------------------------------------------------------------------------------------------------------------*/
21+
/// <inheritdoc/>
22+
public string WebPath { get; init; }
23+
24+
/*==========================================================================================================================
25+
| TITLE
26+
\-------------------------------------------------------------------------------------------------------------------------*/
27+
/// <inheritdoc/>
28+
public string Title { get; init; }
29+
30+
/*==========================================================================================================================
31+
| SHORT TITLE
32+
\-------------------------------------------------------------------------------------------------------------------------*/
33+
/// <inheritdoc/>
34+
public string ShortTitle { get; init; }
35+
36+
} // Interface
37+
} // Namespace

0 commit comments

Comments
 (0)