Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-mod_pdfannotator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-mod_pdfannotator
Commits
4111dbc1
Unverified
Commit
4111dbc1
authored
3 years ago
by
Mario Wehr
Committed by
Tim Schroeder
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixes PHP8 deprecation warning
see
https://php.watch/versions/8.0/deprecate-required-param-after-optional
parent
c91f1733
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
controller.php
+10
-10
10 additions, 10 deletions
controller.php
locallib.php
+80
-80
80 additions, 80 deletions
locallib.php
renderer.php
+5
-5
5 additions, 5 deletions
renderer.php
with
95 additions
and
95 deletions
controller.php
+
10
−
10
View file @
4111dbc1
...
...
@@ -426,7 +426,7 @@ if ($action === 'overviewreports') {
if
(
$action
===
'view'
)
{
// Default.
$PAGE
->
set_title
(
"annotatorview"
);
echo
$myrenderer
->
pdfannotator_render_tabs
(
$taburl
,
$action
,
$pdfannotator
->
name
,
$context
);
echo
$myrenderer
->
pdfannotator_render_tabs
(
$taburl
,
$pdfannotator
->
name
,
$context
,
$action
);
pdfannotator_display_embed
(
$pdfannotator
,
$cm
,
$course
,
$file
,
$page
,
$annoid
,
$commid
);
}
...
...
@@ -439,7 +439,7 @@ if ($action === 'statistic') {
require_once
(
$CFG
->
dirroot
.
'/mod/pdfannotator/model/statistics.class.php'
);
echo
$myrenderer
->
pdfannotator_render_tabs
(
$taburl
,
$action
,
$pdfannotator
->
name
,
$context
);
echo
$myrenderer
->
pdfannotator_render_tabs
(
$taburl
,
$pdfannotator
->
name
,
$context
,
$action
);
$PAGE
->
set_title
(
"statisticview"
);
echo
$OUTPUT
->
heading
(
get_string
(
'activities'
,
'pdfannotator'
));
...
...
@@ -488,7 +488,7 @@ if ($action === 'report') {
/* * ******************* Form processing and displaying is done here ************************ */
if
(
$mform
->
is_cancelled
())
{
$action
=
'view'
;
echo
$myrenderer
->
pdfannotator_render_tabs
(
$taburl
,
$action
,
$pdfannotator
->
name
,
$context
);
echo
$myrenderer
->
pdfannotator_render_tabs
(
$taburl
,
$pdfannotator
->
name
,
$context
,
$action
);
pdfannotator_display_embed
(
$pdfannotator
,
$cm
,
$course
,
$file
);
}
else
if
(
$report
=
$mform
->
get_data
())
{
// Process validated data. $mform->get_data() returns data posted in form.
require_sesskey
();
...
...
@@ -531,7 +531,7 @@ if ($action === 'report') {
}
$action
=
'view'
;
echo
$myrenderer
->
pdfannotator_render_tabs
(
$taburl
,
$action
,
$pdfannotator
->
name
,
$context
);
echo
$myrenderer
->
pdfannotator_render_tabs
(
$taburl
,
$pdfannotator
->
name
,
$context
,
$action
);
pdfannotator_display_embed
(
$pdfannotator
,
$cm
,
$course
,
$file
);
}
else
{
// This branch is executed if the form is submitted but the data doesn't validate and the form should be redisplayed
// or on the first display of the form.
...
...
This diff is collapsed.
Click to expand it.
locallib.php
+
80
−
80
View file @
4111dbc1
...
...
@@ -687,7 +687,7 @@ function pdfannotator_prepare_overviewpage($cmid, $myrenderer, $taburl, $action,
$PAGE
->
set_title
(
"overview"
);
// 1.1 Display tab navigation.
echo
$myrenderer
->
pdfannotator_render_tabs
(
$taburl
,
$action
[
'tab'
],
$pdfannotator
->
name
,
$context
);
echo
$myrenderer
->
pdfannotator_render_tabs
(
$taburl
,
$pdfannotator
->
name
,
$context
,
$action
[
'tab'
]
);
// 1.2 Give javascript (see below) access to the language string repository.
$stringman
=
get_string_manager
();
...
...
This diff is collapsed.
Click to expand it.
renderer.php
+
5
−
5
View file @
4111dbc1
...
...
@@ -93,13 +93,13 @@ class mod_pdfannotator_renderer extends plugin_renderer_base {
* Construct a tab header.
*
* @param moodle_url $baseurl
* @param string $namekey
* @param string $what
* @param string $namekey
* @param string $subpage
* @param string $nameargs
* @return tabobject
*/
private
function
pdfannotator_create_tab
(
moodle_url
$baseurl
,
$namekey
=
null
,
$action
,
$pdfannotatorname
=
null
,
$nameargs
=
null
)
{
private
function
pdfannotator_create_tab
(
moodle_url
$baseurl
,
$action
,
$namekey
=
null
,
$pdfannotatorname
=
null
,
$nameargs
=
null
)
{
$taburl
=
new
moodle_url
(
$baseurl
,
array
(
'action'
=>
$action
));
$tabname
=
get_string
(
$namekey
,
'pdfannotator'
,
$nameargs
);
if
(
$pdfannotatorname
)
{
...
...
@@ -113,19 +113,19 @@ class mod_pdfannotator_renderer extends plugin_renderer_base {
* Render the tab header hierarchy.
*
* @param moodle_url $baseurl
* @param type $selected
* @param type $pdfannotatorname
* @param type $context
* @param type $selected
* @param type $inactive
* @return type
*/
public
function
pdfannotator_render_tabs
(
moodle_url
$baseurl
,
$selected
=
null
,
$pdfannotatorname
,
$context
,
$inactive
=
null
)
{
public
function
pdfannotator_render_tabs
(
moodle_url
$baseurl
,
$pdfannotatorname
,
$context
,
$selected
=
null
,
$inactive
=
null
)
{
$overviewtab
=
$this
->
pdfannotator_create_tab
(
$baseurl
,
'overview'
,
'overview'
);
$level1
=
array
(
$overviewtab
,
$this
->
pdfannotator_create_tab
(
$baseurl
,
'document
'
,
'view
'
,
$pdfannotatorname
),
$this
->
pdfannotator_create_tab
(
$baseurl
,
'
view'
,
'
document'
,
$pdfannotatorname
),
$this
->
pdfannotator_create_tab
(
$baseurl
,
'statistic'
,
'statistic'
),
);
return
$this
->
tabtree
(
$level1
,
$selected
,
$inactive
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment