[LON-CAPA-cvs] cvs: loncom /interface loncourserespicker.pm
raeburn
raeburn at source.lon-capa.org
Fri Nov 22 17:42:27 EST 2024
raeburn Fri Nov 22 22:42:27 2024 EDT
Modified files:
/loncom/interface loncourserespicker.pm
Log:
- Update comments to include information about use for setting shortened
URLs for deep-linking.
Index: loncom/interface/loncourserespicker.pm
diff -u loncom/interface/loncourserespicker.pm:1.16 loncom/interface/loncourserespicker.pm:1.17
--- loncom/interface/loncourserespicker.pm:1.16 Tue Apr 16 15:35:23 2024
+++ loncom/interface/loncourserespicker.pm Fri Nov 22 22:42:27 2024
@@ -1,6 +1,6 @@
# The LearningOnline Network
#
-# $Id: loncourserespicker.pm,v 1.16 2024/04/16 15:35:23 raeburn Exp $
+# $Id: loncourserespicker.pm,v 1.17 2024/11/22 22:42:27 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -37,7 +37,7 @@
resources are to be either:
(a) exported to an IMS Content Package
-(b) subject to access blocking for the duriation of an exam/quiz.
+(b) subject to access blocking for the duration of an exam/quiz.
(c) dumped to an Authoring Space
(d) receive shortened URLs to be used when deep-linking into a course
@@ -63,9 +63,10 @@
There is a submit button, which will be named differently according to the
context in which resource/folder selection is being made.
-The three contexts currently supported are: IMS export, selection of
+The four contexts currently supported are: IMS export, selection of
content to be subject to access restructions for the duration of an
-exam, and selection of items for dumping to an Authoring Space.
+exam, selection of items for dumping to an Authoring Space, and
+display or creation of shortened URLs for deep-linking,
=head1 INTERNAL SUBROUTINES
@@ -132,7 +133,7 @@
- $numcount -- Total numer of folders and resources in course.
- $context -- Context in which resources are being displayed
- (imsexport, examblock or dumpdocs).
+ (imsexport, examblock, dumpdocs or shorturls).
- $formname -- Name of form.
@@ -153,7 +154,7 @@
Inputs: 2.
- $crstype -- Container type: Course or Community
- - $context -- Context: imsexport, examblock or dumpdocs
+ - $context -- Context: imsexport, examblock, dumpdocs, or shorturls
=item &clean()
@@ -172,6 +173,7 @@
(a) storage of lists of maps or resources to be blocked during an exam,
(b) processing selected form element during dumping of selected course
content to Authoring Space.
+(c)
Inputs: 7
@@ -185,7 +187,7 @@
$title_ref - reference to hash containing titles for items in
course
- $context - examblock or dumpdocs
+ $context - examblock, dumpdocs or shorturls
$cdom - course's domain
@@ -518,7 +520,7 @@
}
}
$display .= '</form>';
- my $scripttag =
+ my $scripttag =
&respicker_javascript($startcount,$numcount,$context,$formname,\%children,
\%hierarchy,\@checked_maps,$numhome,$chkname);
if (($context eq 'dumpdocs') || ($context eq 'shorturls')) {
@@ -830,8 +832,10 @@
$outcome .= '</a>';
if ($context eq 'imsexport') {
&Apache::lonnet::logthis('IMS export failed - could not create navmap object in '.lc($crstype).':'.$env{'request.course.id'});
- } else {
+ } elsif ($context eq 'dumpdocs') {
&Apache::lonnet::logthis('Copying to Authoring Space failed - could not create navmap object in '.lc($crstype).':'.$env{'request.course.id'});
+ } elsif ($context eq 'shorturls') {
+ &Apache::lonnet::logthis('Displaying and/or saving URL shortcuts failed - could not create navmap object in '.lc($crstype).':'.$env{'request.course.id'});
}
} elsif ($context eq 'examblock') {
$outcome .= '<href="javascript:window.close();">'.&mt('Close window').'</a>';
More information about the LON-CAPA-cvs
mailing list