if ($isSelected) { $option_lp = '<option value="0">' . get_lang('SelectTargetLP') . '</option>' . $option_lp; } else { $option_lp = '<option value="0" selected="selected" >' . get_lang('SelectTargetLP') . '</option>' . $option_lp; } //Feedback SELECT $question_list = $objExercise->selectQuestionList(); $option_feed = ''; $option_feed .= '<option value="0">' . get_lang('SelectTargetQuestion') . '</option>'; $details = isset($details) ? $details : null; $id = isset($id) ? $id : 0; $selectQuestionNoError = isset($selectQuestionNoError) ? $selectQuestionNoError : null; foreach ($question_list as $key => $questionid) { $selected = ''; $question = Question::read($questionid); $val = 'Q' . $key . ' :' . substrwords($question->selectTitle(), ICON_SIZE_SMALL); $select_lp_id[$id] = $details['lp_name']; if ($questionid == $selectQuestionNoError) { $selected = 'selected="selected"'; } $option_feed .= '<option value="' . $questionid . '" ' . $selected . ' >' . $val . '</option>'; } if ($selectQuestionNoError == -1) { $option_feed .= '<option value="-1" selected="selected" >' . get_lang('ExitTest') . '</option>'; } else { $option_feed .= '<option value="-1">' . get_lang('ExitTest') . '</option>'; } if ($answerType == HOT_SPOT_DELINEATION) { ?> <tr> <th colspan="2" ><?php
function blog($atts, $content = null) { extract(shortcode_atts(array("class" => ''), $atts)); global $post; $return = '<div id="main-blog-holder"><div id="blog-items-holder">'; $conuter = 0; $postsperpage = get_option('posts_per_page'); $page = get_query_var('paged') ? get_query_var('paged') : 1; query_posts('post_type=post&paged=' . $page); while (have_posts()) { the_post(); $conuter++; if ($conuter % 2 == 1) { $return .= '<div class="bottom-10 one_half_with_border text-left"> <p class="blog-section-title crete-round-font bottom-10"><a href="' . get_permalink($post->ID) . '">' . substrwords(get_the_title(), 70) . '</a></p> <p class="blog-date-holder bottom-20">' . get_the_date('d-M') . ' / ' . drop_cats($post->ID) . '' . get_comments_number('0') . ' COMMENTS</p> <p class="blog-excerpt-holder"> ' . get_the_excerpt() . ' </p> <a class="button dark" href="' . get_permalink($post->ID) . '">READ MORE</a> </div>'; } else { $return .= '<div class="bottom-10 one_half_with_border last border-left text-left"> <p class="blog-section-title crete-round-font bottom-10"><a href="' . get_permalink($post->ID) . '">' . substrwords(get_the_title(), 70) . '</a></p> <p class="blog-date-holder bottom-20">' . get_the_date('d-M') . ' / ' . drop_cats($post->ID) . '' . get_comments_number('0') . ' COMMENTS</p> <p class="blog-excerpt-holder"> ' . get_the_excerpt() . ' </p> <a class="button dark" href="' . get_permalink($post->ID) . '">READ MORE</a> </div>'; if ($conuter / $postsperpage != 1) { $return .= '<div class="clear separator blank_separator"></div>'; } } } $return .= '<div class="clear"></div> <div id="blog-pagination" class="navigation-holder"> <span class="navigation-next crete-round-font">' . get_previous_posts_link('<span class="left next-blog-pagination">Next</span>') . '</span><span class="navigation-previous crete-round-font">' . get_next_posts_link('<span class="right previus-blog-pagination">Previous</span>') . '</span><div class="clear"></div></div> </div></div>'; wp_reset_query(); return $return; }