From: Simon H. <sim...@us...> - 2010-11-08 11:09:29
|
Update of /cvsroot/stack/stack-dev/opaque/moodleModule/opaque/stack In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv21951/opaque/moodleModule/opaque/stack Modified Files: stackQuestionList.php Log Message: Tweak and a fix for keywords display. Index: stackQuestionList.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/moodleModule/opaque/stack/stackQuestionList.php,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** stackQuestionList.php 30 Sep 2010 16:56:21 -0000 1.43 --- stackQuestionList.php 8 Nov 2010 11:09:21 -0000 1.44 *************** *** 114,117 **** --- 114,118 ---- $firstKeyword = true; //foreach($kwFreq as $kw => $freq) { + $i = 1; foreach($questionPage->keywords as $kw) { if(!$firstKeyword) { *************** *** 120,126 **** --- 121,132 ---- $kwLink = "<a href='?keywords=$kw'>$kw</a>"; echo isset($_GET['keywords']) && in_array($kw, $kws) ? "<b>$kwLink</b>": $kwLink; + if($i++ == 50) { + echo "<span onmouseover='$(this).hide();$(this).next().show()'>, <b>more...</b></span></a><span style='display:none' class='moreTags'>"; + } } if(!$firstKeyword) echo '.'; + if($i > 50) echo "</span>";// closing moretags + if (count($kwFreq) > 0) { // keywords associated with given keyword *************** *** 169,173 **** // keywords associate with given filter ! if(isset($_POST['filter'])) { echo "<p>".get_string('keywordsRelatedTo', 'qtype_opaque')." '".$_POST['filter']."': "; --- 175,179 ---- // keywords associate with given filter ! if(isset($_POST['filter']) && !empty($_POST['filter'])) { echo "<p>".get_string('keywordsRelatedTo', 'qtype_opaque')." '".$_POST['filter']."': "; |