Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plugins bot
moodle-plugins-snapshots
Commits
0ad39883
Commit
0ad39883
authored
Dec 21, 2016
by
Dan Poltawski
Browse files
MDL-57490 lesson: convert legacy js to jquery
parent
d574114a
Changes
1
Hide whitespace changes
Inline
Side-by-side
mod/lesson/report.php
View file @
0ad39883
...
...
@@ -448,8 +448,8 @@ if ($action === 'delete') {
}
echo
html_writer
::
table
(
$table
);
if
(
has_capability
(
'mod/lesson:edit'
,
$context
))
{
$checklinks
=
'<a
href="javascript: checkall();
">'
.
get_string
(
'selectall'
)
.
'</a> / '
;
$checklinks
.
=
'<a
href="javascript: checknone();
">'
.
get_string
(
'deselectall'
)
.
'</a>'
;
$checklinks
=
'<a
id="checkall" href="#
">'
.
get_string
(
'selectall'
)
.
'</a> / '
;
$checklinks
.
=
'<a
id="checknone" href="#
">'
.
get_string
(
'deselectall'
)
.
'</a>'
;
$checklinks
.
=
html_writer
::
label
(
'action'
,
'menuaction'
,
false
,
array
(
'class'
=>
'accesshide'
));
$options
=
array
(
'delete'
=>
get_string
(
'deleteselected'
));
$attributes
=
array
(
'id'
=>
'actionid'
,
'class'
=>
'custom-select m-l-1'
);
...
...
@@ -459,6 +459,14 @@ if ($action === 'delete') {
$('#actionid').change(function() {
$('#mod-lesson-report-form').submit();
});
$('#checkall').click(function() {
$('#mod-lesson-report-form').find('input:checkbox').prop('checked', true);
e.preventDefault();
});
$('#checknone').click(function() {
$('#mod-lesson-report-form').find('input:checkbox').prop('checked', false);
e.preventDefault();
});
});"
);
echo
$OUTPUT
->
box
(
$checklinks
,
'center'
);
echo
'</form>'
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment