Diff for /loncom/interface/domainprefs.pm between versions 1.272 and 1.273

version 1.272, 2016/04/04 01:09:47 version 1.273, 2016/06/06 17:40:47
Line 3154  sub print_ltitools { Line 3154  sub print_ltitools {
                 }                  }
                 $datatable .= '</select></td>';                  $datatable .= '</select></td>';
             }              }
             $datatable .= '</tr></table></fieldset>'.              $datatable .= '</tr></table></fieldset>';
               my %courseconfig;
               if (ref($settings->{$item}) eq 'HASH') {
                   if (ref($settings->{$item}->{'crsconf'}) eq 'HASH') {
                       %courseconfig = %{$settings->{$item}->{'crsconf'}};
                   }
               }
               $datatable .= '<fieldset><legend>'.&mt('Configurable in course').'</legend><span class="LC_nobreak">';
               foreach my $item ('label','title','target') {
                   my $checked;
                   if ($courseconfig{$item}) {
                       $checked = ' checked="checked"';
                   }
                   $datatable .= '<label>'.
                          '<input type="checkbox" name="ltitools_courseconfig_'.$i.'" value="'.$item.'"'.$checked.' />'.
                          $lt{'crs'.$item}.'</label>'.('&nbsp;' x2)."\n";
               }
               $datatable .= '</span></fieldset>'.
                           '<fieldset><legend>'.&mt('Custom items sent on launch').'</legend>'.                            '<fieldset><legend>'.&mt('Custom items sent on launch').'</legend>'.
                           '<table><tr><th>'.&mt('Action').'</th><th>'.&mt('Name').'</th><th>'.&mt('Value').'</th></tr>';                            '<table><tr><th>'.&mt('Action').'</th><th>'.&mt('Name').'</th><th>'.&mt('Value').'</th></tr>';
             if (ref($settings->{$item}->{'custom'}) eq 'HASH') {              if (ref($settings->{$item}->{'custom'}) eq 'HASH') {
Line 3260  sub print_ltitools { Line 3277  sub print_ltitools {
         $datatable .= '</select></td>';          $datatable .= '</select></td>';
     }      }
     $datatable .= '</tr></table></fieldset>'.      $datatable .= '</tr></table></fieldset>'.
                     '<fieldset><legend>'.&mt('Configurable in course').'</legend><span class="LC_nobreak">';
       foreach my $item ('label','title','target') {
            $datatable .= '<label>'.
                          '<input type="checkbox" name="ltitools_courseconfig" value="'.$item.'" checked="checked" />'.
                          $lt{'crs'.$item}.'</label>'.('&nbsp;' x2)."\n";
       }
       $datatable .= '</span></fieldset>'.
                   '<fieldset><legend>'.&mt('Custom items sent on launch').'</legend>'.                    '<fieldset><legend>'.&mt('Custom items sent on launch').'</legend>'.
                   '<table><tr><th>'.&mt('Action').'</th><th>'.&mt('Name').'</th><th>'.&mt('Value').'</th></tr>'.                    '<table><tr><th>'.&mt('Action').'</th><th>'.&mt('Name').'</th><th>'.&mt('Value').'</th></tr>'.
                   '<tr><td><span class="LC_nobreak">'.                    '<tr><td><span class="LC_nobreak">'.
Line 3294  sub ltitools_names { Line 3318  sub ltitools_names {
                                           'width'     => 'Width',                                            'width'     => 'Width',
                                           'passback'  => 'Tool can return grades:',                                            'passback'  => 'Tool can return grades:',
                                           'roster'    => 'Tool can retrieve roster:',                                            'roster'    => 'Tool can retrieve roster:',
                                             'crstarget' => 'Display target',
                                             'crslabel'  => 'Course label',
                                             'crstitle'  => 'Course title', 
                                         );                                          );
     return %lt;      return %lt;
 }  }
Line 8435  sub modify_ltitools { Line 8462  sub modify_ltitools {
                     }                      }
                 }                  }
             }              }
               my @courseconfig = &Apache::loncommon::get_env_multiple('form.ltitools_courseconfig');
               foreach my $item (@courseconfig) {
                   $confhash{$newid}{'crsconf'}{$item} = 1;
               }
             if ($env{'form.ltitools_add_custom'}) {              if ($env{'form.ltitools_add_custom'}) {
                 my $name = $env{'form.ltitools_add_custom_name'};                  my $name = $env{'form.ltitools_add_custom_name'};
                 my $value = $env{'form.ltitools_add_custom_value'};                  my $value = $env{'form.ltitools_add_custom_value'};
Line 8522  sub modify_ltitools { Line 8553  sub modify_ltitools {
                             $changes{$itemid} = 1;                              $changes{$itemid} = 1;
                         }                          }
                     }                      }
                       my @courseconfig = &Apache::loncommon::get_env_multiple('form.ltitools_courseconfig_'.$i);
                       foreach my $item ('label','title','target') {
                           if (grep(/^\Q$item\E$/,@courseconfig)) {
                               $confhash{$itemid}{'crsconf'}{$item} = 1;
                               if (ref($domconfig{$action}{$itemid}{'crsconf'}) eq 'HASH') {
                                   if ($domconfig{$action}{$itemid}{'crsconf'}{$item} ne $confhash{$itemid}{'crsconf'}{$item}) {
                                       $changes{$itemid} = 1;
                                   }
                               } else {
                                   $changes{$itemid} = 1;
                               }
                           }
                       }
                     my @fields = &Apache::loncommon::get_env_multiple('form.ltitools_fields_'.$i);                      my @fields = &Apache::loncommon::get_env_multiple('form.ltitools_fields_'.$i);
                     foreach my $field (@fields) {                      foreach my $field (@fields) {
                         if ($possfield{$field}) {                          if ($possfield{$field}) {
Line 8685  sub modify_ltitools { Line 8729  sub modify_ltitools {
                         my $num = length($confhash{$itemid}{'secret'});                          my $num = length($confhash{$itemid}{'secret'});
                         $resulttext .= ('*'x$num).'</li>';                          $resulttext .= ('*'x$num).'</li>';
                     }                      }
                       $resulttext .= '<li>'.&mt('Configurable in course:');
                       my @possconfig = ('label','title','target');
                       my $numconfig = 0; 
                       if (ref($confhash{$itemid}{'crsconf'}) eq 'HASH') { 
                           foreach my $item (@possconfig) {
                               if ($confhash{$itemid}{'crsconf'}{$item}) {
                                   $numconfig ++;
                                   $resulttext .= ' '.$lt{'crs'.$item};
                               }
                           }
                       }
                       if (!$numconfig) {
                           $resulttext .= &mt('None');
                       }
                       $resulttext .= '</li>';
                     foreach my $item ('passback','roster') {                      foreach my $item ('passback','roster') {
                         $resulttext .= '<li>'.$lt{$item}.'&nbsp;';                          $resulttext .= '<li>'.$lt{$item}.'&nbsp;';
                         if ($confhash{$itemid}{$item}) {                          if ($confhash{$itemid}{$item}) {

Removed from v.1.272  
changed lines
  Added in v.1.273


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