version 1.14, 2004/06/15 14:26:10
|
version 1.16, 2004/06/23 20:50:26
|
Line 262 sub get_prev_curr_next {
|
Line 262 sub get_prev_curr_next {
|
next if ($res->{'type'} ne 'assessment'); |
next if ($res->{'type'} ne 'assessment'); |
foreach my $part (@{$res->{'parts'}}) { |
foreach my $part (@{$res->{'parts'}}) { |
my $partdata = $res->{'partdata'}->{$part}; |
my $partdata = $res->{'partdata'}->{$part}; |
if ($granularity eq 'part_survey' && $partdata->{'Survey'}){ |
if ($partdata->{'Survey'}) { |
push (@Resource, |
if ($granularity eq 'part_survey'){ |
{ symb => $res->{symb}, |
push (@Resource, |
part => $part, |
{ symb => $res->{symb}, |
resource => $res, |
part => $part, |
} ); |
resource => $res, |
|
} ); |
|
} |
} elsif ($granularity eq 'part') { |
} elsif ($granularity eq 'part') { |
push (@Resource, |
push (@Resource, |
{ symb => $res->{symb}, |
{ symb => $res->{symb}, |
Line 1071 Returns: An array of scalars containing
|
Line 1073 Returns: An array of scalars containing
|
sub manage_caches { |
sub manage_caches { |
my ($r,$formname,$inputname) = @_; |
my ($r,$formname,$inputname) = @_; |
&Apache::loncoursedata::clear_internal_caches(); |
&Apache::loncoursedata::clear_internal_caches(); |
|
my $sectionkey = |
|
join(',', |
|
map { |
|
&Apache::lonnet::escape($_); |
|
} sort(@Apache::lonstatistics::SelectedSections) |
|
); |
|
my $statuskey = $Apache::lonstatistics::enrollment_status; |
if (exists($ENV{'form.ClearCache'}) || |
if (exists($ENV{'form.ClearCache'}) || |
exists($ENV{'form.updatecaches'}) || |
exists($ENV{'form.updatecaches'}) || |
(exists($ENV{'form.firstrun'}) && |
(exists($ENV{'form.firstrun'}) && $ENV{'form.firstrun'} ne 'no') || |
$ENV{'form.firstrun'} ne 'no')) { |
(exists($ENV{'form.prevsection'}) && |
|
$ENV{'form.prevsection'} ne $sectionkey) || |
|
(exists($ENV{'form.prevenrollstatus'}) && |
|
$ENV{'form.prevenrollstatus'} ne $statuskey) |
|
) { |
&Apache::lonstatistics::Gather_Full_Student_Data($r,$formname, |
&Apache::lonstatistics::Gather_Full_Student_Data($r,$formname, |
$inputname); |
$inputname); |
} |
} |
# |
# |
|
my @Buttons = |
|
('<input type="submit" name="ClearCache" '. |
|
'value="'.&mt('Clear Caches').'" />', |
|
'<input type="submit" name="updatecaches" '. |
|
'value="'.&mt('Update Caches').'" />', |
|
'<input type="hidden" name="prevsection" value="'.$sectionkey.'" />', |
|
'<input type="hidden" name="prevenrollstatus" value="'.$statuskey.'" />' |
|
); |
|
# |
if (! exists($ENV{'form.firstrun'})) { |
if (! exists($ENV{'form.firstrun'})) { |
$r->print('<input type="hidden" name="firstrun" value="yes" />'); |
$r->print('<input type="hidden" name="firstrun" value="yes" />'); |
} else { |
} else { |
$r->print('<input type="hidden" name="firstrun" value="no" />'); |
$r->print('<input type="hidden" name="firstrun" value="no" />'); |
} |
} |
my @Buttons = |
|
('<input type="submit" name="ClearCache" '. |
|
'value="'.&mt('Clear Caches').'" />', |
|
'<input type="submit" name="updatecaches" '. |
|
'value="'.&mt('Update Caches').'" />'); |
|
# |
# |
return @Buttons; |
return @Buttons; |
} |
} |