--- loncom/interface/lonmenu.pm 2021/01/04 17:27:54 1.369.2.79.2.4
+++ loncom/interface/lonmenu.pm 2020/03/05 21:04:37 1.369.2.80
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.369.2.79.2.4 2021/01/04 17:27:54 raeburn Exp $
+# $Id: lonmenu.pm,v 1.369.2.80 2020/03/05 21:04:37 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1018,9 +1018,9 @@ if ($env{'browser.mobile'}) {
$is_mobile = 1;
}
- unless ($env{'request.noversionuri'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme|viewclasslist|portfolio|ext\.tool)(\?|$)/) {
+ unless ($env{'request.noversionuri'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme|viewclasslist|portfolio)(\?|$)/) {
if ((!$env{'request.enc'}) && ($env{'request.noversionuri'} !~ m{^/adm/wrapper/ext/}) &&
- ($env{'request.noversionuri'} !~ m{^/uploaded/$match_domain/$match_courseid/(docs/|default_\d+\.page$)})) {
+ ($env{'request.noversionuri'} !~ m{^/uploaded/$match_domain/$match_courseida(/docs/|default_\d+\.page$)}) {
$menuitems.=(< 'WARNING!',
- preamble => 'You are trying to end this timed event early.',
- map => 'Confirming that you are done will cause the time to expire and prevent you from changing any answers in the current folder.',
- resource => 'Confirming that you are done will cause the time to expire for this question, and prevent you from changing your answer(s).',
- okdone => 'Click "OK" if you are completely finished.',
- cancel => 'Click "Cancel" to continue working.',
- proctor => 'Ask a proctor to enter the key, then click "OK" if you are completely finished.',
- ok => 'OK',
- exit => 'Cancel',
- key => 'Key:',
- nokey => 'A proctor key is required',
- );
- my $shownsymb = &HTML::Entities::encode(&Apache::lonenc::check_encrypt($env{'request.symb'}));
- my $navmap = Apache::lonnavmaps::navmap->new();
- my ($missing,$tried) = (0,0);
- if (ref($navmap)) {
- my @resources=();
- if ($type eq 'map') {
- my ($mapurl,$rid,$resurl)=&Apache::lonnet::decode_symb($env{'request.symb'});
- if ($env{'request.symb'} =~ /\.page$/) {
- @resources=$navmap->retrieveResources($resurl,sub { $_[0]->is_problem() });
- } else {
- @resources=$navmap->retrieveResources($mapurl,sub { $_[0]->is_problem() });
- }
- } else {
- my $res = $navmap->getBySymb($env{'request.symb'});
- if (ref($res)) {
- if ($res->is_problem()) {
- push(@resources,$res);
- }
- }
- }
- foreach my $res (@resources) {
- if (ref($res->parts()) eq 'ARRAY') {
- foreach my $part (@{$res->parts()}) {
- if (!$res->tries($part)) {
- $missing++;
- } else {
- $tried++;
- }
- }
- }
- }
- }
- if ($missing) {
- $lt{'miss'} .= '
';
- if ($type eq 'map') {
- $lt{'miss'} .= &mt('Submissions are missing for [quant,_1,question part,question parts] in this folder.',$missing);
- } else {
- $lt{'miss'} .= &mt('Submissions are missing for [quant,_1,part] in this question.',$missing);
- }
- if ($missing > 1) {
- $lt{'miss'} .= ' '.&mt('If you confirm you are done you will be unable to submit answers for them.').'';
- } else {
- $lt{'miss'} .= ' '.&mt('If you confirm you are done you will be unable to submit an answer for it.').'