--- loncom/interface/lonfeedback.pm 2008/06/06 05:24:28 1.255 +++ loncom/interface/lonfeedback.pm 2009/03/18 02:49:39 1.255.2.6 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.255 2008/06/06 05:24:28 raeburn Exp $ +# $Id: lonfeedback.pm,v 1.255.2.6 2009/03/18 02:49:39 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -625,7 +625,7 @@ END $filterchoice .= ' '.$role_types{$role}.','; } $filterchoice =~ s/,$//; - $filterchoice .= '
        '; + $filterchoice .= '
'.(' ' x8); } if ($statusfilter) { $filterchoice .= ''.&mt('status').'- '.$status_types{$statusfilter}; @@ -794,7 +794,7 @@ sub action_links_bar { $discussion .= '&previous='.$prevread; } $discussion .= &group_args($group); - $discussion .='">'.&mt('Sorting/Filtering options').'  '; + $discussion .='">'.&mt('Sorting/Filtering options').''.(' ' x2); } else { $discussion .= ''; } @@ -1618,7 +1618,7 @@ END $comment = &unescape($env{'form.comment'}); &process_attachments(\@currnewattach,\@currdelold,\@keepold); } - my $latexHelp=&Apache::loncommon::helpLatexCheatsheet(); + my $latexHelp=&Apache::loncommon::helpLatexCheatsheet(undef,undef,1); my $send=&mt('Send'); my $alert = &mt('Please select a feedback type.'); my $js= < 'Action', 'deff' => 'Default for all discussions', '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', 'wipa' => 'Whether individual posts can be marked as read/unread', 'allposts' => 'All posts', @@ -1960,7 +1960,7 @@ END $lt{$disctogg} 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()); $r->print(<   - @@ -2164,13 +2164,13 @@ $start_page   - $section_sel   - $group_sel @@ -2889,9 +2889,18 @@ sub show_preview { my $end_page = &Apache::loncommon::end_page(); - $r->print($start_page.'
'. - ''.&mt('Subject').': '.$subject.'

'. - $message.'
'.$end_page); + $r->print($start_page + .'

'.&mt('Preview').'

' + .&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 + ); } @@ -3247,12 +3256,18 @@ function setblogvalue() { sub has_discussion { my $resourcesref = shift; my $navmap = Apache::lonnavmaps::navmap->new(); - my @allres=$navmap->retrieveResources(); - foreach my $resource (@allres) { - if ($resource->hasDiscussion()) { - my $ressymb = $resource->wrap_symb(); - push(@{$resourcesref}, $ressymb); + if (defined($navmap)) { + my @allres=$navmap->retrieveResources(); + foreach my $resource (@allres) { + if ($resource->hasDiscussion()) { + 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; } @@ -3429,7 +3444,7 @@ sub handler { my %lt = &Apache::lonlocal::texthash( 'mnpa' => 'Marked "New" posts as read in a total of', '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) { my $ressymb=$res; @@ -3654,7 +3669,7 @@ ENDREDIR } else { # ------------------------------------------------------------- Normal feedback my $feedurl=$env{'form.postdata'}; - $feedurl=~s/^http\:\/\///; + $feedurl=~s/^https?\:\/\///; $feedurl=~s/^$ENV{'SERVER_NAME'}//; $feedurl=~s/^$ENV{'HTTP_HOST'}//; $feedurl=~s/\?.+$//;