version 1.129, 2010/03/08 14:36:24
|
version 1.130, 2010/03/11 21:18:24
|
Line 658 sub print_login {
|
Line 658 sub print_login {
|
my ($position,$dom,$confname,$phase,$settings,$rowtotal) = @_; |
my ($position,$dom,$confname,$phase,$settings,$rowtotal) = @_; |
my ($css_class,$datatable); |
my ($css_class,$datatable); |
my %choices = &login_choices(); |
my %choices = &login_choices(); |
my $itemcount = 1; |
|
|
|
if ($position eq 'top') { |
if ($position eq 'top') { |
my %servers = &dom_servers($dom); |
my %servers = &dom_servers($dom); |
Line 2762 sub print_scantronformat {
|
Line 2761 sub print_scantronformat {
|
'<span class="LC_nobreak">'; |
'<span class="LC_nobreak">'; |
if ($scantronurl) { |
if ($scantronurl) { |
$datatable .= '<a href="'.$scantronurl.'" target="_blank">'. |
$datatable .= '<a href="'.$scantronurl.'" target="_blank">'. |
&mt('Default scantron format file').'</a>'; |
&mt('Default bubblesheet format file').'</a>'; |
} else { |
} else { |
$datatable = &mt('File unavailable for display'); |
$datatable = &mt('File unavailable for display'); |
} |
} |
Line 2789 sub print_scantronformat {
|
Line 2788 sub print_scantronformat {
|
} elsif ($scantronurl) { |
} elsif ($scantronurl) { |
$datatable .= '<td><span class="LC_nobreak">'. |
$datatable .= '<td><span class="LC_nobreak">'. |
'<a href="'.$scantronurl.'" target="_blank">'. |
'<a href="'.$scantronurl.'" target="_blank">'. |
&mt('Custom scantron format file').'</a><label>'. |
&mt('Custom bubblesheet format file').'</a><label>'. |
'<input type="checkbox" name="scantronformat_del"'. |
'<input type="checkbox" name="scantronformat_del"'. |
'" value="1" />'.&mt('Delete?').'</label></span></td>'. |
'" value="1" />'.&mt('Delete?').'</label></span></td>'. |
'<td><span class="LC_nobreak"> '. |
'<td><span class="LC_nobreak"> '. |
Line 2818 sub legacy_scantronformat {
|
Line 2817 sub legacy_scantronformat {
|
&publishlogo($r,'copy',$legacyfile,$dom,$confname,'scantron', |
&publishlogo($r,'copy',$legacyfile,$dom,$confname,'scantron', |
'','',$newfile); |
'','',$newfile); |
if ($result ne 'ok') { |
if ($result ne 'ok') { |
$error = &mt("An error occurred publishing the [_1] scantron format file in RES space. Error was: [_2].",$newfile,$result); |
$error = &mt("An error occurred publishing the [_1] bubblesheet format file in RES space. Error was: [_2].",$newfile,$result); |
} |
} |
} |
} |
return ($url,$error); |
return ($url,$error); |
Line 5817 sub modify_scantron {
|
Line 5816 sub modify_scantron {
|
my $error; |
my $error; |
if ($configuserok eq 'ok') { |
if ($configuserok eq 'ok') { |
if ($switchserver) { |
if ($switchserver) { |
$error = &mt("Upload of scantron format file is not permitted to this server: [_1]",$switchserver); |
$error = &mt("Upload of bubblesheet format file is not permitted to this server: [_1]",$switchserver); |
} else { |
} else { |
if ($author_ok eq 'ok') { |
if ($author_ok eq 'ok') { |
my ($result,$scantronurl) = |
my ($result,$scantronurl) = |
Line 5857 sub modify_scantron {
|
Line 5856 sub modify_scantron {
|
if (ref($confhash{'scantron'}) eq 'HASH') { |
if (ref($confhash{'scantron'}) eq 'HASH') { |
$resulttext = &mt('Changes made:').'<ul>'; |
$resulttext = &mt('Changes made:').'<ul>'; |
if ($confhash{'scantron'}{'scantronformat'} eq '') { |
if ($confhash{'scantron'}{'scantronformat'} eq '') { |
$resulttext .= '<li>'.&mt('[_1] scantron format file removed; [_2] file will be used for courses in this domain.',$custom,$default).'</li>'; |
$resulttext .= '<li>'.&mt('[_1] bubblesheet format file removed; [_2] file will be used for courses in this domain.',$custom,$default).'</li>'; |
} else { |
} else { |
$resulttext .= '<li>'.&mt('Custom scantron format file ([_1]) uploaded for use with courses in this domain.',$custom).'</li>'; |
$resulttext .= '<li>'.&mt('Custom bubblesheet format file ([_1]) uploaded for use with courses in this domain.',$custom).'</li>'; |
} |
} |
$resulttext .= '</ul>'; |
$resulttext .= '</ul>'; |
} else { |
} else { |
$resulttext = &mt('Changes made to scantron format file.'); |
$resulttext = &mt('Changes made to bubblesheet format file.'); |
} |
} |
$resulttext .= '</ul>'; |
$resulttext .= '</ul>'; |
&Apache::loncommon::devalidate_domconfig_cache($dom); |
&Apache::loncommon::devalidate_domconfig_cache($dom); |
} else { |
} else { |
$resulttext = &mt('No changes made to scantron format file'); |
$resulttext = &mt('No changes made to bubblesheet format file'); |
} |
} |
} else { |
} else { |
$resulttext = '<span class="LC_error">'. |
$resulttext = '<span class="LC_error">'. |
&mt('An error occurred: [_1]',$putresult).'</span>'; |
&mt('An error occurred: [_1]',$putresult).'</span>'; |
} |
} |
} else { |
} else { |
$resulttext = &mt('No changes made to scantron format file'); |
$resulttext = &mt('No changes made to bubblesheet format file'); |
} |
} |
if ($errors) { |
if ($errors) { |
$resulttext .= &mt('The following errors occurred: ').'<ul>'. |
$resulttext .= &mt('The following errors occurred: ').'<ul>'. |