× Feature Requests

Please do NOT use this section of the forum to request help if Joomdle does not work for you in some particular way. Your post will be deleted.

[Closed] joomla modules and lists

12 years 3 months ago 12 years 1 month ago by Antonio Durán.
red
Posts: 38
More
Topic Author
[Closed] joomla modules and lists #1
Hi! This may be slightly more compatible with joomla themes

<?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;
echo '<ul class="menu">';
	if (is_array($cursos))
	foreach ($cursos as $id => $curso) {
		$id = $curso['remoteid'];
		if ($username)
		{
			//	echo "<a href=\"".$moodle_auth_land_url."?username=$username&token=$token&course_id=$id&use_wrapper=1\">".$curso['fullname']."</a><br>";
				if ($linkstarget == "new")
					$target = " target='_blank'";
				else $target = "";
				echo "<li><a $target href=\"".$moodle_auth_land_url."?username=$username&token=$token&mtype=course&id=$id&use_wrapper=$open_in_wrapper\">".$curso['fullname']."</a></li>";
		}
		else
			if ($open_in_wrapper)
			//	echo "<a href=\"".JURI::base()."index.php?option=com_wrapper&view=wrapper&Itemid=59&course_id=$id\">".$curso['fullname']."</a><br>"; // XXX FIX 
				echo "<li><a href=\"".$moodle_auth_land_url."?username=$username&token=$token&mtype=course&id=$id&use_wrapper=$open_in_wrapper\">".$curso['fullname']."</a></li>";
			else
				echo "<li><a href=\"".$moodle_url."/course/view.php?id=$id\">".$curso['fullname']."</a></li>";
	}
	echo "</ul>";
?>

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

12 years 3 months ago
Antonio Durán
Posts: 7417
More
[Closed] joomla modules and lists #2
Hi. Thank you very much for your help. I just arrived home, so I will test and report back as soon as possible.
I will also go through your feature suggestions once I have some good sleep :)

Antonio

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

12 years 3 months ago
Antonio Durán
Posts: 7417
More
[Closed] joomla modules and lists #3
I tested and it works well: now the module has the same look and feel as the menus.

I will add this mod in next version, thanks for contributing :)

What I don't know if it we should preserve the old layout too. Maybe is only that I am used to see it the old way and feels a little strange...There is time to decide yet.

Antonio

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

12 years 3 months ago
red
Posts: 38
More
Topic Author
[Closed] joomla modules and lists #4
why not give the option to choose the the module settings?

i would also add an "add class suffix" option, so the users can design a special look for their module using css, or even make it look like native joomla menus. now it doesnt look like the menus but rather like lists. the menus all have a "_menu" suffix.

this way the design would be completely flexible.

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

12 years 3 months ago
Antonio Durán
Posts: 7417
More
[Closed] joomla modules and lists #5
Yes, I think giving the option is always best.

As for the suffix option, I totally agree. This is my first Joomla project, so I don't know all the details that need to be taken care of, so thanks for your input.

I will consult you, or even ask for testing if you want, when I get into it.

Thanks,
Antonio

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