Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ public async Task<Course> GetCourse(string source, string id) {
CourseTitle = courseraCourse.Title,
Sections = [
new Section {
Title = "Coursera Information",
BeginDate = DateTime.MinValue,
EndDate = DateTime.MaxValue,
IsActive = true,
Term = Terms.Ongoing,
FormatType = FormatType.Online,
SectionCode = courseraCourse.Id
SectionCode = "Coursera Information"
}
]
};
course.CleanHtmlFields();
course.SetId();
return course;
}

Expand Down
6 changes: 3 additions & 3 deletions ProgramInformationV2.Search/Models/Section.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ public void ManageFacultyList(string name, string netid, string url, bool isAdde

public override void SetId() {
base.SetId();
Title = string.IsNullOrWhiteSpace(Title) ? Title :
string.IsNullOrWhiteSpace(DateString) || string.IsNullOrWhiteSpace(SectionCode) ? AlternateTitle :
(string.IsNullOrWhiteSpace(AlternateTitle) ? $"{DateString}: {SectionCode}" : $"{AlternateTitle} ({DateString}: {SectionCode})");
var datestring = string.IsNullOrWhiteSpace(DateString) ? "Ongoing" : DateString;
Title = string.IsNullOrWhiteSpace(SectionCode) ? AlternateTitle :
(string.IsNullOrWhiteSpace(AlternateTitle) ? $"{datestring}: {SectionCode}" : $"{AlternateTitle} ({datestring}: {SectionCode})");
}

public override string ToString() => JsonSerializer.Serialize(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</ilw-content>

@if (SectionItem != null && FieldItems != null) {
<MediumText Title="Title" FieldItems="FieldItems" @bind-Value="SectionItem.Title"></MediumText>
<ilw-content><p>Title: @SectionItem.Title</p></ilw-content>
<SmallText Title="Section Code" FieldItems="FieldItems" @bind-Value="SectionItem.SectionCode"></SmallText>
<MediumText Title="Alternate Title" FieldItems="FieldItems" @bind-Value="SectionItem.AlternateTitle"></MediumText>
<LargeText Title="Alternate Description" FieldItems="FieldItems" @bind-Value="SectionItem.Description"></LargeText>
Expand Down
Loading