[LON-CAPA-cvs] cvs: doc /loncapafiles loncapafiles.lpml loncom/html/adm/help/tex ForceIDChange.tex loncom/interface loncreateuser.pm lonuserutils.pm
raeburn
raeburn at source.lon-capa.org
Sun Feb 16 10:39:27 EST 2014
raeburn Sun Feb 16 15:39:27 2014 EDT
Added files:
/loncom/html/adm/help/tex ForceIDChange.tex
Modified files:
/loncom/interface loncreateuser.pm lonuserutils.pm
/doc/loncapafiles loncapafiles.lpml
Log:
- Modify changes in lonuserutils.pm rev. 1.161, so "Force ID change" message
is not shown to users self-creating accounts.
- Wording change to labels for "Force ID change" and "Update ID in courses"
message, to make them shorter, so "Login Data" can still float into right
column.
- Add help document to explain ramifications of forcing ID change.
- eliminate unhelpful: "only do if you know what you are doing".
-------------- next part --------------
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.392 loncom/interface/loncreateuser.pm:1.393
--- loncom/interface/loncreateuser.pm:1.392 Sat Feb 15 19:31:22 2014
+++ loncom/interface/loncreateuser.pm Sun Feb 16 15:38:52 2014
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.392 2014/02/15 19:31:22 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.393 2014/02/16 15:38:52 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1271,11 +1271,9 @@
}
$r->print('<h2>'.$title.'</h2>'."\n");
$r->print('<div class="LC_left_float">');
- my $personal_table =
- &personal_data_display($ccuname,$ccdomain,$newuser,$context,
- $inst_results{$ccuname.':'.$ccdomain});
- # (Do not offer Disable Safeguard here)
- $r->print($personal_table);
+ $r->print(&personal_data_display($ccuname,$ccdomain,$newuser,$context,
+ $inst_results{$ccuname.':'.$ccdomain}));
+ # Option to disable student/employee ID conflict checking not offerred for new users.
my ($home_server_pick,$numlib) =
&Apache::loncommon::home_server_form_item($ccdomain,'hserver',
'default','hide');
@@ -1376,10 +1374,8 @@
}
$r->print('<h2>'.$title.'</h2>'."\n");
$r->print('<div class="LC_left_float">');
- my $personal_table =
- &personal_data_display($ccuname,$ccdomain,$newuser,$context,
- $inst_results{$ccuname.':'.$ccdomain});
- $r->print($personal_table);
+ $r->print(&personal_data_display($ccuname,$ccdomain,$newuser,$context,
+ $inst_results{$ccuname.':'.$ccdomain}));
if (&Apache::lonnet::allowed('ccc',$env{'request.role.domain'})) {
$r->print('<br /><h3>'.&mt('User Can Request Creation of Courses/Communities in this Domain?').'</h3>'.
&Apache::loncommon::start_data_table());
@@ -1475,7 +1471,8 @@
}
$r->print('<br /><input type="button" value="'.$btntxt.'" onclick="setSections(this.form)" />'."\n");
} else {
- $r->print('<fieldset><legend>'.&mt('Add Roles').'</legend>');
+ $r->print('<div class="LC_left_float">'.
+ '<fieldset><legend>'.&mt('Add Roles').'</legend>');
my $addrolesdisplay = 0;
if ($context eq 'domain' || $context eq 'author') {
$addrolesdisplay = &new_coauthor_roles($r,$ccuname,$ccdomain);
@@ -1486,27 +1483,32 @@
$addrolesdisplay = $add_domainroles;
}
$r->print(&course_level_dc($env{'request.role.domain'},$showcredits));
- $r->print('</fieldset><br /><input type="button" value="'.&mt('Save').'" onclick="setCourse()" />'."\n");
+ $r->print('</fieldset></div><div class="LC_clear_float_footer"></div>'.
+ '<br /><input type="button" value="'.&mt('Save').'" onclick="setCourse()" />'."\n");
} elsif ($context eq 'author') {
if ($addrolesdisplay) {
- $r->print('</fieldset><br /><input type="button" value="'.&mt('Save').'"');
+ $r->print('</fieldset></div><div class="LC_clear_float_footer"></div>'.
+ '<br /><input type="button" value="'.&mt('Save').'"');
if ($newuser) {
$r->print(' onclick="auth_check()" \>'."\n");
} else {
$r->print('onclick="this.form.submit()" \>'."\n");
}
} else {
- $r->print('</fieldset><br /><a href="javascript:backPage(document.cu)">'.
+ $r->print('</fieldset></div>'.
+ '<div class="LC_clear_float_footer"></div>'.
+ '<br /><a href="javascript:backPage(document.cu)">'.
&mt('Back to previous page').'</a>');
}
} else {
$r->print(&course_level_table(\%inccourses,$showcredits,$defaultcredits));
- $r->print('</fieldset><br /><input type="button" value="'.&mt('Save').'" onclick="setSections(this.form)" />'."\n");
+ $r->print('</fieldset></div><div class="LC_clear_float_footer"></div>'.
+ '<br /><input type="button" value="'.&mt('Save').'" onclick="setSections(this.form)" />'."\n");
}
}
$r->print(&Apache::lonhtmlcommon::echo_form_input(['phase','userrole','ccdomain','prevphase','currstate','ccuname','ccdomain']));
$r->print('<input type="hidden" name="currstate" value="" />');
- $r->print('<input type="hidden" name="prevphase" value="'.$env{'form.phase'}.'" /></form>');
+ $r->print('<input type="hidden" name="prevphase" value="'.$env{'form.phase'}.'" /></form><br /><br />');
return;
}
@@ -1861,7 +1863,7 @@
} else {
$contextrole = &mt('Existing Roles in this Domain');
}
- $r->print('<div>'.
+ $r->print('<div class="LC_left_float">'.
'<fieldset><legend>'.$contextrole.'</legend>'.
&Apache::loncommon::start_data_table("LC_createuser").
&Apache::loncommon::start_data_table_header_row().
@@ -2296,12 +2298,12 @@
} else {
if ($canmodify{$item}) {
$row .= '<input type="text" name="c'.$item.'" size="'.$textboxsize{$item}.'" value="'.$userenv{$item}.'" />';
+ if (($item eq 'id') && (!$newuser)) {
+ $row .= '<br />'.&Apache::lonuserutils::forceid_change($context);
+ }
} else {
$row .= $userenv{$item};
}
- if (($item eq 'id') && ($canmodify{$item})) {
- $row .= '<br />'.&Apache::lonuserutils::forceid_change($context);
- }
}
$row .= &Apache::lonhtmlcommon::row_closure(1);
if (!$hiderow) {
@@ -4177,6 +4179,7 @@
my $dompriv='';
my $coursepriv='';
my $body_top;
+ my $newrole;
my ($rdummy,$roledef)=
&Apache::lonnet::get('roles',["rolesdef_$rolename"]);
# ------------------------------------------------------- Does this role exist?
@@ -4189,6 +4192,7 @@
$syspriv =~ s/bre\&S//;
}
} else {
+ $newrole = 1;
$body_top .= &mt('New Role').' "';
$roledef='';
}
@@ -4458,6 +4462,7 @@
bread_crumbs_component => 'User Management'};
$r->print(&Apache::loncommon::start_page('Save Custom Role',$jscript,$args));
+ my $newrole;
my ($rdummy,$roledef)=
&Apache::lonnet::get('roles',["rolesdef_$rolename"]);
@@ -4468,6 +4473,7 @@
} else {
$r->print(&mt('New Role').' "');
$roledef='';
+ $newrole = 1;
}
$r->print($rolename.'"</h3>');
# ------------------------------------------------------- What can be assigned?
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.162 loncom/interface/lonuserutils.pm:1.163
--- loncom/interface/lonuserutils.pm:1.162 Fri Feb 14 17:44:00 2014
+++ loncom/interface/lonuserutils.pm Sun Feb 16 15:38:53 2014
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utility functions for managing LON-CAPA user accounts
#
-# $Id: lonuserutils.pm,v 1.162 2014/02/14 17:44:00 bisitz Exp $
+# $Id: lonuserutils.pm,v 1.163 2014/02/16 15:38:53 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1081,14 +1081,13 @@
my ($context) = @_;
my $output =
'<label><input type="checkbox" name="forceid" value="yes" />'
- .&mt('Disable Student/Employee ID Safeguard and force change of conflicting IDs')
- .'</label><br />'."\n"
- .&mt('(only do if you know what you are doing.)')."\n";
+ .&mt('Force change of exising ID')
+ .'</label>'.&Apache::loncommon::help_open_topic('ForceIDChange')."\n";
if ($context eq 'domain') {
- $output .= '<br /><label><input type="checkbox" name="recurseid"'.
- ' value="yes" />'.
- &mt('Update student/employee ID in courses in which user is active/future student,[_1](if forcing change).','<br />').
- '</label>'."\n";
+ $output .=
+ '<br />'
+ .'<label><input type="checkbox" name="recurseid" value="yes" />'
+ .&mt("Update ID in user's course(s).").'</label>'."\n";
}
return $output;
}
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.878 doc/loncapafiles/loncapafiles.lpml:1.879
--- doc/loncapafiles/loncapafiles.lpml:1.878 Mon Jan 20 18:53:33 2014
+++ doc/loncapafiles/loncapafiles.lpml Sun Feb 16 15:39:26 2014
@@ -2,7 +2,7 @@
"http://lpml.sourceforge.net/DTD/lpml.dtd">
<!-- loncapafiles.lpml -->
-<!-- $Id: loncapafiles.lpml,v 1.878 2014/01/20 18:53:33 bisitz Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.879 2014/02/16 15:39:26 raeburn Exp $ -->
<!--
@@ -3420,6 +3420,7 @@
Feedback_Policy.tex;
Finding_Resources.tex;
Foils.tex;
+ForceIDChange.tex;
Formula_Answers.tex;
Formula_Editor.tex;
Formula_Response_Adv_Intro.tex;
Index: loncom/html/adm/help/tex/ForceIDChange.tex
+++ loncom/html/adm/help/tex/ForceIDChange.tex
\label{ForceIDChange}
Although the username is the principal unique identifier for a user in LON-CAPA, the student/employee ID
is a secondary identifier, which needs to be defined (and unique) for certain applications.
The default is not to allow the student/employee ID for an existing user to be changed when
modifying a user's information in course, author or domain context.
This default can be overridden by checking the ``Force change of existing ID'' checkbox. If that is
done the old ID will be replaced with the new ID. (Note: the new ID can not be blank; i.e., once an ID
has been set for a user, it can be changed to a different ID, but not set to be null).
A side effect of updating a student/employee ID is that the database file used for the quick
look-up of uername for a specified student/employee ID will be updated. This can potentially impact
bubblesheet grading, if there is a possibility that student/employee IDs are not unique.
However, there is no requirement to set a student/employee ID for a user, and you will not encounter
issues doing that unless you attempt bubblesheet grading or uploading scores from a csv file
containing IDs and points as column data. If either of those actions are likely to occur in courses
in your domain you should attempt to ensure that student/employee IDs are unique.
Your domain may have been configured to automatically update student/employee IDs from an institutional
data source, and similarly, IDs may be retrieved (and set) automatically when creating a new user, if the
username is for an institutional user, and your domain has been configured to support that.
Individual courses contain their own database files of class rosters, which include a copy of each student's ID. If a student/employee ID is changed by a Domain Coordinator, there is an option to propagate that change to the individual classlist database files for courses in which the student has a role that is currently active, or one that will become active in the future.
More information about the LON-CAPA-cvs
mailing list