Gitlab CSE Unil
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
M. Chardon
moodle-assignfeedback_editpdfplus
Commits
1d973211
Commit
1d973211
authored
Jun 17, 2019
by
M. Chardon
Browse files
bug configuration menu access
parent
dcff1e14
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib.php
View file @
1d973211
...
...
@@ -80,7 +80,7 @@ function assignfeedback_editpdfplus_pluginfile($course, $cm, context $context, $
* @param context_course $context
*/
function
assignfeedback_editpdfplus_extend_navigation_course
(
navigation_node
$navigation
,
stdClass
$course
,
context_course
$context
)
{
if
(
has_capability
(
'assignfeedback/editpdfplus:use'
,
$context
,
null
,
false
)
&&
has_capability
(
'assignfeedback/editpdfplus:managetools'
,
$context
))
{
if
(
has_capability
(
'assignfeedback/editpdfplus:managetools'
,
$context
))
{
$url
=
new
moodle_url
(
'/mod/assign/feedback/editpdfplus/view_admin.php'
,
array
(
'id'
=>
$context
->
id
));
$feedbackadminnode
=
navigation_node
::
create
(
'Feedback : configuration'
,
$url
,
navigation_node
::
TYPE_CUSTOM
,
'Bars d\'outils'
,
'editpdfplusadmin'
,
new
pix_icon
(
'i/grades'
,
""
));
$navigation
->
add_node
(
$feedbackadminnode
);
...
...
locallib.php
View file @
1d973211
...
...
@@ -446,7 +446,7 @@ class assign_feedback_editpdfplus extends assign_feedback_plugin {
public
function
is_available
()
{
if
(
$this
->
enabledcache
===
null
)
{
$testpath
=
assignfeedback_editpdfplus\pdf
::
test_gs_path
(
false
);
$this
->
enabledcache
=
$testpath
->
status
==
assignfeedback_editpdfplus\pdf
::
GSPATH_OK
/* && has_capability('assignfeedback/editpdfplus:use', $this->assignment->get_context(), null, false) */
;
$this
->
enabledcache
=
$testpath
->
status
==
assignfeedback_editpdfplus\pdf
::
GSPATH_OK
;
}
return
$this
->
enabledcache
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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