version 1.68, 2002/09/18 18:47:04
|
version 1.70, 2002/09/18 20:40:32
|
Line 392 ENDPART
|
Line 392 ENDPART
|
my %moreenv; |
my %moreenv; |
$moreenv{'form.grade_target'}='tex'; |
$moreenv{'form.grade_target'}='tex'; |
&Apache::lonnet::appenv(%moreenv); |
&Apache::lonnet::appenv(%moreenv); |
my $texversion=&Apache::lonnet::ssi($urlp); |
my $texversion=&Apache::lonnet::ssi($urlp,('symb'=>$symb)); |
&Apache::lonnet::delenv('form.grade_target'); |
&Apache::lonnet::delenv('form.grade_target'); |
$result .= $texversion; |
$result .= $texversion; |
} |
} |
Line 405 ENDPART
|
Line 405 ENDPART
|
my @file_seq = &coming_from_hash($main_seq); |
my @file_seq = &coming_from_hash($main_seq); |
#-- produce an output string |
#-- produce an output string |
for (my $i=0;$i<=$#file_seq;$i++) { |
for (my $i=0;$i<=$#file_seq;$i++) { |
my $urlp = $file_seq[$i]; |
my ($urlp,$symb) = split /&&/, $file_seq[$i]; |
$urlp=~s/\/home\/httpd\/html//; |
$urlp=~s/\/home\/httpd\/html//; |
if ($urlp=~m/\.(problem|exam|quiz|assess|survey|form|library)/) { |
if ($urlp=~m/\.(problem|exam|quiz|assess|survey|form|library)/) { |
my %moreenv; |
my %moreenv; |
Line 437 ENDPART
|
Line 437 ENDPART
|
my ($usersection,$username,$userdomain) = split /:/,$person; |
my ($usersection,$username,$userdomain) = split /:/,$person; |
my $fullname = &Apache::grades::get_fullname($username,$userdomain); |
my $fullname = &Apache::grades::get_fullname($username,$userdomain); |
#goes through all resources, checks if they are available for current student, and produces output |
#goes through all resources, checks if they are available for current student, and produces output |
foreach my $curres (@master_seq) { |
foreach my $curresline (@master_seq) { |
|
my ($curres,$symb) = split /&&/, $curresline; |
$curres =~ s/^"//; |
$curres =~ s/^"//; |
$curres =~ s/"$//; |
$curres =~ s/"$//; |
if ($curres=~/\w+/) { |
if ($curres=~/\w+/) { |
my $symb = &Apache::lonnet::symbread($curres); |
|
my ($map,$id,$res_url) = split(/___/,$symb); |
my ($map,$id,$res_url) = split(/___/,$symb); |
if (&Apache::lonnet::allowed('bre',$res_url)) { |
if (&Apache::lonnet::allowed('bre',$res_url)) { |
my $rendered = &Apache::loncommon::get_student_view($symb,$username,$userdomain, |
my $rendered = &Apache::loncommon::get_student_view($symb,$username,$userdomain, |
Line 561 sub coming_from_hash {
|
Line 561 sub coming_from_hash {
|
my $mapstart = $hash{'map_start_'.$mainsequence}; |
my $mapstart = $hash{'map_start_'.$mainsequence}; |
my $mapfinish = $hash{'map_finish_'.$mainsequence}; |
my $mapfinish = $hash{'map_finish_'.$mainsequence}; |
my $symb = &Apache::lonnet::symbread($hash{'src_'.$mapstart}); |
my $symb = &Apache::lonnet::symbread($hash{'src_'.$mapstart}); |
$symb = m/^([^___]*)___/; |
my ($presymb) = split(/___/,$symb); |
my $presymb = $1.'___'; |
$presymb = $presymb.'___'; |
my $current_resource = $mapstart; |
my $current_resource = $mapstart; |
while ($current_resource ne $mapfinish) { |
while ($current_resource ne $mapfinish) { |
if (not $hash{'src_'.$current_resource}=~/\.sequence$/) { |
if (not $hash{'src_'.$current_resource}=~/\.sequence$/) { |
Line 610 sub coming_from_hash {
|
Line 610 sub coming_from_hash {
|
} |
} |
return @resourcelist; |
return @resourcelist; |
} |
} |
#sub coming_from_hash { |
|
# |
|
# my $mainsequence = shift; |
|
# my @resourcelist = (); |
|
# my $mapid = $hash{'map_pc_'.$mainsequence}; |
|
# my $mapstart = $hash{'map_start_'.$mainsequence}; |
|
# my $mapfinish = $hash{'map_finish_'.$mainsequence}; |
|
# my $current_resource = $mapstart; |
|
# while ($current_resource ne $mapfinish) { |
|
# if (not $hash{'src_'.$current_resource}=~/\.sequence$/) { |
|
# push @resourcelist,$hash{'src_'.$current_resource}; |
|
# } else { |
|
# push @resourcelist,&coming_from_hash($hash{'src_'.$current_resource}); |
|
# } |
|
# $current_resource = $hash{'goesto_'.$hash{'to_'.$current_resource}}; |
|
# } |
|
# #needs if final resource in the map (type="finish") contains something |
|
# if (not $hash{'src_'.$current_resource}=~/\.sequence$/) { |
|
# push @resourcelist,$hash{'src_'.$current_resource}; |
|
# } else { |
|
# push @resourcelist,&coming_from_hash($hash{'src_'.$current_resource}); |
|
# } |
|
# return @resourcelist; |
|
#} |
|
|
|
|
|
sub character_chart { |
sub character_chart { |