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
mahara
mahara
Commits
2a2f172b
Commit
2a2f172b
authored
Jan 21, 2007
by
Martyn Smith
Committed by
Martyn Smith
Jan 21, 2007
Browse files
Default user activity preferences for new users
parent
46549e26
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/activity.php
View file @
2a2f172b
...
...
@@ -411,14 +411,13 @@ function activity_get_users($activitytype, $userids=null, $userobjs=null, $admin
* id
*/
function
activity_set_defaults
(
$user_id
)
{
global
$USER
;
log_debug
(
$USER
);
log_debug
(
$user_id
);
$activitytypes
=
get_records_array
(
'activity_type'
,
'admin'
,
0
);
foreach
(
$activitytypes
as
$type
)
{
log_debug
(
'set '
.
$type
.
' for '
.
$user_id
);
insert_record
(
'usr_activity_preference'
,
(
object
)
array
(
'usr'
=>
$user_id
,
'activity'
=>
$type
->
name
,
'method'
=>
'internal'
,
));
}
}
...
...
htdocs/lib/mahara.php
View file @
2a2f172b
...
...
@@ -657,7 +657,7 @@ function handle_event($event, $data) {
// this is here because the core can't listen to events
// @todo, this is VERY ugly, and someone should fix it
if
(
$event
==
'createuser'
)
{
activity_set_defaults
(
$
event
->
id
);
activity_set_defaults
(
$
data
->
id
);
}
$plugintypes
=
plugin_types
();
...
...
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