Skip to content
Snippets Groups Projects
Commit 10c2b8a1 authored by Leon's avatar Leon
Browse files

Fix answer style

parent 1fd728ac
No related branches found
No related tags found
No related merge requests found
...@@ -158,15 +158,19 @@ function constructQuestion(data) { ...@@ -158,15 +158,19 @@ function constructQuestion(data) {
dataset.ids.push(data['id']); dataset.ids.push(data['id']);
label.innerText = data['label']; label.innerText = data['label'] + ' (' + (isScq ? 'Single choice' : 'Multiple choice') + ')';
answersContainer.setAttribute('id', 'answers_container'); answersContainer.setAttribute('id', 'answers_container');
questionBlock.append(label); questionBlock.append(label);
for (let i = 0; i < data['answers'].length; i += 1) { for (let i = 0; i < data['answers'].length; i += 1) {
let input = document.createElement('input'), let container = document.createElement('div'),
label = document.createElement('label'); input = document.createElement('input'),
label = document.createElement('label')
;
container.setAttribute('class', 'input-container');
input.setAttribute('type', isScq ? 'radio' : 'checkbox'); input.setAttribute('type', isScq ? 'radio' : 'checkbox');
input.setAttribute('id', `answer_${i}`); input.setAttribute('id', `answer_${i}`);
...@@ -178,8 +182,9 @@ function constructQuestion(data) { ...@@ -178,8 +182,9 @@ function constructQuestion(data) {
label.setAttribute('for', `answer_${i}`); label.setAttribute('for', `answer_${i}`);
label.innerText = data['answers'][i]['label']; label.innerText = data['answers'][i]['label'];
answersContainer.append(input); container.append(input);
answersContainer.append(label); container.append(label);
answersContainer.append(container);
} }
questionBlock.append(answersContainer); questionBlock.append(answersContainer);
......
...@@ -6,6 +6,7 @@ header nav a, ...@@ -6,6 +6,7 @@ header nav a,
.admin > a[data-target="close"] { .admin > a[data-target="close"] {
color: black; color: black;
text-decoration: none; text-decoration: none;
cursor: pointer;
&:active, &:active,
&:visited { &:visited {
color: black; color: black;
...@@ -26,6 +27,10 @@ header { ...@@ -26,6 +27,10 @@ header {
} }
} }
button {
cursor: pointer;
}
p { p {
&.correct, &.correct,
&.wrong { &.wrong {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment