Skip to content

Commit

Permalink
[NCN-921] reverting unnecessary parts of [NCN-502]
Browse files Browse the repository at this point in the history
  • Loading branch information
nkissebe committed May 23, 2024
1 parent 188044f commit c7102d9
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@
$grandchild->set('path', \Components\Resources\Helpers\Html::processPath($this->option, $grandchild, $child->id));

$alias = $grandchild->type->alias;
$logical_alias = Components\Resources\Models\Type::oneOrFail($grandchild->get('logical_type'))->alias;

switch ($alias)
{
Expand All @@ -325,20 +324,20 @@
break;
case 'elink':
case 'youtube':
if ($logical_alias == 'youtube') // youtube
if ($grandchild->get('logical_type') == 68) // youtube
{
$youtube .= (!$youtube) ? '<a title="View Presentation - YouTube Version" class="youtube" href="'.$grandchild->path.'" title="'.$this->escape(stripslashes($grandchild->title)).'">'.Lang::txt('View on YouTube').'</a>' : '';
break;
}
case 'pdf':
default:
if ($logical_alias == 'pdf')
if ($grandchild->get('logical_type') == 14)
{
$ext = Filesystem::extension($grandchild->path);
$ext = (strpos($ext, '?') ? strstr($ext, '?', true) : $ext);
$pdf .= '<a href="'.$grandchild->path.'">'.Lang::txt('Notes').' (' . $ext . ')</a><br />'."\n";
}
elseif ($logical_alias == 'homeworkassignment')
elseif ($grandchild->get('logical_type') == 51)
{
$exercises .= '<a href="'.$grandchild->path.'">'.stripslashes($grandchild->title).'</a><br />'."\n";
}
Expand Down

0 comments on commit c7102d9

Please sign in to comment.