'."\n";
+ return $result;
+}
sub show_problem {
- my ($request,$symb,$uname,$udom,$removeform) = @_;
+ my ($request,$symb,$uname,$udom,$removeform,$viewon) = @_;
my $rendered=&Apache::loncommon::get_student_view($symb,$uname,$udom,
$ENV{'request.course.id'});
if ($removeform) {
@@ -815,13 +958,14 @@ sub show_problem {
$rendered=~s|name="submit"|name="would_have_been_submit"|g;
}
my $result.='
';
- $result.='
';
- $result.=' View of the problem - '.$ENV{'form.fullname'}.
- '
'.$rendered.' ';
+ $result.='
';
+ $result.='
View of the problem - '.$ENV{'form.fullname'}.
+ '
';
- $request->print($result);
+ return $result;
}
# --------------------------- show submissions of a student, option to grade
@@ -829,27 +973,25 @@ sub submission {
my ($request,$counter,$total) = @_;
(my $url=$ENV{'form.url'})=~s-^http://($ENV{'SERVER_NAME'}|$ENV{'HTTP_HOST'})--;
-# if ($ENV{'form.student'} eq '') { &moreinfo($request,'Need student login id'); return ''; }
my ($uname,$udom) = ($ENV{'form.student'},$ENV{'form.userdom'});
($uname,$udom) = &finduser($uname) if $udom eq '';
$ENV{'form.fullname'} = &get_fullname ($uname,$udom) if $ENV{'form.fullname'} eq '';
-# if ($uname eq '') { &moreinfo($request,'Unable to find student'); return ''; }
my $symb=($ENV{'form.symb'} ne '' ? $ENV{'form.symb'} : (&Apache::lonnet::symbread($url)));
if ($symb eq '') { $request->print("Unable to handle ambiguous references:$url:."); return ''; }
my $last = ($ENV{'form.lastSub'} eq 'last' ? 'last' : '');
-# $ENV{'form.vProb'} = $ENV{'form.vProb'} ne '' ? $ENV{'form.vProb'} : 'yes';
# header info
if ($counter == 0) {
&sub_page_js($request);
+ &sub_page_kw_js($request);
$request->print('
Submission Record
'."\n".
- ' Resource: '.$url.''."\n");
+ ' Problem: '.$ENV{'form.probTitle'}.''."\n");
# option to display problem, only once else it cause problems
# with the form later since the problem has a form.
if ($ENV{'form.vProb'} eq 'yes' or !$ENV{'form.vProb'}) {
- &show_problem($request,$symb,$uname,$udom,0);
+ $request->print(&show_problem($request,$symb,$uname,$udom,0,1));
}
# kwclr is the only variable that is guaranteed to be non blank
@@ -866,13 +1008,16 @@ sub submission {
$ENV{'form.kwsize'} = $keyhash{$loginuser.'_kwsize'} ne '' ? $keyhash{$loginuser.'_kwsize'} : '0';
$ENV{'form.kwstyle'} = $keyhash{$loginuser.'_kwstyle'} ne '' ? $keyhash{$loginuser.'_kwstyle'} : '';
$ENV{'form.msgsub'} = $keyhash{$symb.'_subject'} ne '' ?
- $keyhash{$symb.'_subject'} : &Apache::lonnet::metadata($url,'title');
+ $keyhash{$symb.'_subject'} : $ENV{'form.probTitle'};
$ENV{'form.savemsgN'} = $keyhash{$symb.'_savemsgN'} ne '' ? $keyhash{$symb.'_savemsgN'} : '0';
}
$request->print('