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
d77f39b2
Unverified
Commit
d77f39b2
authored
5 years ago
by
fs959857
Committed by
Tim Schroeder
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
bugfix notifications: correct userid in link to settings
parent
a2ac0124
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
controller.php
+2
-2
2 additions, 2 deletions
controller.php
locallib.php
+3
-3
3 additions, 3 deletions
locallib.php
model/comment.class.php
+2
-2
2 additions, 2 deletions
model/comment.class.php
version.php
+1
-1
1 addition, 1 deletion
version.php
with
8 additions
and
8 deletions
controller.php
+
2
−
2
View file @
d77f39b2
...
...
@@ -499,10 +499,10 @@ if ($action === 'report') {
$report
->
url
=
$CFG
->
wwwroot
.
'/mod/pdfannotator/view.php?id='
.
$cm
->
id
.
'&action=overviewreports'
;
$messagetext
=
new
stdClass
();
$messagetext
->
text
=
pdfannotator_format_notification_message_text
(
$course
,
$cm
,
$context
,
get_string
(
'modulename'
,
'pdfannotator'
),
$cm
->
name
,
$report
,
'reportadded'
);
$messagetext
->
html
=
pdfannotator_format_notification_message_html
(
$course
,
$cm
,
$context
,
get_string
(
'modulename'
,
'pdfannotator'
),
$cm
->
name
,
$report
,
'reportadded'
);
$messagetext
->
url
=
$report
->
url
;
try
{
foreach
(
$recipients
as
$recipient
)
{
$messagetext
->
html
=
pdfannotator_format_notification_message_html
(
$course
,
$cm
,
$context
,
get_string
(
'modulename'
,
'pdfannotator'
),
$cm
->
name
,
$report
,
'reportadded'
,
$recipient
->
id
);
$messageid
=
pdfannotator_notify_manager
(
$recipient
,
$course
,
$cm
,
$name
,
$messagetext
);
}
// 2. Notify the reporting user that their report has been sent off (display blue toast box at top of page).
...
...
This diff is collapsed.
Click to expand it.
locallib.php
+
3
−
3
View file @
d77f39b2
...
...
@@ -260,10 +260,10 @@ function pdfannotator_send_forward_message($recipients, $messageparams, $course,
$text
=
new
stdClass
();
$module
=
get_string
(
'modulename'
,
'pdfannotator'
);
$text
->
text
=
pdfannotator_format_notification_message_text
(
$course
,
$cm
,
$context
,
$module
,
$cm
->
name
,
$messageparams
,
$name
);
$text
->
html
=
pdfannotator_format_notification_message_html
(
$course
,
$cm
,
$context
,
$module
,
$cm
->
name
,
$messageparams
,
$name
);
$text
->
url
=
$messageparams
->
urltoquestion
;
foreach
(
$recipients
as
$recipient
)
{
$text
->
html
=
pdfannotator_format_notification_message_html
(
$course
,
$cm
,
$context
,
$module
,
$cm
->
name
,
$messageparams
,
$name
,
$recipient
);
pdfannotator_notify_manager
(
$recipient
,
$course
,
$cm
,
$name
,
$text
);
}
}
...
...
@@ -323,7 +323,7 @@ function pdfannotator_format_notification_message_text($course, $cm, $context, $
* @param stdClass $coursemodule
* @param string $assignmentname
*/
function
pdfannotator_format_notification_message_html
(
$course
,
$cm
,
$context
,
$modulename
,
$pdfannotatorname
,
$report
,
$messagetype
)
{
function
pdfannotator_format_notification_message_html
(
$course
,
$cm
,
$context
,
$modulename
,
$pdfannotatorname
,
$report
,
$messagetype
,
$recipientid
)
{
global
$CFG
,
$USER
;
$formatparams
=
array
(
'context'
=>
$context
->
get_course_context
());
$posthtml
=
'<p><font face="sans-serif">'
.
...
...
@@ -339,7 +339,7 @@ function pdfannotator_format_notification_message_html($course, $cm, $context, $
$posthtml
.
=
'<hr /><font face="sans-serif">'
;
$report
->
urltoreport
=
$CFG
->
wwwroot
.
'/mod/pdfannotator/view.php?id='
.
$cm
->
id
.
'&action=overviewreports'
;
$posthtml
.
=
'<p>'
.
get_string
(
$messagetype
.
'html'
,
'pdfannotator'
,
$report
)
.
'</p>'
;
$linktonotificationsettingspage
=
new
moodle_url
(
'/message/notificationpreferences.php'
,
array
(
'userid'
=>
$
USER
->
id
));
$linktonotificationsettingspage
=
new
moodle_url
(
'/message/notificationpreferences.php'
,
array
(
'userid'
=>
$
recipient
id
));
$linktonotificationsettingspage
=
$linktonotificationsettingspage
->
__toString
();
$posthtml
.
=
'</font><hr />'
;
$posthtml
.
=
'<font face="sans-serif"><p>'
.
get_string
(
'unsubscribe_notification'
,
'pdfannotator'
,
$linktonotificationsettingspage
)
.
'</p></font>'
;
...
...
This diff is collapsed.
Click to expand it.
model/comment.class.php
+
2
−
2
View file @
d77f39b2
...
...
@@ -89,11 +89,11 @@ class pdfannotator_comment {
$messagetext
=
new
stdClass
();
$module
=
get_string
(
'modulename'
,
'pdfannotator'
);
$messagetext
->
text
=
pdfannotator_format_notification_message_text
(
$course
,
$cm
,
$context
,
$module
,
$cm
->
name
,
$comment
,
'newanswer'
);
$messagetext
->
html
=
pdfannotator_format_notification_message_html
(
$course
,
$cm
,
$context
,
$module
,
$cm
->
name
,
$comment
,
'newanswer'
);
$messagetext
->
url
=
$comment
->
urltoanswer
;
$recipients
=
self
::
get_subscribed_users
(
$annotationid
);
foreach
(
$recipients
as
$recipient
)
{
if
(
$recipient
!=
$USER
->
id
)
{
$messagetext
->
html
=
pdfannotator_format_notification_message_html
(
$course
,
$cm
,
$context
,
$module
,
$cm
->
name
,
$comment
,
'newanswer'
,
$recipient
);
$messageid
=
pdfannotator_notify_manager
(
$recipient
,
$course
,
$cm
,
'newanswer'
,
$messagetext
,
$anonymous
);
}
}
...
...
@@ -112,12 +112,12 @@ class pdfannotator_comment {
$messagetext
=
new
stdClass
();
$messagetext
->
text
=
pdfannotator_format_notification_message_text
(
$course
,
$cm
,
$context
,
get_string
(
'modulename'
,
'pdfannotator'
),
$cm
->
name
,
$question
,
'newquestion'
);
$messagetext
->
html
=
pdfannotator_format_notification_message_html
(
$course
,
$cm
,
$context
,
get_string
(
'modulename'
,
'pdfannotator'
),
$cm
->
name
,
$question
,
'newquestion'
);
$messagetext
->
url
=
$question
->
urltoanswer
;
foreach
(
$recipients
as
$recipient
)
{
if
(
$recipient
->
id
==
$USER
->
id
)
{
continue
;
}
$messagetext
->
html
=
pdfannotator_format_notification_message_html
(
$course
,
$cm
,
$context
,
get_string
(
'modulename'
,
'pdfannotator'
),
$cm
->
name
,
$question
,
'newquestion'
,
$recipient
->
id
);
$messageid
=
pdfannotator_notify_manager
(
$recipient
,
$course
,
$cm
,
'newquestion'
,
$messagetext
,
$anonymous
);
}
...
...
This diff is collapsed.
Click to expand it.
version.php
+
1
−
1
View file @
d77f39b2
...
...
@@ -25,6 +25,6 @@
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$plugin
->
component
=
'mod_pdfannotator'
;
// Full name of the plugin (used for diagnostics).
$plugin
->
version
=
20200
326
00
;
// The current module version (Date: YYYYMMDDXX).
$plugin
->
version
=
20200
408
00
;
// The current module version (Date: YYYYMMDDXX).
$plugin
->
release
=
'PDF Annotator v1.3 release 2'
;
$plugin
->
requires
=
2016112900
;
// Requires this Moodle version.
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