--- loncom/interface/loncommon.pm 2003/09/10 15:06:34 1.115 +++ loncom/interface/loncommon.pm 2003/09/11 22:37:54 1.116 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.115 2003/09/10 15:06:34 matthew Exp $ +# $Id: loncommon.pm,v 1.116 2003/09/11 22:37:54 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1835,6 +1835,30 @@ sub get_student_answers { =pod +=item * &submlink() + +Inputs: $text $uname $udom $symb + +Returns: A link to grades.pm such as to see the SUBM view of a student + +=cut + +############################################### +sub submlink { + my ($text,$uname,$udom,$symb)=@_; + if (!($uname && $udom)) { + (my $cursymb, my $courseid,$udom,$uname)= + &Apache::lonxml::whichuser($symb); + if (!$symb) { $symb=$cursymb; } + } + if (!$symb) { $symb=&symbread(); } + return ''.$text.''; +} +############################################## + +=pod + =back =cut