File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 23
23
"title": {{ .Title | jsonify }},
24
24
"description": {{ .Description | jsonify }},
25
25
"banner": {{ $banner_url | jsonify }},
26
+ "badge": {{ .Params.badge | jsonify }},
27
+ "certificate": {{ .Params.certificate | jsonify }},
26
28
"permalink": {{ .Permalink | jsonify }},
27
29
"categories": {{ .Params.Categories | jsonify }},
28
30
"tags": {{ .Params.Tags | jsonify }},
Original file line number Diff line number Diff line change 8
8
{{- $parentType = .Params.Type -}}
9
9
{{- end -}}
10
10
11
- {{- if $isFinal -}}
12
- {{- $title = printf "%sFinal" $title -}}
13
- {{- end -}}
11
+
14
12
15
13
{{- if $page.Params.is_optional -}}
16
14
{{- $title = printf "%sOptional" $title -}}
28
26
{{- $title = printf "%s Exam" $title -}}
29
27
{{- end -}}
30
28
31
- {{- if not $isFinal -}}
32
- {{- $title = printf "%s - %d" $title $index -}}
33
- {{- end -}}
29
+ {{- $title = printf "%s - %d" $title $index -}}
34
30
35
31
{{- return $title -}}
Original file line number Diff line number Diff line change @@ -255,11 +255,11 @@ <h1>{{ $title }}</h1>
255
255
< div class ="question-number "> Question {{ add $index 1 }}</ div >
256
256
< div class ="question-text "> {{ $question.text }}</ div >
257
257
258
- {{ if eq $question.type "mcq" }}
258
+ {{ if or ( eq $question.type "single_answer") ( eq $question.type "multiple_answers" ) }}
259
259
{{ range $optIndex, $option := $question.options }}
260
260
< div class ="option ">
261
261
< label >
262
- {{ if $question.multiple_answers }}
262
+ {{ if eq $question.type " multiple_answers" }}
263
263
< input type ="checkbox " name ="selected_option_ids_{{ $question.id }} " value ="{{ $option.id }} ">
264
264
{{ else }}
265
265
< input type ="radio " name ="selected_option_ids_{{ $question.id }} " value ="{{ $option.id }} ">
@@ -410,7 +410,7 @@ <h4 class="mb-0 ${statusClass}">${statusText}</h4>
410
410
const answer = { question_id : questionID } ;
411
411
412
412
if ( selectedCheckboxes . length > 0 ) {
413
- // Multiple choice with checkboxes (multiple_response = true)
413
+ // Multiple choice with checkboxes
414
414
answer . selected_option_id = Array . from ( selectedCheckboxes ) . reduce ( ( acc , cb ) => {
415
415
acc [ cb . value ] = true ;
416
416
return acc ;
You can’t perform that action at this time.
0 commit comments