Diff for /loncom/homework/structuretags.pm between versions 1.155 and 1.157

version 1.155, 2003/03/07 23:41:29 version 1.157, 2003/04/02 19:52:05
Line 254  sub start_problem { Line 254  sub start_problem {
   $Apache::inputtags::part='0';    $Apache::inputtags::part='0';
   @Apache::inputtags::responselist = ();    @Apache::inputtags::responselist = ();
   @Apache::inputtags::previous=();    @Apache::inputtags::previous=();
     @Apache::inputtags::previous_version=();
   $Apache::structuretags::printanswer='No';    $Apache::structuretags::printanswer='No';
   if ($target ne 'analyze') {    if ($target ne 'analyze') {
     &initialize_storage();      &initialize_storage();
Line 336  sub start_problem { Line 337  sub start_problem {
       my $name= &get_resource_name($parstack,$safeeval);        my $name= &get_resource_name($parstack,$safeeval);
       if ($status eq 'CAN_ANSWER') {        if ($status eq 'CAN_ANSWER') {
  # create a page header and exit   # create a page header and exit
    my $WeightOfProblem = '';
    if ($Apache::lonhomework::type eq 'exam') {
        my $weight = &Apache::lonnet::EXT("resource.$Apache::inputtags::part.weight");
             $WeightOfProblem = "<table border=1><tr><td><i>$weight pt</i></td></tr></table>";
    }
  $result.="$head_tag_start<title>$name</title></head>   $result.="$head_tag_start<title>$name</title></head>
               $body_tag_start \n $form_tag_start".                $body_tag_start \n $form_tag_start $WeightOfProblem".
  '<input type="hidden" name="submitted" value="yes" />';   '<input type="hidden" name="submitted" value="yes" />';
  if ($ENV{'request.state'} eq "construct") {   if ($ENV{'request.state'} eq "construct") {
   $result.= &problem_web_to_edit_header($rndseed);    $result.= &problem_web_to_edit_header($rndseed);
Line 434  sub end_problem { Line 440  sub end_problem {
       # if part is zero, no <part>s existed, so we need show the current         # if part is zero, no <part>s existed, so we need show the current 
       # grading status        # grading status
       my $gradestatus = &Apache::inputtags::gradestatus($Apache::inputtags::part,$target);        my $gradestatus = &Apache::inputtags::gradestatus($Apache::inputtags::part,$target);
       if ($Apache::lonhomework::type ne 'exam') {$result.= $gradestatus;}        $result.= $gradestatus;
     }      }
     if (      if (
  (($target eq 'web') && ($ENV{'request.state'} ne 'construct')) ||   (($target eq 'web') && ($ENV{'request.state'} ne 'construct')) ||
Line 686  sub start_part { Line 692  sub start_part {
   $Apache::inputtags::part=$id;    $Apache::inputtags::part=$id;
   @Apache::inputtags::responselist = ();    @Apache::inputtags::responselist = ();
   @Apache::inputtags::previous=();    @Apache::inputtags::previous=();
     @Apache::inputtags::previous_version=();
   my $hidden=&Apache::loncommon::check_if_partid_hidden($Apache::inputtags::part);    my $hidden=&Apache::loncommon::check_if_partid_hidden($Apache::inputtags::part);
   
   if ($target eq 'meta') {    if ($target eq 'meta') {

Removed from v.1.155  
changed lines
  Added in v.1.157


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