Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MACAO Hugo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Beniamine
MACAO Hugo
Commits
2293b83c
Commit
2293b83c
authored
5 months ago
by
Anthony
Browse files
Options
Downloads
Patches
Plain Diff
Convert Markdown to HTML in feedback
parent
a86a3ad5
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
macao/assets/custom.js
+2
-1
2 additions, 1 deletion
macao/assets/custom.js
macao/assets/quiz.js
+4
-4
4 additions, 4 deletions
macao/assets/quiz.js
with
6 additions
and
5 deletions
macao/assets/custom.js
+
2
−
1
View file @
2293b83c
$
(
document
).
ready
(
function
()
{
console
.
log
(
'
Custom JS loaded
'
);
console
.
log
(
'
Custom JS loaded
'
);
$
(
document
).
ready
(
function
()
{
console
.
log
(
'
Custom JS executed
'
);
// Add specific classes to play buttons
// Add specific classes to play buttons
$
(
'
button:contains("Play")
'
).
html
(
'
<i class="fa-solid fa-play"></i>
'
);
$
(
'
button:contains("Play")
'
).
html
(
'
<i class="fa-solid fa-play"></i>
'
);
});
});
This diff is collapsed.
Click to expand it.
macao/assets/quiz.js
+
4
−
4
View file @
2293b83c
/**
/**
* Checks whether all questions are correctly answered and displays the overall feedback.
* Checks whether all questions are correctly answered and displays the overall feedback.
*/
*/
function
checkAllQuestions
(
questions
,
surveyConfig
)
{
function
checkAllQuestions
(
questions
,
surveyConfig
,
converter
)
{
let
allCorrect
=
true
;
let
allCorrect
=
true
;
questions
.
forEach
((
question
)
=>
{
questions
.
forEach
((
question
)
=>
{
...
@@ -12,10 +12,10 @@ function checkAllQuestions(questions, surveyConfig) {
...
@@ -12,10 +12,10 @@ function checkAllQuestions(questions, surveyConfig) {
if
(
allCorrect
)
{
if
(
allCorrect
)
{
correctIndic
.
node
.
className
=
"
correct
"
;
correctIndic
.
node
.
className
=
"
correct
"
;
correctIndic
.
commentNode
.
innerHTML
=
surveyConfig
.
correctComment
||
"
All answers are correct!
"
;
correctIndic
.
commentNode
.
innerHTML
=
converter
.
renderInline
(
surveyConfig
.
correctComment
)
||
"
All answers are correct!
"
;
}
else
{
}
else
{
correctIndic
.
node
.
className
=
"
incorrect
"
;
correctIndic
.
node
.
className
=
"
incorrect
"
;
correctIndic
.
commentNode
.
innerHTML
=
surveyConfig
.
incorrectComment
||
"
Some answers are incorrect!
"
;
correctIndic
.
commentNode
.
innerHTML
=
converter
.
renderInline
(
surveyConfig
.
incorrectComment
)
||
"
Some answers are incorrect!
"
;
}
}
}
}
...
@@ -79,7 +79,7 @@ $(function () {
...
@@ -79,7 +79,7 @@ $(function () {
id
:
"
sv-nav-check
"
,
id
:
"
sv-nav-check
"
,
title
:
"
Vérifier
"
,
title
:
"
Vérifier
"
,
action
:
()
=>
{
action
:
()
=>
{
checkAllQuestions
(
survey
.
currentPage
.
questions
,
jsonStatic
);
checkAllQuestions
(
survey
.
currentPage
.
questions
,
jsonStatic
,
converter
);
},
},
css
:
"
nav-button
"
,
css
:
"
nav-button
"
,
innerCss
:
"
sd-btn sd-btn--action nav-input
"
innerCss
:
"
sd-btn sd-btn--action nav-input
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment