Skip to content

Commit

Permalink
Add guardian to Lessons.php
Browse files Browse the repository at this point in the history
  • Loading branch information
csev committed Feb 11, 2024
1 parent db0a4db commit 86b1fc5
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

"nesbot/carbon" : "2.68.1",

"tsugi/lib": "dev-master#fb54b517fb1c07f09e250514c6d7c2d441b78177",
"tsugi/lib": "dev-master#715bb90cc5913b7907f7a7e15dc71a52bfd8b4cc",
"koseu/lib": "dev-master#70c7ac1ca413c2dd541e078ebe07719405621b1b"
},
"config": {
Expand Down
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -7511,12 +7511,12 @@
"source": {
"type": "git",
"url": "https://github.com/tsugiproject/tsugi-php.git",
"reference": "fb54b517fb1c07f09e250514c6d7c2d441b78177"
"reference": "715bb90cc5913b7907f7a7e15dc71a52bfd8b4cc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tsugiproject/tsugi-php/zipball/fb54b517fb1c07f09e250514c6d7c2d441b78177",
"reference": "fb54b517fb1c07f09e250514c6d7c2d441b78177",
"url": "https://api.github.com/repos/tsugiproject/tsugi-php/zipball/715bb90cc5913b7907f7a7e15dc71a52bfd8b4cc",
"reference": "715bb90cc5913b7907f7a7e15dc71a52bfd8b4cc",
"shasum": ""
},
"require": {
Expand All @@ -7529,7 +7529,7 @@
"phpunit/php-timer": "v5.0.3",
"phpunit/phpunit": "9.*"
},
"time": "2024-02-08T19:54:42+00:00",
"time": "2024-02-11T21:49:42+00:00",
"default-branch": true,
"type": "library",
"installation-source": "dist",
Expand Down
6 changes: 3 additions & 3 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '366b48c7466257318acfb56138b2769d9192fb57',
'reference' => 'db0a4db034c82a138661f0b22b8418a871e11ca4',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '366b48c7466257318acfb56138b2769d9192fb57',
'reference' => 'db0a4db034c82a138661f0b22b8418a871e11ca4',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -1045,7 +1045,7 @@
'tsugi/lib' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'fb54b517fb1c07f09e250514c6d7c2d441b78177',
'reference' => '715bb90cc5913b7907f7a7e15dc71a52bfd8b4cc',
'type' => 'library',
'install_path' => __DIR__ . '/../tsugi/lib',
'aliases' => array(
Expand Down
9 changes: 7 additions & 2 deletions vendor/tsugi/lib/src/UI/Lessons.php
Original file line number Diff line number Diff line change
Expand Up @@ -990,12 +990,17 @@ public function renderBadges($allgrades, $buffer=false)
$lti = $this->getLtiByRlid($resource_link_id);

echo('<tr><td>');

$rest_path = U::rest_path();
$href = $rest_path->parent . '/lessons/' . urlencode($module->anchor);
$href= "Missing ". $resource_link_id;
if ($module != null ) $href = $rest_path->parent . '/lessons/' . urlencode($module->anchor);

$badge_title = "Missing ". $resource_link_id;
if ( $lti != null ) $badge_title = $lti->title;

echo('<a href="'.$href.'">');
echo('<i class="fa fa-square-o text-info" aria-hidden="true" style="label label-success; padding-right: 5px;"></i>');
echo($lti->title."</a>\n");
echo($badge_title."</a>\n");
echo('</td><td style="width: 30%; min-width: 200px;">');
echo('<a href="'.$href.'">');
echo('<div class="progress">');
Expand Down

0 comments on commit 86b1fc5

Please sign in to comment.