R0.22 and earlier: No Longer Supported

Where does Joomdle get the variables?

  • Graham Nelmes
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
15 years 8 months ago #1 by Graham Nelmes
Where does Joomdle get the variables? was created by Graham Nelmes
Really impresed with Joomdle and have learned a lot from it. In the script below from default.php where does the array $cursos come from? Many thanks

<?php // no direct access
defined('_JEXEC') or die('Restricted access');
$moodle_auth_land_url = $params->get( 'MOODLE_URL' ).'/auth/joomdle/land.php';
if ($params->get( 'linkstarget' ) == 'wrapper')
$open_in_wrapper = 1;
else
$open_in_wrapper = 0;

if (is_array($cursos))
foreach ($cursos as $id => $curso) {
$id = $curso;
if ($username)
{
// echo "<a href=\"".$moodle_auth_land_url."?username=$username&token=$token&course_id=$id&use_wrapper=1\">".$curso."</a><br>";
if ($linkstarget == "new")
$target = " target='_blank'";
else $target = "";
echo "<a $target href=\"".$moodle_auth_land_url."?username=$username&token=$token&mtype=course&id=$id&use_wrapper=$open_in_wrapper\">".$curso."</a><br>";
}
else
if ($open_in_wrapper)
// echo "<a href=\"".JURI::base()."index.php?option=com_wrapper&view=wrapper&Itemid=59&course_id=$id\">".$curso."</a><br>"; // XXX FIX
echo "<a href=\"".$moodle_auth_land_url."?username=$username&token=$token&mtype=course&id=$id&use_wrapper=$open_in_wrapper\">".$curso."</a><br>";
else
echo "<a href=\"".$moodle_url."/course/view.php?id=$id\">".$curso."</a><br>";
}
?>

Please Log in or Create an account to join the conversation.

More
15 years 8 months ago #2 by Antonio Durán
Replied by Antonio Durán on topic Re: Where does Joomdle get the variables?
Hi. Great to hear that :)

The variable is filled in the main module file, mod_joomdle_courses.php.

Please Log in or Create an account to join the conversation.