Diff for /loncom/homework/edit.pm between versions 1.65 and 1.68

version 1.65, 2003/09/17 15:44:19 version 1.68, 2003/10/24 21:09:24
Line 67  sub tag_start { Line 67  sub tag_start {
 #<td>".   #<td>". 
 #  &movebuttons($target,$token).  #  &movebuttons($target,$token).
 #    "</tr><tr><td colspan=\"3\">\n";  #    "</tr><tr><td colspan=\"3\">\n";
  my @help;# = Apache::lonxml::helpinfo($token);   my @help = Apache::lonxml::helpinfo($token);
  if ($help[0]) {   if ($help[0]) {
     $result .= '<td align="right" valign="top">' .      $result .= '<td align="right" valign="top">' .
  Apache::loncommon::help_open_topic(@help) .   Apache::loncommon::help_open_topic(@help) .
Line 283  sub insert_formularesponse { Line 283  sub insert_formularesponse {
 <formularesponse answer="" samples="">  <formularesponse answer="" samples="">
     <textline />      <textline />
     <hintgroup>      <hintgroup>
       <startouttext/>
       <endouttext />
     </hintgroup>      </hintgroup>
 </formularesponse>';  </formularesponse>';
 }  }
Line 292  sub insert_numericalresponse { Line 294  sub insert_numericalresponse {
 <numericalresponse answer="">  <numericalresponse answer="">
     <textline />      <textline />
     <hintgroup>      <hintgroup>
       <startouttext/>
       <endouttext />
     </hintgroup>      </hintgroup>
 </numericalresponse>';  </numericalresponse>';
 }  }
Line 301  sub insert_stringresponse { Line 305  sub insert_stringresponse {
 <stringresponse answer="" type="">  <stringresponse answer="" type="">
     <textline />      <textline />
     <hintgroup>      <hintgroup>
       <startouttext/>
       <endouttext />
     </hintgroup>      </hintgroup>
 </stringresponse>';  </stringresponse>';
 }  }
Line 318  sub insert_imageresponse { Line 324  sub insert_imageresponse {
     <foilgroup>      <foilgroup>
     </foilgroup>      </foilgroup>
     <hintgroup>      <hintgroup>
       <startouttext/>
       <endouttext />
     </hintgroup>      </hintgroup>
 </imageresponse>';  </imageresponse>';
 }  }
Line 328  sub insert_optionresponse { Line 336  sub insert_optionresponse {
     <foilgroup options="">      <foilgroup options="">
     </foilgroup>      </foilgroup>
     <hintgroup>      <hintgroup>
       <startouttext/>
       <endouttext />
     </hintgroup>      </hintgroup>
 </optionresponse>';  </optionresponse>';
 }  }
Line 338  sub insert_radiobuttonresponse { Line 348  sub insert_radiobuttonresponse {
     <foilgroup>      <foilgroup>
     </foilgroup>      </foilgroup>
     <hintgroup>      <hintgroup>
       <startouttext/>
       <endouttext />
     </hintgroup>      </hintgroup>
 </radiobuttonresponse>';  </radiobuttonresponse>';
 }  }
Line 348  sub insert_rankresponse { Line 360  sub insert_rankresponse {
     <foilgroup options="">      <foilgroup options="">
     </foilgroup>      </foilgroup>
     <hintgroup>      <hintgroup>
       <startouttext/>
       <endouttext />
     </hintgroup>      </hintgroup>
 </rankresponse>';  </rankresponse>';
 }  }
Line 360  sub insert_matchresponse { Line 374  sub insert_matchresponse {
       </itemgroup>        </itemgroup>
     </foilgroup>      </foilgroup>
     <hintgroup>      <hintgroup>
       <startouttext/>
       <endouttext />
     </hintgroup>      </hintgroup>
 </matchresponse>';  </matchresponse>';
 }  }
Line 374  sub insert_hintpart { Line 390  sub insert_hintpart {
 </hintpart>';  </hintpart>';
 }  }
   
   sub insert_hintgroup {
     return '
   <hintgroup>
       <startouttext/>
       <endouttext />
   </hintgroup>';
   }
   
 sub insert_numericalhint {  sub insert_numericalhint {
     return '      return '
 <numericalhint>  <numericalhint>
Line 707  ENDBUTTON Line 731  ENDBUTTON
 #----------------------------------------------------- browse  #----------------------------------------------------- browse
 sub browse {  sub browse {
     # insert a link to call up the filesystem browser (lonindexer)      # insert a link to call up the filesystem browser (lonindexer)
     my ($id, $mode) = @_;      my ($id, $mode, $titleid) = @_;
     my $form    = 'lonhomework';      my $form    = 'lonhomework';
     my $element;      my $element;
     if (! defined($mode) || $mode eq 'attribute') {      if (! defined($mode) || $mode eq 'attribute') {
         $element = &Apache::lonnet::escape("$id\_$Apache::lonxml::curdepth");          $element = &Apache::lonnet::escape("$id\_$Apache::lonxml::curdepth");
     } elsif ($mode eq 'textnode') {  # for data between <tag> ... </tag>      } elsif ($mode eq 'textnode') {  # for data between <tag> ... </tag>
         $element = &Apache::lonnet::escape('homework_edit_'.          $element = &Apache::lonnet::escape('homework_edit_'.
                                            $Apache::lonxml::curdepth);                                             $Apache::lonxml::curdepth);
       }
       my $titleelement;
       if ($titleid) {
    $titleelement=",'','','".&Apache::lonnet::escape("$titleid\_$Apache::lonxml::curdepth")."'";
     }      }
     my $result = <<"ENDBUTTON";      my $result = <<"ENDBUTTON";
 <a href=\"javascript:openbrowser('$form','$element')\"\>Select</a>  <a href=\"javascript:openbrowser('$form','$element'$titleelement)\"\>Select</a>
 ENDBUTTON  ENDBUTTON
     return $result;      return $result;
 }  }
Line 725  ENDBUTTON Line 753  ENDBUTTON
 #----------------------------------------------------- browse  #----------------------------------------------------- browse
 sub search {  sub search {
     # insert a link to call up the filesystem browser (lonindexer)      # insert a link to call up the filesystem browser (lonindexer)
     my ($id, $mode) = @_;      my ($id, $mode, $titleid) = @_;
     my $form    = 'lonhomework';      my $form    = 'lonhomework';
     my $element;      my $element;
     if (! defined($mode) || $mode eq 'attribute') {      if (! defined($mode) || $mode eq 'attribute') {
Line 734  sub search { Line 762  sub search {
         $element = &Apache::lonnet::escape('homework_edit_'.          $element = &Apache::lonnet::escape('homework_edit_'.
                                            $Apache::lonxml::curdepth);                                             $Apache::lonxml::curdepth);
     }      }
       my $titleelement;
       if ($titleid) {
    $titleelement=",'".&Apache::lonnet::escape("$titleid\_$Apache::lonxml::curdepth")."'";
       }
     my $result = <<"ENDBUTTON";      my $result = <<"ENDBUTTON";
 <a href=\"javascript:opensearcher('$form','$element')\"\>Search</a>  <a href=\"javascript:opensearcher('$form','$element'$titleelement)\"\>Search</a>
 ENDBUTTON  ENDBUTTON
     return $result;      return $result;
 }  }

Removed from v.1.65  
changed lines
  Added in v.1.68


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