version 1.258, 2006/09/25 19:41:56
|
version 1.261, 2006/10/17 15:11:11
|
Line 393 sub check_access {
|
Line 393 sub check_access {
|
&Apache::lonxml::debug("checking for part :$id:"); |
&Apache::lonxml::debug("checking for part :$id:"); |
&Apache::lonxml::debug("time:".time); |
&Apache::lonxml::debug("time:".time); |
|
|
my ($symb)=&Apache::lonxml::whichuser(); |
my ($symb)=&Apache::lonnet::whichuser(); |
&Apache::lonxml::debug("symb:".$symb); |
&Apache::lonxml::debug("symb:".$symb); |
#if ($env{'request.state'} ne "construct" && $symb ne '') { |
#if ($env{'request.state'} ne "construct" && $symb ne '') { |
if ($env{'request.state'} ne "construct") { |
if ($env{'request.state'} ne "construct") { |
Line 604 sub setuppermissions {
|
Line 604 sub setuppermissions {
|
|
|
if ($Apache::lonhomework::browse eq 'F' && |
if ($Apache::lonhomework::browse eq 'F' && |
$env{'form.devalidatecourseresdata'} eq 'on') { |
$env{'form.devalidatecourseresdata'} eq 'on') { |
my (undef,$courseid) = &Apache::lonxml::whichuser(); |
my (undef,$courseid) = &Apache::lonnet::whichuser(); |
&Apache::lonnet::devalidatecourseresdata($env{"course.$courseid.num"}, |
&Apache::lonnet::devalidatecourseresdata($env{"course.$courseid.num"}, |
$env{"course.$courseid.domain"}); |
$env{"course.$courseid.domain"}); |
} |
} |
Line 885 sub renderpage {
|
Line 885 sub renderpage {
|
my $problem=&Apache::lonnet::getfile($file); |
my $problem=&Apache::lonnet::getfile($file); |
my $result; |
my $result; |
if ($problem eq -1) { |
if ($problem eq -1) { |
my $filename=(split('/',$file))[-1]; |
|
$result.="<b> ".&mt('Unable to find')." <i>$filename</i></b>"; |
|
$problem=''; |
$problem=''; |
|
my $filename=(split('/',$file))[-1]; |
|
my $error = |
|
"<b> ".&mt('Unable to find [_1]', |
|
' <span class="LC_filename">'.$filename.'</span>') |
|
."</b>"; |
|
$result.= |
|
&Apache::loncommon::simple_error_page($request,'Not available', |
|
$error); |
|
return; |
} |
} |
|
|
my %mystyle; |
my %mystyle; |
Line 986 sub newproblem {
|
Line 993 sub newproblem {
|
my $instructions; |
my $instructions; |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page("Create New $extension"); |
&Apache::loncommon::start_page("Create New $extension"); |
if ($templatelist) { $instructions=&mt(", select a template from the pull-down menu below.").'<br />'.&mt("Then");} |
|
my %lt=&Apache::lonlocal::texthash( 'create' => 'Creating a new', |
|
'resource' => 'resource', |
|
'requested' => 'The requested file', |
|
'not exist' => 'currently does not exist', |
|
'createnew' => 'To create a new', |
|
'click' => 'click on the', |
|
'Create' => 'Create', |
|
'button' => 'button'); |
|
my $extensionTranslated = &mt($extension); |
|
$request->print(" |
$request->print(" |
$start_page |
$start_page |
<h1>".&mt("Creating a new $extension resource.")."</h1> |
<h1>".&mt("Creating a new $extension resource.")."</h1> |
Line 1006 $errormsg
|
Line 1003 $errormsg
|
<b> |
<b> |
".&mt("To create a new $extension, select a template from the". |
".&mt("To create a new $extension, select a template from the". |
"pull-down menu below. Then click on the \"Create $extension\" button.")."</b> |
"pull-down menu below. Then click on the \"Create $extension\" button.")."</b> |
</p>"); |
</p><form action=\"$url\" method=\"POST\">"); |
|
|
if (defined($templatelist)) { |
if (defined($templatelist)) { |
$request->print("<select name=\"template\">$templatelist</select>"); |
$request->print("<select name=\"template\">$templatelist</select>"); |
Line 1051 sub handler {
|
Line 1048 sub handler {
|
} |
} |
&Apache::lonxml::debug("Permissions:$Apache::lonhomework::browse:$Apache::lonhomework::viewgrades:$Apache::lonhomework::modifygrades:$Apache::lonhomework::queuegrade"); |
&Apache::lonxml::debug("Permissions:$Apache::lonhomework::browse:$Apache::lonhomework::viewgrades:$Apache::lonhomework::modifygrades:$Apache::lonhomework::queuegrade"); |
&Apache::lonxml::debug("Problem Mode ".$env{'form.problemmode'}); |
&Apache::lonxml::debug("Problem Mode ".$env{'form.problemmode'}); |
my ($symb) = &Apache::lonxml::whichuser(); |
my ($symb) = &Apache::lonnet::whichuser(); |
&Apache::lonxml::debug('symb is '.$symb); |
&Apache::lonxml::debug('symb is '.$symb); |
if ($env{'request.state'} eq "construct") { |
if ($env{'request.state'} eq "construct") { |
if ( -e $file ) { |
if ( -e $file ) { |