Skip to content

Commit 80cd9f1

Browse files
committed
New: Decorate assigned problems
1 parent 78907e3 commit 80cd9f1

2 files changed

Lines changed: 37 additions & 2 deletions

File tree

bases/rsptx/interactives/runestone/common/css/runestone-custom-sphinx-bootstrap.css

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,14 +1185,41 @@ margin-right: 3px;
11851185

11861186
.isCorrect:before {
11871187
/*content: url(https://em-content.zobj.net/thumbs/240/apple/325/check-mark_2714-fe0f.png);*/
1188-
content: "✅ ";
1188+
font-family: "Material Symbols Outlined";
1189+
content: "\e86c ";
11891190
float:right;
11901191
padding-left: 4px;
11911192
}
11921193

11931194
.isInCorrect:before {
11941195
/*content: url(https://em-content.zobj.net/thumbs/240/apple/325/check-mark_2714-fe0f.png);*/
1195-
content: "⚠️ ";
1196+
font-family: "Material Symbols Outlined";
1197+
content: "\e349 ";
1198+
float:right;
1199+
padding-left: 4px;
1200+
}
1201+
1202+
.isAssigned:before {
1203+
/*content: url(https://em-content.zobj.net/thumbs/240/apple/325/check-mark_2714-fe0f.png);*/
1204+
font-family: "Material Symbols Outlined";
1205+
content: "\f3de ";
1206+
float:right;
1207+
padding-left: 4px;
1208+
}
1209+
1210+
/* When both isCorrect and isAssigned are present, show both icons */
1211+
.isCorrect.isAssigned:before {
1212+
font-family: "Material Symbols Outlined";
1213+
content: "\e86c \f3de ";
1214+
/*content: "✅ 📋 ";*/
1215+
float:right;
1216+
padding-left: 4px;
1217+
}
1218+
1219+
/* When both isInCorrect and isAssigned are present, show both icons */
1220+
.isInCorrect.isAssigned:before {
1221+
font-family: "Material Symbols Outlined";
1222+
content: "\e349 \f3de ";
11961223
float:right;
11971224
padding-left: 4px;
11981225
}

bases/rsptx/interactives/runestone/common/js/runestonebase.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,14 @@ export default class RunestoneBase {
610610
rsDiv.classList.remove("notAnswered");
611611
rsDiv.classList.remove("isInCorrect");
612612
rsDiv.classList.remove("isCorrect");
613+
let assignmentInfo = localStorage.getItem("currentAssignmentInfo");
614+
let questions = [];
615+
if (assignmentInfo) {
616+
questions = JSON.parse(assignmentInfo).questions
617+
}
618+
if (questions.indexOf(this.divid) >= 0) {
619+
rsDiv.classList.add("isAssigned");
620+
}
613621
if (this.correct) {
614622
rsDiv.classList.add("isCorrect");
615623
} else {

0 commit comments

Comments
 (0)