Diff for /loncom/interface/lonmsgdisplay.pm between versions 1.49 and 1.50

version 1.49, 2006/12/07 21:21:04 version 1.50, 2006/12/08 14:43:38
Line 74  email program, so they have full access Line 74  email program, so they have full access
 interface, or other features they may wish to use in response to the  interface, or other features they may wish to use in response to the
 student's query.  student's query.
   
 =item * B<Blocking>: LON-CAPA can block display of e-mails that are   =item * B<Blocking>: LON-CAPA can block selected communication 
 sent to a student during an online exam. A course coordinator or  features for students during an online exam. A course coordinator or
 instructor can set an open and close date/time for scheduled online  instructor can set an open and close date/time for scheduled online
 exams in a course. If a user uses the LON-CAPA internal messaging   exams in a course. If a user uses the LON-CAPA internal messaging 
 system to display e-mails during the scheduled blocking event,    system to display e-mails during the scheduled blocking event,  
Line 143  sub folderlist { Line 143  sub folderlist {
                 fold => 'Folder',                  fold => 'Folder',
                 show => 'Show',                  show => 'Show',
                 go   => 'Go',                  go   => 'Go',
                   nnff => 'New Name for Folder',
                   newn => 'New Name',
                   thfm => 'The folder may not be renamed',
                   fmnb => 'folder may not be renamed as it is a folder provided by the system.',
                   asth => 'as this name is already in use for a system-provided or user-defined folder.',
                   the => 'The',
                   tnfm => 'The new folder may not be named',
   
     );      );
   
     my %actions = &Apache::lonlocal::texthash(      my %actions = &Apache::lonlocal::texthash(
Line 182  function folder_choice(targetform,caller Line 190  function folder_choice(targetform,caller
         if (targetform.folderaction.options[targetform.folderaction.selectedIndex].value == 'rename') {          if (targetform.folderaction.options[targetform.folderaction.selectedIndex].value == 'rename') {
             for (var i=0; i<permfolders_keys.length; i++) {              for (var i=0; i<permfolders_keys.length; i++) {
                 if (permfolders_keys[i] == targetform.folder.value) {                  if (permfolders_keys[i] == targetform.folder.value) {
                     alert("The '"+permfolders_vals[i]+"' folder may not be renamed as it is a mail folder provided by the system.");                      alert("$lt{'the'} '"+permfolders_vals[i]+"' $lt{'fmnb'}");
                     return;                      return;
                 }                  }
             }              }
             var foldername=prompt('New Name for Folder','New Name');              var foldername=prompt('$lt{'nnff'}','$lt{'newn'}');
             if (foldername) {              if (foldername) {
                 targetform.renamed.value=foldername;                  targetform.renamed.value=foldername;
                 for (var i=0; i<allfolders.length; i++) {                  for (var i=0; i<allfolders.length; i++) {
                     if (allfolders[i] == foldername) {                      if (allfolders[i] == foldername) {
                         alert("The folder may not be renamed '"+foldername+"' as this name is already in use for a system-provided or user-defined folder.");                          alert("$lt{'thfm'} '"+foldername+"' $lt{'asth'}");
                         return;                          return;
                     }                      }
                 }                  }
Line 207  function folder_choice(targetform,caller Line 215  function folder_choice(targetform,caller
         if (newname) {          if (newname) {
             for (var i=0; i<allfolders.length; i++) {              for (var i=0; i<allfolders.length; i++) {
                 if (allfolders[i] == newname) {                  if (allfolders[i] == newname) {
                     alert("The new folder may not be named '"+newname+"' as this name is already in use for a system-provided or user-defined folder.");                      alert("$lt{'tnfm'} '"+newname+"' $lt{'asth'}");
                     return;                      return;
                 }                  }
             }              }
Line 569  sub disgroup { Line 577  sub disgroup {
                     $result.='<td valign="top">'.                      $result.='<td valign="top">'.
                              '<fieldset><legend><b>'.$lt{$status}.                               '<fieldset><legend><b>'.$lt{$status}.
                              '</b></legend><nobr>'.                               '</b></legend><nobr>'.
                              '<input type="button" value="check all" '.                               '<input type="button" value="'.&mt('Check All').'" '.
                              'onclick="javascript:toggleAll('."'".$status."','check'".')" />'.                               'onclick="javascript:toggleAll('."'".$status."','check'".')" />'.
                              '&nbsp;&nbsp;'.                               '&nbsp;&nbsp;'.
                              '<input type="button" value="uncheck all" '.                               '<input type="button" value="'.&mt('Uncheck All').'" '.
                              'onclick="javascript:toggleAll('."'".$status."','uncheck'".')" />'.                               'onclick="javascript:toggleAll('."'".$status."','uncheck'".')" />'.
                              '</nobr></fieldset><br />'.                               '</nobr></fieldset><br />'.
                              &Apache::loncommon::start_data_table().                               &Apache::loncommon::start_data_table().
Line 1147  sub compout { Line 1155  sub compout {
     my $dismsg='';      my $dismsg='';
     my $disbase='';      my $disbase='';
     my $func=&mt('Send New');      my $func=&mt('Send New');
     my %lt=&Apache::lonlocal::texthash('us' => 'Username',      my %lt=&Apache::lonlocal::texthash('us'  => 'Username',
        'do' => 'Domain',         'do'  => 'Domain',
        'ad' => 'Additional Recipients',         'ad'  => 'Additional Recipients',
        'sb' => 'Subject',         'sb'  => 'Subject',
        'ca' => 'Cancel',         'ca'  => 'Cancel',
        'ma' => 'Mail');         'ma'  => 'Mail',
                                          'gen' => 'Generate messages from a file',
                                          'gmt' => 'General message text',
                                          'tff' => 'The file format for the uploaded portion of the message is',
                                          'uas' => 'Upload and Send',
                                         );
     if (&Apache::lonnet::allowed('srm',$env{'request.course.id'})      if (&Apache::lonnet::allowed('srm',$env{'request.course.id'})
  || &Apache::lonnet::allowed('srm',$env{'request.course.id'}.   || &Apache::lonnet::allowed('srm',$env{'request.course.id'}.
     '/'.$env{'request.course.sec'})) {      '/'.$env{'request.course.sec'})) {
Line 1252  sub compout { Line 1264  sub compout {
     my $latexHelp = Apache::loncommon::helpLatexCheatsheet();      my $latexHelp = Apache::loncommon::helpLatexCheatsheet();
     if ($broadcast ne 'upload') {      if ($broadcast ne 'upload') {
        $r->print(<<"ENDCOMP");         $r->print(<<"ENDCOMP");
 <tr><td>$lt{'ad'}<br /><tt>username:domain,username:domain, ...  <tr><td>$lt{'ad'}:<br /><tt>username:domain,username:domain, ...
 </tt></td><td>  </tt></td><td>
 <input type="text" size="50" name="additionalrec" /></td></tr>  <input type="text" size="50" name="additionalrec" /></td></tr>
 <tr><td>$lt{'sb'}:</td><td><input type="text" size="50" name="subject" value="$dissub" />  <tr><td>$lt{'sb'}:</td><td><input type="text" size="50" name="subject" value="$dissub" />
Line 1277  ENDCOMP Line 1289  ENDCOMP
                       $env{'form.group'}.'" />');                        $env{'form.group'}.'" />');
         }          }
     } else { # $broadcast is 'upload'      } else { # $broadcast is 'upload'
  $r->print(<<ENDUPLOAD);   $r->print(<<ENDBLOCK);
 <input type="hidden" name="sendmode" value="upload" />  <input type="hidden" name="sendmode" value="upload" />
 <input type="hidden" name="send" value="on" />  <input type="hidden" name="send" value="on" />
 <h3>Generate messages from a file</h3>  <h3>$lt{'gen'}</h3>
 <p>  <p>
 Subject: <input type="text" size="50" name="subject" />  Subject: <input type="text" size="50" name="subject" />
 </p>  </p>
 <p>General message text<br />  <p>$lt{'gmt'}:<br />
 <textarea name="message" id="message" cols="60" rows="10" wrap="hard">$dismsg  <textarea name="message" id="message" cols="60" rows="10" wrap="hard">$dismsg
 </textarea></p>  </textarea></p>
 <p>  <p>
 The file format for the uploaded portion of the message is:  $lt{'tff'}:
 <pre>  ENDBLOCK
 username1:domain1: text         $r->print('
 username2:domain2: text  <pre>'."\n".
 username3:domain1: text  &mt('username1:domain1: text')."\n".
 </pre>  &mt('username2:domain2: text')."\n".
   &mt('username3:domain1: text')."\n".
   '</pre>
 </p>  </p>
 <p>  <p>
 The messages will be assembled from all lines with the respective   '.&mt('The messages will be assembled from all lines with the respective'."\n".'<tt>username:domain</tt>, and appended to the general message text.'));
 <tt>username:domain</tt>, and appended to the general message text.</p>          $r->print(<<ENDUPLOAD);
   </p>
 <p>  <p>
 <input type="file" name="upfile" size="40" /></p><p>  <input type="file" name="upfile" size="40" /></p><p>
 $dispcrit  $dispcrit
 <input type="submit" value="Upload and Send" /></p>  <input type="submit" value="$lt{'uas'}" /></p>
 ENDUPLOAD  ENDUPLOAD
     }      }
     if ($broadcast eq 'group') {      if ($broadcast eq 'group') {
Line 1368  sub disfacetoface { Line 1383  sub disfacetoface {
     if  (!&Apache::lonnet::allowed('dff',$env{'request.course.id'})      if  (!&Apache::lonnet::allowed('dff',$env{'request.course.id'})
  && ! &Apache::lonnet::allowed('dff',$env{'request.course.id'}.   && ! &Apache::lonnet::allowed('dff',$env{'request.course.id'}.
        '/'.$env{'request.course.sec'})) {         '/'.$env{'request.course.sec'})) {
  $r->print('Not allowed');   $r->print(&mt('Not allowed'));
  return;   return;
     }      }
     my %records=&Apache::lonnet::dump('nohist_email',      my %records=&Apache::lonnet::dump('nohist_email',
Line 1450  sub facetoface { Line 1465  sub facetoface {
     if (!&Apache::lonnet::allowed('dff',$env{'request.course.id'})      if (!&Apache::lonnet::allowed('dff',$env{'request.course.id'})
  && ! &Apache::lonnet::allowed('dff',$env{'request.course.id'}.   && ! &Apache::lonnet::allowed('dff',$env{'request.course.id'}.
       '/'.$env{'request.course.sec'})) {        '/'.$env{'request.course.sec'})) {
  $r->print('Not allowed');   $r->print(&mt('Not allowed'));
  return;   return;
     }      }
     my $crstype = &Apache::loncommon::course_type();      my $crstype = &Apache::loncommon::course_type();
Line 1537  sub examblock { Line 1552  sub examblock {
             'cbds' => 'Communication blocking during scheduled exams',              'cbds' => 'Communication blocking during scheduled exams',
             'desc' => "You can use communication blocking to prevent $usertype enrolled in this course from displaying LON-CAPA messages sent by other $usertype during an online exam. As blocking of communication could potentially interrupt legitimate communication between $usertype who are also both enrolled in a different LON-CAPA course, please be careful that you select the correct start and end times for your scheduled exam when setting or modifying these parameters.",              'desc' => "You can use communication blocking to prevent $usertype enrolled in this course from displaying LON-CAPA messages sent by other $usertype during an online exam. As blocking of communication could potentially interrupt legitimate communication between $usertype who are also both enrolled in a different LON-CAPA course, please be careful that you select the correct start and end times for your scheduled exam when setting or modifying these parameters.",
              'mecb' => 'Modify existing communication blocking periods',               'mecb' => 'Modify existing communication blocking periods',
              'ncbc' => 'No communication blocks currently stored'               'ncbc' => 'No communication blocks currently stored',
                'stor' => 'Store',
     );      );
   
     my %ltext = &Apache::lonlocal::texthash(      my %ltext = &Apache::lonlocal::texthash(
Line 1576  sub examblock { Line 1592  sub examblock {
     $r->print(<<"END");      $r->print(<<"END");
 <br />  <br />
 <input type="hidden" name="blocktotal" value="$blockcount" />  <input type="hidden" name="blocktotal" value="$blockcount" />
 <input type ="submit" value="Save Changes" />  <input type ="submit" value="$lt{'stor'}" />
 </form>  </form>
 $end_page  $end_page
 END  END
Line 1587  sub blockstore { Line 1603  sub blockstore {
     my $r = shift;      my $r = shift;
     my %lt=&Apache::lonlocal::texthash(      my %lt=&Apache::lonlocal::texthash(
             'tfcm' => 'The following changes were made',              'tfcm' => 'The following changes were made',
             'cbps' => 'communication blocking period(s)',  
             'werm' => 'was/were removed',  
             'wemo' => 'was/were modified',  
             'wead' => 'was/were added',  
             'ncwm' => 'No changes were made.'               'ncwm' => 'No changes were made.' 
     );      );
     my %adds = ();      my %adds = ();
Line 1647  sub blockstore { Line 1659  sub blockstore {
     if ($chgestotal > 0) {      if ($chgestotal > 0) {
         $r->print($lt{'tfcm'}.'<ul>');          $r->print($lt{'tfcm'}.'<ul>');
         if ($canceltotal > 0) {          if ($canceltotal > 0) {
             $r->print('<li>'.$canceltotal.' '.$lt{'cbps'},' '.$lt{'werm'}.'</li>');              $r->print('<li>'.&mt('[quant,_1,communication blocking period was,communication blocking periods were] removed.',$canceltotal).'</li>');
         }          }
         if ($modtotal > 0) {          if ($modtotal > 0) {
             $r->print('<li>'.$modtotal.' '.$lt{'cbps'},' '.$lt{'wemo'}.'</li>');              $r->print('<li>'.&mt('[quant,_1,communication blocking period was,communication blocking periods were] modified.',$modtotal).'</li>');
         }          }
         if ($addtotal > 0) {          if ($addtotal > 0) {
             $r->print('<li>'.$addtotal.' '.$lt{'cbps'},' '.$lt{'wead'}.'</li>');              $r->print('<li>'.&mt('[quant,_1,communication blocking period was,communication blocking periods were] added.',$addtotal).'</li>');
         }          }
         $r->print('</ul>');          $r->print('</ul>');
     } else {      } else {

Removed from v.1.49  
changed lines
  Added in v.1.50


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