3 if (!defined('AT_INCLUDE_PATH')) { exit; }
6 * Free form PHP can appear here to retreive current information
7 * from the module, or a text description of the module where there is
8 * not current information
13 $link_limit = 3; // Number of links to be displayed on "detail view" box
15 $sql = "SELECT hello_world_id, value FROM ".TABLE_PREFIX."hello_world WHERE course_id=".$_SESSION[course_id].
16 " ORDER BY value LIMIT $link_limit";
17 $result = mysql_query($sql, $db);
19 if (mysql_num_rows($result) > 0) {
20 while ($row = mysql_fetch_assoc($result)) {
22 * SUBLINK_TEXT_LEN, VALIDATE_LENGTH_FOR_DISPLAY are defined in include/lib/constance.lib.inc
23 * SUBLINK_TEXT_LEN determins the maxium length of the string to be displayed on "detail view" box.
25 $list[] = '<a href="'.AT_BASE_HREF.url_rewrite('mods/hello_world/index.php?id='. $row['hello_world_id']).'"'.
26 (strlen($row['value']) > SUBLINK_TEXT_LEN ? ' title="'.$row['value'].'"' : '') .'>'.
27 validate_length($row['value'], SUBLINK_TEXT_LEN, VALIDATE_LENGTH_FOR_DISPLAY) .'</a>';