--- loncom/interface/loncommon.pm 2009/03/27 02:14:43 1.780 +++ loncom/interface/loncommon.pm 2009/03/27 04:59:30 1.781 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.780 2009/03/27 02:14:43 raeburn Exp $ +# $Id: loncommon.pm,v 1.781 2009/03/27 04:59:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2847,6 +2847,27 @@ sub track_student_link { &help_open_topic('View_recent_activity'); } +sub slot_reservations_link { + my ($linktext,$sname,$sdom,$target) = @_; + my $link ="/adm/slotrequest?command=showresv&origin=aboutme"; + my $title = 'View slot reservation history'; + if (defined($sname) && $sname !~ /^\s*$/ && + defined($sdom) && $sdom !~ /^\s*$/) { + $link .= "&uname=$sname&udom=$sdom"; + $title .= ' of this student'; + } + if (defined($target) && $target !~ /^\s*$/) { + $target = qq{target="$target"}; + } else { + $target = ''; + } + $title = &mt($title); + $linktext = &mt($linktext); + return qq{$linktext}; +# FIXME uncomment when help item created: &help_open_topic('Slot_Reservation_History'); + +} + # ===================================================== Display a student photo