version 1.67, 2004/03/31 05:23:59
|
version 1.70, 2004/04/20 15:46:34
|
Line 263 sub real_handler {
|
Line 263 sub real_handler {
|
|
|
|
|
# Send header, don't cache this page |
# Send header, don't cache this page |
if ($r->header_only) { |
|
if ($ENV{'browser.mathml'}) { |
|
$r->content_type('text/xml; charset=UTF-8'); |
|
} else { |
|
$r->content_type('text/html; charset=UTF-8'); |
|
} |
|
$r->send_http_header; |
|
return OK; |
|
} |
|
if ($ENV{'browser.mathml'}) { |
if ($ENV{'browser.mathml'}) { |
$r->content_type('text/xml'); |
&Apache::loncommon::content_type($r,'text/xml'); |
} else { |
} else { |
$r->content_type('text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
} |
} |
$r->send_http_header; |
$r->send_http_header; |
|
return OK if $r->header_only; |
$r->rflush(); |
$r->rflush(); |
|
|
# Discard result, we just want the objects that get created by the |
# Discard result, we just want the objects that get created by the |
Line 583 sub display {
|
Line 575 sub display {
|
} |
} |
|
|
# Phase 4: Display. |
# Phase 4: Display. |
my $stateTitle = &mt($state->title()); |
my $stateTitle=&mt($state->title()); |
my $helperTitle = &mt($self->{TITLE}); |
my $helperTitle = &mt($self->{TITLE}); |
my $bodytag = &Apache::loncommon::bodytag($helperTitle,'',''); |
my $bodytag = &Apache::loncommon::bodytag($helperTitle,'',''); |
my $previous = HTML::Entities::encode(&mt("<- Previous"), '<>&"'); |
my $previous = HTML::Entities::encode(&mt("<- Previous"), '<>&"'); |
Line 593 sub display {
|
Line 585 sub display {
|
|
|
$result .= <<HEADER; |
$result .= <<HEADER; |
<html> |
<html> |
|
<script type="text/javascript" language="Javascript" > |
|
var editbrowser; |
|
function openbrowser(formname,elementname,only,omit) { |
|
var url = '/res/?'; |
|
if (editbrowser == null) { |
|
url += 'launch=1&'; |
|
} |
|
url += 'catalogmode=interactive&'; |
|
url += 'mode=parmset&'; |
|
url += 'form=' + formname + '&'; |
|
if (only != null) { |
|
url += 'only=' + only + '&'; |
|
} |
|
if (omit != null) { |
|
url += 'omit=' + omit + '&'; |
|
} |
|
url += 'element=' + elementname + ''; |
|
var title = 'Browser'; |
|
var options = 'scrollbars=1,resizable=1,menubar=0'; |
|
options += ',width=700,height=600'; |
|
editbrowser = open(url,title,options,'1'); |
|
editbrowser.focus(); |
|
} |
|
</script> |
<head> |
<head> |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
<title>$loncapaHelper: $helperTitle</title> |
<title>$loncapaHelper: $helperTitle</title> |
Line 998 sub start_message {
|
Line 1014 sub start_message {
|
return ''; |
return ''; |
} |
} |
|
|
$paramHash->{MESSAGE_TEXT} = &Apache::lonxml::get_all_text('/message', |
$paramHash->{MESSAGE_TEXT} = &mtn(&Apache::lonxml::get_all_text('/message', |
$parser); |
$parser)); |
|
|
if (defined($token->[2]{'nextstate'})) { |
if (defined($token->[2]{'nextstate'})) { |
$paramHash->{NEXTSTATE} = $token->[2]{'nextstate'}; |
$paramHash->{NEXTSTATE} = $token->[2]{'nextstate'}; |
Line 1169 sub start_choice {
|
Line 1185 sub start_choice {
|
} |
} |
|
|
my $computer = $token->[2]{'computer'}; |
my $computer = $token->[2]{'computer'}; |
my $human = &Apache::lonxml::get_all_text('/choice', |
my $human = &mt(&Apache::lonxml::get_all_text('/choice', |
$parser); |
$parser)); |
my $nextstate = $token->[2]{'nextstate'}; |
my $nextstate = $token->[2]{'nextstate'}; |
my $evalFlag = $token->[2]{'eval'}; |
my $evalFlag = $token->[2]{'eval'}; |
push @{$paramHash->{CHOICES}}, [$human, $computer, $nextstate, |
push @{$paramHash->{CHOICES}}, [$human, $computer, $nextstate, |
Line 1206 SCRIPT
|
Line 1222 SCRIPT
|
# Only print "select all" and "unselect all" if there are five or |
# Only print "select all" and "unselect all" if there are five or |
# more choices; fewer then that and it looks silly. |
# more choices; fewer then that and it looks silly. |
if ($self->{'multichoice'} && scalar(@{$self->{CHOICES}}) > 4) { |
if ($self->{'multichoice'} && scalar(@{$self->{CHOICES}}) > 4) { |
|
my %lt=&Apache::lonlocal::texthash( |
|
'sa' => "Select All", |
|
'ua' => "Unselect All"); |
$buttons = <<BUTTONS; |
$buttons = <<BUTTONS; |
<br /> |
<br /> |
<input type="button" onclick="checkall(true, '$var')" value="Select All" /> |
<input type="button" onclick="checkall(true, '$var')" value="$lt{'sa'}" /> |
<input type="button" onclick="checkall(false, '$var')" value="Unselect All" /> |
<input type="button" onclick="checkall(false, '$var')" value="$lt{'ua'}" /> |
<br /> |
<br /> |
BUTTONS |
BUTTONS |
} |
} |
Line 1276 BUTTONS
|
Line 1295 BUTTONS
|
$choiceLabel = eval($choiceLabel); |
$choiceLabel = eval($choiceLabel); |
$choiceLabel = &$choiceLabel($helper, $self); |
$choiceLabel = &$choiceLabel($helper, $self); |
} |
} |
|
&Apache::lonnet::logthis("TITLE TRANSLATION >$choiceLabel<"); |
$result .= "/></td><td> " . &mtn($choiceLabel) . "</td></tr>\n"; |
$result .= "/></td><td> " . &mtn($choiceLabel) . "</td></tr>\n"; |
} |
} |
$result .= "</table>\n\n\n"; |
$result .= "</table>\n\n\n"; |
Line 1893 sub render {
|
Line 1913 sub render {
|
} |
} |
</script> |
</script> |
SCRIPT |
SCRIPT |
|
my %lt=&Apache::lonlocal::texthash( |
|
'sar' => "Select All Resources", |
|
'uar' => "Unselect All Resources"); |
|
|
$buttons = <<BUTTONS; |
$buttons = <<BUTTONS; |
<br /> |
<br /> |
<input type="button" onclick="checkall(true, '$var')" value="Select All Resources" /> |
<input type="button" onclick="checkall(true, '$var')" value="$lt{'sar'}" /> |
<input type="button" onclick="checkall(false, '$var')" value="Unselect All Resources" /> |
<input type="button" onclick="checkall(false, '$var')" value="$lt{'uar'}" /> |
<br /> |
<br /> |
BUTTONS |
BUTTONS |
} |
} |
Line 2104 sub render {
|
Line 2128 sub render {
|
</script> |
</script> |
SCRIPT |
SCRIPT |
|
|
my $selectAllStudents = &mt('Select All Students'); |
my %lt=&Apache::lonlocal::texthash( |
my $unselectAllStudents = &mt('Unselect All Students'); |
'ocs' => "Select Only Current Students", |
|
'sas' => "Select All Students", |
|
'uas' => "Unselect All Students", |
|
'sfsg' => "Select for Section/Group", |
|
'ufsg' => "Unselect for Section/Group"); |
|
|
$buttons = <<BUTTONS; |
$buttons = <<BUTTONS; |
<br /> |
<br /> |
<input type="button" onclick="checkactive()" value="Select Only Current Students" /> |
<input type="button" onclick="checkactive()" value="$lt{'ocs'}" /> |
<input type="button" onclick="checkall(true, '$var')" value="$selectAllStudents" /> |
<input type="button" onclick="checkall(true, '$var')" value="$lt{'sas'}" /> |
<input type="button" onclick="checkall(false, '$var')" value="$unselectAllStudents" /> |
<input type="button" onclick="checkall(false, '$var')" value="$lt{'uas'}" /> |
<input type="button" onclick="checksec(true)" value="Select for Section/Group"> |
<input type="button" onclick="checksec(true)" value="$lt{'sfsg'}"> |
<input type="text" size="5" name="chksec"> |
<input type="text" size="5" name="chksec"> |
<input type="button" onclick="checksec(false)" value="Unselect for Section/Group"> |
<input type="button" onclick="checksec(false)" value="$lt{'ufsg'}"> |
<br /> |
<br /> |
BUTTONS |
BUTTONS |
} |
} |
Line 2172 BUTTONS
|
Line 2201 BUTTONS
|
} |
} |
} |
} |
|
|
my $name = &mt($self->{'coursepersonnel'} ? 'Name' : 'Student Name'); |
my $name = $self->{'coursepersonnel'} ? &mt('Name') : &mt('Student Name'); |
|
&Apache::lonnet::logthis("THE NAME IS >$name<"); |
my $type = 'radio'; |
my $type = 'radio'; |
if ($self->{'multichoice'}) { $type = 'checkbox'; } |
if ($self->{'multichoice'}) { $type = 'checkbox'; } |
$result .= "<table cellspacing='2' cellpadding='2' border='0'>\n"; |
$result .= "<table cellspacing='2' cellpadding='2' border='0'>\n"; |
$result .= "<tr><td></td><td align='center'><b>$name</b></td>". |
$result .= "<tr><td></td><td align='center'><b>$name</b></td>". |
"<td align='center'><b>" . &mt('Section') . "</b></td>" . |
"<td align='center'><b>" . &mt('Section') . "</b></td>" . |
"<td align='center'><b>Status</b></td>" . |
"<td align='center'><b>".&mt('Status')."</b></td>" . |
"<td align='center'><b>" . &mt("Role") . "</b></td></tr>" . |
"<td align='center'><b>" . &mt("Role") . "</b></td>" . |
"<td align='center'><b>Username:Domain</b></td></tr>"; |
"<td align='center'><b>".&mt('Username').":".&mt('Domain')."</b></td></tr>"; |
|
|
my $checked = 0; |
my $checked = 0; |
for my $choice (@$choices) { |
for my $choice (@$choices) { |
Line 2403 sub render {
|
Line 2433 sub render {
|
} |
} |
</script> |
</script> |
SCRIPT |
SCRIPT |
my $selectAllFiles = &mt("Select All Files"); |
my %lt=&Apache::lonlocal::texthash( |
my $unselectAllFiles = &mt("Unselect All Files"); |
'saf' => "Select All Files", |
$buttons = <<BUTTONS; |
'uaf' => "Unselect All Files"); |
|
$buttons = <<BUTTONS; |
<br /> |
<br /> |
<input type="button" onclick="checkall(true, '$var')" value="$selectAllFiles" /> |
<input type="button" onclick="checkall(true, '$var')" value="$lt{'saf'}" /> |
<input type="button" onclick="checkall(false, '$var')" value="$unselectAllFiles" /> |
<input type="button" onclick="checkall(false, '$var')" value="$lt{'uaf'}" /> |
BUTTONS |
BUTTONS |
|
|
my $selectAllPublished = &mt("Select All Published"); |
%lt=&Apache::lonlocal::texthash( |
my $unselectAllPublished= &mt("UnselectAllPublished"); |
'sap' => "Select All Published", |
|
'uap' => "Unselect All Published"); |
if ($helper->{VARS}->{'construction'}) { |
if ($helper->{VARS}->{'construction'}) { |
$buttons .= <<BUTTONS; |
$buttons .= <<BUTTONS; |
<input type="button" onclick="checkallclass(true, 'Published')" value="$selectAllPublished" /> |
<input type="button" onclick="checkallclass(true, 'Published')" value="$lt{'sap'}" /> |
<input type="button" onclick="checkallclass(false, 'Published')" value="$unselectAllPublished" /> |
<input type="button" onclick="checkallclass(false, 'Published')" value="$lt{'uap'}" /> |
<br /> |
<br /> |
BUTTONS |
BUTTONS |
} |
} |
Line 3042 package Apache::lonhelper::parmwizfinal;
|
Line 3074 package Apache::lonhelper::parmwizfinal;
|
no strict; |
no strict; |
@ISA = ('Apache::lonhelper::element'); |
@ISA = ('Apache::lonhelper::element'); |
use strict; |
use strict; |
|
use Apache::lonlocal; |
|
|
BEGIN { |
BEGIN { |
&Apache::lonhelper::register('Apache::lonhelper::parmwizfinal', |
&Apache::lonhelper::register('Apache::lonhelper::parmwizfinal', |
Line 3121 sub render {
|
Line 3154 sub render {
|
} |
} |
|
|
my $result = "<form name='helpform' method='get' action='/adm/parmset#$affectedResourceId&$parm_name&$level'>\n"; |
my $result = "<form name='helpform' method='get' action='/adm/parmset#$affectedResourceId&$parm_name&$level'>\n"; |
$result .= '<p>Confirm that this information is correct, then click "Finish Helper" to complete setting the parameter.<ul>'; |
$result .= '<p>'.&mt('Confirm that this information is correct, then click "Finish Helper" to complete setting the parameter.').'<ul>'; |
|
|
# Print the type of manipulation: |
# Print the type of manipulation: |
$result .= '<li>Setting the <b>' . $dateTypeHash{$vars->{ACTION_TYPE}} . '</b>'; |
$result .= '<li>Setting the <b>' . $dateTypeHash{$vars->{ACTION_TYPE}} . '</b>'; |