Skip to content

Commit

Permalink
LMSA-9502 - better way to handle sis display
Browse files Browse the repository at this point in the history
  • Loading branch information
gjthomas committed Dec 3, 2024
1 parent 4c2e81d commit 5ccb0d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,6 @@ public String lookupSearchBySisId(@ModelAttribute FindParentModel findParentMode

model.addAttribute("findParentResult", findParentResult);

if (findParentResult.getSisCourseId() == null) {
model.addAttribute("sisCourseId", "non-SIS course");
} else {
model.addAttribute("sisCourseId", findParentResult.getSisCourseId());
}

// add canvasCourseId to be used in audit log purposes later
model.addAttribute("canvasCourseId", findParentResult.getCanvasCourseId());

Expand Down Expand Up @@ -211,12 +205,6 @@ public String decrossListSections(@RequestParam("section-checkboxes") List<Strin
if (findParentResult != null) {
model.addAttribute("findParentResult", findParentResult);

if (findParentResult.getSisCourseId() == null) {
model.addAttribute("sisCourseId", "non-SIS course");
} else {
model.addAttribute("sisCourseId", findParentResult.getSisCourseId());
}

// add canvasCourseId to be used in audit log purposes later
model.addAttribute("canvasCourseId", findParentResult.getCanvasCourseId());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,8 @@ public class FindParentResult {
private String statusIconName;
private String canvasCourseId;
private List<Section> sectionList;

public String displaySisCourseId() {
return sisCourseId == null ? "non-SIS course" : sisCourseId;
}
}
2 changes: 1 addition & 1 deletion src/main/resources/templates/findParentCourse.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ <h1 id="tool-title" class="rvt-p-top-sm rvt-ts-36">De-cross-listing sections</h1
<form th:object="${findParentModel}" id="decrosslist-form" th:action="@{|/app/decrosslist-sections|}" method="post">
<div class="rvt-flex rvt-items-center">
<rvt-icon th:name="${findParentResult.statusIconName}" class="rvt-border-radius-circle rvt-p-all-xs" th:classappend="${findParentResult.statusIconCssClasses}"></rvt-icon>
<h2 id="results-message" tabindex="-1" th:text="|Parent course found: ${sisCourseId}|" class="rvt-ts-18 rvt-text-bold rvt-p-left-xs">Parent course found</h2>
<h2 id="results-message" tabindex="-1" th:text="|Parent course found: ${findParentResult.displaySisCourseId}|" class="rvt-ts-18 rvt-text-bold rvt-p-left-xs">Parent course found</h2>
</div>
<div>
<div class="rvt-p-top-sm">
Expand Down

0 comments on commit 5ccb0d9

Please sign in to comment.