[LON-CAPA-cvs] cvs: loncom /html/adm/help/tex Docs_Adding_External_Resource.tex Docs_Adding_External_Tool.tex /interface londocs.pm lonextresedit.pm
raeburn
raeburn at source.lon-capa.org
Tue May 29 15:33:57 EDT 2018
raeburn Tue May 29 19:33:57 2018 EDT
Modified files:
/loncom/interface londocs.pm lonextresedit.pm
/loncom/html/adm/help/tex Docs_Adding_External_Tool.tex
Docs_Adding_External_Resource.tex
Log:
- Bug 6754 LON-CAPA as LTI Consumer
- Move External Resource and External Tool (if one or more LTI Tools
available in domain) to separate External "tab" in Course Editor menu.
- Update documentation for adding External Resource and External Tool.
-------------- next part --------------
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.654 loncom/interface/londocs.pm:1.655
--- loncom/interface/londocs.pm:1.654 Tue Apr 24 11:17:58 2018
+++ loncom/interface/londocs.pm Tue May 29 19:33:48 2018
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.654 2018/04/24 11:17:58 raeburn Exp $
+# $Id: londocs.pm,v 1.655 2018/05/29 19:33:48 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1909,7 +1909,7 @@
cnum => $coursenum,
);
if ($prefix eq 'ext.tool') {
- if ($prefixchg{$suffix} eq 'docstosupp') {
+ if ($prefixchg{$suffix} eq 'docstosupp') {
$info{'delgradable'} = 1;
}
}
@@ -2005,7 +2005,7 @@
$coursedom,$coursenum,$template,$newidx,"$folder.$container");
}
} elsif ($url =~ /ext\.tool$/) {
- if (($newidx) && ($folder=~/^default/)) {
+ if (($newidx) && ($folder=~/^default/)) {
my $marker = (split(m{/},$url))[4];
my %toolsettings = &Apache::lonnet::dump('exttool_'.$marker,$coursedom,$coursenum);
my $val = 'no';
@@ -2558,7 +2558,7 @@
my $rem = $3;
my ($is_exttool,$exttoolchg);
if ($rem =~ m{\d+/ext\.tool$}) {
- $is_exttool = 1;
+ $is_exttool = 1;
}
if (($srcdom ne $cdom) || ($srcnum ne $cnum)) {
$rewrites->{$oldurl}{$id} = $ressrc;
@@ -5723,7 +5723,7 @@
my $tid = 1;
my @tabids;
if ($supplementalflag) {
- @tabids = ('002','ee2','ff2');
+ @tabids = ('002','dd2','ee2','ff2');
$tid = 2;
} else {
@tabids = ('aa1','bb1','cc1','ff1');
@@ -6178,7 +6178,7 @@
my $newnavform=(<<NNFORM);
<form action="/adm/coursedocs" method="post" name="newnav">
- <input type="hidden" name="active" value="ee" />
+ <input type="hidden" name="active" value="ff" />
$pathitem
<input type="hidden" name="importdetail"
value="$lt{'navc'}=/adm/navmaps" />
@@ -6188,7 +6188,7 @@
NNFORM
my $newsmppageform=(<<NSPFORM);
<form action="/adm/coursedocs" method="post" name="newsmppg">
- <input type="hidden" name="active" value="ee" />
+ <input type="hidden" name="active" value="ff" />
$pathitem
<input type="hidden" name="importdetail" value="" />
<a class="LC_menubuttons_link" href="javascript:makesmppage();"> $lt{'sipa'}</a>
@@ -6198,7 +6198,7 @@
my $newsmpproblemform=(<<NSPROBFORM);
<form action="/adm/coursedocs" method="post" name="newsmpproblem">
- <input type="hidden" name="active" value="cc" />
+ <input type="hidden" name="active" value="dd" />
$pathitem
<input type="hidden" name="importdetail" value="" />
<a class="LC_menubuttons_link" href="javascript:makesmpproblem();">$lt{'sipr'}</a>
@@ -6209,7 +6209,7 @@
my $newdropboxform=(<<NDBFORM);
<form action="/adm/coursedocs" method="post" name="newdropbox">
- <input type="hidden" name="active" value="cc" />
+ <input type="hidden" name="active" value="dd" />
$pathitem
<input type="hidden" name="importdetail" value="" />
<a class="LC_menubuttons_link" href="javascript:makedropbox();">$lt{'drbx'}</a>
@@ -6219,7 +6219,7 @@
my $newexuploadform=(<<NEXUFORM);
<form action="/adm/coursedocs" method="post" name="newexamupload">
- <input type="hidden" name="active" value="cc" />
+ <input type="hidden" name="active" value="dd" />
$pathitem
<input type="hidden" name="importdetail" value="" />
<a class="LC_menubuttons_link" href="javascript:makeexamupload();">$lt{'scuf'}</a>
@@ -6229,7 +6229,7 @@
my $newbulform=(<<NBFORM);
<form action="/adm/coursedocs" method="post" name="newbul">
- <input type="hidden" name="active" value="dd" />
+ <input type="hidden" name="active" value="ee" />
$pathitem
<input type="hidden" name="importdetail" value="" />
<a class="LC_menubuttons_link" href="javascript:makebulboard();" >$lt{'bull'}</a>
@@ -6239,7 +6239,7 @@
my $newaboutmeform=(<<NAMFORM);
<form action="/adm/coursedocs" method="post" name="newaboutme">
- <input type="hidden" name="active" value="dd" />
+ <input type="hidden" name="active" value="ee" />
$pathitem
<input type="hidden" name="importdetail"
value="$plainname=/adm/$udom/$uname/aboutme" />
@@ -6250,7 +6250,7 @@
my $newaboutsomeoneform=(<<NASOFORM);
<form action="/adm/coursedocs" method="post" name="newaboutsomeone">
- <input type="hidden" name="active" value="dd" />
+ <input type="hidden" name="active" value="ee" />
$pathitem
<input type="hidden" name="importdetail" value="" />
<a class="LC_menubuttons_link" href="javascript:makeabout();">$lt{'abou'}</a>
@@ -6259,7 +6259,7 @@
my $newrosterform=(<<NROSTFORM);
<form action="/adm/coursedocs" method="post" name="newroster">
- <input type="hidden" name="active" value="dd" />
+ <input type="hidden" name="active" value="ee" />
$pathitem
<input type="hidden" name="importdetail"
value="$lt{'rost'}=/adm/viewclasslist" />
@@ -6280,7 +6280,7 @@
}
my $newwebpageform =(<<NWEBFORM);
<form action="/adm/coursedocs" method="post" name="newwebpage">
- <input type="hidden" name="active" value="ee" />
+ <input type="hidden" name="active" value="ff" />
$pathitem
<input type="hidden" name="importdetail" value="$newwebpage" />
<a class="LC_menubuttons_link" href="javascript:makewebpage();">$lt{'webp'}</a>
@@ -6463,7 +6463,7 @@
<form action="/adm/coursedocs" method="post" name="courseresform">
<fieldset id="crsresform" style="display:none;">
<legend>$lt{'stpr'}</legend>
- <input type="hidden" name="active" value="ee" />
+ <input type="hidden" name="active" value="bb" />
<p>
$pickdir
<span class="LC_nobreak">$lt{'news'}?
@@ -6551,7 +6551,7 @@
my $newgroupfileform=(<<NGFFORM);
<form action="/adm/coursedocs" method="post" name="newgroupfiles">
- <input type="hidden" name="active" value="dd" />
+ <input type="hidden" name="active" value="ee" />
$pathitem
<input type="hidden" name="importdetail"
value="$lt{'grpo'}=/adm/$coursedom/$coursenum/aboutme" />
@@ -6568,15 +6568,17 @@
);
$specialdocumentsform = &create_form_ul(&create_list_elements(@specialdocumentsforma));
-
- my @importdoc = (
- {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/extres.png" alt="'.$lt{extr}.'" onclick="toggleUpload(\'ext\');" />'=>$extresourcesform}
+ my @external = (
+ {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/extres.png" alt="'.$lt{extr}.'" onclick="toggleExternal(\'ext\');" />'=>$extresourcesform}
);
if (keys(%ltitools)) {
- push(@importdoc,
- {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/exttool.png" alt="'.$lt{extt}.'" onclick="toggleUpload(\'tool\');" />'=>$exttoolform},
- );
+ push(@external,
+ {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/exttool.png" alt="'.$lt{extt}.'" onclick="toggleExternal(\'tool\');" />'=>$exttoolform},
+ );
}
+ my $externalform = &create_form_ul(&create_list_elements(@external));
+
+ my @importdoc = ();
unless ($container eq 'page') {
push(@importdoc,
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/ims.png" alt="'.$lt{imsf}.'" onclick="javascript:toggleUpload(\'ims\');" />'=>$imspform}
@@ -6607,12 +6609,13 @@
my %orderhash = (
'aa' => ['Upload',$fileuploadform],
'bb' => ['Import',$importpubform],
- 'cc' => ['Grading',$gradingform],
+ 'cc' => ['External',$externalform],
+ 'dd' => ['Grading',$gradingform],
);
unless ($container eq 'page') {
$orderhash{'00'} = ['Newfolder',$newfolderform];
- $orderhash{'dd'} = ['Collaboration',$communityform];
- $orderhash{'ee'} = ['Other',$specialdocumentsform];
+ $orderhash{'ee'} = ['Collaboration',$communityform];
+ $orderhash{'ff'} = ['Other',$specialdocumentsform];
}
$hadchanges=0;
@@ -6748,15 +6751,15 @@
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/webpage.png" alt="'.$lt{webp}.'" onclick="javascript:makewebpage('."'supp'".');" />'=>$supwebpageform},
);
-my @supimportdoc = (
- {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/extres.png" alt="'.$lt{extr}.'" onclick="javascript:toggleUpload(\'suppext\')" />'
- =>$supextform});
+ my @supexternal = (
+ {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/extres.png" alt="'.$lt{extr}.'" onclick="javascript:toggleExternal(\'suppext\')" />'
+ =>$supextform});
if (keys(%ltitools)) {
- push(@supimportdoc,
- {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/exttool.png" alt="'.$lt{extt}.'" onclick="javascript:toggleUpload(\'supptool\')" />'
+ push(@supexternal,
+ {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/exttool.png" alt="'.$lt{extt}.'" onclick="javascript:toggleExternal(\'supptool\')" />'
=>$supexttoolform});
}
- push(@supimportdoc,
+ my @supimportdoc = (
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/pdfupload.png" alt="'.$lt{upl}.'" onclick="javascript:toggleUpload(\'suppdoc\');" />'
=>$supupdocform},
);
@@ -6764,7 +6767,8 @@
$supupdocform = &create_form_ul(&create_list_elements(@supimportdoc));
my %suporderhash = (
'00' => ['Supnewfolder', $supnewfolderform],
- 'ee' => ['Upload',$supupdocform],
+ 'dd' => ['Upload',$supupdocform],
+ 'ee' => ['External',&create_form_ul(&create_list_elements(@supexternal))],
'ff' => ['Other',&create_form_ul(&create_list_elements(@specialdocs))]
);
if ($supplementalflag) {
@@ -7294,20 +7298,22 @@
$backtourl = '/adm/navmaps';
}
- my $fieldsets = "'ext','doc'";
- if ($posslti) {
- $fieldsets .= ",'tool'";
- }
+ my $fieldsets = "'doc'";
unless ($main_container_page) {
$fieldsets .=",'ims'";
}
+ my $extfieldsets = "'ext'";
+ if ($posslti) {
+ $extfieldsets .= ",'tool'";
+ }
if ($supplementalflag) {
- $fieldsets = "'suppext','suppdoc'";
+ $fieldsets = "'suppdoc'";
+ $extfieldsets = "'suppext'";
if ($posslti) {
- $fieldsets .= ",'supptool'";
+ $extfieldsets .= ",'supptool'";
}
}
-
+
my $jsmakefunctions;
if ($canedit) {
$jsmakefunctions = <<ENDNEWSCRIPT;
@@ -7528,16 +7534,32 @@
}
}
document.getElementById('upload'+blocks[i]+'form').style.display=disp;
+ }
+ resize_scrollbox('contentscroll','1','1');
+ return;
+}
+
+function toggleExternal(caller) {
+ var blocks = Array($extfieldsets);
+ for (var i=0; i<blocks.length; i++) {
+ var disp = 'none';
+ if (caller == blocks[i]) {
+ var curr = document.getElementById('external'+caller+'form').style.display;
+ if (curr == 'none') {
+ disp='block';
+ }
+ }
+ document.getElementById('external'+blocks[i]+'form').style.display=disp;
if ((caller == 'tool') || (caller == 'supptool')) {
if (disp == 'block') {
- if (document.getElementById('LC_exttoolid')) {
- var toolselector = document.getElementById('LC_exttoolid');
+ if (document.getElementById('LC_exttoolid')) {
+ var toolselector = document.getElementById('LC_exttoolid');
var suppflag = 0;
if (caller == 'supptool') {
suppflag = 1;
}
currForm = document.getElementById('new'+caller);
- updateExttool(toolselector,currForm,suppflag);
+ updateExttool(toolselector,currForm,suppflag);
}
}
}
Index: loncom/interface/lonextresedit.pm
diff -u loncom/interface/lonextresedit.pm:1.24 loncom/interface/lonextresedit.pm:1.25
--- loncom/interface/lonextresedit.pm:1.24 Wed Jan 31 14:51:05 2018
+++ loncom/interface/lonextresedit.pm Tue May 29 19:33:48 2018
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: lonextresedit.pm,v 1.24 2018/01/31 14:51:05 raeburn Exp $
+# $Id: lonextresedit.pm,v 1.25 2018/05/29 19:33:48 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -386,7 +386,7 @@
$appendstyle,$gradablestyle,$legend,$urlelem,$toolelem,%toolattr);
$formname = 'new'.$type;
$toggle = $type;
- $fieldsetid = 'upload'.$type.'form';
+ $fieldsetid = 'external'.$type.'form';
$urlid = $type.'url';
map { $toolattr{$_} = $type.$_; } ('dispdiv','dimendiv','dimenwidth','dimenheight',
'crstitlediv','crslabeldiv','crsappenddiv',
@@ -405,7 +405,7 @@
if ($supplementalflag) {
$formname = 'newsupp'.$type;
$toggle = 'supp'.$type;
- $fieldsetid = 'uploadsupp'.$type.'form';
+ $fieldsetid = 'externalsupp'.$type.'form';
$urlid = 'supp'.$type.'url';
map { $toolattr{$_} = 'supp'.$toolattr{$_}; } (keys(%toolattr));
}
@@ -443,7 +443,7 @@
$active = '<input type="hidden" name="active" value="'.$tabid.'" />';
}
$formname = 'edit'.$type.'_'.$residx;
- $fieldsetid = 'upload'.$type.$residx;
+ $fieldsetid = 'external'.$type.$residx;
$urlid = $type.'url_'.$residx;
map { $toolattr{$_} .= '_'.$residx; } (keys(%toolattr));
$srcclass = ' class="LC_nobreak"';
Index: loncom/html/adm/help/tex/Docs_Adding_External_Tool.tex
diff -u loncom/html/adm/help/tex/Docs_Adding_External_Tool.tex:1.1 loncom/html/adm/help/tex/Docs_Adding_External_Tool.tex:1.2
--- loncom/html/adm/help/tex/Docs_Adding_External_Tool.tex:1.1 Wed May 10 00:03:15 2017
+++ loncom/html/adm/help/tex/Docs_Adding_External_Tool.tex Tue May 29 19:33:57 2018
@@ -39,6 +39,13 @@
\item Course label -- e.g., institutional course code (sent on launch of tool)
\item Course title -- Course Title
+\item Append to URL -- you can specify text to append to the default URL
+(shown) which will be requested on launch.
+
+\item Gradable -- if a tool is used in Main Content, you can choose whether
+to accept scores passed back by the tool, if the domain configuration
+specified availability of a passback service.
+
\item Title -- title to use for tool instance on the Course Contents page.
\end{itemize}
Index: loncom/html/adm/help/tex/Docs_Adding_External_Resource.tex
diff -u loncom/html/adm/help/tex/Docs_Adding_External_Resource.tex:1.9 loncom/html/adm/help/tex/Docs_Adding_External_Resource.tex:1.10
--- loncom/html/adm/help/tex/Docs_Adding_External_Resource.tex:1.9 Mon Aug 5 01:10:04 2013
+++ loncom/html/adm/help/tex/Docs_Adding_External_Resource.tex Tue May 29 19:33:57 2018
@@ -13,7 +13,7 @@
within Main Menu.
\item On the in-line menu of the \textbf{Course Editor} screen,
-click \fbox{Upload}. Next click on
+click \fbox{External}. Next click on
\includegraphics[width=0.03\paperwidth]{extres}
\textbf{External Resource}.
\item Type in the title of the web resource you wish to add in the \textbf{Title} text box.
More information about the LON-CAPA-cvs
mailing list