'>

  <div id="full">
    <ul id="navigation">
    	<?php 
$sec_num = 0;
foreach ($sections as $section) {
    echo "<li onclick='showSection({$sec_num});'>{$section->title}</li>\n";
    $sec_num++;
}
?>
    </ul>
    
    <div id="sections">
    	<?php 
$q_types = get_question_types();
foreach ($sections as $section) {
    //start section div
    echo "<div id='{$section->title}' class='major_section'>\n\n\t\t\t\t  <h2>{$section->title}</h2>\n";
    //load each question
    foreach ($questions[$section->id] as $question) {
        echo "<!-- {$question->slug} -->\n\n\t\t\t\t\t<div id='" . $question->slug . "_container' class='container'>\n\n\t\t\t\t\t<div class='label'>" . stripslashes($question->question);
        if ($major_abbr == 'RATS') {
            echo "<br>&nbsp;&nbsp;(classes meeting this objective: <strong>" . $outcomes_count[$question->slug] . "</strong>)";
        }
        //custom field for RATS that shows the count of classroom posts matching this taxonomy
        echo "</div>\n";
        foreach ($q_types as $q) {
            if ($question->type == $q->id) {
                eval(urldecode($q->code));
            }
function create_question_table($sec_id)
{
    //generates html for questions table
    //create html and return
    $result = "<h3>Questions</h3>\n\n\t\t<table class='seufolios' id='seufolios_questions_table'>\n\n\t\t<tr><th>Slug</th><th>Question</th><th>Type</th><th>Enabled</th><th></th></tr>";
    $questions = get_questions($sec_id);
    $q_types = get_question_types();
    foreach ($questions as $question) {
        $enabled = $question->enabled == 1 ? 'Yes' : 'No';
        $result .= "<tr id='qrow_{$question->id}'>\n\n\t\t\t\t\t<td class='slug'>{$question->slug}</td>\n\n\t\t\t\t\t<td class='question'>" . stripslashes($question->question) . "</td>\n\n\t\t\t\t\t<td class='type'>";
        foreach ($q_types as $q) {
            if ($q->id == $question->type) {
                $result .= $q->displayName;
            }
        }
        $result .= "</td>\n\n\t\t\t\t\t<td class='enabled'>{$enabled}</td>\n\n\t\t\t\t\t<td><button id='edit_{$question->id}' class='edit_button' type='button' onclick='edit_question({$question->id}, {$question->order_loc})'>Edit</button> &nbsp;&nbsp;";
    }
    $result .= "</table>";
    return $result;
}
function get_question_data()
{
    $ques_types = get_question_types();
    return serialize($ques_types);
}
Exemple #4
0
function create_eval_q_table()
{
    //generates html for section table
    //create html and return
    $result = "<h2>Evaluation Questions</h2>\n\n\t\t<table class='seufolios' id='seufolios_questions_table'>\n\n\t\t<tr><th>slug</th><th>Display Name</th><th>Code</th><th></th></tr>";
    $questions = get_question_types();
    foreach ($questions as $q) {
        $code = urldecode($q->code);
        $result .= "<tr id='secrow_{$q->id}'>\n\t\t\t\t\t<td class='slug'>{$q->slug}</td>\n\t\t\t\t\t<td class='displayName'>{$q->displayName}</td>\n\t\t\t\t\t<td class='code'><xmp>{$code}</xmp></td>\n\t\t\t\t\t<td>\n\t\t\t\t\t    <button id='edit_{$q->id}' class='edit_button' type='button' onclick='edit_q({$q->id});'>Edit</button>\n\t\t\t\t\t</td></tr>\n";
    }
    $result .= "</table>";
    return $result;
}