[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm
raeburn
raeburn at source.lon-capa.org
Thu Oct 5 22:04:47 EDT 2023
raeburn Fri Oct 6 02:04:47 2023 EDT
Modified files:
/loncom/interface lonmenu.pm
Log:
- Bug 6979.
"View As" form in Functions menu includes domain dropdown list if users in
course are from more than one domain; domain in hidden input tag otherwise
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.539 loncom/interface/lonmenu.pm:1.540
--- loncom/interface/lonmenu.pm:1.539 Mon Oct 2 21:01:21 2023
+++ loncom/interface/lonmenu.pm Fri Oct 6 02:04:47 2023
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.539 2023/10/02 21:01:21 raeburn Exp $
+# $Id: lonmenu.pm,v 1.540 2023/10/06 02:04:47 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1122,7 +1122,7 @@
$change = 'on';
$visibility = 'none';
$leftvis = 'inline';
- if ($defdom eq '') {
+ if ($defdom eq '') {
$defdom = $cdom;
}
}
@@ -2421,7 +2421,13 @@
function validCourseUser(form,change) {
var possuname = form.elements['vuname'].value;
var possuid = form.elements['vid'].value;
- var possudom = form.elements['vudom'].value;
+ var domelem = form.elements['vudom'];
+ var possudom = '';
+ if ((domelem.tagName === 'INPUT') && ((domelem.type === 'text') || (domelem.type === 'hidden'))) {
+ possudom = domelem.value;
+ } else if (domelem.tagName === 'SELECT') {
+ possudom = domelem.options[domelem.selectedIndex].value;
+ }
if ((possuname == '') && (possuid == '')) {
if (change == 'off') {
form.elements['LC_viewas'].value = '';
More information about the LON-CAPA-cvs
mailing list