Diff for /loncom/homework/structuretags.pm between versions 1.162 and 1.166

version 1.162, 2003/04/03 20:05:21 version 1.166, 2003/04/21 20:59:02
Line 104  sub page_start { Line 104  sub page_start {
  }   }
  $body_tag_start.='>'.&Apache::lonmenu::menubuttons(undef,$target,1);   $body_tag_start.='>'.&Apache::lonmenu::menubuttons(undef,$target,1);
  if ($target eq 'web' && $ENV{'request.state'} ne 'construct') {   if ($target eq 'web' && $ENV{'request.state'} ne 'construct') {
     my ($symb)=&Apache::lonxml::whichuser();      my ($symb,undef,undef,undef,$publicuser)=
     if ($symb eq '') {   &Apache::lonxml::whichuser();
       if ($symb eq '' && !$publicuser) {
  my $help = &Apache::loncommon::help_open_topic("Ambiguous_Reference");   my $help = &Apache::loncommon::help_open_topic("Ambiguous_Reference");
  $help="Browsing resource, all submissions are temporary.<br />";   $help="Browsing resource, all submissions are temporary.<br />";
  $body_tag_start.=$help;   $body_tag_start.=$help;
Line 270  sub start_problem { Line 271  sub start_problem {
     @Apache::structuretags::whileconds=();      @Apache::structuretags::whileconds=();
     @Apache::structuretags::whilebody=();      @Apache::structuretags::whilebody=();
     @Apache::structuretags::whileline=();      @Apache::structuretags::whileline=();
       $Apache::lonhomework::scantronmode=0;
   
       if (defined($ENV{'scantron.maxquest'})) {
    $Apache::lonhomework::scantronmode=1;
       }
   
     if ($target ne 'analyze') {      if ($target ne 'analyze') {
  &initialize_storage();   &initialize_storage();
Line 279  sub start_problem { Line 285  sub start_problem {
  $Apache::lonhomework::type=&Apache::lonnet::EXT('resource.0.type');   $Apache::lonhomework::type=&Apache::lonnet::EXT('resource.0.type');
  &Apache::lonxml::debug("Found this to be of type :$Apache::lonhomework::type:");   &Apache::lonxml::debug("Found this to be of type :$Apache::lonhomework::type:");
     }      }
     if ($Apache::lonhomework::type eq '') {      if ($Apache::lonhomework::type eq '' ) {
  my $uri=$ENV{'request.uri'};   my $uri=$ENV{'request.uri'};
  if ($uri=~/\.(\w+)$/) {   if ($uri=~/\.(\w+)$/) {
     $Apache::lonhomework::type=$1;      $Apache::lonhomework::type=$1;
Line 319  sub start_problem { Line 325  sub start_problem {
  #handle rand seed in construction space   #handle rand seed in construction space
  my $rndseed=&setup_rndseed($safeeval);   my $rndseed=&setup_rndseed($safeeval);
  my ($symb)=&Apache::lonxml::whichuser();   my ($symb)=&Apache::lonxml::whichuser();
  if ($ENV{'request.state'} ne "construct" || $symb eq '') {   if ($ENV{'request.state'} ne "construct" && $symb eq '') {
     $form_tag_start.='<input type="hidden" name="rndseed" value="'.      $form_tag_start.='<input type="hidden" name="rndseed" value="'.
  $rndseed.'" />'.   $rndseed.'" />'.
     '<input type="submit" name="resetdata"      '<input type="submit" name="resetdata"
                              value="New Problem Variation" />';                               value="New Problem Variation" />'.
       '<input type="hidden" name="username"
                                value="'.$ENV{'form.username'}.'" />';
  }   }
  ($status,$accessmsg) = &Apache::lonhomework::check_access('0');   ($status,$accessmsg) = &Apache::lonhomework::check_access('0');
  push (@Apache::inputtags::status,$status);   push (@Apache::inputtags::status,$status);

Removed from v.1.162  
changed lines
  Added in v.1.166


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