Skip to content

Commit

Permalink
MDL-56448 mustache: fix json errors in example context
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Oct 26, 2016
1 parent 919b9df commit f07cb88
Show file tree
Hide file tree
Showing 22 changed files with 37 additions and 44 deletions.
8 changes: 4 additions & 4 deletions admin/tool/lp/templates/course_competency_statistics.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
Example context (json):
{
competencycount: 4,
proficientcompetencycount: 3,
proficientcompetencypercentage: 75,
proficientcompetencypercentageformatted: 75.0
"competencycount": 4,
"proficientcompetencycount": 3,
"proficientcompetencypercentage": 75,
"proficientcompetencypercentageformatted": 75.0
}

}}
Expand Down
12 changes: 6 additions & 6 deletions admin/tool/lp/templates/template_statistics.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
Example context (json):
{
linkedcompetencycount: 4,
competencycount: 8,
linkedcompetencypercentage: 50,
plancount: 40,
completedplancount: 30,
completedplanpercentage: 75,
"linkedcompetencycount": 4,
"competencycount": 8,
"linkedcompetencypercentage": 50,
"plancount": 40,
"completedplancount": 30,
"completedplanpercentage": 75
}

}}
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/modal.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
{
"title": "Example modal",
"body": "Some example content for the body",
"footer": "Footer text, right here!",
"footer": "Footer text, right here!"
}
}}

Expand Down
6 changes: 3 additions & 3 deletions message/templates/message_preferences.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@
"name": "loggedin",
"displayname": "When I'm logged in",
"checked": 0,
"disableall": 0,
"disableall": 0
},
"loggedoff": {
"name": "loggedoff",
"displayname": "When I'm offline",
"checked": 0,
"disableall": 0,
},
"disableall": 0
}
}
]
}
Expand Down
6 changes: 3 additions & 3 deletions message/templates/message_preferences_component.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@
"name": "loggedin",
"displayname": "When I'm logged in",
"checked": 0,
"disableall": 0,
"disableall": 0
},
"loggedoff": {
"name": "loggedoff",
"displayname": "When I'm offline",
"checked": 0,
"disableall": 0,
},
"disableall": 0
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@
"name": "loggedin",
"displayname": "When I'm logged in",
"checked": 0,
"disableall": 0,
"disableall": 0
},
"loggedoff": {
"name": "loggedoff",
"displayname": "When I'm offline",
"checked": 0,
"disableall": 0,
},
"disableall": 0
}
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions message/templates/notification_preferences.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"processors": [
{
"onlinehelphtml": "<p>help button HTML</p>",
"offlinehelphtml": "<p>help button HTML</p>",
"offlinehelphtml": "<p>help button HTML</p>"
}
],
"notifications": [
Expand All @@ -57,14 +57,14 @@
"name": "loggedin",
"displayname": "When I'm logged in",
"checked": 0,
"disableall": 0,
"disableall": 0
},
"loggedoff": {
"name": "loggedoff",
"displayname": "When I'm offline",
"checked": 0,
"disableall": 0,
},
"disableall": 0
}
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions message/templates/notification_preferences_component.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"processors": [
{
"onlinehelphtml": "<p>help button HTML</p>",
"offlinehelphtml": "<p>help button HTML</p>",
"offlinehelphtml": "<p>help button HTML</p>"
}
],
"notifications": [
Expand All @@ -53,14 +53,14 @@
"name": "loggedin",
"displayname": "When I'm logged in",
"checked": 0,
"disableall": 0,
"disableall": 0
},
"loggedoff": {
"name": "loggedoff",
"displayname": "When I'm offline",
"checked": 0,
"disableall": 0,
},
"disableall": 0
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"displayname": "When I'm offline",
"checked": 0,
"iconurl": "some url"
},
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"name": "popup",
"hassettings": 1,
"userid": 3,
"contextid": 3,
"contextid": 3
}
}}
<th {{^userconfigured}}class="unconfigured"{{/userconfigured}} data-processor-name="{{name}}">
Expand Down
1 change: 0 additions & 1 deletion mod/assign/templates/grading_actions.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
Context variables required for this template:
* see mod/assign/classes/output/grading_app.php
Example context (json):
This template is initially hidden, and is only displayed after the current user info has been loaded.
}}
<form data-region="grading-actions-form" class="hide">
Expand Down
1 change: 0 additions & 1 deletion mod/assign/templates/grading_app.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
Context variables required for this template:
* see mod/assign/classes/output/grading_app.php
Example context (json):
This template includes ajax functionality, so it cannot be shown in the template library.
}}
<div data-region="grading-navigation-panel" data-first-userid="{{userid}}" data-courseid="{{courseid}}" data-showuseridentity="{{showuseridentity}}">
Expand Down
1 change: 0 additions & 1 deletion mod/assign/templates/grading_navigation.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
Context variables required for this template:
* see mod/assign/classes/output/grading_app.php
Example context (json):
This template includes ajax functionality, so it cannot be shown in the template library.
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
Context variables required for this template:
* see mod/assign/classes/output/grading_app.php
Example context (json):
This template uses ajax functionality, so it cannot be shown in the template library.
}}
<a href="#previous" data-action="previous-user">{{{larrow}}}</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"id": "5",
"fullname": "Mr T",
"hasidentity": true,
"identity": "t@example.org, T"
"identity": "t@example.org, T",
"profileimageurl": "https://moodle.org/pix/u/f3.png"
}
}}
Expand Down
1 change: 0 additions & 1 deletion mod/assign/templates/grading_panel.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
Context variables required for this template:
* None
Example context (json):
This template loads it's content via ajax, so it cannot be shown in the template library.
}}
{{> mod_assign/loading }}
Expand Down
6 changes: 3 additions & 3 deletions search/templates/result.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
"title": "Example title",
"docurl": "https://example.com/mod/example/view.php?id=4",
"content": "I am content",
"contexturl": "https://example.com/mod/example/view.php?id=2"
"contexturl": "https://example.com/mod/example/view.php?id=2",
"userurl": "https://example.com/user/profile.php?id=3",
"userfullname": "Example User Full Name",
"multiplefiles": true,
"filenames":
{
[
"file1.txt",
"file2.txt"
}
]
}
}}
<div class="result">
Expand Down
2 changes: 1 addition & 1 deletion theme/boost/templates/core/modal.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
{
"title": "Example modal",
"body": "Some example content for the body",
"footer": "Footer text, right here!",
"footer": "Footer text, right here!"
}
}}

Expand Down
3 changes: 2 additions & 1 deletion theme/boost/templates/core/pix_icon.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
Example context (json):
{
"attributes": [
{ "name": "src", "value": "http://moodle.com/wp-content/themes/moodle/images/logo-hat2.png" },
{"name": "src", "value": "http://moodle.com/wp-content/themes/moodle/images/logo-hat2.png"},
{"name": "alt", "value": "Alt text for icon"}
]
}

Expand Down
1 change: 0 additions & 1 deletion theme/boost/templates/mod_assign/grading_actions.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
Context variables required for this template:
* see mod/assign/classes/output/grading_app.php
Example context (json):
This template is initially hidden, and is only displayed after the current user info has been loaded.
}}
{{#showreview}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
Context variables required for this template:
* see mod/assign/classes/output/grading_app.php
Example context (json):
This template includes ajax functionality, so it cannot be shown in the template library.
}}
<div class="container-fluid">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
Context variables required for this template:
* see mod/assign/classes/output/grading_app.php
Example context (json):
This template uses ajax functionality, so it cannot be shown in the template library.
}}
<a href="#previous" data-action="previous-user">{{{larrow}}}</a>
Expand Down

0 comments on commit f07cb88

Please sign in to comment.