version 1.255, 2004/06/03 16:42:02
|
version 1.276, 2004/12/10 17:54:54
|
Line 36 use Apache::File();
|
Line 36 use Apache::File();
|
use Apache::lonmenu; |
use Apache::lonmenu; |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonxml; |
use Apache::lonxml; |
|
use Time::HiRes qw( gettimeofday tv_interval ); |
BEGIN { |
BEGIN { |
&Apache::lonxml::register('Apache::structuretags',('block','languageblock','instructorcomment','while','randomlist','problem','library','web','tex','part','preduedate','postanswerdate','solved','notsolved','problemtype','startouttext','endouttext','simpleeditbutton','definetag')); |
&Apache::lonxml::register('Apache::structuretags',('block','languageblock','instructorcomment','while','randomlist','problem','library','web','tex','part','preduedate','postanswerdate','solved','notsolved','problemtype','startouttext','endouttext','simpleeditbutton','definetag')); |
} |
} |
Line 83 sub page_start {
|
Line 83 sub page_start {
|
$result=&Apache::londefdef::start_html($target,$token,$tagstack, |
$result=&Apache::londefdef::start_html($target,$token,$tagstack, |
$parstack,$parser,$safeeval); |
$parstack,$parser,$safeeval); |
$head_tag_start='<head>'.&Apache::lonmenu::registerurl(undef,$target). |
$head_tag_start='<head>'.&Apache::lonmenu::registerurl(undef,$target). |
&Apache::lonhtmlcommon::htmlareaheaders(); |
&Apache::lonhtmlcommon::htmlareaheaders(). |
@Apache::lonxml::htmlareafields=(); |
&Apache::lonhtmlcommon::spellheader(). |
|
&Apache::lonxml::fontsettings(); |
} |
} |
my $body_tag_start; |
my $body_tag_start; |
if (!defined($found{'body'})) { |
if (!defined($found{'body'}) && $ENV{'request.state'} eq 'construct' |
$body_tag_start='<body onLoad="'.&Apache::lonmenu::loadevents().'" '. |
&& $ENV{'environment.remote'} eq 'off') { |
'onUnload="'.&Apache::lonmenu::unloadevents().'" '; |
$body_tag_start=&Apache::loncommon::bodytag(); |
|
$body_tag_start.=&Apache::lonxml::message_location(); |
|
} elsif (!defined($found{'body'})) { |
|
$body_tag_start='<body onload="'.&Apache::lonmenu::loadevents().'" '. |
|
'onunload="'.&Apache::lonmenu::unloadevents().'" '; |
my $background=&Apache::lonxml::get_param('background',$parstack, |
my $background=&Apache::lonxml::get_param('background',$parstack, |
$safeeval); |
$safeeval); |
if ($ENV{'browser.imagesuppress'} eq 'on') { $background=''; } |
if ($ENV{'browser.imagesuppress'} eq 'on') { $background=''; } |
Line 123 sub page_start {
|
Line 128 sub page_start {
|
} |
} |
my $form_tag_start; |
my $form_tag_start; |
if (!defined($found{'form'})) { |
if (!defined($found{'form'})) { |
$form_tag_start='<form name="lonhomework" method="POST" action="'. |
$form_tag_start='<form name="lonhomework" method="post" action="'; |
$ENV{'request.uri'}.'">'; |
my $uri=$ENV{'request.uri'}; |
|
if ($ENV{'request.enc'}) { $uri=&Apache::lonenc::encrypted($uri); } |
|
$form_tag_start.=$uri.'">'; |
} |
} |
return ($result,$head_tag_start,$body_tag_start,$form_tag_start); |
return ($result,$head_tag_start,$body_tag_start,$form_tag_start); |
} |
} |
Line 184 sub setup_rndseed {
|
Line 191 sub setup_rndseed {
|
return $rndseed; |
return $rndseed; |
} |
} |
|
|
|
sub remember_problem_state { |
|
return ' |
|
<input type="hidden" name="problemstate" value="'.$ENV{'form.problemstate'}.'" /> |
|
<input type="hidden" name="problemtype" value="'.$ENV{'form.problemtype'}.'" /> |
|
<input type="hidden" name="problemstatus" value="'.$ENV{'form.problemstatus'}.'" />'; |
|
} |
|
|
sub problem_edit_header { |
sub problem_edit_header { |
return '<input type="hidden" name="submitted" value="edit" /> |
return '<input type="hidden" name="submitted" value="edit" />'. |
|
&Apache::structuretags::remember_problem_state().' |
<input type="hidden" name="problemmode" value="'.&mt('Edit').'" /> |
<input type="hidden" name="problemmode" value="'.&mt('Edit').'" /> |
<input type="submit" name="problemmode" accesskey="d" value="'.&mt('Discard Edits and View').'" /> |
<input type="submit" name="problemmode" accesskey="d" value="'.&mt('Discard Edits and View').'" /> |
<input type="submit" name="problemmode" accesskey="x" value="'.&mt('EditXML').'" /> |
<input type="submit" name="problemmode" accesskey="x" value="'.&mt('EditXML').'" /> |
<input type="submit" name="Undo" accesskey="u" value="'.&mt('undo').'" /> <hr /> |
<input type="submit" name="Undo" accesskey="u" value="'.&mt('undo').'" /> <hr /> |
<input type="submit" name="submit" accesskey="s" value="'.&mt('Submit Changes and Edit').'" /> |
<input type="submit" name="submit" accesskey="s" value="'.&mt('Submit Changes and Edit').'" /> |
<input type="submit" name="submit" accesskey="v" value="'.&mt('Submit Changes and View').'" /><table><tr><td>'. |
<input type="submit" name="submit" accesskey="v" value="'.&mt('Submit Changes and View').'" /><table><tr><td>'. |
&Apache::loncommon::help_open_topic('Problem_Editor_XML_Index', |
&Apache::loncommon::help_open_menu('','Problem Editing Help','Problem_Editor_XML_Index','',5,'Authoring',undef,undef,undef,'Problem Editing Help') |
'Problem Editing Help').'</td><td>'. |
.'</td></tr></table>'. |
&Apache::loncommon::help_open_faq(5). |
|
&Apache::loncommon::help_open_bug('Authoring').'</td></tr></table>'. |
|
'<table border="0"><tr><td bgcolor="#DDDDDD">'; |
'<table border="0"><tr><td bgcolor="#DDDDDD">'; |
} |
} |
|
|
Line 224 sub problem_web_to_edit_header {
|
Line 237 sub problem_web_to_edit_header {
|
<input type="submit" name="newrandomization" accesskey="a" value="'.&mt('New Randomization').'" /> |
<input type="submit" name="newrandomization" accesskey="a" value="'.&mt('New Randomization').'" /> |
<input type="submit" name="resetdata" accesskey="r" value="'.&mt('Reset Submissions').'" /> |
<input type="submit" name="resetdata" accesskey="r" value="'.&mt('Reset Submissions').'" /> |
<nobr><input type="submit" name="changerandseed" value="'.&mt('Change Random Seed To:').'" /> |
<nobr><input type="submit" name="changerandseed" value="'.&mt('Change Random Seed To:').'" /> |
<input type="text" name="rndseed" width="10" value="'. |
<input type="text" name="rndseed" size="10" value="'. |
$rndseed.'" |
$rndseed.'" |
onChange="javascript:document.lonhomework.changerandseed.click()" /></nobr> |
onchange="javascript:document.lonhomework.changerandseed.click()" /></nobr> |
<input type="checkbox" name="showallfoils" '; |
<input type="checkbox" name="showallfoils" '; |
if (defined($ENV{'form.showallfoils'})) { $result.='checked="on"'; } |
if (defined($ENV{'form.showallfoils'})) { $result.='checked="on"'; } |
$result.= ' />'.&mt(' Show All Foils'). |
$result.= ' />'.&mt(' Show All Foils'). |
Line 236 sub problem_web_to_edit_header {
|
Line 249 sub problem_web_to_edit_header {
|
<nobr> |
<nobr> |
Problem Status: |
Problem Status: |
<select name='problemstate'> |
<select name='problemstate'> |
<option name=''></option> |
<option value=''></option> |
".&option('CLOSED' ,'problemstate').&mt("Closed")."</option> |
".&option('CLOSED' ,'problemstate').&mt("Closed")."</option> |
".&option('CAN_ANSWER' ,'problemstate').&mt("Answerable")."</option> |
".&option('CAN_ANSWER' ,'problemstate').&mt("Answerable")."</option> |
".&option('CANNOT_ANSWER_tries' ,'problemstate').&mt("Open with full tries")."</option> |
".&option('CANNOT_ANSWER_tries' ,'problemstate').&mt("Open with full tries")."</option> |
Line 247 Problem Status:
|
Line 260 Problem Status:
|
<nobr> |
<nobr> |
Problem Type: |
Problem Type: |
<select name='problemtype'> |
<select name='problemtype'> |
<option name=''></option> |
<option value=''></option> |
".&option('exam' ,'problemtype').&mt("Exam Problem")."</option> |
".&option('exam' ,'problemtype').&mt("Exam Problem")."</option> |
".&option('problem','problemtype').&mt("Homework problem")."</option> |
".&option('problem','problemtype').&mt("Homework problem")."</option> |
".&option('survey' ,'problemtype').&mt("Survey Question")."</option> |
".&option('survey' ,'problemtype').&mt("Survey Question")."</option> |
Line 329 sub checkout_msg {
|
Line 342 sub checkout_msg {
|
<font color="red"> |
<font color="red"> |
<p>$lt{'warning'}</p> |
<p>$lt{'warning'}</p> |
</font> |
</font> |
<form name="checkout" method="POST" action="$ENV{'request.uri'}"> |
<form name="checkout" method="post" action="$ENV{'request.uri'}"> |
<input type="hidden" name="doescheckout" value="yes" /> |
<input type="hidden" name="doescheckout" value="yes" /> |
<input type="button" name="checkoutbutton" value="$lt{'checkout'}" onClick="javascript:if (confirm('$lt{'checkout?'}')) { document.checkout.submit(); }" /> |
<input type="button" name="checkoutbutton" value="$lt{'checkout'}" onClick="javascript:if (confirm('$lt{'checkout?'}')) { document.checkout.submit(); }" /> |
</form> |
</form> |
Line 343 sub firstaccess_msg {
|
Line 356 sub firstaccess_msg {
|
&Apache::lonxml::debug("map is $map title is $foldertitle"); |
&Apache::lonxml::debug("map is $map title is $foldertitle"); |
return (<<ENDCHECKOUT); |
return (<<ENDCHECKOUT); |
<h2>The resources in "$foldertitle" are open for a limited time. Once you click the 'Show Resource' button below you have $time to complete all resources "$foldertitle".</h2> |
<h2>The resources in "$foldertitle" are open for a limited time. Once you click the 'Show Resource' button below you have $time to complete all resources "$foldertitle".</h2> |
<form name="markaccess" method="POST" action="$ENV{'request.uri'}"> |
<form name="markaccess" method="post" action="$ENV{'request.uri'}"> |
<input type="hidden" name="markaccess" value="yes" /> |
<input type="hidden" name="markaccess" value="yes" /> |
<input type="button" name="accessbutton" value="Show Resource" onClick="javascript:if (confirm('Start Timer?')) { document.markaccess.submit(); }" /> |
<input type="button" name="accessbutton" value="Show Resource" onClick="javascript:if (confirm('Start Timer?')) { document.markaccess.submit(); }" /> |
</form> |
</form> |
Line 356 sub init_problem_globals {
|
Line 369 sub init_problem_globals {
|
if ($type eq 'problem') { |
if ($type eq 'problem') { |
$Apache::inputtags::part='0'; |
$Apache::inputtags::part='0'; |
@Apache::inputtags::partlist=('0'); |
@Apache::inputtags::partlist=('0'); |
|
$Apache::lonhomework::problemstatus=&get_problem_status('0'); |
$Apache::lonhomework::problemstatus=&get_problem_status('0') |
$Apache::lonhomework::ignore_response_errors=0; |
} else { |
} elsif ($type eq 'library') { |
$Apache::inputtags::part=''; |
$Apache::inputtags::part=''; |
@Apache::inputtags::partlist=(); |
@Apache::inputtags::partlist=(); |
$Apache::lonhomework::problemstatus=''; |
$Apache::lonhomework::problemstatus=''; |
|
$Apache::lonhomework::ignore_response_errors=1; |
} |
} |
@Apache::inputtags::responselist = (); |
@Apache::inputtags::responselist = (); |
@Apache::inputtags::importlist = (); |
@Apache::inputtags::importlist = (); |
Line 397 sub set_problem_state {
|
Line 411 sub set_problem_state {
|
|
|
sub get_problem_status { |
sub get_problem_status { |
my ($part)=@_; |
my ($part)=@_; |
my $problem_status=&Apache::lonnet::EXT("resource.$part.problemstatus"); |
my $problem_status; |
&Apache::lonxml::debug("problem status for $part is $problem_status"); |
|
&Apache::lonxml::debug("env probstat is ".$ENV{'form.problemstatus'}); |
|
if ($ENV{'request.state'} eq 'construct' && |
if ($ENV{'request.state'} eq 'construct' && |
defined($ENV{'form.problemstatus'})) { |
defined($ENV{'form.problemstatus'})) { |
$problem_status=$ENV{'form.problemstatus'}; |
$problem_status=$ENV{'form.problemstatus'}; |
|
} else { |
|
$problem_status=&Apache::lonnet::EXT("resource.$part.problemstatus"); |
|
&Apache::lonxml::debug("problem status for $part is $problem_status"); |
|
&Apache::lonxml::debug("env probstat is ".$ENV{'form.problemstatus'}); |
} |
} |
return $problem_status; |
return $problem_status; |
} |
} |
Line 486 sub start_problem {
|
Line 502 sub start_problem {
|
'<input type="submit" name="resetdata" |
'<input type="submit" name="resetdata" |
value="'.&mt('New Problem Variation').'" />'. |
value="'.&mt('New Problem Variation').'" />'. |
'<input type="hidden" name="username" |
'<input type="hidden" name="username" |
value="'.$ENV{'form.username'}.'" /> <br />'; |
value="'.$ENV{'form.username'}.'" />'; |
|
if ($ENV{'user.adv'}) { |
|
$form_tag_start.= |
|
' <input type="checkbox" name="showallfoils" '; |
|
if (defined($ENV{'form.showallfoils'})) { |
|
$form_tag_start.='checked="on"'; |
|
} |
|
$form_tag_start.= ' />'.&mt(' Show All Foils'); |
|
} |
|
$form_tag_start.='<hr />'; |
} |
} |
($status,$accessmsg) = &Apache::lonhomework::check_access('0'); |
($status,$accessmsg) = &Apache::lonhomework::check_access('0'); |
push (@Apache::inputtags::status,$status); |
push (@Apache::inputtags::status,$status); |
Line 556 sub start_problem {
|
Line 581 sub start_problem {
|
$allow_print_points=1; |
$allow_print_points=1; |
} |
} |
} |
} |
|
my $maxtries = &Apache::lonnet::EXT("resource.$id.maxtries"); |
|
if (defined($maxtries) && $maxtries < 0) { $allow_print_points=0; } |
my $duedate = &Apache::lonnet::EXT("resource.$id.duedate"); |
my $duedate = &Apache::lonnet::EXT("resource.$id.duedate"); |
$duedate = POSIX::strftime("%c",localtime($duedate)); |
$duedate = POSIX::strftime("%c",localtime($duedate)); |
my $temp_file; |
my $temp_file; |
Line 568 sub start_problem {
|
Line 595 sub start_problem {
|
my @due_file_content = <$temp_file>; |
my @due_file_content = <$temp_file>; |
my $due_file_content = $due_file_content[$#due_file_content]; |
my $due_file_content = $due_file_content[$#due_file_content]; |
chomp $due_file_content; |
chomp $due_file_content; |
my $name_of_resourse= &Apache::lonxml::latex_special_symbols(&get_resource_name($parstack,$safeeval)); |
my $name_of_resourse= &Apache::lonxml::latex_special_symbols(&get_resource_name($parstack,$safeeval),'header'); |
if ($due_file_content ne $duedate) { |
if ($due_file_content ne $duedate) { |
$temp_file = Apache::File->new('>'.$filename); |
$temp_file = Apache::File->new('>'.$filename); |
print $temp_file "$duedate\n"; |
print $temp_file "$duedate\n"; |
Line 647 sub end_problem {
|
Line 674 sub end_problem {
|
if (not $ENV{'form.problem_split'}=~/yes/) { |
if (not $ENV{'form.problem_split'}=~/yes/) { |
$endminipage = '\end{minipage}'; |
$endminipage = '\end{minipage}'; |
} |
} |
$result .= '\keephidden{ENDOFPROBLEM}\vskip 0.5mm\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill}'; |
if ($ENV{'form.print_discussions'} eq 'yes') { |
if (not $ENV{'request.symb'} =~ m/\.page_/) { |
$result.=&Apache::lonxml::xmlend($target,$parser); |
$result .= $endminipage.'\end{document} '; |
$result=~s/<\/html>//; |
} else { |
} else { |
$result .= ''; |
$result .= '\keephidden{ENDOFPROBLEM}\vskip 0.5mm\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill}'; |
|
if (not $ENV{'request.symb'} =~ m/\.page_/) { |
|
$result .= $endminipage.'\end{document} '; |
|
} else { |
|
$result .= ''; |
|
} |
} |
} |
} |
} |
} |
} |
Line 670 sub end_problem {
|
Line 702 sub end_problem {
|
$result=&Apache::response::mandatory_part_meta; |
$result=&Apache::response::mandatory_part_meta; |
} |
} |
$result.=&Apache::response::meta_part_order(); |
$result.=&Apache::response::meta_part_order(); |
|
$result.=&Apache::response::meta_response_order(); |
} elsif ($target eq 'edit') { |
} elsif ($target eq 'edit') { |
&Apache::lonxml::debug("in end_problem with $target, edit"); |
&Apache::lonxml::debug("in end_problem with $target, edit"); |
$result = &problem_edit_footer(); |
$result = &problem_edit_footer(); |
Line 858 sub start_instructorcomment {
|
Line 891 sub start_instructorcomment {
|
if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || |
if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || |
$target eq 'tex' || $target eq 'analyze') { |
$target eq 'tex' || $target eq 'analyze') { |
$result=($ENV{'request.role'}=~/^(in|cc|au|ca|li)/); |
$result=($ENV{'request.role'}=~/^(in|cc|au|ca|li)/); |
if ( ! $result ) { |
if ( (! $result) or ($ENV{'form.instructor_comments'} eq 'hide')) { |
my $skip=&Apache::lonxml::get_all_text("/instructorcomment", |
my $skip=&Apache::lonxml::get_all_text("/instructorcomment", |
$parser,$style); |
$parser,$style); |
&Apache::lonxml::debug("skipping ahead :$skip: $$parser[-1]"); |
&Apache::lonxml::debug("skipping ahead :$skip: $$parser[-1]"); |
Line 928 sub end_while {
|
Line 961 sub end_while {
|
while ($return) { |
while ($return) { |
if (time-$starttime > |
if (time-$starttime > |
$Apache::lonnet::perlvar{'lonScriptTimeout'}) { |
$Apache::lonnet::perlvar{'lonScriptTimeout'}) { |
$return = 0; $error=1; next; |
#$return = 0; $error=1; next; |
} |
} |
$result.=&Apache::scripttag::xmlparse($bodytext); |
$result.=&Apache::scripttag::xmlparse($bodytext); |
$return = &Apache::run::run($code,$safeeval); |
$return = &Apache::run::run($code,$safeeval); |
} |
} |
if ($error) { |
if ($error) { |
&Apache::lonxml::error('<pre>'.&mt('Code ran too long. It ran for more than').' '.$Apache::lonnet::perlvar{'lonScriptTimeout'}.' '.&mt('seconds occured while running <while$gt; on line').' '.$line.'</pre>'); |
&Apache::lonxml::error('<pre>'.&mt('Code ran too long. It ran for more than').' '.$Apache::lonnet::perlvar{'lonScriptTimeout'}.' '.&mt('seconds occured while running <while> on line').' '.$line.'</pre>'); |
} |
} |
} elsif ($target eq "edit") { |
} elsif ($target eq "edit") { |
$result.= &Apache::edit::tag_end($target,$token,''); |
$result.= &Apache::edit::tag_end($target,$token,''); |
Line 1038 sub start_part {
|
Line 1071 sub start_part {
|
@Apache::inputtags::previous_version=(); |
@Apache::inputtags::previous_version=(); |
$Apache::lonhomework::problemstatus=&get_problem_status($id); |
$Apache::lonhomework::problemstatus=&get_problem_status($id); |
my $hidden=&Apache::loncommon::check_if_partid_hidden($Apache::inputtags::part); |
my $hidden=&Apache::loncommon::check_if_partid_hidden($Apache::inputtags::part); |
|
my $newtype=&Apache::lonnet::EXT("resource.$id.type"); |
|
if ($newtype) { $Apache::lonhomework::type=$newtype; } |
|
|
my $expression='$external::part=\''.$Apache::inputtags::part.'\';'; |
my $expression='$external::part=\''.$Apache::inputtags::part.'\';'; |
|
$expression.='$external::type=\''.$Apache::lonhomework::type.'\';'; |
&Apache::run::run($expression,$safeeval); |
&Apache::run::run($expression,$safeeval); |
|
|
if ($target eq 'meta') { |
if ($target eq 'meta') { |
Line 1077 sub start_part {
|
Line 1114 sub start_part {
|
} else { |
} else { |
if ($target eq 'tex') { |
if ($target eq 'tex') { |
if (not $ENV{'form.problem_split'}=~/yes/) { |
if (not $ENV{'form.problem_split'}=~/yes/) { |
$result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent'; |
if ($$tagstack[-2] eq 'td') { |
|
$result.='\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent'; |
|
} else { |
|
$result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent'; |
|
} |
} |
} |
my $weight = &Apache::lonnet::EXT("resource.$id.weight"); |
my $weight = &Apache::lonnet::EXT("resource.$id.weight"); |
my $allkeys=&Apache::lonnet::metadata($ENV{'request.uri'},'packages'); |
my $allkeys=&Apache::lonnet::metadata($ENV{'request.uri'},'packages'); |
Line 1088 sub start_part {
|
Line 1129 sub start_part {
|
if ($1 ne '0') {$allow_print_points=1;} |
if ($1 ne '0') {$allow_print_points=1;} |
} |
} |
} |
} |
|
my $maxtries = &Apache::lonnet::EXT("resource.$id.maxtries"); |
|
if (defined($maxtries) && $maxtries < 0) { |
|
$allow_print_points=0; |
|
} |
if (($Apache::lonhomework::type eq 'exam') && ($allow_print_points)) { $result .= '\fbox{\textit{'.$weight.' pt}}';} |
if (($Apache::lonhomework::type eq 'exam') && ($allow_print_points)) { $result .= '\fbox{\textit{'.$weight.' pt}}';} |
} elsif ($target eq 'web') { |
} elsif ($target eq 'web') { |
$result.='<a name="'.&Apache::lonnet::escape($Apache::inputtags::part).'" />'; |
$result.='<a name="'.&Apache::lonnet::escape($Apache::inputtags::part).'" />'; |
Line 1137 sub end_part {
|
Line 1182 sub end_part {
|
$gradestatus=''; |
$gradestatus=''; |
} |
} |
$result=$gradestatus; |
$result=$gradestatus; |
|
if ($$tagstack[-2] eq 'td' and $target eq 'tex') {$result.='\end{minipage}';} |
} elsif ($target eq 'edit') { |
} elsif ($target eq 'edit') { |
$result=&Apache::edit::end_table(); |
$result=&Apache::edit::end_table(); |
} |
} |
Line 1324 sub delete_startouttext {
|
Line 1370 sub delete_startouttext {
|
sub start_simpleeditbutton { |
sub start_simpleeditbutton { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
my $result=''; |
my $result=''; |
if (($target eq 'web') && |
if (($ENV{'form.simple_edit_button'} ne 'off') && |
|
($target eq 'web') && |
(&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))) { |
(&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))) { |
my $url=$ENV{'request.noversionuri'}; |
my $url=$ENV{'request.noversionuri'}; |
$url=~s/\?.*$//; |
$url=~s/\?.*$//; |
$result='<table width="100%" bgcolor="#FFFFAA" border="2"><tr><td>'. |
$result='<table width="100%" bgcolor="#FFFFAA" border="2"><tr><td>'. |
'<a href="'.$url.'/smpedit">'.&mt('Simple Problem Editor').'</a> - '.&mt('Note: it can take up to 10 minutes for changes to take effect for all users.'). |
'<a href="'.$url.'/smpedit">'.&mt('Edit').'</a> - '.&mt('Note: it can take up to 10 minutes for changes to take effect for all users.'). |
&Apache::loncommon::help_open_topic('Caching').'</td></tr></table><br />'; |
&Apache::loncommon::help_open_topic('Caching').'</td></tr></table><br />'; |
} |
} |
return $result; |
return $result; |