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
mahara
mahara
Commits
bbbe625e
Commit
bbbe625e
authored
Mar 19, 2008
by
Richard Mansfield
Browse files
Show the name of the reporter of objectionable content in the notification message
parent
714c5f93
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/lang/en.utf8/activity.php
View file @
bbbe625e
...
...
@@ -84,13 +84,11 @@ $string['newviewaccessmessage'] = 'You have been added to the access list for th
$string
[
'newviewaccesssubject'
]
=
'New view access'
;
$string
[
'viewmodified'
]
=
'has changed their view'
;
$string
[
'onview'
]
=
'on View'
;
$string
[
'onartefact'
]
=
'on Artefact'
;
$string
[
'ongroup'
]
=
'on Group'
;
$string
[
'ownedby'
]
=
'owned by'
;
$string
[
'objectionablecontentview'
]
=
'Objectionable content'
;
$string
[
'objectionablecontentartefact'
]
=
'Objectionable content'
;
$string
[
'objectionablecontentview'
]
=
'Objectionable content
on View "%s" reported by %s
'
;
$string
[
'objectionablecontentartefact'
]
=
'Objectionable content
on Artefact "%s" reported by %s
'
;
$string
[
'newgroupmembersubj'
]
=
'%s is now a group member!'
;
$string
[
'removedgroupmembersubj'
]
=
'%s is no longer a group member'
;
...
...
htdocs/lib/activity.php
View file @
bbbe625e
...
...
@@ -404,6 +404,7 @@ class ActivityTypeObjectionable extends ActivityTypeAdmin {
protected
$view
;
protected
$artefact
;
protected
$reporter
;
function
__construct
(
$data
,
$cron
=
false
)
{
parent
::
__construct
(
$data
,
$cron
);
...
...
@@ -420,20 +421,20 @@ class ActivityTypeObjectionable extends ActivityTypeAdmin {
throw
new
ViewNotFoundException
(
get_string
(
'viewnotfound'
,
'error'
,
$this
->
view
));
}
if
(
empty
(
$this
->
artefact
))
{
return
get_string_from_language
(
$user
->
lang
,
'objectionablecontentview'
,
'activity'
)
.
' '
.
get_string_from_language
(
$user
->
lang
,
'onview'
,
'activity'
)
.
' '
.
$viewtitle
;
return
get_string_from_language
(
$user
->
lang
,
'objectionablecontentview'
,
'activity'
,
$viewtitle
,
display_name
(
$this
->
reporter
,
$user
))
;
}
else
{
if
(
!
$artefacttitle
=
get_field
(
'artefact'
,
'title'
,
'id'
,
$this
->
artefact
))
{
throw
new
ArtefactNotFoundException
(
get_string
(
'artefactnotfound'
,
'error'
,
$this
->
artefact
));
}
return
get_string_from_language
(
$user
->
lang
,
'objectionablecontentartefact'
,
'activity'
)
.
' '
.
get_string_from_language
(
$user
->
lang
,
'onartefact'
,
'activity'
)
.
' '
.
$artefacttitle
;
return
get_string_from_language
(
$user
->
lang
,
'objectionablecontentartefact'
,
'activity'
,
$artefacttitle
,
display_name
(
$this
->
reporter
,
$user
))
;
}
}
public
function
get_required_parameters
()
{
return
array
(
'message'
,
'view'
);
return
array
(
'message'
,
'view'
,
'reporter'
);
}
}
...
...
htdocs/view/objectionable.json.php
View file @
bbbe625e
...
...
@@ -36,6 +36,7 @@ $data = new StdClass;
$data
->
view
=
param_integer
(
'view'
);
$data
->
artefact
=
param_integer
(
'artefact'
,
null
);
$data
->
message
=
param_variable
(
'message'
);
$data
->
reporter
=
$USER
->
get
(
'id'
);
activity_occurred
(
'objectionable'
,
$data
);
...
...
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