[LON-CAPA-cvs] cvs: loncom /interface loncreateuser.pm
raeburn
lon-capa-cvs-allow@mail.lon-capa.org
Mon, 24 Dec 2007 16:00:14 -0000
This is a MIME encoded message
--raeburn1198512014
Content-Type: text/plain
raeburn Mon Dec 24 11:00:14 2007 EDT
Modified files:
/loncom/interface loncreateuser.pm
Log:
- Contextual help items reuse file names for existing help files.
- Contextual help moved into breadcrumb row where a single help file applies to all functions on a page.
--raeburn1198512014
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20071224110014.txt"
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.223 loncom/interface/loncreateuser.pm:1.224
--- loncom/interface/loncreateuser.pm:1.223 Sun Dec 23 10:50:23 2007
+++ loncom/interface/loncreateuser.pm Mon Dec 24 11:00:13 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.223 2007/12/23 15:50:23 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.224 2007/12/24 16:00:13 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -233,7 +233,14 @@
text=>"Single user search",
faq=>282,bug=>'Instructor Interface',});
}
- my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('User Management');
+ my $helpitem = 'Course_Change_Privileges';
+ if ($env{'form.action'} eq 'custom') {
+ $helpitem = 'Course_Editing_Custom_Roles';
+ } elsif ($env{'form.action'} eq 'singlestudent') {
+ $helpitem = 'Course_Add_Student';
+ }
+ my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('User Management',
+ $helpitem);
my %existingroles=&Apache::lonuserutils::my_custom_roles();
my $choice=&Apache::loncommon::select_form('make new role','rolename',
('make new role' => 'Generate new role ...',%existingroles));
@@ -249,9 +256,6 @@
'enrl' => "to enroll one student",
);
my $help = &Apache::loncommon::help_open_menu(undef,undef,282,'Instructor Interface');
- my $helpsiur=&Apache::loncommon::help_open_topic('Course_Change_Privileges');
- my $helpsist=&Apache::loncommon::help_open_topic('Course_Add_Student');
- my $helpecpr=&Apache::loncommon::help_open_topic('Course_Editing_Custom_Roles');
my $sellink=&Apache::loncommon::selectstudent_link('crtuser','srchterm','srchdomain');
if ($sellink) {
$sellink = "$lt{'or'} ".$sellink;
@@ -263,16 +267,16 @@
<form action="/adm/createuser" method="post" name="docustom">
<input type="hidden" name="action" value="$env{'form.action'}" />
<input type="hidden" name="phase" value="selected_custom_edit" />
-<h3>$lt{'ecrp'}$helpecpr</h3>
+<h3>$lt{'ecrp'}</h3>
$lt{'nr'}: $choice <input type="text" size="15" name="newrolename" /><br />
<input name="customeditor" type="submit" value="$lt{'cre'}" />
</form>
ENDCUSTOM
}
} else {
- my $actiontext = $lt{'mod'}.$helpsiur;
+ my $actiontext = $lt{'mod'};
if ($env{'form.action'} eq 'singlestudent') {
- $actiontext = $lt{'enrl'}.$helpsist;
+ $actiontext = $lt{'enrl'};
}
$r->print("
<h3>$lt{'srch'} $sellink $actiontext</h3>");
@@ -420,7 +424,8 @@
{href=>"javascript:backPage(document.usersrchform,'get_user_info','select')",
text=>"Select User",
faq=>282,bug=>'Instructor Interface',});
- $r->print(&Apache::lonhtmlcommon::breadcrumbs('User Management'));
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs('User Management',
+ 'Course_Change_Privileges'));
$r->print("<b>$lt{'usrch'}</b><br />");
$r->print(&entry_form($srch->{'srchdomain'},$srch,undef,$context));
$r->print('<h3>'.$lt{'usel'}.'</h3>');
@@ -432,7 +437,8 @@
{href=>"javascript:backPage(document.usersrchform,'get_user_info','select')",
text=>"Select Student",
faq=>282,bug=>'Instructor Interface',});
- $r->print(&Apache::lonhtmlcommon::breadcrumbs('User Management'));
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs('User Management',
+ 'Course_Add_Student'));
$r->print($jscript."<b>$lt{'stusrch'}</b><br />");
$r->print(&entry_form($srch->{'srchdomain'},$srch,undef,$context));
$r->print('</form><h3>'.$lt{'stusel'}.'</h3>');
@@ -620,7 +626,12 @@
({href=>"javascript:backPage($form,'$env{'form.phase'}','modify')",
text=>$breadcrumb_text{'modify'},
faq=>282,bug=>'Instructor Interface',});
- my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('User Management');
+ my $helpitem = 'Course_Change_Privileges';
+ if ($env{'form.action'} eq 'singlestudent') {
+ $helpitem = 'Course_Add_Student';
+ }
+ my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('User Management',
+ $helpitem);
my $forminfo =<<"ENDFORMINFO";
<form action="/adm/createuser" method="post" name="$formname">
@@ -1508,7 +1519,12 @@
{href=>"/adm/createuser",
text=>"Result",
faq=>282,bug=>'Instructor Interface',});
- $r->print(&Apache::lonhtmlcommon::breadcrumbs('User Management'));
+ my $helpitem = 'Course_Change_Privileges';
+ if ($env{'form.action'} eq 'singlestudent') {
+ $helpitem = 'Course_Add_Student';
+ }
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs('User Management',
+ $helpitem));
$r->print(&update_result_form($uhome));
# Check Inputs
if (! $env{'form.ccuname'} ) {
@@ -2479,7 +2495,8 @@
{href=>"javascript:backPage(document.form1,'','')",
text=>"Edit custom role",
faq=>282,bug=>'Instructor Interface',});
- $r->print(&Apache::lonhtmlcommon::breadcrumbs('User Management'));
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs('User Management',
+ 'Course_Editing_Custom_Roles'));
$r->print($body_top);
my %lt=&Apache::lonlocal::texthash(
@@ -2619,7 +2636,8 @@
{href=>"javascript:backPage(document.customresult,'set_custom_roles','')",
text=>"Result",
faq=>282,bug=>'Instructor Interface',});
- $r->print(&Apache::lonhtmlcommon::breadcrumbs('User Management'));
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs('User Management',
+ 'Course_Editing_Custom_Roles'));
my ($rdummy,$roledef)=
&Apache::lonnet::get('roles',["rolesdef_$rolename"]);
@@ -2727,7 +2745,7 @@
({href=>'/adm/createuser?action=upload&state=',
text=>"Upload Users List"});
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Upload Users List',
- 'User_Management_Upload'));
+ 'Course_Create_Class_List'));
$r->print('<form name="studentform" method="post" '.
'enctype="multipart/form-data" '.
' action="/adm/createuser">'."\n");
@@ -2837,7 +2855,7 @@
my $choice = $env{'form.bulkaction'};
$r->print(&header());
$r->print(&Apache::lonhtmlcommon::breadcrumbs("Update Users",
- 'User_Management_List'));
+ 'Course_View_Class_List'));
if ($permission->{'cusr'}) {
&Apache::lonuserutils::update_user_list($r,$context,$setting,$choice);
$r->print(&Apache::loncommon::end_page());
@@ -2869,7 +2887,7 @@
$r->print(&header(&add_script(&verify_user_display())));
}
$r->print(&Apache::lonhtmlcommon::breadcrumbs("List Users",
- 'User_Management_List'));
+ 'Course_View_Class_List'));
&Apache::lonuserutils::print_userlist($r,undef,$permission,$context,
$formname,$totcodes,$codetitles,$idlist,$idlist_titles);
$r->print(&Apache::loncommon::end_page());
@@ -2969,24 +2987,24 @@
my @menu =
(
{ text => $links{$context}{'upload'},
- help => 'User_Management_Upload',
+ help => 'Course_Create_Class_List',
action => 'upload',
permission => $permission->{'cusr'},
},
{ text => $links{$context}{'singleuser'},
- help => 'User_Management_Single_User',
+ help => 'Course_Change_Privileges',
action => 'singleuser',
permission => $permission->{'cusr'},
},
{ text => $links{$context}{'listusers'},
- help => 'User_Management_List',
+ help => 'Course_View_Class_List',
action => 'listusers',
permission => ($permission->{'view'} || $permission->{'cusr'}),
},
);
if ($context eq 'domain' || $context eq 'course') {
my $customlink = { text => 'Edit Custom Roles',
- help => 'Custom_Role_Edit',
+ help => 'Course_Editing_Custom_Roles',
action => 'custom',
permission => $permission->{'custom'},
};
@@ -2997,7 +3015,7 @@
my @courselinks =
(
{ text => 'Enroll a Single Student',
- help => 'Course_Single_Student',
+ help => 'Course_Add_Student',
action => 'singlestudent',
permission => $permission->{'cusr'},
},
--raeburn1198512014--