Diff for /loncom/homework/structuretags.pm between versions 1.269 and 1.270

version 1.269, 2004/09/20 15:57:11 version 1.270, 2004/10/12 22:55:22
Line 84  sub page_start { Line 84  sub page_start {
        $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::lonhtmlcommon::spellheader();      &Apache::lonhtmlcommon::spellheader().
       &Apache::lonxml::fontsettings();     
     }      }
     my $body_tag_start;      my $body_tag_start;
     if (!defined($found{'body'})) {      if (!defined($found{'body'})) {
  $body_tag_start='<body onLoad="'.&Apache::lonmenu::loadevents().'" '.   $body_tag_start='<body onload="'.&Apache::lonmenu::loadevents().'" '.
     'onUnload="'.&Apache::lonmenu::unloadevents().'" ';      '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 124  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'}.'">';      $ENV{'request.uri'}.'">';
     }      }
     return ($result,$head_tag_start,$body_tag_start,$form_tag_start);      return ($result,$head_tag_start,$body_tag_start,$form_tag_start);
Line 230  sub problem_web_to_edit_header { Line 231  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('&nbsp;Show&nbsp;All&nbsp;Foils').      $result.= ' />'.&mt('&nbsp;Show&nbsp;All&nbsp;Foils').
Line 242  sub problem_web_to_edit_header { Line 243  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 253  Problem Status: Line 254  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 335  sub checkout_msg { Line 336  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 349  sub firstaccess_msg { Line 350  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 952  sub end_while { Line 953  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 &lt;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 &lt;while&gt; 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,'');

Removed from v.1.269  
changed lines
  Added in v.1.270


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>