version 1.62, 2006/09/07 19:31:26
|
version 1.65, 2006/11/23 00:15:56
|
Line 286 sub display_actions_box {
|
Line 286 sub display_actions_box {
|
$result = &store_courseinit_setting($uname,$udom,$cid,$initpage); |
$result = &store_courseinit_setting($uname,$udom,$cid,$initpage); |
} |
} |
|
|
my %threshold = ( |
my %threshold = (); |
av_attempts => 2, |
|
degdiff => 0.5, |
|
numstudents => 2, |
|
); |
|
my %pagedesc = &Apache::lonlocal::texthash ( |
my %pagedesc = &Apache::lonlocal::texthash ( |
firstres => 'First resource', |
firstres => 'First resource', |
whatsnew => "What's New? page", |
whatsnew => "What's New? page", |
Line 468 sub display_threshold_config {
|
Line 464 sub display_threshold_config {
|
my $rowColor; |
my $rowColor; |
|
|
my @thresholditems = ("av_attempts","degdiff","numstudents"); |
my @thresholditems = ("av_attempts","degdiff","numstudents"); |
foreach my $item (@thresholditems) { |
|
$threshold{$item} = ''; |
|
} |
|
my %threshold_titles = &Apache::lonlocal::texthash( |
my %threshold_titles = &Apache::lonlocal::texthash( |
av_attempts => 'Average number of attempts', |
av_attempts => 'Average number of attempts', |
degdiff => 'Degree of difficulty', |
degdiff => 'Degree of difficulty', |
Line 913 sub check_thresholds {
|
Line 906 sub check_thresholds {
|
|
|
sub get_curr_thresholds { |
sub get_curr_thresholds { |
my ($threshold,$uname,$udom,$cid,$cdom,$crs) = @_; |
my ($threshold,$uname,$udom,$cid,$cdom,$crs) = @_; |
|
# set default values |
|
%$threshold = (av_attempts => 2, |
|
degdiff => 0.5, |
|
numstudents => 2 |
|
); |
my %thresholdsettings = &Apache::lonnet::dump('nohist_whatsnew',$udom, |
my %thresholdsettings = &Apache::lonnet::dump('nohist_whatsnew',$udom, |
$uname,$cid.':threshold'); |
$uname,$cid.':threshold'); |
my $thresholdcount = 0; |
my $thresholdcount = 0; |
Line 1004 sub process_update {
|
Line 1002 sub process_update {
|
next if ($_!~/^form\.(.+)\_setparmval$/); |
next if ($_!~/^form\.(.+)\_setparmval$/); |
my $name = $1; |
my $name = $1; |
my $value = $env{'form.'.$name.'_value'}; |
my $value = $env{'form.'.$name.'_value'}; |
if ($name && defined($value)) { |
if ($name && defined($value) && ($value ne '')) { |
my $put_result = &Apache::lonnet::put('nohist_whatsnew', |
my $put_result = &Apache::lonnet::put('nohist_whatsnew', |
{$name=>$value},$udom,$uname); |
{$name=>$value},$udom,$uname); |
|
|
Line 1236 sub display_abovethreshold {
|
Line 1234 sub display_abovethreshold {
|
} |
} |
$r->print('<tr class="LC_info_row"><td colspan="7"><br /><input type="submit" name="counters" value="'.$lt{'rese'}.'" /></td></tr></form>'); |
$r->print('<tr class="LC_info_row"><td colspan="7"><br /><input type="submit" name="counters" value="'.$lt{'rese'}.'" /></td></tr></form>'); |
} else { |
} else { |
$r->print('<tr class="LC_empty_row"><br />'.$lt{'nopr'}.'<br /></td></tr>'); |
$r->print('<tr class="LC_empty_row"><td>'.$lt{'nopr'}.'</td></tr>'); |
} |
} |
} |
} |
|
|