version 1.44, 2006/01/06 21:52:19
|
version 1.48, 2006/01/09 22:55:47
|
Line 564 sub display_discussion_config {
|
Line 564 sub display_discussion_config {
|
if ($current eq '') { |
if ($current eq '') { |
$current = 'on'; |
$current = 'on'; |
} |
} |
my %status = ( |
my %opposite = ( |
on => 'checked="checked"', |
'on' => 'off', |
off => 'checked="checked"', |
'off' => 'on', |
); |
); |
$status{$current} = ''; |
$r->print('<script type="text/javascript"> |
$r->print('<br />'.&mt('Choose whether or not to display a count of the number of new posts for each resource or bulletin board which has unread posts.').'<br />'.&mt('This can increase the time taken to gather data for the [_1] page by a few seconds.',"<i>What's New?</i>").' '.&mt('Currently set to [_1] .'),"<b>$current</b>."); |
function toggle_countunread(choice) { |
|
if (choice == "unchanged") { |
|
document.discussionswitch.command.value = ""; |
|
} |
|
document.discussionswitch.submit(); |
|
} |
|
</script>'); |
|
$r->print('<br />'.&mt('Choose whether or not to display a count of the number of new posts for each resource or bulletin board which has unread posts.').'<br />'.&mt('This can increase the time taken to gather data for the [_1] page by a few seconds.',"<i>What's New?</i>").' '.&mt('Currently set to [_1].','<b>'.$current.'</b>')); |
$r->print('<br /><br /> |
$r->print('<br /><br /> |
<form method="post" name="discussionswitch" action="/adm/whatsnew">'. |
<form method="post" name="discussionswitch" action="/adm/whatsnew"> |
&mt('Display of unread post counts?').' |
|
<input type="hidden" name="command" value="newdiscconf" /> |
<input type="hidden" name="command" value="newdiscconf" /> |
<input type="hidden" name="refpage" value="'.$refpage.'" /> |
<input type="hidden" name="refpage" value="'.$refpage.'" /> |
<input type ="radio" '.$status{'on'}.' name="countunread" value="on">on |
<input type="hidden" name="countunread" value="'.$opposite{$current}.'" /> |
|
|
<input type ="radio" '.$status{'off'}.' name="countunread" value="off">off |
|
'); |
'); |
$r->print('<br/><br /> |
$r->print('<br/> |
<input type="submit" name="display" value="'. |
<input type="button" name="display" value="'. |
&mt('Make changes').'" /></form>'); |
&mt('Change to [_1]',$opposite{$current}).'" |
|
onclick="javascript:toggle_countunread('."'change'".')" /> |
|
  |
|
<input type="button" name="nochange" value="'. |
|
&mt("No change").'" |
|
onclick="javascript:toggle_countunread('."'unchanged'".')" /> |
|
</form>'); |
return; |
return; |
} |
} |
|
|
Line 617 $$initpage{$current}</b>.<br /><br />
|
Line 627 $$initpage{$current}</b>.<br /><br />
|
$lt{'padc'} |
$lt{'padc'} |
END |
END |
foreach my $choice (@chgstate) { |
foreach my $choice (@chgstate) { |
$r->print('<nobr><input type="radio" name="courseinit_control" value="'. |
$r->print('<nobr><label><input type="radio" name="courseinit_control" value="'. |
$choice.'"/>'.$$initpage{$choice}.' </nobr>'); |
$choice.'"/>'.$$initpage{$choice}.' </label></nobr>'); |
} |
} |
$r->print('<br /><br />'.&mt('If').' '.$$initpage{'coursespecific'}. |
$r->print('<br /><br />'.&mt('If').' '.$$initpage{'coursespecific'}. |
'<br />'.$lt{'chce'}." \n"); |
'<br />'.$lt{'chce'}." \n"); |
foreach my $choice (@chgentry) { |
foreach my $choice (@chgentry) { |
$r->print('<nobr><input type="radio" name="courseinit_page" value="'. |
$r->print('<nobr><label><input type="radio" name="courseinit_page" value="'. |
$choice.'"/>'.$$initpage{$choice}.' </nobr>'); |
$choice.'"/>'.$$initpage{$choice}.' </label></nobr>'); |
} |
} |
$r->print('<br /><br /><input type="submit" name="display" value="'. |
$r->print('<br /><br /><input type="submit" name="display" value="'. |
$lt{'moce'}.'" /></form>'); |
$lt{'moce'}.'" /></form>'); |
Line 880 sub check_thresholds {
|
Line 890 sub check_thresholds {
|
if ($resource->handgrade($part) eq 'yes') { |
if ($resource->handgrade($part) eq 'yes') { |
next; |
next; |
} |
} |
|
if ($resource->is_survey($part)) { |
|
next; |
|
} |
%{$stats{$part}} = (); |
%{$stats{$part}} = (); |
my ($attempts,$users,$corrects,$degdiff,$av_attempts); |
my ($attempts,$users,$corrects,$degdiff,$av_attempts); |
if (exists($$resourcetracker{$symb."\0".$part."\0attempts"})) { |
if (exists($$resourcetracker{$symb."\0".$part."\0attempts"})) { |