1.8 * @version MOODLE 2.0 * @date 06/05/2009 * * Prints a form for user preferences */ if (!defined('MOODLE_INTERNAL')) { die('Direct access to this script is forbidden.'); /// It must be included from view.php in mod/tracker } echo "
"; print_heading(get_string('mywatches', 'tracker')); print_simple_box_start('center', '80%', '', '', 'generalbox', 'bugreport'); $mywatches = tracker_getwatches($tracker->id, $USER->id); ?>
head = array("$idstr", "$summarystr", "$peoplestr", "$actionstr", "$notificationstr"); $table->size = array('10%', '50%', '10%', '10%', '%20'); $table->align = array('left', 'left', 'center', 'center', 'center'); foreach($mywatches as $awatch){ $actions = "id}&what=unregister&issueid={$awatch->issueid}&ccid={$awatch->userid}\" title=\"".get_string('delete')."\">pixpath}/t/delete.gif\" border=\"0\" />"; $actions .= " id}&what=editwatch&ccid={$awatch->userid}\" title=\"".get_string('update')."\">pixpath}/t/edit.gif\" border=\"0\" />"; if ($awatch->events & EVENT_OPEN){ $notifications = " id}&what=updatewatch&ccid={$awatch->id}&open=0\" title=\"".get_string('unsetwhenopens','tracker')."\">wwwroot}/mod/tracker/pix/open.gif\" border=\"0\" />"; } else { $notifications = " id}&what=updatewatch&ccid={$awatch->id}&open=1\" title=\"".get_string('setwhenopens','tracker')."\">wwwroot}/mod/tracker/pix/open_shadow.gif\" border=\"0\" />"; } if ($awatch->events & EVENT_RESOLVING){ $notifications .= " id}&what=updatewatch&ccid={$awatch->id}&resolving=0\" title=\"".get_string('unsetwhenworks','tracker')."\">wwwroot}/mod/tracker/pix/resolving.gif\" border=\"0\" />"; } else { $notifications .= " id}&what=updatewatch&ccid={$awatch->id}&resolving=1\" title=\"".get_string('setwhenworks','tracker')."\">wwwroot}/mod/tracker/pix/resolving_shadow.gif\" border=\"0\" />"; } if ($awatch->events & EVENT_WAITING){ $notifications .= " id}&what=updatewatch&ccid={$awatch->id}&waiting=0\" title=\"".get_string('unsetwhenwaits','tracker')."\">wwwroot}/mod/tracker/pix/waiting.gif\" border=\"0\" />"; } else { $notifications .= " id}&what=updatewatch&ccid={$awatch->id}&waiting=1\" title=\"".get_string('setwhenwaits','tracker')."\">wwwroot}/mod/tracker/pix/waiting_shadow.gif\" border=\"0\" />"; } if ($awatch->events & EVENT_TESTING){ $notifications .= " id}&what=updatewatch&ccid={$awatch->id}&testing=0\" title=\"".get_string('unsetwhentesting','tracker')."\">wwwroot}/mod/tracker/pix/testing.gif\" border=\"0\" />"; } else { $notifications .= " id}&what=updatewatch&ccid={$awatch->id}&testing=1\" title=\"".get_string('setwhentesting','tracker')."\">wwwroot}/mod/tracker/pix/testing_shadow.gif\" border=\"0\" />"; } if ($awatch->events & EVENT_RESOLVED){ $notifications .= " id}&what=updatewatch&ccid={$awatch->id}&resolved=0\" title=\"".get_string('unsetwhenresolves','tracker')."\">wwwroot}/mod/tracker/pix/resolved.gif\" border=\"0\" />"; } else { $notifications .= " id}&what=updatewatch&ccid={$awatch->id}&resolved=1\" title=\"".get_string('setwhenresolves','tracker')."\">wwwroot}/mod/tracker/pix/resolved_shadow.gif\" border=\"0\" />"; } if ($awatch->events & EVENT_ABANDONNED){ $notifications .= " id}&what=updatewatch&ccid={$awatch->id}&abandonned=0\" title=\"".get_string('unsetwhenthrown','tracker')."\">wwwroot}/mod/tracker/pix/abandonned.gif\" border=\"0\" />"; } else { $notifications .= " id}&what=updatewatch&ccid={$awatch->id}&abandonned=1\" title=\"".get_string('setwhenthrown','tracker')."\">wwwroot}/mod/tracker/pix/abandonned_shadow.gif\" border=\"0\" />"; } if ($awatch->events & ON_COMMENT){ $notifications .= " id}&what=updatewatch&ccid={$awatch->id}&oncomment=0\" title=\"".get_string('unsetoncomment','tracker')."\">wwwroot}/mod/tracker/pix/comments.gif\" border=\"0\" />"; } else { $notifications .= " id}&what=updatewatch&ccid={$awatch->id}&oncomment=1\" title=\"".get_string('setoncomment','tracker')."\">wwwroot}/mod/tracker/pix/comments_shadow.gif\" border=\"0\" />"; } $watchid = "wwwroot}/mod/tracker/view.php?id={$cm->id}&view=view&page=viewanissue&issueid=$awatch->issueid\">".$tracker->ticketprefix.$awatch->issueid.''; $table->data[] = array($watchid, $awatch->summary, $awatch->people, $actions, $notifications); } print_table($table); ?>