--- loncom/interface/Attic/lonspreadsheet.pm 2001/01/22 18:22:51 1.37 +++ loncom/interface/Attic/lonspreadsheet.pm 2001/01/22 22:54:16 1.38 @@ -328,6 +328,7 @@ sub sett { $t{$lb}=~s/\#/$trow/g; $t{$lb}=~s/\.\.+/\,/g; $t{$lb}=~s/(^|[^\"\'])([A-Za-z]\d+)/$1\$v\{\'$2\'\}/g; + $t{$lb}=~s/(^|[^\"\'])\[([\w\.]+)\]/$1\$c\{\'$2\'\}/g; } } } keys %f; @@ -344,12 +345,14 @@ sub sett { $t{$_}=$f{$_}; $t{$_}=~s/\.\.+/\,/g; $t{$_}=~s/(^|[^\"\'])([A-Za-z]\d+)/$1\$v\{\'$2\'\}/g; + $t{$_}=~s/(^|[^\"\'])\[([\w\.]+)\]/$1\$c\{\'$2\'\}/g; } } } keys %f; $t{'A0'}=$f{'A0'}; $t{'A0'}=~s/\.\.+/\,/g; $t{'A0'}=~s/(^|[^\"\'])([A-Za-z]\d+)/$1\$v\{\'$2\'\}/g; + $t{'A0'}=~s/(^|[^\"\'])\[([\w\.]+)\]/$1\$c\{\'$2\'\}/g; } sub calc { @@ -1102,8 +1105,8 @@ sub updatestudentassesssheet { &Apache::lonnet::declutter($bighash{'map_id_'.$mapid}). '___'.$resid.'___'. &Apache::lonnet::declutter($srcf); - $allassess{$symb}=$bighash{'title_'.$id}; - + $allassess{$symb}= + ''.$bighash{'title_'.$id}.''; if ($stype eq 'assesscalc') { map { if (($_=~/^stores\_(.*)/) || ($_=~/^parameter\_(.*)/)) { @@ -1228,7 +1231,8 @@ sub loadcourse { } keys %f; my $now=0; my $since=time; - $r->print('
'); + $r->print('
'. + "
\n"); $r->rflush(); map { if ($_=~/^A(\d+)/) { @@ -1240,7 +1244,7 @@ sub loadcourse { $now++; $r->print(''."\n"); + ' secs remaining";'."
\n"); $r->rflush(); my $index=0; @@ -1260,7 +1264,7 @@ sub loadcourse { &setformulas($safeeval,%f); &setconstants($safeeval,%c); $r->print(''. - "
\n"); + "
\n
"); $r->rflush(); } @@ -1286,6 +1290,7 @@ sub loadassessment { "restore:$udom:$uname:". &Apache::lonnet::escape($namespace).":". &Apache::lonnet::escape($symb),$uhome); + my %returnhash=(); map { my ($name,$value)=split(/\=/,$_); @@ -1298,6 +1303,7 @@ sub loadassessment { $returnhash{$_}=$returnhash{$version.':'.$_}; } split(/\:/,$returnhash{$version.':keys'}); } + # ----------------------------- returnhash now has all stores for this resource # ---------------------------- initialize coursedata and userdata for this user @@ -1338,7 +1344,6 @@ sub loadassessment { &Apache::lonnet::unescape($value); } split(/\&/,$userrdatas{$uname.'___'.$udom}); } - # ----------------- now courseopt, useropt initialized for this user and course # (used by parmval) @@ -1357,6 +1362,7 @@ sub loadassessment { $key=~s/^stores\_/resource\./; $key=~s/\_/\./; $c{$_}=$returnhash{$key}; + $c{$key}=$returnhash{$key}; } } }