Skip to content

Commit

Permalink
Smarter error checking in badge display
Browse files Browse the repository at this point in the history
  • Loading branch information
csev committed Feb 18, 2024
1 parent 6724e1a commit 770e466
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vendor/tsugi/lib/src/UI/Lessons.php
Original file line number Diff line number Diff line change
Expand Up @@ -992,11 +992,19 @@ public function renderBadges($allgrades, $buffer=false)
echo('<tr><td>');

$rest_path = U::rest_path();
<<<<<<< Updated upstream
$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;
=======
$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;
>>>>>>> Stashed changes

echo('<a href="'.$href.'">');
echo('<i class="fa fa-square-o text-info" aria-hidden="true" style="label label-success; padding-right: 5px;"></i>');
Expand Down

0 comments on commit 770e466

Please sign in to comment.