}
if ($modaction) {
- $joins[] = "l.action = '$modaction'";
+ $firstletter = substr($modaction, 0, 1);
+ if (ctype_alpha($firstletter)) {
+ $joins[] = "lower(l.action) LIKE '%" . strtolower($modaction) . "%'";
+ } else if ($firstletter == '-') {
+ $joins[] = "lower(l.action) NOT LIKE '%" . strtolower(substr($modaction, 1)) . "%'";
+ }
}
/// Getting all members of a group.
$date = optional_param('date', 0, PARAM_CLEAN); // Date to display
$modname = optional_param('modname', ''); // course_module->id
$modid = optional_param('modid', ''); // course_module->id
- $modaction = optional_param('modaction', ''); // an action as recorded in the logs
+ $modaction = optional_param('modaction', '', PARAM_ALPHAEXT); // an action as recorded in the logs
$page = optional_param('page', '0', PARAM_INT); // which page to show
$perpage = optional_param('perpage', '100', PARAM_INT); // how many per page
$showcourses = optional_param('showcourses',0,PARAM_INT); // whether to show courses if we're over our limit.
asort($users);
+ // Prepare the list of action options.
+ $actions = array(
+ 'view' => get_string('view'),
+ 'add' => get_string('add'),
+ 'update' => get_string('update'),
+ 'delete' => get_string('delete'),
+ '-view' => get_string('allchanges')
+ );
+
// Get all the possible dates
// Note that we are keeping track of real (GMT) time and user time
// User time is only used in displays - all calcs and passing is GMT
}
choose_from_menu ($dates, "date", $selecteddate, get_string("alldays"));
choose_from_menu ($activities, "modid", $selectedactivity, get_string("allactivities"), "", "");
+ choose_from_menu ($actions, 'modaction', $modaction, get_string("allactions"));
echo '<input type="submit" value="'.get_string('showtheselogs').'" />';
echo "</form>";
echo "</center>";