Diff for /loncom/interface/lonfeedback.pm between versions 1.211 and 1.217

version 1.211, 2006/07/18 17:42:15 version 1.217, 2006/11/09 20:44:37
Line 186  sub list_discussion { Line 186  sub list_discussion {
             push @{$roleinfo{$student}}, 'st:'.$section.':'.$status;              push @{$roleinfo{$student}}, 'st:'.$section.':'.$status;
         }          }
  ($classgroups,$studentgroups) =    ($classgroups,$studentgroups) = 
          &Apache::loncoursedata::get_group_memberships($classlist,$keylist,      &Apache::loncoursedata::get_group_memberships($classlist,$keylist,
                                                        $cdom,$cnum);    $cdom,$cnum);
     }      }
   
 # Get discussion display default settings for user  # Get discussion display default settings for user
Line 713  END Line 713  END
     if ($discussiononly) {      if ($discussiononly) {
         my $now = time;          my $now = time;
         my $attachnum = 0;          my $attachnum = 0;
         my $currnewattach;          my $currnewattach = [];
         my $currdelold;          my $currdelold = [];
         my $comment = '';          my $comment = '';
         my $subject = '';          my $subject = '';
         if ($env{'form.origpage'}) {          if ($env{'form.origpage'}) {
Line 752  END Line 752  END
     if ($outputtarget ne 'tex') {      if ($outputtarget ne 'tex') {
  $discussion.='<a href="/adm/feedback?replydisc='.   $discussion.='<a href="/adm/feedback?replydisc='.
     &escape($ressymb).':::" '.$target.'>'.      &escape($ressymb).':::" '.$target.'>'.
     '<img src="'.&Apache::loncommon::lonhttpdurl('/adm/lonMisc/chat.gif').'" border="0" />'.      '<img alt="" src="'.&Apache::loncommon::lonhttpdurl('/adm/lonMisc/chat.gif').'" border="0" />'.
     &mt('Post Discussion').'</a><br />';      &mt('Post Discussion').'</a><br />';
             }              }
  }   }
  $discussion.='<a href="/adm/feedback?sendmessageonly=1&symb='.   $discussion.='<a href="/adm/feedback?sendmessageonly=1&amp;symb='.
     &escape($ressymb).      &escape($ressymb).
     '"><img src="'.&Apache::loncommon::lonhttpdurl('/adm/lonMisc/feedback.gif').'" border="0" />'.      '"><img alt="" src="'.&Apache::loncommon::lonhttpdurl('/adm/lonMisc/feedback.gif').'" border="0" />'.
     &mt('Send Message').'</a></td></tr></table>';      &mt('Send Message').'</a></td></tr></table>';
     }      }
     return $discussion;      return $discussion;
Line 1683  END Line 1683  END
                 }                  }
             }              }
             if ($attachmsg) {              if ($attachmsg) {
                 $r->print("<b>Retained attachments</b>:$attachmsg<br />\n");                  $r->print("<br /><b>Retained attachments</b>:$attachmsg<br />\n");
             }              }
             if ($newattachmsg) {              if ($newattachmsg) {
                 $r->print("$newattachmsg<br />");                  $r->print("$newattachmsg<br />");
Line 1930  sub print_sortfilter_options { Line 1930  sub print_sortfilter_options {
         unshift(@sections,'all'); # Put 'all' at the front of the list          unshift(@sections,'all'); # Put 'all' at the front of the list
   
     }      }
     foreach (@sections) {      foreach my $sec (@sections) {
         $section_sel .= "  <option value=\"$_\" />$_\n";          $section_sel .= "  <option value=\"$sec\">$sec</option>\n";
     }      }
   
     if (&check_group_priv() eq 'ok') {      if (&check_group_priv() eq 'ok') {
Line 1956  sub print_sortfilter_options { Line 1956  sub print_sortfilter_options {
             $numgroupvis = 1;              $numgroupvis = 1;
         }          }
     }      }
     foreach (@groups) {      foreach my $group (@groups) {
         $group_sel .= "  <option value=\"$_\" />$_\n";          $group_sel .= "  <option value=\"$group\">$group</option>\n";
     }      }
   
     my $function = &Apache::loncommon::get_users_function();      my $function = &Apache::loncommon::get_users_function();
Line 2047  $start_page Line 2047  $start_page
  <tr>   <tr>
   <td align="center" valign="top">    <td align="center" valign="top">
    <select name="sortposts">     <select name="sortposts">
     <option value="ascdate" selected="selected" />$sort_types{'ascdate'}      <option value="ascdate" selected="selected">$sort_types{'ascdate'}</option>
     <option value="descdate" />$sort_types{'descdate'}      <option value="descdate">$sort_types{'descdate'}</option>
     <option value="thread" />$sort_types{'thread'}      <option value="thread">$sort_types{'thread'}</option>
     <option value="subject" />$sort_types{'subject'}      <option value="subject">$sort_types{'subject'}</option>
     <option value="username" />$sort_types{'username'}      <option value="username">$sort_types{'username'}</option>
     <option value="lastfirst" />$sort_types{'lastfirst'}      <option value="lastfirst">$sort_types{'lastfirst'}</option>
    </select>     </select>
   </td>    </td>
   <td>&nbsp;</td>    <td>&nbsp;</td>
   <td align="center" valign="top">    <td align="center" valign="top">
    <select name="statusfilter">     <select name="statusfilter">
     <option value="all" selected="selected" />$status_types{'all'}      <option value="all" selected="selected">$status_types{'all'}</option>
     <option value="Active" />$status_types{'Active'}      <option value="Active">$status_types{'Active'}</option>
     <option value="Expired" />$status_types{'Expired'}      <option value="Expired">$status_types{'Expired'}</option>
       <option value="Future">$status_types{'Future'}</option>
    </select>     </select>
   </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="true" size="5">
     <option value="all" />$role_types{'all'}      <option value="all">$role_types{'all'}</option>
     <option value="st" />$role_types{'st'}      <option value="st">$role_types{'st'}</option>
     <option value="cc" />$role_types{'cc'}      <option value="cc">$role_types{'cc'}</option>
     <option value="in" />$role_types{'in'}      <option value="in">$role_types{'in'}</option>
     <option value="ta" />$role_types{'ta'}      <option value="ta">$role_types{'ta'}</option>
     <option value="ep" />$role_types{'ep'}      <option value="ep">$role_types{'ep'}</option>
     <option value="cr" />$role_types{'cr'}      <option value="cr">$role_types{'cr'}</option>
    </select>     </select>
   </td>    </td>
   <td>&nbsp;</td>    <td>&nbsp;</td>
Line 2545  sub clear_out_html { Line 2546  sub clear_out_html {
      H1=>1, H2=>1, H3=>1, H4=>1, H5=>1);       H1=>1, H2=>1, H3=>1, H4=>1, H5=>1);
   }    }
 # Do the substitution of everything that is not explicitly allowed  # Do the substitution of everything that is not explicitly allowed
   $message =~ s/\<(\/?\s*(\w*)[^\>\<]*)/    $message =~ s/\<(\/?\s*(\w+)[^\>\<]*)/
   {($html{uc($2)}&&(length($1)<1000))?"\<$1":"\&lt;$1"}/ge;    {($html{uc($2)}&&(length($1)<1000))?"\<$1":"\&lt;$1"}/ge;
   $message =~ s/(\<?\s*(\w*)[^\<\>]*)\>/    $message =~ s/(\<?\s*(\w+)[^\<\>]*)\>/
   {($html{uc($2)}&&(length($1)<1000))?"$1\>":"$1\&gt;"}/ge;    {($html{uc($2)}&&(length($1)<1000))?"$1\>":"$1\&gt;"}/ge;
   return $message;    return $message;
 }  }
Line 2920  END Line 2921  END
             }              }
         }          }
     }      }
     if (@{$currnewattach} > 0) {      if ((ref($currnewattach) eq 'ARRAY') && (@{$currnewattach} > 0)) {
         $r->print("The following attachments have been uploaded for inclusion with this posting.<br />Check the checkboxes for any you wish to remove<br />\n");          $r->print("The following attachments have been uploaded for inclusion with this posting.<br />Check the checkboxes for any you wish to remove<br />\n");
         foreach (@{$currnewattach}) {          foreach (@{$currnewattach}) {
             $_ =~ m#/([^/]+)$#;              $_ =~ m#/([^/]+)$#;
Line 3168  sub sort_filter_names { Line 3169  sub sort_filter_names {
                    );                     );
     %{$status_types} = (      %{$status_types} = (
                      all     => 'Roles of any status',                       all     => 'Roles of any status',
                      Active => 'Only active roles',                       Active  => 'Only active roles',
                      Expired => 'Only inactive roles'                       Expired => 'Only past roles',
                        Future  => 'Only future roles',
                    );                     );
 }  }
       

Removed from v.1.211  
changed lines
  Added in v.1.217


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