Skip to content

Commit

Permalink
exams added
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh committed Oct 27, 2016
1 parent 477400e commit 80e86ab
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions qlist-desc-layer.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,18 @@ public function q_list($q_list)

if (!empty($postids)) {
// Retrieve the content for these questions from the database

$parts=explode('/',$this->request);
$maxlength = qa_opt('qlist_desc_max_len');
$minlength = qa_opt('qlist_desc_min_len');
if($this->template =='blogs')
if($this->template == 'blogs' ||
(count($parts) >=1 && $parts[0]=='blog')
)

$result = qa_db_query_sub('SELECT postid, content, title, format FROM ^blogs WHERE postid IN (#)', $postids);
else if($this->template == 'exams' ||(count($parts) >=1 && $parts[0]=='exam')){
$result = qa_db_query_sub('SELECT postid, "" as content, "html" as format FROM ^exams WHERE postid IN (#)', $postids);
}

else
$result = qa_db_query_sub('SELECT postid, content, format FROM ^posts WHERE postid IN (#)', $postids);
$postinfo = qa_db_read_all_assoc($result, 'postid');
Expand Down

0 comments on commit 80e86ab

Please sign in to comment.