\n"
+ my $score=$record{"resource.$part.$type"};
+ if ($type eq 'awarded' || $type eq 'tries') {
+ $result.='
'."\n";
} elsif ($type eq 'solved') {
- my $score=$record{"resource.$part.$type"};
+ my ($status,$foo)=split(/_/,$score,2);
$result.="
\n";
}
}
$result.='
';
return $result;
}
-#FIXME need to look at the meatdata spec on what type of data to accept and provide an
+
+#FIXME need to look at the metadata spec on what type of data to accept and provide an
#interface based on that, also do that to above function.
sub setstudentgrade {
my ($url,$symb,$courseid,$student,@parts) = @_;
my $result ='';
-
my ($stuname,$domain) = split(/:/,$student);
-
my %record=&Apache::lonnet::restore($symb,$courseid,$domain,$stuname);
-
my %newrecord;
foreach my $part (@parts) {
@@ -324,12 +313,19 @@ sub setstudentgrade {
return $result;
}
+# -- show submissions of a student, option to grade
+#
sub submission {
my ($request) = @_;
+ $request->print(<
+ function changeRadio(title,url) {
+ }
+
+JAVASCRIPT
my $url=$ENV{'form.url'};
$url=~s-^http://($ENV{'SERVER_NAME'}|$ENV{'HTTP_HOST'})--;
if ($ENV{'form.student'} eq '') { &moreinfo($request,"Need student login id"); return ''; }
-# if ($ENV{'form.student'} eq '') { &listStudents($request); return ''; }
my ($uname,$udom) = &finduser($ENV{'form.student'});
if ($uname eq '') { &moreinfo($request,"Unable to find student"); return ''; }
my $symb;
@@ -339,10 +335,13 @@ sub submission {
$symb=&Apache::lonnet::symbread($url);
}
if ($symb eq '') { $request->print("Unable to handle ambiguous references:$url:."); return ''; }
-
+#
+# header info
my $result='
Submission Record
';
$result.='
Username: '.$uname.'
Fullname: '.$ENV{'form.fullname'}.'
Domain: '.$udom.'
';
$result.='
Resource: '.$url.'
';
+#
+# option to display problem
if ($ENV{'form.vProb'} eq 'yes') {
my $rendered=&Apache::loncommon::get_student_view($symb,$uname,$udom,
$ENV{'request.course.id'});
@@ -350,7 +349,7 @@ sub submission {
$ENV{'request.course.id'});
$result.='
';
$result.='
';
- $result.='Student\'s view of the problem:
'.$rendered.' ';
+ $result.='Student\'s view of the problem