mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-57791 insights: Templates examples
This commit is contained in:
parent
27ae9af4ba
commit
acb14d08f6
@ -30,6 +30,20 @@
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"target": "Prevent devs at risk",
|
||||
"enabled": 1,
|
||||
"indicators": [
|
||||
"Indicator 1",
|
||||
"Indicator 2",
|
||||
"Indicator 3",
|
||||
"Indicator 4"
|
||||
],
|
||||
"timesplitting": "Quarters",
|
||||
"noinsights": "No insights available yet"
|
||||
}
|
||||
]
|
||||
}
|
||||
}}
|
||||
|
||||
|
@ -30,6 +30,10 @@
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"samplelink": "<a href=\"#\">Link</a>",
|
||||
"sampledescription": "Sample description",
|
||||
"predictionstyle": "alert alert-success",
|
||||
"predictiondisplayvalue": "This dev will understand it"
|
||||
}
|
||||
}}
|
||||
<div class="card">
|
||||
|
@ -27,6 +27,25 @@
|
||||
|
||||
Context variables required for this template:
|
||||
* none
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"samplelink": "<a href=\"#\">Link</a>",
|
||||
"sampledescription": "Sample description",
|
||||
"predictionstyle": "alert alert-success",
|
||||
"predictiondisplayvalue": "This dev will success",
|
||||
"calculations": [
|
||||
{
|
||||
"style": "alert alert-success",
|
||||
"name": "Indicator 1",
|
||||
"displayvalue": "yes"
|
||||
}, {
|
||||
"style": "alert alert-warning",
|
||||
"name": "Indicator 2",
|
||||
"displayvalue": "20%"
|
||||
}
|
||||
]
|
||||
}
|
||||
}}
|
||||
|
||||
<h2>{{#str}}prediction, report_insights{{/str}}</h2>
|
||||
|
@ -30,6 +30,19 @@
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"insights": [
|
||||
{
|
||||
"samplelink": "<a href=\"#\">Link</a>",
|
||||
"sampledescription": "Sample description",
|
||||
"predictionstyle": "alert alert-success",
|
||||
"predictiondisplayvalue": "This dev will understand it"
|
||||
}, {
|
||||
"samplelink": "<a href=\"#\">Any renderable</a>",
|
||||
"sampledescription": "Another sample description",
|
||||
"predictionstyle": "alert alert-danger",
|
||||
"predictiondisplayvalue": "This dev will not understand it"
|
||||
}
|
||||
]
|
||||
}
|
||||
}}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user