Diff for /loncom/interface/lonmsg.pm between versions 1.110 and 1.111

version 1.110, 2004/09/28 14:38:50 version 1.111, 2004/10/26 19:50:15
Line 970  sub compout { Line 970  sub compout {
  $dismsg=~s/\f/\n/g;   $dismsg=~s/\f/\n/g;
  $dismsg=~s/\n+/\n\> /g;   $dismsg=~s/\n+/\n\> /g;
     }      }
       my $citation=&displayresource(%content);
     if ($ENV{'form.recdom'}) { $defdom=$ENV{'form.recdom'}; }      if ($ENV{'form.recdom'}) { $defdom=$ENV{'form.recdom'}; }
       $r->print(        $r->print(
                 '<form action="/adm/email"  name="compemail" method="post"'.                  '<form action="/adm/email"  name="compemail" method="post"'.
Line 1010  $latexHelp Line 1011  $latexHelp
 </textarea></p><br />  </textarea></p><br />
 $dispcrit  $dispcrit
 <input type="submit" name="send" value="$func $lt{'ma'}" />  <input type="submit" name="send" value="$func $lt{'ma'}" />
 <input type="submit" name="cancel" value="$lt{'ca'}" />  <input type="submit" name="cancel" value="$lt{'ca'}" /><hr />
   $citation
 ENDCOMP  ENDCOMP
     } else { # $broadcast is 'upload'      } else { # $broadcast is 'upload'
  $r->print(<<ENDUPLOAD);   $r->print(<<ENDUPLOAD);
Line 1634  sub displaymessage { Line 1636  sub displaymessage {
       '<br /><b>'.&mt('Time').':</b> '.$content{'time'}.        '<br /><b>'.&mt('Time').':</b> '.$content{'time'}.
       '<p><pre>'.        '<p><pre>'.
       &Apache::lontexconvert::msgtexconverted($content{'message'},1).        &Apache::lontexconvert::msgtexconverted($content{'message'},1).
       '</pre><hr />'.$content{'citation'}.'</p>');        '</pre><hr />'.&displayresource(%content).'</p>');
     return;         return;   
 }  }
   
   # =========================================================== Show the citation
   
   sub displayresource {
       my %content=@_;
   #
   # If the recipient is in the same course that the message was sent from and
   # has sufficient privileges, show "all details," else show citation
   #
       if (($ENV{'request.course.id'} eq $content{'courseid'})
        && (&Apache::lonnet::allowed('vgr',$content{'courseid'}))) {
    my $symb=&Apache::lonnet::symbread($content{'baseurl'});
   # Could not get a symb, give up
    unless ($symb) { return $content{'citation'}; }
   # Have a symb, can render
    return '<h2>'.&mt('Current attempts of student (if applicable)').'</h2>'.
       &Apache::loncommon::get_previous_attempt($symb,
        $content{'sendername'},
        $content{'senderdomain'},
        $content{'courseid'}).
       '<hr /><h2>'.&mt('Current screen output (if applicable)').'</h2>'.
       &Apache::loncommon::get_student_view($symb,
    $content{'sendername'},
    $content{'senderdomain'},
    $content{'courseid'}).
       '<h2>'.&mt('Correct Answer(s) (if applicable)').'</h2>'.
       &Apache::loncommon::get_student_answers($symb,
       $content{'sendername'},
       $content{'senderdomain'},
       $content{'courseid'});
       } else {
    return $content{'citation'};
       }
   }
   
 # ================================================================== The Header  # ================================================================== The Header
   
 sub header {  sub header {

Removed from v.1.110  
changed lines
  Added in v.1.111


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