Diff for /loncom/homework/matchresponse.pm between versions 1.87 and 1.89

version 1.87, 2012/12/29 01:21:10 version 1.89, 2013/04/30 03:03:34
Line 104  sub start_itemgroup { Line 104  sub start_itemgroup {
     if ($target eq 'edit') {      if ($target eq 'edit') {
  $result=&Apache::edit::tag_start($target,$token);   $result=&Apache::edit::tag_start($target,$token);
  $result.=&Apache::edit::select_arg('Randomize Order:','randomize',   $result.=&Apache::edit::select_arg('Randomize Order:','randomize',
    ['yes','no'],$token).' 'x 3;     ['yes','no'],$token);
  $result.=&Apache::edit::select_arg('Items Display Location:',   $result.=&Apache::edit::select_arg('Items Display Location:',
    'location',     'location',
    ['top','bottom','left','right'],     ['top','bottom','left','right'],
    $token).' 'x 3;     $token);
  $result.=&Apache::edit::select_arg('Items Display Direction:',   $result.=&Apache::edit::select_arg('Items Display Direction:',
    'direction',     'direction',
    ['vertical','horizontal'],     ['vertical','horizontal'],
    $token).' 'x 3;     $token);
         $result.=&Apache::edit::select_arg('Items Columns:',          $result.=&Apache::edit::select_arg('Items Columns:',
                                            'columns',                                             'columns',
                                            [['','default'],'1','2','3','4'],                                             [['','default'],'1','2','3','4'],
Line 262  sub start_item { Line 262  sub start_item {
  $result=&Apache::edit::tag_start($target,$token,"Item");   $result=&Apache::edit::tag_start($target,$token,"Item");
  $result.=&Apache::edit::text_arg('Name:','name',$token);   $result.=&Apache::edit::text_arg('Name:','name',$token);
  if ($randomize ne 'no') {   if ($randomize ne 'no') {
     $result.=' 'x 3 .      $result.=
                      &Apache::edit::select_arg('Location:','location',                       &Apache::edit::select_arg('Location:','location',
        ['random','top','bottom'],         ['random','top','bottom'],
        $token);         $token);
Line 652  sub displayfoils { Line 652  sub displayfoils {
                 $newvariation = 1;                  $newvariation = 1;
             }              }
         }          }
         unless ((($Apache::lonhomework::history{"resource.$part.type"} eq 'anonsurvey') || ($Apache::lonhomework::history{"resource.$part.type"} eq 'anonsurveycred') && (defined($env{'form.grade_symb'}))) || $newvariation) {          unless ($newvariation) {
     $lastresponse=$Apache::lonhomework::history{"resource.$part.$id.submission"};              if ((($env{'form.grade_username'} eq '') && ($env{'form.grade_domain'} eq '')) ||
                   (($env{'form.grade_username'} eq $env{'user.name'}) &&
                    ($env{'form.grade_domain'} eq $env{'user.domain'}))) {
                   $lastresponse=$Apache::lonhomework::history{"resource.$part.$id.submission"};
               } else {
                   unless (($Apache::lonhomework::history{"resource.$part.type"} eq 'anonsurvey') ||
                           ($Apache::lonhomework::history{"resource.$part.type"} eq 'anonsurveycred')) {
                       $lastresponse=$Apache::lonhomework::history{"resource.$part.$id.submission"};
                   }
               }
         }          }
   
  my %lastresponse=&Apache::lonnet::str2hash($lastresponse);       my %lastresponse=&Apache::lonnet::str2hash($lastresponse);    
  my @alphabet=('A'..'Z');   my @alphabet=('A'..'Z');
  my @used_letters=sort(keys(%letter_name_map));   my @used_letters=sort(keys(%letter_name_map));

Removed from v.1.87  
changed lines
  Added in v.1.89


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