Skip to content

Commit

Permalink
linking and steps/questions labels working
Browse files Browse the repository at this point in the history
  • Loading branch information
jessewashburn committed Nov 15, 2024
1 parent ecfc45a commit 03cae0e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<table class="simple-table">
<thead>
<tr>
<th i18n>Steps</th>
<th *ngIf="showTotals">{ label, select, Steps {Steps} Questions {Questions} other {Steps} }</th>
<th i18n>Success (%)</th>
<th i18n>Total Errors</th>
<!-- Dynamic User Headers -->
Expand Down
14 changes: 6 additions & 8 deletions src/app/courses/progress-courses/courses-progress-chart.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.simple-table {
width: 80%; /* Set table width to 80% of the screen */
margin: 0 auto; /* Center the table */
width: 80%;
margin: 0 auto;
border-collapse: collapse;
table-layout: fixed;

th, td {
padding: 8px; /* Reduced padding for a smaller look */
padding: 8px;
border: 1px solid grey;
text-align: center;
vertical-align: middle;
Expand All @@ -14,9 +14,9 @@
th {
background-color: #f2f2f2;
font-weight: bold;
position: sticky; /* Make the header follow as you scroll */
top: 0; /* Stick to the top */
z-index: 2; /* Ensure it stays on top of other content */
position: sticky;
top: 0;
z-index: 2;
}

tr:nth-child(even) {
Expand Down Expand Up @@ -46,8 +46,6 @@
overflow: hidden;
text-overflow: ellipsis;
}

/* Removed the primary-color background */

.wrap-content {
max-width: 100px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class CoursesProgressLeaderComponent implements OnInit, OnDestroy {
onStepChange(value: any) {
this.selectedStep = value;
this.setSingleStep(this.submissions);
this.chartLabel = $localize`Quest.`;
this.chartLabel = $localize`Questions`;
}

setSubmissions() {
Expand Down Expand Up @@ -146,6 +146,7 @@ export class CoursesProgressLeaderComponent implements OnInit, OnDestroy {
setSingleStep(submissions: any[]) {
const step = this.selectedStep;
this.headingStart = this.selectedStep.stepTitle;
this.chartLabel = $localize`Questions`;
this.yAxisLength = this.selectedStep.exam.questions.length;
this.allChartData = submissions.filter(submission => submission.parentId === (step.exam._id + '@' + this.course._id)).map(
submission => {
Expand All @@ -166,7 +167,7 @@ export class CoursesProgressLeaderComponent implements OnInit, OnDestroy {
if (selectedStep?.exam) {
this.selectedStep = selectedStep;
this.onStepChange(this.selectedStep);
this.chartLabel = $localize`Question`;
this.chartLabel = $localize`Questions`;
}
}

Expand Down

0 comments on commit 03cae0e

Please sign in to comment.