--- loncom/interface/loncreateuser.pm 2006/03/19 22:15:46 1.110
+++ loncom/interface/loncreateuser.pm 2007/03/03 01:33:21 1.146
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.110 2006/03/19 22:15:46 albertel Exp $
+# $Id: loncreateuser.pm,v 1.146 2007/03/03 01:33:21 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -64,6 +64,9 @@ use Apache::Constants qw(:common :http);
use Apache::lonnet;
use Apache::loncommon;
use Apache::lonlocal;
+use Apache::longroup;
+use lib '/home/httpd/lib/perl/';
+use LONCAPA qw(:DEFAULT :match);
my $loginscript; # piece of javascript used in two separate instances
my $generalrule;
@@ -96,8 +99,8 @@ sub initialize_authen_forms {
sub my_custom_roles {
my %returnhash=();
my %rolehash=&Apache::lonnet::dump('roles');
- foreach (keys %rolehash) {
- if ($_=~/^rolesdef\_(\w+)$/) {
+ foreach my $key (keys %rolehash) {
+ if ($key=~/^rolesdef\_(\w+)$/) {
$returnhash{$1}=$1;
}
}
@@ -113,12 +116,25 @@ sub authorpriv {
return 1;
}
+# ====================================================
+
+sub portfolio_quota {
+ my ($ccuname,$ccdomain) = @_;
+ my %lt = &Apache::lonlocal::texthash(
+ 'disk' => "Disk space allocated to user's portfolio files",
+ );
+ my $output = '
'.$lt{'disk'}.'
'.
+ ' Mb';
+ return $output;
+}
+
# =================================================================== Phase one
sub print_username_entry_form {
my ($r) = @_;
my $defdom=$env{'request.role.domain'};
- my @domains = &Apache::loncommon::get_domains();
my $domform = &Apache::loncommon::select_dom_form($defdom,'ccdomain');
my $selscript=&Apache::loncommon::studentbrowser_javascript();
my $start_page =
@@ -139,10 +155,11 @@ sub print_username_entry_form {
'nr' => "Name of Role",
'cre' => "Custom Role Editor"
);
- my $help = &Apache::loncommon::help_open_menu('',undef,undef,'',282,'Instructor Interface');
+ my $help = &Apache::loncommon::help_open_menu(undef,undef,282,'Instructor Interface');
my $helpsiur=&Apache::loncommon::help_open_topic('Course_Change_Privileges');
my $helpecpr=&Apache::loncommon::help_open_topic('Course_Editing_Custom_Roles');
$r->print(<<"ENDDOCUMENT");
+$start_page