Diff for /loncom/interface/lonwhatsnew.pm between versions 1.72 and 1.75

version 1.72, 2007/06/06 17:35:32 version 1.75, 2008/03/11 00:44:09
Line 99  sub handler { Line 99  sub handler {
               text=>"Display Action Items"});                text=>"Display Action Items"});
     if (($command eq 'chgthreshold') && $checkallowed{'abovethreshold'}) {      if (($command eq 'chgthreshold') && $checkallowed{'abovethreshold'}) {
         &Apache::lonhtmlcommon::add_breadcrumb          &Apache::lonhtmlcommon::add_breadcrumb
             ({href=>'/adm/whatsnew?command=chgthreshold&refpage='.$refpage,              ({href=>'/adm/whatsnew?command=chgthreshold&refpage='.$refpage,
               text=>"Change thresholds"});                text=>"Change thresholds"});
         $r->print(&Apache::lonhtmlcommon::breadcrumbs          $r->print(&Apache::lonhtmlcommon::breadcrumbs
             ("What's New?",#'Course_Action_Items_Thresholds'              ("What's New?",#'Course_Action_Items_Thresholds'
      ));       ));
     } elsif (($command eq 'chginterval') && $checkallowed{'versionchanges'} ) {      } elsif (($command eq 'chginterval') && $checkallowed{'versionchanges'} ) {
         &Apache::lonhtmlcommon::add_breadcrumb          &Apache::lonhtmlcommon::add_breadcrumb
             ({href=>'/adm/whatsnew?command=chginterval&refpage='.$refpage,              ({href=>'/adm/whatsnew?command=chginterval&refpage='.$refpage,
               text=>"Change interval"});                text=>"Change interval"});
         $r->print(&Apache::lonhtmlcommon::breadcrumbs          $r->print(&Apache::lonhtmlcommon::breadcrumbs
             ("What's New?",#'Course_Action_Items_Intervals'              ("What's New?",#'Course_Action_Items_Intervals'
      ));       ));
     } elsif (($command eq 'chgdisc') && $checkallowed{'coursediscussion'}) {      } elsif (($command eq 'chgdisc') && $checkallowed{'coursediscussion'}) {
         &Apache::lonhtmlcommon::add_breadcrumb          &Apache::lonhtmlcommon::add_breadcrumb
             ({href=>'/adm/whatsnew?command=chgdisc&refpage='.$refpage,              ({href=>'/adm/whatsnew?command=chgdisc&refpage='.$refpage,
               text=>"Change discussion display"});                text=>"Change discussion display"});
         $r->print(&Apache::lonhtmlcommon::breadcrumbs          $r->print(&Apache::lonhtmlcommon::breadcrumbs
             ("What's New?",#'Course_Action_Items_Intervals'              ("What's New?",#'Course_Action_Items_Intervals'
      ));       ));
     } elsif ($command eq 'courseinit') {      } elsif ($command eq 'courseinit') {
         &Apache::lonhtmlcommon::add_breadcrumb          &Apache::lonhtmlcommon::add_breadcrumb
             ({href=>'/adm/whatsnew?command=courseinit&refpage='.$refpage,              ({href=>'/adm/whatsnew?command=courseinit&refpage='.$refpage,
               text=>"Course initialization preference"});                text=>"Course initialization preference"});
         $r->print(&Apache::lonhtmlcommon::breadcrumbs          $r->print(&Apache::lonhtmlcommon::breadcrumbs
             ("What's New?",#'Course_Action_Items_Initialization'              ("What's New?",#'Course_Action_Items_Initialization'
Line 295  sub display_actions_box { Line 295  sub display_actions_box {
     my $currinit = $pagedesc{$initdisp}.' ('.$pagedesc{$initcontrol}.')';      my $currinit = $pagedesc{$initdisp}.' ('.$pagedesc{$initcontrol}.')';
   
     unless ($cid) {      unless ($cid) {
         $r->print('<br /><b><center>'.$lt{'yacc'}.'</center></b><br /><br />');          $r->print('<p><span style="text-align: center; font-weight: bold;">'.$lt{'yacc'}.'</span></p>');
         return;          return;
     }      }
   
Line 304  sub display_actions_box { Line 304  sub display_actions_box {
             &GDBM_READER(),0640)) {              &GDBM_READER(),0640)) {
             my $furl=$bighash{'first_url'};              my $furl=$bighash{'first_url'};
             untie(%bighash);              untie(%bighash);
             $r->print('<font size="+1"><a href="'.$furl.'">'.$lt{'gtfr'}.              $r->print('<span style="font-size: larger;"><a href="'.$furl.'">'.$lt{'gtfr'}.
                   '</a></font><br />');                    '</a></span><br />');
         }          }
     }      }
     $r->print(&mt('Page set to be displayed after you have selected a role in this '.$lctype).      $r->print(&mt('Page set to be displayed after you have selected a role in this '.$lctype).'.'
               '. <nobr>'.&mt('Currently: <i>[_1]</i>',$currinit).'.&nbsp;&nbsp;'.                .' <span class="LC_nobreak">'
               &mt('<b>Change</b> for just <a href="/adm/whatsnew?command=courseinit&refpage=[_1]">this '.$lctype.'</a>',$refpage).' '.                .&mt('Currently: <i>[_1]</i>',$currinit)
               &mt('or for all <a href="/adm/preferences?action=changecourseinit&refpage=[_1]">your courses</a>.',$refpage).'</nobr><br /><hr />');                .'.&nbsp;&nbsp;'
   #              &mt('<b>Change</b> for just <a href="/adm/whatsnew?command=courseinit&amp;refpage=[_1]">this '.$lctype.'</a>',$refpage).' '.
   #              &mt('or for all <a href="/adm/preferences?action=changecourseinit&amp;refpage=[_1]">your courses</a>.',$refpage).'</span><br /><hr />');
                 .&mt('<b>Change</b> for just [_1]this course[_2]'
                     .' or for all [_3]your courses[_2].'
                     ,'<a href="/adm/whatsnew?command=courseinit&amp;refpage='.$refpage.'">'
                     ,'</a>'
                     ,'<a href="/adm/preferences?action=changecourseinit&amp;refpage='.$refpage.'">')
                 .' </span><br /><hr />');
   
     if ($command eq 'reset') {      if ($command eq 'reset') {
         $result = &process_reset($cdom,$crs);          $result = &process_reset($cdom,$crs);
Line 411  sub display_actions_box { Line 419  sub display_actions_box {
         }          }
     }      }
   
     $r->print('<input type="hidden" name="refpage" value="'.$refpage.'"></form><br /><table border="0" width="100%" cellpadding="2" cellspacing="4"><tr><td align="left" valign="top" width="45%">');      $r->print('<input type="hidden" name="refpage" value="'.$refpage.'" /></form><table class="LC_double_column"><tr><td class="LC_left_col">');
   
     my $displayed = 0;      my $displayed = 0;
     my $totalboxes = 0;      my $totalboxes = 0;
Line 426  sub display_actions_box { Line 434  sub display_actions_box {
     foreach my $actionitem (@actionorder) {      foreach my $actionitem (@actionorder) {
         if ($$checkallowed{$actionitem}) {          if ($$checkallowed{$actionitem}) {
             if ($displayed == $halfway) {              if ($displayed == $halfway) {
                 $r->print('</td><td width="6%">&nbsp;</td><td align="left" valign="top" width="47%">');                  $r->print('</td><td>&nbsp;</td><td class="LC_right_col" >');
             }              }
             &display_launcher($r,$actionitem,$refpage,$checkallowed,\%show,\%headings,\%res_title,\@tograde,\%ungraded,\@bombs,\%bombed,\%changed,\@warnings,\%triggered,\@newdiscussions,\%unread,$msgcount,\@newmsgs,$critmsgcount,\@critmsgs,$interval,$countunread);              &display_launcher($r,$actionitem,$refpage,$checkallowed,\%show,\%headings,\%res_title,\@tograde,\%ungraded,\@bombs,\%bombed,\%changed,\@warnings,\%triggered,\@newdiscussions,\%unread,$msgcount,\@newmsgs,$critmsgcount,\@critmsgs,$interval,$countunread);
             $displayed ++;               $displayed ++; 
         }          }
     }      }
     $r->print('      $r->print('
            </table>  
           </td>  
          </tr>  
         </table>  
       </td>        </td>
     </tr>      </tr>
    </table>');     </table>
   ');
 }  }
   
 #-------------------------------  #-------------------------------
Line 491  sub display_threshold_config { Line 496  sub display_threshold_config {
                  &Apache::loncommon::end_data_table_row());                   &Apache::loncommon::end_data_table_row());
     }      }
     $r->print(&Apache::loncommon::end_data_table()."\n".      $r->print(&Apache::loncommon::end_data_table()."\n".
           '<br /><input type="submit" name="threshold" value="Make changes" />            '<br /><input type="submit" name="threshold" value="'.&mt('Make changes').'" />
                  <input type="hidden" name="command" value="update" />                   <input type="hidden" name="command" value="update" />
                  <input type="hidden" name="refpage" value="'.$refpage.'" />                   <input type="hidden" name="refpage" value="'.$refpage.'" />
                </form>');                 </form>');
Line 509  sub display_interval_config { Line 514  sub display_interval_config {
     my $lctype = lc(&Apache::loncommon::course_type());      my $lctype = lc(&Apache::loncommon::course_type());
     my $current = &get_current($env{'user.name'},$env{'user.domain'},      my $current = &get_current($env{'user.name'},$env{'user.domain'},
                                 $env{'request.course.id'},'interval');                                  $env{'request.course.id'},'interval');
     $r->print('<br />'.&mt('Choose the time window to use for display of version changes for resources in the '.$lctype.'.'));      $r->print('<br />'.&mt('Choose the time window to use for display of version changes for resources in the '.$lctype.'.').'<br />');
     unless ($current eq '') {      unless ($current eq '') {
         $r->print(' '.&mt('Current value is [_1]','<b>'.          $r->print(' '.&mt('Current value is [_1].','<b>'.
                   $$interval_titles{$current}.'</b>.'));                    $$interval_titles{$current}.'</b>'));
     }      }
     $r->print('<br /><br />      $r->print('<br /><br />
 <form method="post" name="intervalswitch" action="/adm/whatsnew">  <form method="post" name="intervalswitch" action="/adm/whatsnew">
Line 565  function toggle_countunread(choice) { Line 570  function toggle_countunread(choice) {
 ');  ');
     $r->print('<br/>      $r->print('<br/>
                <input type="button" name="display" value="'.                 <input type="button" name="display" value="'.
                &mt('Change to [_1]',$opposite{$current}).'"                  &mt('Change to [_1]',&mt($opposite{$current})).'" 
                onclick="javascript:toggle_countunread('."'change'".')" />                 onclick="javascript:toggle_countunread('."'change'".')" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;
                <input type="button" name="nochange" value="'.                 <input type="button" name="nochange" value="'.
Line 612  END Line 617  END
         if ($choice eq $control) {          if ($choice eq $control) {
             $chkstring = ' checked="checked" ';              $chkstring = ' checked="checked" ';
         }            }  
         $r->print('<nobr><label><input type="radio" name="courseinit_control" value="'.          $r->print('<span class="LC_nobreak"><label><input type="radio" name="courseinit_control" value="'.
                    $choice.'"'.$chkstring.'/>'.$$initpage{$choice}.                     $choice.'"'.$chkstring.'/>'.$$initpage{$choice}.
                    '&nbsp;&nbsp;</label></nobr>');                     '&nbsp;&nbsp;</label></span>');
     }      }
     $r->print('<br /><br />'.&mt('If').' '.$$initpage{'coursespecific'}.      $r->print('<br /><br />'.&mt('If').' '.$$initpage{'coursespecific'}.
               ' - <br />'.$lt{'chce'}.": \n");                ' - <br />'.$lt{'chce'}.": \n");
Line 623  END Line 628  END
         if (($choice eq $current) && ($control eq 'coursespecific')) {          if (($choice eq $current) && ($control eq 'coursespecific')) {
             $chkstring = ' checked="checked" ';              $chkstring = ' checked="checked" ';
         }          }
         $r->print('<nobr><label><input type="radio" name="courseinit_page" value="'.          $r->print('<span class="LC_nobreak"><label><input type="radio" name="courseinit_page" value="'.
                   $choice.'"'.$chkstring.'/>'.$$initpage{$choice}.                    $choice.'"'.$chkstring.'/>'.$$initpage{$choice}.
                   '&nbsp;&nbsp;</label></nobr>');                    '&nbsp;&nbsp;</label></span>');
     }      }
     $r->print('<br /><br /><input type="submit" name="display" value="'.      $r->print('<br /><br /><input type="submit" name="display" value="'.
                $lt{'moce'}.'" /></form>');                 $lt{'moce'}.'" /></form>');
Line 869  sub check_thresholds { Line 874  sub check_thresholds {
                 my $resettitle = 'title_'.&escape($symb."\0".$part);                  my $resettitle = 'title_'.&escape($symb."\0".$part);
                 if (@parts > 1) {                  if (@parts > 1) {
                     $$triggered{$symb}{text}[$partcount] = '                      $$triggered{$symb}{text}[$partcount] = '
                      <td>part - '.$part.'</td>';                       <td>'.&mt('part - ').$part.'</td>';
                 } else {                  } else {
                     $$triggered{$symb}{text}[$partcount] = '                      $$triggered{$symb}{text}[$partcount] = '
                      <td>single part</td>';                       <td>'.&mt('single part').'</td>';
                 }                  }
                 $$triggered{$symb}{text}[$partcount] .= '                  $$triggered{$symb}{text}[$partcount] .= '
                      <td>'.$stats{$part}{users}.'</td>                       <td>'.$stats{$part}{users}.'</td>
Line 982  sub process_reset { Line 987  sub process_reset {
   
 sub process_update {  sub process_update {
     my ($uname,$udom,$threshold_titles) = @_;      my ($uname,$udom,$threshold_titles) = @_;
     my $setoutput = '<b>Changes to threshold(s) for problem tracking:</b><br />';      my $setoutput = '<b>'.&mt('Changes to threshold(s) for problem tracking:').'</b><br />';
     foreach (keys %env) {      foreach (keys %env) {
         next if ($_!~/^form\.(.+)\_setparmval$/);          next if ($_!~/^form\.(.+)\_setparmval$/);
         my $name  = $1;          my $name  = $1;
Line 1330  sub display_coursenormalmail { Line 1335  sub display_coursenormalmail {
             $mailcount ++;              $mailcount ++;
             my $css_class = $mailcount%2?' class="LC_odd_row"':'';              my $css_class = $mailcount%2?' class="LC_odd_row"':'';
             $r->print('<tr'.$css_class.'><td>'.$mailcount.              $r->print('<tr'.$css_class.'><td>'.$mailcount.
                       '. &nbsp;</td><td><a href="/adm/communicate">'.                        '. &nbsp;</td><td><a href="/adm/email?display='.
                         $msg->{'msgid'}.'">'.
                       $msg->{'shortsub'}.'</a>&nbsp; &nbsp;</td><td>&nbsp;'.                        $msg->{'shortsub'}.'</a>&nbsp; &nbsp;</td><td>&nbsp;'.
                       $msg->{'from'}.':'.$msg->{'fromdom'}.'&nbsp;</td><td>'.                        $msg->{'from'}.':'.$msg->{'fromdom'}.'&nbsp;</td><td>'.
                       $msg->{'sendtime'}.'</td></tr>');                        $msg->{'sendtime'}.'</td></tr>');
Line 1420  sub store_interval_setting { Line 1426  sub store_interval_setting {
                                              \%interval_settings,$udom,$uname);                                               \%interval_settings,$udom,$uname);
         if ($outcome eq 'ok') {          if ($outcome eq 'ok') {
             $result = &mt('Interval set to version changes [_1]',              $result = &mt('Interval set to version changes [_1]',
                   '<b>'.$$interval_titles{$env{'form.interval'}}.'</b><br />');                    '<b>'.$$interval_titles{$env{'form.interval'}}.'</b>').'<br />';
   
         } else {          } else {
     my $lctype = lc(&Apache::loncommon::course_type());      my $lctype = lc(&Apache::loncommon::course_type());
Line 1444  sub store_discussion_setting { Line 1450  sub store_discussion_setting {
                                              \%discussion_settings,$udom,$uname);                                               \%discussion_settings,$udom,$uname);
         if ($outcome eq 'ok') {          if ($outcome eq 'ok') {
             $result = &mt('Count unread posts in discussions display set to [_1]',              $result = &mt('Count unread posts in discussions display set to [_1]',
                   '<b>'.$env{'form.countunread'}.'</b><br />');                    '<b>'.&mt($env{'form.countunread'}).'</b>').'<br />';
                                                                                                                                                                       
         } else {          } else {
     my $lctype = lc(&Apache::loncommon::course_type());      my $lctype = lc(&Apache::loncommon::course_type());
Line 1452  sub store_discussion_setting { Line 1458  sub store_discussion_setting {
                 ' '.$outcome.' for '.$uname.':'.$udom.' in '.$lctype.' '.$cid);                  ' '.$outcome.' for '.$uname.':'.$udom.' in '.$lctype.' '.$cid);
             $result = &mt('Unable to set "number unread posts display" to [_1]'.              $result = &mt('Unable to set "number unread posts display" to [_1]'.
                           ' due to [_2].',                            ' due to [_2].',
                          '<b>'.$env{'form.countunread'}.'</b>',                           '<b>'.&mt($env{'form.countunread'}).'</b>',
                          '<tt>'.$outcome.'</tt>.<br />');                           '<tt>'.$outcome.'</tt>.<br />');
         }          }
     }      }
Line 1526  sub start_box { Line 1532  sub start_box {
     $r->print('      $r->print('
          <table class="LC_nested_outer">           <table class="LC_nested_outer">
           <tr>            <tr>
            <th>'.$$heading{$caller}.'</th>             <th class="LC_left_item">'.$$heading{$caller}.'</th>
            <th class="LC_right_item">'.$showhide.'</th>             <th class="LC_right_item">'.$showhide.'</th>
           </tr>');            </tr>');
      if (($caller eq 'abovethreshold') && ($$show{$caller})) {       if (($caller eq 'abovethreshold') && ($$show{$caller})) {

Removed from v.1.72  
changed lines
  Added in v.1.75


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