Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-27891 Tags Flagging tags is now logged

  • Loading branch information...
commit 5b41faa53f5b5f8e98a4f507804ef777994f9041 1 parent a1063d9
@ankitagarwal ankitagarwal authored
Showing with 6 additions and 1 deletion.
  1. +1 −0  lib/db/log.php
  2. +5 −1 tag/user.php
View
1  lib/db/log.php
@@ -48,4 +48,5 @@
array('module'=>'message', 'action'=>'unblock contact', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
array('module'=>'group', 'action'=>'view', 'mtable'=>'groups', 'field'=>'name'),
array('module'=>'tag', 'action'=>'update', 'mtable'=>'tag', 'field'=>'name'),
+ array('module'=>'tag', 'action'=>'flag', 'mtable'=>'tag', 'field'=>'name'),
);
View
6 tag/user.php
@@ -45,7 +45,11 @@
case 'flaginappropriate':
- tag_set_flag(tag_get_id($tag));
+ $tagid = tag_get_id($tag);
+ // Add flaging action to logs
+ add_to_log(SITEID, 'tag', 'flag', 'index.php?id='. $tagid, $tagid, '', $USER->id);
+
+ tag_set_flag($tagid);
redirect($CFG->wwwroot.'/tag/index.php?tag='. rawurlencode($tag), get_string('responsiblewillbenotified', 'tag'));
break;
Please sign in to comment.
Something went wrong with that request. Please try again.