3 if (!defined('AT_INCLUDE_PATH')) { exit; }
7 $polls_limit = 3; //Numero massimo dei possibili sottocontenuti visualizzabili nella home-page
9 $sql = "SELECT poll_id, question FROM ".TABLE_PREFIX."polls WHERE course_id=$_SESSION[course_id] ORDER BY created_date DESC LIMIT $polls_limit";
10 $result = mysql_query($sql, $db);
12 if (mysql_num_rows($result) > 0) {
13 while ($row = mysql_fetch_assoc($result)) {
14 $list[] = '<a href="'.url_rewrite('polls/index.php#'.$row['poll_id'], AT_PRETTY_URL_IS_HEADER).'"'.
15 (strlen($row['question']) > SUBLINK_TEXT_LEN ? ' title="'.$row['question'].'"' : '') .'>'.
16 validate_length($row['question'], SUBLINK_TEXT_LEN, VALIDATE_LENGTH_FOR_DISPLAY) .'</a>';