version 1.32, 2004/12/02 21:53:33
|
version 1.36, 2005/02/01 15:15:28
|
Line 86 sub render_resource {
|
Line 86 sub render_resource {
|
($base,undef) = ($resource->{'src'} =~ m|(.*/)[^/]*$|); |
($base,undef) = ($resource->{'src'} =~ m|(.*/)[^/]*$|); |
$base = "http://".$ENV{'SERVER_NAME'}.$base; |
$base = "http://".$ENV{'SERVER_NAME'}.$base; |
my $rendered_problem = |
my $rendered_problem = |
&Apache::lonnet::ssi_body($resource->{'src'}); |
&Apache::lonnet::ssi_body($resource->{'src'}.'?symb='.&Apache::lonnet::escape($resource->{'symb'})); |
$rendered_problem =~ s/<\s*form\s*/<nop /g; |
$rendered_problem =~ s/<\s*form\s*/<nop /g; |
$rendered_problem =~ s|(<\s*/form\s*>)|<\/nop>|g; |
$rendered_problem =~ s|(<\s*/form\s*>)|<\/nop>|g; |
return '<table bgcolor="ffffff"><tr><td>'. |
return '<table bgcolor="ffffff"><tr><td>'. |
Line 149 sub ProblemSelector {
|
Line 149 sub ProblemSelector {
|
if (scalar(@{$partdata->{'ResponseIds'}}) > 1) { |
if (scalar(@{$partdata->{'ResponseIds'}}) > 1) { |
$seq_str .= &mt('response').' '.$respid; |
$seq_str .= &mt('response').' '.$respid; |
} |
} |
|
my $link = $res->{'src'}.'?symb='. |
|
&Apache::lonnet::escape($res->{'symb'}); |
$seq_str .= (' 'x2). |
$seq_str .= (' 'x2). |
qq{<a target="preview" href="$res->{'src'}">view</a>}; |
qq{<a target="preview" href="$link">view</a>}; |
$seq_str .= "</td></tr>\n"; |
$seq_str .= "</td></tr>\n"; |
$rb_count++; |
$rb_count++; |
} |
} |
Line 280 END
|
Line 282 END
|
return $Str; |
return $Str; |
} |
} |
|
|
sub get_title { |
|
my ($title,$src) = @_; |
|
if ($title eq '') { |
|
($title) = ($src =~ m|/([^/]+)$|); |
|
} else { |
|
$title =~ s/\:/:/g; |
|
} |
|
return $title; |
|
} |
|
|
|
sub new_accumulator { |
sub new_accumulator { |
my ($title,$src,$symb,$seq_id,$inputname) = @_; |
my ($title,$src,$symb,$seq_id,$inputname) = @_; |
my $target; |
my $target; |
Line 308 sub new_accumulator {
|
Line 300 sub new_accumulator {
|
'value="'.&Apache::lonnet::escape($res->symb).'" />'. |
'value="'.&Apache::lonnet::escape($res->symb).'" />'. |
' '.$res->compTitle.'</label>'. |
' '.$res->compTitle.'</label>'. |
(' 'x2).'<a target="preview" '. |
(' 'x2).'<a target="preview" '. |
'href="'.$res->src.'">view</a>'. |
'href="'.$res->src.'?symb='. |
|
&Apache::lonnet::escape($res->{'symb'}).'">view</a>'. |
'</td></tr>'.$/; |
'</td></tr>'.$/; |
} else { |
} else { |
if (defined($target)) { |
if (defined($target)) { |
Line 1338 sub manage_caches {
|
Line 1331 sub manage_caches {
|
if (defined($update_message)) { |
if (defined($update_message)) { |
$r->print($update_message); |
$r->print($update_message); |
} |
} |
&Apache::lonstatistics::Gather_Full_Student_Data($r,$formname, |
&gather_full_student_data($r,$formname,$inputname); |
$inputname); |
|
|
|
} |
} |
# |
# |
my @Buttons = |
my @Buttons = |
Line 1362 sub manage_caches {
|
Line 1353 sub manage_caches {
|
return @Buttons; |
return @Buttons; |
} |
} |
|
|
|
sub gather_full_student_data { |
|
&Apache::lonnet::logthis('called gather_full_student_data'); |
|
my ($r,$formname,$inputname) = @_; |
|
my $status_type; |
|
if (defined($formname)) { |
|
$status_type = 'inline'; |
|
} else { |
|
$status_type = 'popup'; |
|
} |
|
my $c = $r->connection(); |
|
# |
|
&Apache::loncoursedata::clear_internal_caches(); |
|
# |
|
my @Students = @Apache::lonstatistics::Students; |
|
# |
|
# Open the progress window |
|
my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin |
|
($r,&mt('Student Data Compilation Status'), |
|
&mt('Student Data Compilation Progress'), scalar(@Students), |
|
$status_type,undef,$formname,$inputname); |
|
# |
|
while (my $student = shift @Students) { |
|
return if ($c->aborted()); |
|
my $status = &Apache::loncoursedata::ensure_current_full_data |
|
($student->{'username'},$student->{'domain'}, |
|
$ENV{'request.course.id'}); |
|
&Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state, |
|
&mt('last student')); |
|
} |
|
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
|
$r->rflush(); |
|
return; |
|
} |
|
|
|
|
#################################################### |
#################################################### |