1.8
* @version MOODLE 2.0
* @date 06/05/2009
*
* Prints list of user's stored queries
*/
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from view.php in mod/tracker
}
$queries = $DB->get_records_select('tracker_query', " userid = ? AND trackerid = ? ", array($USER->id, $tracker->id));
echo "
";
print_heading(get_string('myqueries', 'tracker'));
print_simple_box_start('center', '80%', '', '', 'generalbox', 'bugreport');
?>
head = array("$searchstr", "$namestr", "$descriptionstr", "$actionstr");
$table->size = array(50, 100, 500, 100);
$table->align = array('center', 'left', 'center', 'center');
foreach ($queries as $query){
$fields = tracker_extractsearchparametersfromdb($query->id);
$query->description = tracker_printsearchfields($fields);
$searchlink = "id}&view=view&page=browse&what=usequery&queryid={$query->id}\" title=\"".get_string('searchwiththat', 'tracker')."\">
wwwroot}/mod/tracker/pix/search.gif\" border=\"0\" />";
$action = "id}&what=editquery&queryid={$query->id}\" title=\"".get_string('update')."\" >
pixpath}/t/edit.gif\" />";
$action .= " id}&what=deletequery&queryid={$query->id}\" title=\"".get_string('delete')."\" >
pixpath}/t/delete.gif\" />";
$table->data[] = array($searchlink, " {$query->name}", format_string($query->description), $action);
}
print_table($table);
}
else{
print_string('noqueryssaved', 'tracker');
}
?>