[LON-CAPA-cvs] cvs: loncom /interface loncoursequeueadmin.pm loncreatecourse.pm
raeburn
raeburn at source.lon-capa.org
Tue Apr 28 14:28:05 EDT 2026
raeburn Tue Apr 28 18:28:05 2026 EDT
Modified files:
/loncom/interface loncreatecourse.pm loncoursequeueadmin.pm
Log:
- WCAG 2 compliance
Include landmark for page's main content to support "Skip to main content"
Replace use of <table> for layout with <div>.
Include labels for form elements.
Sequential headings.
-------------- next part --------------
Index: loncom/interface/loncreatecourse.pm
diff -u loncom/interface/loncreatecourse.pm:1.181 loncom/interface/loncreatecourse.pm:1.182
--- loncom/interface/loncreatecourse.pm:1.181 Tue Apr 28 14:30:18 2026
+++ loncom/interface/loncreatecourse.pm Tue Apr 28 18:28:05 2026
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Create a course
#
-# $Id: loncreatecourse.pm,v 1.181 2026/04/28 14:30:18 raeburn Exp $
+# $Id: loncreatecourse.pm,v 1.182 2026/04/28 18:28:05 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -716,6 +716,7 @@
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Creation Outcome','Create_Course',undef,'Create_Courses');
$r->print($start_page.$crumbs);
+ $r->print("\n".'<div class="LC_landmark" role="main" id="LC_main_content">'."\n");
my $args = {
crstype => $crstype,
@@ -844,7 +845,7 @@
$r->print('<p>'.&mt('Roles will be active at next login').'.</p>');
}
$r->print('<p><a href="/adm/createcourse?phase='.lc($crstype).'one">'.
- &mt("Create Another $crstype").'</a></p>'.
+ &mt("Create Another $crstype").'</a></p></div>'.
&Apache::loncommon::end_page());
}
@@ -959,14 +960,15 @@
my $end_page =
&Apache::loncommon::end_page();
$r->print($start_page.$crumbs);
+ $r->print("\n".'<div class="LC_landmark" role="main" id="LC_main_content">'."\n");
$r->print('<h2 class="LC_heading_2">'.&mt('Upload a courses, communities or placement tests attributes file').'</h2>');
$r->print('<form name="batchcreate" method="post" '.
'enctype="multipart/form-data" action="/adm/createcourse">'.
- '<input type="file" name="coursecreatorxml" />'.
+ '<input type="file" name="coursecreatorxml" aria-label="'.&mt('Upload attributes file').'" />'.
'<input type="hidden" name="phase" value="batchtwo" /><br /><br />'.
'<input type="submit" name="batchsubmit" '.
'value="'.&mt('Create Courses/Communities/Placement Tests').'" /></form>');
- $r->print($end_page);
+ $r->print('</div>'.$end_page);
return;
}
@@ -1033,6 +1035,7 @@
}
$r->print(&Apache::loncommon::start_page('Create a New Course, Community or Placement Test').
&Apache::lonhtmlcommon::breadcrumbs('Creation Outcome','Create_Course',undef,'Create_Courses').
+ "\n".'<div class="LC_landmark" role="main" id="LC_main_content">'."\n".
$logmsg.$clonemsg.$result.'<br /><a href="/adm/createcourse">'.
&mt('Creation options menu').'</a>'.
&Apache::loncommon::end_page());
@@ -1093,7 +1096,7 @@
my $showntablehdr = 0;
my $tablehdr = &Apache::loncommon::start_data_table().
&Apache::loncommon::start_data_table_header_row().
- '<th> </th><th>'.&mt('Creation Date').'</th>'.
+ '<th>#</th><th>'.&mt('Creation Date').'</th>'.
'<th>'.&mt('Creator').'</th><th>'.&mt('Description').'</th>'.
'<th>'.&mt('Owner(s)').'</th>';
if (($curr{'type'} eq 'official') || ($curr{'type'} eq 'any')) {
@@ -1247,14 +1250,15 @@
if ($showntablehdr) {
$r->print(&Apache::loncommon::end_data_table().'<br />');
if (($curr{'page'} > 1) || ($more_records)) {
- $r->print('<table><tr>');
if ($curr{'page'} > 1) {
- $r->print('<td><a href="javascript:chgPage('."'previous'".');">'.&mt('Previous [_1] changes',$curr{'show'}).'</a></td>');
+ $r->print('<div class="LC_floatleft">'.
+ '<a href="javascript:chgPage('."'previous'".');">'.&mt('Previous [_1] changes',$curr{'show'}).'</a></div>');
}
if ($more_records) {
- $r->print('<td><a href="javascript:chgPage('."'next'".');">'.&mt('Next [_1] changes',$curr{'show'}).'</a></td>');
+ $r->print('<div class="LC_floatleft">'.
+ '<a href="javascript:chgPage('."'next'".');">'.&mt('Next [_1] changes',$curr{'show'}).'</a></div>');
}
- $r->print('</tr></table>');
+ $r->print('<div style="padding:0;clear:both;margin:0;border:0"></div>');
$r->print(<<"ENDSCRIPT");
<script type="text/javascript">
// <![CDATA[
@@ -1286,11 +1290,12 @@
my ($formname,$curr) = @_;
my $nolink = 1;
my ($contexts,$contextnames) = &context_names();
- my $output = '<table><tr><td valign="top">'.
- '<span class="LC_nobreak"><b>'.&mt('Records/page:').'</b></span><br />'.
- &Apache::lonmeta::selectbox('show',$curr->{'show'},'','',undef,
- (&mt('all'),5,10,20,50,100,1000,10000)).
- '</td><td> </td>';
+ my $output = '<div class="LC_left_float" style="padding: 0; vertical-align: top">'.
+ '<span class="LC_nobreak"><b><label for="show">'.
+ &mt('Records/page:').'</label></b></span><br />'.
+ &Apache::lonmeta::selectbox('show',$curr->{'show'},'','show',undef,
+ (&mt('all'),5,10,20,50,100,1000,10000)).
+ '</div>';
my $startform =
&Apache::lonhtmlcommon::date_setter($formname,'created_after_date',
$curr->{'created_after_date'},undef,
@@ -1299,18 +1304,26 @@
&Apache::lonhtmlcommon::date_setter($formname,'created_before_date',
$curr->{'created_before_date'},undef,
undef,undef,undef,undef,undef,undef,$nolink);
- $output .= '<td valign="top"><b>'.&mt('Window during which course/community was created:').'</b><br />'.
- '<table><tr><td>'.&mt('After:').
- '</td><td>'.$startform.'</td></tr>'.
- '<tr><td>'.&mt('Before:').'</td>'.
- '<td>'.$endform.'</td></tr></table>'.
- '</td>'.
- '<td> </td>';
+ $output .= '<div class="LC_left_float" style="padding: 0 2px 0 0; vertical-align: top">'.
+ '<b>'.&mt('Window during which course/community was created').':</b><br />'.
+ '<div style="padding-top: 0; margin-top:0; vertical-align: top" role="grid" class="LC_grid">'.
+ '<div role="row" class="LC_grid_row">'.
+ '<div role="gridcell" class="LC_grid_cell">'.
+ &mt('After:').'</div>'.
+ '<div role="gridcell" class="LC_grid_cell">'.$startform.'</div>'.
+ '</div>'.
+ '<div role="row" class="LC_grid_row">'.
+ '<div role="gridcell" class="LC_grid_cell">'.
+ &mt('Before:').'</div>'.
+ '<div role="gridcell" class="LC_grid_cell">'.$endform.'</div>'.
+ '</div></div></div>';
my ($types,$typenames) = &Apache::loncommon::course_types();
if (ref($types) eq 'ARRAY') {
if (@{$types} > 1) {
- $output .= '<td valign="top"><b>'.
- &mt('Course Type:').'</b><br /><select name="type">';
+ $output .=
+ '<div class="LC_left_float" style="padding: 0 2px 0 0; vertical-align: top">'.
+ '<b><label for="type">'.&mt('Course Type').'</label>:</b><br />'.
+ '<select name="type" id="type">';
my $selstr = '';
if ($curr->{'type'} eq 'any') {
$selstr = ' selected="selected"';
@@ -1329,12 +1342,13 @@
}
$output .= '<option value="'.$type.'"'.$selstr.'>'.&mt($typename).'</option>'."\n";
}
- $output .= '</select></td>';
+ $output .= '</select></div>';
}
}
- $output .= '<td> </td>'.
- '<td valign="top"><b>'.
- &mt('Creation Context:').'</b><br /><select name="context">';
+ $output .=
+ '<div class="LC_left_float" style="padding: 0; vertical-align: top">'.
+ '<b><label for="context">'.&mt('Creation Context').'</label>:</b><br />'.
+ '<select name="context" id="context">';
foreach my $context ('any',@{$contexts}) {
my $selstr = '';
if ($curr->{'context'} eq $context) {
@@ -1348,8 +1362,8 @@
}
$output .= '</option>'."\n";
}
- $output .= '</select></td>'.
- '</tr></table>';
+ $output .= '</select></div>'.
+ '<div style="padding:0;clear:both;margin:0;border:0"></div>';
# Update Display button
$output .= '<p>'.
@@ -1568,7 +1582,7 @@
unless ($permission->{'create'}) {
$context = 'helpdesk';
}
- $r->print($start_page.$crumbs."\n".'<div>'.
+ $r->print($start_page.$crumbs."\n".'<div role="main" id="LC_main_content">'.
&Apache::loncoursequeueadmin::display_queued_requests(
$context,$env{'request.role.domain'}).'</div>'.
&Apache::loncommon::end_page());
@@ -1591,7 +1605,7 @@
faq=>9,bug=>'Dom Coord Interface',},);
my $start_page=&Apache::loncommon::start_page('Update Requests Result');
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Requests Updated','Course_Requests',undef,'Course_Requests');
- $r->print($start_page.$crumbs."\n".'<div>'.
+ $r->print($start_page.$crumbs."\n".'<div role="main" id="LC_main_content">'.
&Apache::loncoursequeueadmin::update_request_queue(
'domain',$env{'request.role.domain'}).'</div>'.
&Apache::loncommon::end_page());
@@ -1607,7 +1621,7 @@
unless ($permission->{'create'}) {
$context = 'displaypending';
}
- $r->print($start_page.$crumbs."\n".'<div>'.
+ $r->print($start_page.$crumbs."\n".'<div role="main" id="LC_main_content">'.
&Apache::loncoursequeueadmin::display_queued_requests(
$context,$env{'request.role.domain'}).'</div>'.
&Apache::loncommon::end_page());
@@ -1621,7 +1635,7 @@
text=>&mt('Validation Attempted'),},);
my $start_page=&Apache::loncommon::start_page('Requests Validation Result',$js);
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Validation Attempted','Course_Requests',undef,'Course_Requests');
- $r->print($start_page.$crumbs."\n".'<div>'.
+ $r->print($start_page.$crumbs."\n".'<div role="main" id="LC_main_content">'.
&Apache::loncoursequeueadmin::process_official_reqs('domain',$env{'request.role.domain'},
$env{'user.name'},$env{'user.domain'}).
'</div>'.
@@ -1637,7 +1651,7 @@
'</script>';
my $start_page=&Apache::loncommon::start_page('Course/Community Creation Logs',$js);
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Created Courses/Communities','Course_Creation_Log',undef,'Course_Creation_Log');
- $r->print($start_page.$crumbs."\n".'<div>');
+ $r->print($start_page.$crumbs."\n".'<div role="main" id="LC_main_content">');
&print_creation_logs($r);
$r->print('</div>'.&Apache::loncommon::end_page());
} else {
Index: loncom/interface/loncoursequeueadmin.pm
diff -u loncom/interface/loncoursequeueadmin.pm:1.71 loncom/interface/loncoursequeueadmin.pm:1.72
--- loncom/interface/loncoursequeueadmin.pm:1.71 Tue Dec 23 01:23:42 2025
+++ loncom/interface/loncoursequeueadmin.pm Tue Apr 28 18:28:05 2026
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Utilities to administer domain course requests and course self-enroll requests
#
-# $Id: loncoursequeueadmin.pm,v 1.71 2025/12/23 01:23:42 raeburn Exp $
+# $Id: loncoursequeueadmin.pm,v 1.72 2026/04/28 18:28:05 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -539,33 +539,33 @@
'<input type="hidden" name="action" value="'.$env{'form.action'}.'" />'."\n".
$nextelement."\n";
if ($context eq 'course') {
- $output .= '<h3>'.&mt('Self-enrollment requests queued pending approval by a Coordinator').'</h3>';
+ $output .= '<h2 class="LC_heading_2">'.&mt('Self-enrollment requests queued pending approval by a Coordinator').'</h2>';
} elsif (($context eq 'pending') || ($context eq 'displaypending')) {
- $output .= '<h3>'.&mt('Requests for official courses queued pending validation').'</h3>'.
+ $output .= '<h2 class="LC_heading_2">'.&mt('Requests for official courses queued pending validation').'</h2>'.
'<p>'.&mt('Requests are validated against institutional data to confirm that the requestor is an instructor of record.').'<br />'.
&mt('Validation is attempted when the request is submitted.').' '.
&mt('If unvalidated, the request will be held in a queue.').' '.
&mt('Validation of pending requests is automatically repeated daily.').'</p>';
} elsif ($context eq 'requestauthor') {
- $output .= '<h3>'.&mt('Requests for Authoring Space queued pending approval by a Domain Coordinator').'</h3>';
+ $output .= '<h2 class="LC_heading_2">'.&mt('Requests for Authoring Space queued pending approval by a Domain Coordinator').'</h2>';
} elsif ($context eq 'requestusername') {
- $output .= '<h3>'.&mt('Requests for LON-CAPA accounts queued pending approval by a Domain Coordinator').'</h3>';
+ $output .= '<h2 class="LC_heading_2">'.&mt('Requests for LON-CAPA accounts queued pending approval by a Domain Coordinator').'</h2>';
} elsif ($context eq 'othdomqueue') {
if ($secondary eq 'domain') {
- $output .= '<h3>'.&mt('Domain role assignments for users from another domain which were/are queued for approval').'</h3>';
+ $output .= '<h2 class="LC_heading_2">'.&mt('Domain role assignments for users from another domain which were/are queued for approval').'</h2>';
} elsif ($secondary eq 'author') {
- $output .= '<h3>'.&mt('Co-author role assignments for users from another domain which were/are queued for approval').'</h3>';
+ $output .= '<h2 class="LC_heading_2">'.&mt('Co-author role assignments for users from another domain which were/are queued for approval').'</h2>';
} elsif ($secondary eq 'course') {
- $output .= '<h3>'.&mt('Course role assignments for users from another domain which were/are queued for approval').'</h3>';
+ $output .= '<h2 class="LC_heading_2">'.&mt('Course role assignments for users from another domain which were/are queued for approval').'</h2>';
} elsif ($secondary eq 'community') {
- $output .= '<h3>'.&mt('Community role assignments for users from another domain which were/are queued for approval').'</h3>';
+ $output .= '<h2 class="LC_heading_2">'.&mt('Community role assignments for users from another domain which were/are queued for approval').'</h2>';
}
} elsif ($context eq 'othdomaction') {
unless ($secondary eq 'user') {
- $output .= '<h3>'.&mt('Role assignments in other domains, queued pending domain coordinator approval in this domain.').'</h3>';
+ $output .= '<h2 class="LC_heading_2">'.&mt('Role assignments in other domains, queued pending domain coordinator approval in this domain.').'</h2>';
}
} else {
- $output .= '<h3>'.&mt('Course/Community requests queued pending approval by a Domain Coordinator').'</h3>';
+ $output .= '<h2 class="LC_heading_2">'.&mt('Course/Community requests queued pending approval by a Domain Coordinator').'</h2>';
}
if ($context eq 'othdomqueue') {
$output .= &queued_role_display($secondary,\%queue_by_date,\%reqstatus);
More information about the LON-CAPA-cvs
mailing list