version 1.15, 2018/01/12 13:33:38
|
version 1.18, 2024/11/24 04:17:50
|
Line 37 loncourserespicker provides an interface
|
Line 37 loncourserespicker provides an interface
|
resources are to be either: |
resources are to be either: |
|
|
(a) exported to an IMS Content Package |
(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 |
(c) dumped to an Authoring Space |
(d) receive shortened URLs to be used when deep-linking into a course |
(d) receive shortened URLs to be used when deep-linking into a course |
|
|
Line 63 a higher level to become unchecked.
|
Line 63 a higher level to become unchecked.
|
There is a submit button, which will be named differently according to the |
There is a submit button, which will be named differently according to the |
context in which resource/folder selection is being made. |
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 |
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 |
=head1 INTERNAL SUBROUTINES |
|
|
Line 132 Inputs: 7.
|
Line 133 Inputs: 7.
|
- $numcount -- Total numer of folders and resources in course. |
- $numcount -- Total numer of folders and resources in course. |
|
|
- $context -- Context in which resources are being displayed |
- $context -- Context in which resources are being displayed |
(imsexport, examblock or dumpdocs). |
(imsexport, examblock, dumpdocs or shorturls). |
|
|
- $formname -- Name of form. |
- $formname -- Name of form. |
|
|
Line 153 no object instantiated.
|
Line 154 no object instantiated.
|
Inputs: 2. |
Inputs: 2. |
- $crstype -- Container type: Course or Community |
- $crstype -- Container type: Course or Community |
|
|
- $context -- Context: imsexport, examblock or dumpdocs |
- $context -- Context: imsexport, examblock, dumpdocs, or shorturls |
|
|
|
|
=item &clean() |
=item &clean() |
Line 170 a course, where keys are numbers (starti
|
Line 171 a course, where keys are numbers (starti
|
map url, or symb, for an iteration through the course, as seen by |
map url, or symb, for an iteration through the course, as seen by |
a Course Coordinator. Used to generate numerical IDs to facilitate |
a Course Coordinator. Used to generate numerical IDs to facilitate |
(a) storage of lists of maps or resources to be blocked during an exam, |
(a) storage of lists of maps or resources to be blocked during an exam, |
(b) processing selected form element during dumping of selected course |
(b) processing selected form elements during dumping of selected course |
content to Authoring Space. |
content to Authoring Space. |
|
(c) processing of checked checkboxes for creation of shortened URLs for |
|
deep-linking to course content. |
|
|
Inputs: 7 |
Inputs: 7 |
|
|
Line 185 Inputs: 7
|
Line 188 Inputs: 7
|
$title_ref - reference to hash containing titles for items in |
$title_ref - reference to hash containing titles for items in |
course |
course |
|
|
$context - examblock or dumpdocs |
$context - examblock, dumpdocs or shorturls |
|
|
$cdom - course's domain |
$cdom - course's domain |
|
|
$cnum - courseID |
$cnum - courseID |
|
|
Outputs: None |
Outputs: None |
|
|
Line 218 sub create_picker {
|
Line 221 sub create_picker {
|
my ($navmap,$context,$formname,$crstype,$blockedmaps,$blockedresources,$block,$preamble, |
my ($navmap,$context,$formname,$crstype,$blockedmaps,$blockedresources,$block,$preamble, |
$numhome,$uploadedfiles,$tiny,$readonly) = @_; |
$numhome,$uploadedfiles,$tiny,$readonly) = @_; |
return unless (ref($navmap)); |
return unless (ref($navmap)); |
my ($it,$output,$numdisc,%maps,%resources,%discussiontime,%currmaps,%currresources,%files, |
my ($it,$output,$numdisc,%discussiontime,%currmaps,%currresources,%files, |
%shorturls,$chkname); |
%shorturls,$chkname); |
$chkname = 'archive'; |
$chkname = 'archive'; |
if ($context eq 'shorturls') { |
if ($context eq 'shorturls') { |
Line 518 sub create_picker {
|
Line 521 sub create_picker {
|
} |
} |
} |
} |
$display .= '</form>'; |
$display .= '</form>'; |
my $scripttag = |
my $scripttag = |
&respicker_javascript($startcount,$numcount,$context,$formname,\%children, |
&respicker_javascript($startcount,$numcount,$context,$formname,\%children, |
\%hierarchy,\@checked_maps,$numhome,$chkname); |
\%hierarchy,\@checked_maps,$numhome,$chkname); |
if (($context eq 'dumpdocs') || ($context eq 'shorturls')) { |
if (($context eq 'dumpdocs') || ($context eq 'shorturls')) { |
Line 830 sub get_navmap_object {
|
Line 833 sub get_navmap_object {
|
$outcome .= '</a>'; |
$outcome .= '</a>'; |
if ($context eq 'imsexport') { |
if ($context eq 'imsexport') { |
&Apache::lonnet::logthis('IMS export failed - could not create navmap object in '.lc($crstype).':'.$env{'request.course.id'}); |
&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'}); |
&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') { |
} elsif ($context eq 'examblock') { |
$outcome .= '<href="javascript:window.close();">'.&mt('Close window').'</a>'; |
$outcome .= '<href="javascript:window.close();">'.&mt('Close window').'</a>'; |