Diff for /loncom/interface/loncreatecourse.pm between versions 1.152 and 1.153

version 1.152, 2013/12/24 19:15:10 version 1.153, 2013/12/25 09:52:42
Line 160  function validate(formname) { Line 160  function validate(formname) {
                     'crcs' => "Crosslisted courses",                      'crcs' => "Crosslisted courses",
                     'cscs' => "a comma separated list of course sections crosslisted with the current course, with each entry including the institutional course section name followed by a colon and then the (optional) sectionID to be used in LON-CAPA, e.g., fs03ent231001:ent1,fs03bot231001:bot1,fs03zol231002:zol2",                      'cscs' => "a comma separated list of course sections crosslisted with the current course, with each entry including the institutional course section name followed by a colon and then the (optional) sectionID to be used in LON-CAPA, e.g., fs03ent231001:ent1,fs03bot231001:bot1,fs03zol231002:zol2",
                     'ccre' => "Course credits",                      'ccre' => "Course credits",
                       'crcd' => "Create six character course indentifier to share with students",
                     'cred' => "the number of institutional credits students will earn by completing this course",                      'cred' => "the number of institutional credits students will earn by completing this course",
                     'crco' => "Course Content",                      'crco' => "Course Content",
                     'cncr' => "Completely new course",                      'cncr' => "Completely new course",
Line 343  END Line 344  END
                      .&Apache::lonhtmlcommon::row_closure()                       .&Apache::lonhtmlcommon::row_closure()
             );              );
         }          }
           $r->print(&Apache::lonhtmlcommon::row_title($lt{'crcd'})
                        .'<span class="LC_nobreak">'
                        .'<input type="radio" name="uniquecode" value="1" />'.&mt('Yes').('&nbsp;'x2)
                        .'<input type="radio" name="uniquecode" value="0" checked="checked" />'.&mt('No')
                        .&Apache::lonhtmlcommon::row_closure()
               );
     }      }
     # Table: New Course / Clone Course      # Table: New Course / Clone Course
     $r->print(&Apache::lonhtmlcommon::row_headline()      $r->print(&Apache::lonhtmlcommon::row_headline()
Line 653  sub create_course { Line 660  sub create_course {
         $args->{'defaultcredits'} = $env{'form.defaultcredits'};          $args->{'defaultcredits'} = $env{'form.defaultcredits'};
     }      }
   
       if ($env{'form.uniquecode'}) {
            $args->{'uniquecode'} = 1;
       }
   
     #      #
     # Verify data      # Verify data
     #      #
Line 681  sub create_course { Line 692  sub create_course {
                      ,$env{'form.course_home'}.&Apache::loncommon::end_page()));                       ,$env{'form.course_home'}.&Apache::loncommon::end_page()));
         return;          return;
     }      }
     my ($courseid,$crsudom,$crsunum);      my ($courseid,$crsudom,$crsunum,$code);
     my ($success,$output) =       my ($success,$output) = 
  &Apache::loncommon::construct_course($args,\$logmsg,\$courseid,   &Apache::loncommon::construct_course($args,\$logmsg,\$courseid,
      \$crsudom,\$crsunum,       \$crsudom,\$crsunum,
      $env{'user.domain'},       $env{'user.domain'},
      $env{'user.name'},'dc_create');       $env{'user.name'},'dc_create',undef,undef,\$code);
     $r->print($output);      $r->print($output);
     if ($success) {      if ($success) {
         #          #
Line 706  sub create_course { Line 717  sub create_course {
     $r->print(      $r->print(
       '<p><a href="/adm/managekeys?cid='.$crsudom.'_'.$crsunum.'">'.&mt('Manage Access Keys').'</a></p>');        '<p><a href="/adm/managekeys?cid='.$crsudom.'_'.$crsunum.'">'.&mt('Manage Access Keys').'</a></p>');
  }   }
           if ($code) {
               $r->print(
                         '<p>'.&mt('Course indentifier to share with students: [_1]',$code).'</p>'
                        );
           }
         # Flush the course logs so reverse user roles immediately updated          # Flush the course logs so reverse user roles immediately updated
  $r->register_cleanup(\&Apache::lonnet::flushcourselogs);   $r->register_cleanup(\&Apache::lonnet::flushcourselogs);
  $r->print('<p>'.&mt('Roles will be active at next login').'.</p>');   $r->print('<p>'.&mt('Roles will be active at next login').'.</p>');

Removed from v.1.152  
changed lines
  Added in v.1.153


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