1.8 * @date 02/12/2007 * * 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 = get_records_select('tracker_query', "userid = {$USER->id} AND trackerid = {$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&screen=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'); } ?>