[prev in list] [next in list] [prev in thread] [next in thread]
List: lon-capa-cvs
Subject: [LON-CAPA-cvs] cvs: rat / lonwrapper.pm
From: raeburn via LON-CAPA-cvs <lon-capa-cvs () mail ! lon-capa ! org>
Date: 2023-05-22 21:20:56
Message-ID: cvsraeburn1684790456 () cvsserver
[Download RAW message or body]
raeburn Mon May 22 21:20:56 2023 EDT
Modified files:
/rat lonwrapper.pm
Log:
- Bug 6754
- Can select from tool definitions set in course's domain or in course
itself when using External > "External Tool" in Course Editor.
Index: rat/lonwrapper.pm
diff -u rat/lonwrapper.pm:1.81 rat/lonwrapper.pm:1.82
--- rat/lonwrapper.pm:1.81 Sat Oct 29 18:52:58 2022
+++ rat/lonwrapper.pm Mon May 22 21:20:56 2023
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Wrapper for external and binary files as standalone resources
#
-# $Id: lonwrapper.pm,v 1.81 2022/10/29 18:52:58 raeburn Exp $
+# $Id: lonwrapper.pm,v 1.82 2023/05/22 21:20:56 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -425,9 +425,16 @@
my %toolhash = \
&Apache::lonnet::get('exttool_'.$marker,['target','linktext','explanation','id','width','height'],
$cdom,$cnum);
if ($toolhash{'id'}) {
- my %ltitools = &Apache::lonnet::get_domain_lti($cdom,'consumer');
- if (ref($ltitools{$toolhash{'id'}}) eq 'HASH') {
- $exttoolremote = $ltitools{$toolhash{'id'}}{'url'};
+ my ($idx,%ltitools);
+ if ($toolhash{'id'} =~ /^c(\d+)$/) {
+ $idx = $1;
+ %ltitools = &Apache::lonnet::get_course_lti($cnum,$cdom,'consumer');
+ } else {
+ $idx = $toolhash{'id'};
+ %ltitools = &Apache::lonnet::get_domain_lti($cdom,'consumer');
+ }
+ if (ref($ltitools{$idx}) eq 'HASH') {
+ $exttoolremote = $ltitools{$idx}{'url'};
}
}
if ($toolhash{'target'} eq 'window') {
_______________________________________________
LON-CAPA-cvs mailing list
LON-CAPA-cvs@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic