Diff for /loncom/interface/loncreatecourse.pm between versions 1.127 and 1.132

version 1.127, 2009/09/28 19:21:38 version 1.132, 2009/10/31 18:23:30
Line 172  function validate(formname) { Line 172  function validate(formname) {
                     'stco' => "standard courses only",                      'stco' => "standard courses only",
                     'blnk' => "Blank",                      'blnk' => "Blank",
                     'sllb' => "Syllabus",                      'sllb' => "Syllabus",
                     'navi' => "Navigate Contents",                      'navi' => "Course Contents",
                     'cid'  => "Course ID",                      'cid'  => "Course ID",
                     'dmn'  => "Domain",                      'dmn'  => "Domain",
                     'dsh'  => "Date Shift",                      'dsh'  => "Date Shift",
Line 787  sub create_course { Line 787  sub create_course {
  # Make the requested user a course coordinator or group coordinator   # Make the requested user a course coordinator or group coordinator
         #          #
  if (($ccdomain) && ($ccuname)) {   if (($ccdomain) && ($ccuname)) {
               my $ccrole = 'cc';
               if ($crstype eq 'Community') {
                   $ccrole = 'co';
               }    
     $r->print(&mt('Assigning role of '.$crstype.' Coordinator to [_1]:',      $r->print(&mt('Assigning role of '.$crstype.' Coordinator to [_1]:',
  ,'<i>'.$ccuname.':'.$ccdomain.'</i>')   ,'<i>'.$ccuname.':'.$ccdomain.'</i>')
       .&Apache::lonnet::assignrole($ccdomain,$ccuname,$courseid,        .&Apache::lonnet::assignrole($ccdomain,$ccuname,$courseid,
   'cc','','','','','createcourse').'<p>');    $ccrole,'','','','','createcourse').'<p>');
  }   }
  if ($env{'form.setkeys'}) {   if ($env{'form.setkeys'}) {
     $r->print(      $r->print(
Line 979  sub print_creation_logs { Line 983  sub print_creation_logs {
                    &Apache::loncommon::start_data_table_header_row().                     &Apache::loncommon::start_data_table_header_row().
                    '<th>&nbsp;</th><th>'.&mt('Creation Date').'</th>'.                     '<th>&nbsp;</th><th>'.&mt('Creation Date').'</th>'.
                    '<th>'.&mt('Creator').'</th><th>'.&mt('Description').'</th>'.                     '<th>'.&mt('Creator').'</th><th>'.&mt('Description').'</th>'.
                    '<th>'.&mt('Course Owner(s)').'</th>';                     '<th>'.&mt('Owner(s)').'</th>';
     if (($curr{'type'} eq 'official') || ($curr{'type'} eq 'any')) {      if (($curr{'type'} eq 'official') || ($curr{'type'} eq 'any')) {
        $tablehdr .= '<th>'.&mt('Institutional Code').'</th>';         $tablehdr .= '<th>'.&mt('Institutional Code').'</th>';
     }       }
     $tablehdr .= '<th>'.&mt('Course Type').'</th>'.      if ($curr{'type'} eq 'any') { 
                  '<th>'.&mt('Creation Context').'</th>'.          $tablehdr .= '<th>'.&mt('Course Type').'</th>';
                  &Apache::loncommon::end_data_table_header_row();      }
       if ($curr{'context'} eq 'any') {
           $tablehdr .= '<th>'.&mt('Creation Context').'</th>';
       }
       $tablehdr .= &Apache::loncommon::end_data_table_header_row();
     my ($minshown,$maxshown);      my ($minshown,$maxshown);
     $minshown = 1;      $minshown = 1;
     my $count = 0;      my $count = 0;
Line 1106  sub print_creation_logs { Line 1114  sub print_creation_logs {
         if (($curr{'type'} eq 'official') || ($curr{'type'} eq 'any')) {          if (($curr{'type'} eq 'official') || ($curr{'type'} eq 'any')) {
             $r->print('<td>'.$courses{$cid}{'inst_code'}.'</td>');              $r->print('<td>'.$courses{$cid}{'inst_code'}.'</td>');
         }          }
         $r->print('<td>'.$showtype.'</td><td>'.$showcontext.'</td><td>'.&Apache::loncommon::end_data_table_row()."\n");          if ($curr{'type'} eq 'any') {
               $r->print('<td>'.$showtype.'</td>');
           }
           if ($curr{'context'} eq 'any') {
               $r->print('<td>'.$showcontext.'</td>');
           }
           $r->print('<td>'.&Apache::loncommon::end_data_table_row()."\n");
     }      }
     if ($showntablehdr) {      if ($showntablehdr) {
         $r->print(&Apache::loncommon::end_data_table().'<br />');          $r->print(&Apache::loncommon::end_data_table().'<br />');
Line 1222  sub creation_display_filter { Line 1236  sub creation_display_filter {
   
     # Server version info      # Server version info
     $output .= '<p class="LC_info">'.      $output .= '<p class="LC_info">'.
                &mt('Only courses created from servers running LON-CAPA [_1] or later are displayed.','2.9.0');                 &mt('Only courses and communities created from servers running LON-CAPA [_1] or later are displayed.','2.9.0');
     if ($version) {      if ($version) {
         $output .= ' '.&mt('This LON-CAPA server is version [_1]',$version);          $output .= ' '.&mt('This LON-CAPA server is version [_1]',$version);
     }      }
Line 1241  sub course_types { Line 1255  sub course_types {
 }  }
   
 sub context_names {  sub context_names {
     my @contexts = qw(auto web dc_create requestcrs);      my @contexts = qw(auto web dc_create requestcourses);
     my %contextnames =       my %contextnames = 
         &Apache::lonlocal::texthash (          &Apache::lonlocal::texthash (
                             auto       => 'Automated creation from batch file',                          auto           => 'Automated creation from batch file',
                             web        => 'Batch creation from uploaded file',                          web            => 'Batch creation from uploaded file',
                             dc_create  => 'Single course created by Domain Coordinator',                           dc_create      => 'Course or community created by Dom. Coord.', 
                             requestcrs => 'Processing of submitted course request',                          requestcourses => 'Processing of submitted course request',
         );          );
     return (\@contexts,\%contextnames);      return (\@contexts,\%contextnames);
 }  }
Line 1386  sub handler { Line 1400  sub handler {
                     &syllabuslink_javascript()."\n".                      &syllabuslink_javascript()."\n".
                     '// ]]>'."\n".                      '// ]]>'."\n".
                     '</script>';                      '</script>';
            my $start_page=&Apache::loncommon::start_page('Course Creation Logs',$js);             my $start_page=&Apache::loncommon::start_page('Course/Community Creation Logs',$js);
            my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Created Courses','Creation_Log',undef,'Creation_Log');             my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Created Courses/Communities','Creation_Log',undef,'Creation_Log');
            $r->print($start_page.$crumbs."\n".'<div>');             $r->print($start_page.$crumbs."\n".'<div>');
            &print_creation_logs($r);             &print_creation_logs($r);
            $r->print('</div>'.&Apache::loncommon::end_page());             $r->print('</div>'.&Apache::loncommon::end_page());

Removed from v.1.127  
changed lines
  Added in v.1.132


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