version 1.36, 2002/03/02 01:44:00
|
version 1.38, 2002/05/09 17:06:09
|
Line 120 sub ExtractStudentData {
|
Line 120 sub ExtractStudentData {
|
} |
} |
} |
} |
|
|
my $Prob = &Apache::lonnet::declutter( $hash{'map_id_'.$1} ). |
my $Prob = &Apache::lonnet::symbclean( |
|
&Apache::lonnet::declutter( $hash{'map_id_'.$1} ). |
'___'.$2.'___'. |
'___'.$2.'___'. |
&Apache::lonnet::declutter( $hash{'src_'.$ResId} ); |
&Apache::lonnet::declutter( $hash{'src_'.$ResId} )); |
$Code=' '; |
$Code=' '; |
$Tries = 0; |
$Tries = 0; |
$LatestVersion = $result{"version:$Prob"}; |
$LatestVersion = $result{"version:$Prob"}; |
Line 148 sub ExtractStudentData {
|
Line 149 sub ExtractStudentData {
|
$TempHash{"$Part.Code"} = $Code; |
$TempHash{"$Part.Code"} = $Code; |
} |
} |
} |
} |
} |
} |
|
# Actually append problem to output (all parts) |
|
$Str.='<a href="/adm/grades?symb='. |
|
&Apache::lonnet::escape($Prob). |
|
'&student='.$sname.'&domain='.$sdom.'&command=submission">'; |
for ( my $n = 0; $n < $PartNo; $n++ ) { |
for ( my $n = 0; $n < $PartNo; $n++ ) { |
my $part = $TempHash{$n}; |
my $part = $TempHash{$n}; |
my $Code = $TempHash{"$part.Code"}; |
my $Code = $TempHash{"$part.Code"}; |
Line 163 sub ExtractStudentData {
|
Line 168 sub ExtractStudentData {
|
$Str .= $TempHash{"$part.Code"}; |
$Str .= $TempHash{"$part.Code"}; |
if ( $Code ne 'x' ) {$ProbTotal++;} |
if ( $Code ne 'x' ) {$ProbTotal++;} |
} |
} |
|
$Str.='</a>'; |
} |
} |
else { |
else { |
for(my $n=0; $n<$PartNo; $n++) { |
for(my $n=0; $n<$PartNo; $n++) { |
Line 223 sub tracetable {
|
Line 229 sub tracetable {
|
} |
} |
} |
} |
|
|
|
|
sub usection2 { |
|
my ($udom,$unam,$courseid,$ActiveFlag)=@_; |
|
$courseid=~s/\_/\//g; |
|
$courseid=~s/^(\w)/\/$1/; |
|
foreach my $elem(split(/\&/,&Apache::lonnet::reply('dump:'.$udom.':'.$unam.':roles', |
|
&Apache::lonnet::homeserver($unam,$udom)))) { |
|
my ($key,$value)=split(/\=/,$elem); |
|
$key=&Apache::lonnet::unescape($key); |
|
if ($key=~/^$courseid(?:\/)*(\w+)*\_st$/) { |
|
my $section=$1; |
|
if ($key eq $courseid.'_st') { $section=''; } |
|
my ($dummy,$end,$start)=split(/\_/,&Apache::lonnet::unescape($value)); |
|
my $now=time; |
|
my $notactive=0; |
|
if ($start) { |
|
if ($now<$start) { $notactive=1; } |
|
} |
|
if ($end) { |
|
if ($now>$end) { $notactive=1; } |
|
} |
|
if ($ActiveFlag == 1) { $notactive=0; } |
|
unless ($notactive) { return $section; } |
|
} |
|
} |
|
return '-1'; |
|
} |
|
|
|
|
|
sub usection { |
sub usection { |
my ($udom,$unam,$courseid,$ActiveFlag)=@_; |
my ($udom,$unam,$courseid,$ActiveFlag)=@_; |
$courseid=~s/\_/\//g; |
$courseid=~s/\_/\//g; |