[system] / branches / rel-2-2-dev / webwork2 / lib / WeBWorK / ContentGenerator / CourseAdmin.pm Repository:
ViewVC logotype

Diff of /branches/rel-2-2-dev/webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2378 Revision 2384
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/CourseAdmin.pm,v 1.19 2004/06/23 19:19:32 sh002i Exp $ 4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/CourseAdmin.pm,v 1.20 2004/06/23 23:10:44 sh002i Exp $
5# 5#
6# This program is free software; you can redistribute it and/or modify it under 6# This program is free software; you can redistribute it and/or modify it under
7# the terms of either: (a) the GNU General Public License as published by the 7# the terms of either: (a) the GNU General Public License as published by the
8# Free Software Foundation; either version 2, or (at your option) any later 8# Free Software Foundation; either version 2, or (at your option) any later
9# version, or (b) the "Artistic License" which comes with this package. 9# version, or (b) the "Artistic License" which comes with this package.
550 $ce->{pg}->{directories}->{root}, 550 $ce->{pg}->{directories}->{root},
551 $add_courseID, 551 $add_courseID,
552 ); 552 );
553 553
554 my %courseOptions = ( dbLayoutName => $add_dbLayout ); 554 my %courseOptions = ( dbLayoutName => $add_dbLayout );
555
556 if ($add_initial_email ne "") {
557 $courseOptions{allowedRecipients} = [ $add_initial_email ];
558 $courseOptions{feedbackRecipients} = [ $add_initial_email ];
559 }
560
555 if ($add_dbLayout eq "gdbm") { 561 if ($add_dbLayout eq "gdbm") {
556 $courseOptions{globalUserID} = $add_gdbm_globalUserID if $add_gdbm_globalUserID ne ""; 562 $courseOptions{globalUserID} = $add_gdbm_globalUserID if $add_gdbm_globalUserID ne "";
557 } 563 }
558 564
559 my %dbOptions; 565 my %dbOptions;
579 } 585 }
580 586
581 # add initial instructor if desired 587 # add initial instructor if desired
582 if ($add_initial_userID ne "") { 588 if ($add_initial_userID ne "") {
583 my $User = $db->newUser( 589 my $User = $db->newUser(
584 user_id => $add_initial_userID, 590 user_id => $add_initial_userID,
585 first_name => $add_initial_firstName, 591 first_name => $add_initial_firstName,
586 last_name => $add_initial_lastName, 592 last_name => $add_initial_lastName,
587 student_id => $add_initial_userID, 593 student_id => $add_initial_userID,
594 email_address => $add_initial_email,
588 status => "C", 595 status => "C",
589 ); 596 );
590 my $Password = $db->newPassword( 597 my $Password = $db->newPassword(
591 user_id => $add_initial_userID, 598 user_id => $add_initial_userID,
592 password => cryptPassword($add_initial_password), 599 password => cryptPassword($add_initial_password),
593 ); 600 );
595 user_id => $add_initial_userID, 602 user_id => $add_initial_userID,
596 permission => "10", 603 permission => "10",
597 ); 604 );
598 push @users, [ $User, $Password, $PermissionLevel ]; 605 push @users, [ $User, $Password, $PermissionLevel ];
599 } 606 }
607
608 push @{$courseOptions{PRINT_FILE_NAMES_FOR}}, map { $_->[0]->email_address } @users;
600 609
601 my %optional_arguments; 610 my %optional_arguments;
602 if ($add_templates_course ne "") { 611 if ($add_templates_course ne "") {
603 $optional_arguments{templatesFrom} = $add_templates_course; 612 $optional_arguments{templatesFrom} = $add_templates_course;
604 } 613 }

Legend:
Removed from v.2378  
changed lines
  Added in v.2384

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9