Diff for /loncom/interface/lonfeedback.pm between versions 1.256 and 1.260

version 1.256, 2008/11/18 19:14:22 version 1.260, 2008/12/19 19:38:07
Line 27 Line 27
 #  #
 ###  ###
   
 =pod  
   
 =head1 NAME  
   
 Apache::lonfeedback.pm  
   
 =head1 SYNOPSIS  
   
 Handles feedback from students to instructors and system administrators.  
   
 Provides a screenshot of the current resource, as well as previous attempts if the resource was a homework.  
   
 Used by lonmsg.pm.  
   
 This is part of the LearningOnline Network with CAPA project  
 described at http://www.lon-capa.org.  
   
 =head1 OVERVIEW  
   
 None  
   
 =head1 SUBROUTINES  
   
 =over  
   
 =item discussion_open()  
   
 =item discussion_visible()  
   
 =item list_discussion()  
   
 =item send_feedback_link()  
   
 =item send_message_link()  
   
 =item action_links_bar()  
   
 =item postingform_display()  
   
 =item build_posting_display  
   
 =item filter_regexp()  
   
 =item get_post_contents()  
   
 =item replicate_attachments()  
   
 =item mail_screen()  
   
 =item print_display_options()  
   
 =item print_sortfilter_options()  
   
 =item print_showposters()  
   
 =item get_post_versions()  
   
 =item get_post_attachments()  
   
 =item fail_redirect()  
   
 =item redirect_back()  
   
 =item no_redirect_back()  
   
 =item screen_header()  
   
 =item resource_output()  
   
 =item clear_out_html()  
   
 =item assemble_email()  
   
 =item feedback_available()  
   
 =item send_msg()  
   
 =item adddiscuss()  
   
 =item get_discussion_info()  
   
 =item show_preview()  
   
 =item newline_to_br()  
   
 =item generate_preview_button()  
   
 =item modify_attachments()  
   
 =item process_attachments()  
   
 =item generate_attachments_button()  
   
 =item extract_attachments()  
   
 =item construct_attachmenturl()  
   
 =item add_blog_checkbox()  
   
 =item has_discussion()  
   
 =item sort_filter_names()  
   
 =item handler()  
   
 =item blocked_reply_or_edit()  
   
 =item wrap_symb()  
   
 =item dewrapper()  
   
 =item get_feedurl()  
   
 =item get_feedurl_and_clean_symb()  
   
 =item editing_allowed()  
   
 =item check_group_priv()  
   
 =item group_args()  
   
 =item get_resource_title()  
   
 =back  
   
 =cut  
   
 package Apache::lonfeedback;  package Apache::lonfeedback;
   
 use strict;  use strict;
Line 752  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 921  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 3374  function setblogvalue() { Line 3247  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 3781  ENDREDIR Line 3660  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/\?.+$//;
Line 4086  sub get_resource_title { Line 3965  sub get_resource_title {
   
 1;  1;
 __END__  __END__
   
   
   =pod
   
   =head1 NAME
   
   Apache::lonfeedback.pm
   
   =head1 SYNOPSIS
   
   Handles feedback from students to instructors and system administrators.
   
   Provides a screenshot of the current resource, as well as previous attempts if the resource was a homework.
   
   Used by lonmsg.pm.
   
   This is part of the LearningOnline Network with CAPA project
   described at http://www.lon-capa.org.
   
   =head1 OVERVIEW
   
   None
   
   =head1 SUBROUTINES
   
   =over
   
   =item discussion_open()
   
   =item discussion_visible()
   
   =item list_discussion()
   
   =item send_feedback_link()
   
   =item send_message_link()
   
   =item action_links_bar()
   
   =item postingform_display()
   
   =item build_posting_display
   
   =item filter_regexp()
   
   =item get_post_contents()
   
   =item replicate_attachments()
   
   =item mail_screen()
   
   =item print_display_options()
   
   =item print_sortfilter_options()
   
   =item print_showposters()
   
   =item get_post_versions()
   
   =item get_post_attachments()
   
   =item fail_redirect()
   
   =item redirect_back()
   
   =item no_redirect_back()
   
   =item screen_header()
   
   =item resource_output()
   
   =item clear_out_html()
   
   =item assemble_email()
   
   =item feedback_available()
   
   =item send_msg()
   
   =item adddiscuss()
   
   =item get_discussion_info()
   
   =item show_preview()
   
   =item newline_to_br()
   
   =item generate_preview_button()
   
   =item modify_attachments()
   
   =item process_attachments()
   
   =item generate_attachments_button()
   
   =item extract_attachments()
   
   =item construct_attachmenturl()
   
   =item add_blog_checkbox()
   
   =item has_discussion()
   
   =item sort_filter_names()
   
   =item handler()
   
   =item blocked_reply_or_edit()
   
   =item wrap_symb()
   
   =item dewrapper()
   
   =item get_feedurl()
   
   =item get_feedurl_and_clean_symb()
   
   =item editing_allowed()
   
   =item check_group_priv()
   
   =item group_args()
   
   =item get_resource_title()
   
   =back
   
   =cut

Removed from v.1.256  
changed lines
  Added in v.1.260


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