Diff for /loncom/interface/lonfeedback.pm between versions 1.255 and 1.255.2.8

version 1.255, 2008/06/06 05:24:28 version 1.255.2.8, 2009/03/18 02:53:49
Line 625  END Line 625  END
                             $filterchoice .= ' '.$role_types{$role}.',';                              $filterchoice .= ' '.$role_types{$role}.',';
                         }                          }
                         $filterchoice =~ s/,$//;                          $filterchoice =~ s/,$//;
                         $filterchoice .= '<br />&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;';                          $filterchoice .= '<br />'.('&nbsp;' x8);
                     }                      }
                     if ($statusfilter) {                      if ($statusfilter) {
                         $filterchoice .= '<i>'.&mt('status').'</i>-&nbsp;'.$status_types{$statusfilter};                          $filterchoice .= '<i>'.&mt('status').'</i>-&nbsp;'.$status_types{$statusfilter};
Line 794  sub action_links_bar { Line 794  sub action_links_bar {
             $discussion .= '&previous='.$prevread;              $discussion .= '&previous='.$prevread;
         }          }
         $discussion .= &group_args($group);          $discussion .= &group_args($group);
         $discussion .='">'.&mt('Sorting/Filtering options').'</a>&nbsp;&nbsp';          $discussion .='">'.&mt('Sorting/Filtering options').'</a>'.('&nbsp;' x2);
     } else {      } else {
         $discussion .= '<td align="left">';          $discussion .= '<td align="left">';
     }      }
Line 1618  END Line 1618  END
       $comment = &unescape($env{'form.comment'});        $comment = &unescape($env{'form.comment'});
       &process_attachments(\@currnewattach,\@currdelold,\@keepold);        &process_attachments(\@currnewattach,\@currdelold,\@keepold);
   }    }
   my $latexHelp=&Apache::loncommon::helpLatexCheatsheet();    my $latexHelp=&Apache::loncommon::helpLatexCheatsheet(undef,undef,1);
   my $send=&mt('Send');    my $send=&mt('Send');
   my $alert = &mt('Please select a feedback type.');    my $alert = &mt('Please select a feedback type.');
   my $js= <<END;    my $js= <<END;
Line 1795  sub print_display_options { Line 1795  sub print_display_options {
         'actn' => 'Action',          'actn' => 'Action',
         'deff' => 'Default for all discussions',          'deff' => 'Default for all discussions',
         'prca' => 'Preferences can be set for this discussion that determine ....',          'prca' => 'Preferences can be set for this discussion that determine ....',
         'whpo' => 'Which posts are displayed when you display this bulletin board or resource, and',          'whpo' => 'Which posts are displayed when you display this discussion board or resource, and',
         'unwh' => 'Under what circumstances posts are identified as "NEW", and',          'unwh' => 'Under what circumstances posts are identified as "NEW", and',
         'wipa' => 'Whether individual posts can be marked as read/unread',          'wipa' => 'Whether individual posts can be marked as read/unread',
         'allposts' => 'All posts',          'allposts' => 'All posts',
Line 1960  END Line 1960  END
        <td>$lt{$disctogg}</td>         <td>$lt{$disctogg}</td>
        <td><label><input type="checkbox" name="disctogg" onClick="discdispChk('2')" />$lt{'chgt'} "$toggchange"</label></td>         <td><label><input type="checkbox" name="disctogg" onClick="discdispChk('2')" />$lt{'chgt'} "$toggchange"</label></td>
 END  END
     my $save = &mt('Save Changes');      my $save = &mt('Save');
     $r->print(&Apache::loncommon::end_data_table_row());      $r->print(&Apache::loncommon::end_data_table_row());
     $r->print(&Apache::loncommon::end_data_table());      $r->print(&Apache::loncommon::end_data_table());
     $r->print(<<END);      $r->print(<<END);
Line 2152  $start_page Line 2152  $start_page
   </td>    </td>
   <td>&nbsp;</td>    <td>&nbsp;</td>
   <td align="center" valign="top">    <td align="center" valign="top">
    <select name="rolefilter" multiple="true" size="5">     <select name="rolefilter" multiple="multiple" size="5">
     <option value="all">$role_types{'all'}</option>      <option value="all">$role_types{'all'}</option>
     <option value="st">$role_types{'st'}</option>      <option value="st">$role_types{'st'}</option>
     <option value="cc">$role_types{'cc'}</option>      <option value="cc">$role_types{'cc'}</option>
Line 2164  $start_page Line 2164  $start_page
   </td>    </td>
   <td>&nbsp;</td>    <td>&nbsp;</td>
   <td align="center" valign="top">    <td align="center" valign="top">
    <select name="sectionpick" multiple="true" size="$numvisible">     <select name="sectionpick" multiple="multiple" size="$numvisible">
     $section_sel      $section_sel
    </select>     </select>
   </td>    </td>
   <td>&nbsp;</td>    <td>&nbsp;</td>
   <td align="center" valign="top">    <td align="center" valign="top">
    <select name="grouppick" multiple="true" size="$numvisible">     <select name="grouppick" multiple="multiple" size="$numvisible">
     $group_sel      $group_sel
    </select>     </select>
   </td>    </td>
Line 2889  sub show_preview { Line 2889  sub show_preview {
   
     my $end_page = &Apache::loncommon::end_page();      my $end_page = &Apache::loncommon::end_page();
   
     $r->print($start_page.'<table border="2"><tr><td>'.      $r->print($start_page
       '<b>'.&mt('Subject').':</b> '.$subject.'<br /><br />'.               .'<h1>'.&mt('Preview').'</h1>'
       $message.'</td></tr></table>'.$end_page);               .&Apache::lonhtmlcommon::start_pick_box()
                .&Apache::lonhtmlcommon::row_title(&mt('Subject'))
                .$subject
                .&Apache::lonhtmlcommon::row_closure()
                .&Apache::lonhtmlcommon::row_title(&mt('Message'))
                .$message
                .&Apache::lonhtmlcommon::row_closure(1)
                .&Apache::lonhtmlcommon::end_pick_box()
                .$end_page
       );
 }  }
   
   
Line 3247  function setblogvalue() { Line 3256  function setblogvalue() {
 sub has_discussion {  sub has_discussion {
     my $resourcesref = shift;      my $resourcesref = shift;
     my $navmap = Apache::lonnavmaps::navmap->new();      my $navmap = Apache::lonnavmaps::navmap->new();
     my @allres=$navmap->retrieveResources();      if (defined($navmap)) {
     foreach my $resource (@allres) {          my @allres=$navmap->retrieveResources();
         if ($resource->hasDiscussion()) {          foreach my $resource (@allres) {
             my $ressymb = $resource->wrap_symb();              if ($resource->hasDiscussion()) {
             push(@{$resourcesref}, $ressymb);                  my $ressymb = $resource->wrap_symb();
                   if (ref($resourcesref) eq 'ARRAY') {
                       push(@{$resourcesref}, $ressymb);
                   }
               }
         }          }
       } else {
           &Apache::lonnet::logthis('Has discussion check failed - could not create navmap object.');
     }      }
     return;      return;
 }  }
Line 3299  sub handler { Line 3314  sub handler {
          ['hide','unhide','deldisc','postdata','preview','replydisc','editdisc','cmd','symb','onlyunread','allposts','onlyunmark','previous','markread','markonread','markondisp','toggoff','toggon','modifydisp','changes','navtime','navmaps','navurl','sortposts','applysort','rolefilter','statusfilter','sectionpick','groupick','posterlist','userpick','attach','origpage','currnewattach','deloldattach','keepold','allversions','export','sendmessageonly','group','ref']);           ['hide','unhide','deldisc','postdata','preview','replydisc','editdisc','cmd','symb','onlyunread','allposts','onlyunmark','previous','markread','markonread','markondisp','toggoff','toggon','modifydisp','changes','navtime','navmaps','navurl','sortposts','applysort','rolefilter','statusfilter','sectionpick','groupick','posterlist','userpick','attach','origpage','currnewattach','deloldattach','keepold','allversions','export','sendmessageonly','group','ref']);
   my $group = $env{'form.group'};    my $group = $env{'form.group'};
   my %attachmax = (    my %attachmax = (
                     text => '(128 KB max size)',                      text => &mt('(128 KB max size)'),
                     num  => 131072,                      num  => 131072,
                   );                    );
   if ($env{'form.editdisc'}) {    if ($env{'form.editdisc'}) {
Line 3429  sub handler { Line 3444  sub handler {
       my %lt = &Apache::lonlocal::texthash(        my %lt = &Apache::lonlocal::texthash(
           'mnpa' => 'Marked "New" posts as read in a total of',            'mnpa' => 'Marked "New" posts as read in a total of',
           'robb' => 'resources/bulletin boards.',            'robb' => 'resources/bulletin boards.',
           'twnp' => 'There are currently no resources or bulletin boards with unread discussion postings.'            'twnp' => 'There are currently no resources or discussion boards with unread discussion postings.'
       );               );       
       foreach my $res (@resources) {        foreach my $res (@resources) {
           my $ressymb=$res;            my $ressymb=$res;
Line 3575  ENDREDIR Line 3590  ENDREDIR
   &Apache::lonnet::appenv({'environment.threadeddiscussion' => 'on'});    &Apache::lonnet::appenv({'environment.threadeddiscussion' => 'on'});
       } else {        } else {
    &Apache::lonnet::del('environment',['threadeddiscussion']);     &Apache::lonnet::del('environment',['threadeddiscussion']);
   &Apache::lonnet::delenv('environment\.threadeddiscussion');    &Apache::lonnet::delenv('environment.threadeddiscussion');
       }        }
       &redirect_back($r,$feedurl,&mt('Changed discussion view mode').'<br />',        &redirect_back($r,$feedurl,&mt('Changed discussion view mode').'<br />',
      '0','0','','',$env{'form.previous'},undef,undef,undef,       '0','0','','',$env{'form.previous'},undef,undef,undef,
Line 3654  ENDREDIR Line 3669  ENDREDIR
   } else {    } else {
 # ------------------------------------------------------------- Normal feedback  # ------------------------------------------------------------- Normal feedback
       my $feedurl=$env{'form.postdata'};        my $feedurl=$env{'form.postdata'};
       $feedurl=~s/^http\:\/\///;        $feedurl=~s/^https?\:\/\///;
       $feedurl=~s/^$ENV{'SERVER_NAME'}//;        $feedurl=~s/^$ENV{'SERVER_NAME'}//;
       $feedurl=~s/^$ENV{'HTTP_HOST'}//;        $feedurl=~s/^$ENV{'HTTP_HOST'}//;
       $feedurl=~s/\?.+$//;        $feedurl=~s/\?.+$//;

Removed from v.1.255  
changed lines
  Added in v.1.255.2.8


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