HFP-30 Added showWhen widget and made retry/show solution to toggle by new field checkButton

pull/19/merge
Andreas Nergaard 2017-10-12 15:09:12 +02:00
parent c8531f60f0
commit b10c1354e2
2 changed files with 33 additions and 10 deletions

View File

@ -64,6 +64,11 @@
"machineName": "H5PEditor.QuestionSetTextualEditor",
"majorVersion": 1,
"minorVersion": 2
},
{
"machineName": "H5PEditor.ShowWhen",
"majorVersion": 1,
"minorVersion": 0
}
]
}
}

View File

@ -474,6 +474,15 @@
"importance": "low",
"optional": true,
"fields": [
{
"name": "checkButton",
"type": "boolean",
"label": "Show \"Check\" buttons",
"importance": "low",
"description": "This option determines if the \"Check\" button will be shown for all questions.",
"optional": true,
"default": true
},
{
"name": "showSolutionButton",
"type": "select",
@ -481,6 +490,15 @@
"importance": "low",
"description": "This option determines if the \"Show Solution\" button will be shown for all questions, disabled for all or configured for each question individually.",
"optional": true,
"widget": "showWhen",
"showWhen": {
"rules": [
{
"field": "checkButton",
"equals": true
}
]
},
"options": [
{
"value": "on",
@ -499,6 +517,15 @@
"importance": "low",
"description": "This option determines if the \"Retry\" button will be shown for all questions, disabled for all or configured for each question individually.",
"optional": true,
"widget": "showWhen",
"showWhen": {
"rules": [
{
"field": "checkButton",
"equals": true
}
]
},
"options": [
{
"value": "on",
@ -509,15 +536,6 @@
"label": "Disabled"
}
]
},
{
"name": "checkButton",
"type": "boolean",
"label": "Show \"Check\" buttons",
"importance": "low",
"description": "This option determines if the \"Check\" button will be shown for all questions.",
"optional": true,
"default": true
}
]
}