[LON-CAPA-cvs] cvs: loncom /interface lonfeedback.pm

www lon-capa-cvs@mail.lon-capa.org
Tue, 13 Jan 2004 02:31:09 -0000


www		Mon Jan 12 21:31:09 2004 EDT

  Modified files:              
    /loncom/interface	lonfeedback.pm 
  Log:
  Working through some of the FDBK/COM comments, bug #2187
  
  
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.73 loncom/interface/lonfeedback.pm:1.74
--- loncom/interface/lonfeedback.pm:1.73	Thu Nov 27 04:43:42 2003
+++ loncom/interface/lonfeedback.pm	Mon Jan 12 21:31:09 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.73 2003/11/27 09:43:42 albertel Exp $
+# $Id: lonfeedback.pm,v 1.74 2004/01/13 02:31:09 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -70,7 +70,7 @@
     my $seeid=&Apache::lonnet::allowed('rin',$crs);
     my $viewgrades=&Apache::lonnet::allowed('vgr',$crs);
     my @discussionitems=();
-    # backward compatability (bulltein boards used to be 'wrapped')
+    # backward compatibility (bulletin boards used to be 'wrapped')
     my $ressymb=$symb;
     if ($mode eq 'board') {
 	$ressymb=~s|(bulletin___\d+___)|$1adm/wrapper|;
@@ -232,7 +232,16 @@
 </form>
 ENDDISCUSS
       $discussion.=&generate_preview_button();
-   }
+    } else {
+	if (&Apache::lonnet::allowed('pch',
+				   $ENV{'request.course.id'}.
+	($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) {
+			    $discussion.='<table bgcolor="#BBBBBB"><tr><td><a href="/adm/feedback?replydisc='.
+				$symb.':::" '.$target.'>'.
+				'<img src="/adm/lonMisc/chat.gif" border="0" />'.
+				&mt('Post Discussion').'</a></td></tr></table>';
+			}
+    }
    return $discussion;
 }
 
@@ -255,6 +264,7 @@
       }
   }
   my $latexHelp = Apache::loncommon::helpLatexCheatsheet();
+  my $send=&mt('Send');
   $r->print(<<ENDDOCUMENT);
 <html>
 <head>
@@ -323,7 +333,7 @@
 </p>
 <p>
 <input type="hidden" name="sendit" value="1" />
-<input type="button" value="Send Feedback" onClick='gosubmit();' />
+<input type="button" value="$send" onClick='gosubmit();' />
 </p>
 </form>
 ENDDOCUMENT
@@ -421,16 +431,17 @@
 	if (&Apache::lonnet::allowed('pch',
 				     $ENV{'request.course.id'}.
 				     ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) {
-	    $discussoptions='<input type="checkbox" name="discuss" onClick="this.form.anondiscuss.checked=false;" /> '.
+	    $discussoptions='<input type="checkbox" name="discuss" onClick="this.form.anondiscuss.checked=false;" '.
+		($ENV{'form.replydisc'}?' checked="1"':'').' /> '.
 		&mt('Contribution to course discussion of resource');
 	    $discussoptions.='<br /><input type="checkbox" name="anondiscuss" onClick="this.form.discuss.checked=false;" /> '.
 		&mt('Anonymous contribution to course discussion of resource').
 		' <i>('.&mt('name only visible to course faculty').')</i>';
       }
     }
-    if ($msgoptions) { $msgoptions='<h2>'.&mt('Sending Messages').'</h2>'.$msgoptions; }
+    if ($msgoptions) { $msgoptions='<h2><img src="/adm/lonMisc/feedback.gif" />'.&mt('Sending Messages').'</h2>'.$msgoptions; }
     if ($discussoptions) { 
-	$discussoptions='<h2>'.&mt('Discussion Contributions').'</h2>'.$discussoptions; }
+	$discussoptions='<h2><img src="/adm/lonMisc/chat.gif" />'.&mt('Discussion Contributions').'</h2>'.$discussoptions; }
     return $msgoptions.$discussoptions;
 }
 
@@ -770,7 +781,7 @@
   if ($feedurl=~/\.(problem|exam|quiz|assess|survey|form)$/) {
       unless ($symb) { $goahead=0; }
   }
-  # backward compatability (bulltein boards used to be 'wrapped')
+  # backward compatibility (bulltin boards used to be 'wrapped')
   if ($feedurl=~m|^/adm/wrapper/adm/.*/bulletinboard$|) {
       $feedurl=~s|^/adm/wrapper||;
   }