コード例 #1
0
</a>
                    </h3>

                    <h3 class="next"><a
                            href="<?php 
                    echo $_SERVER['PHP_SELF'];
                    ?>
?Exit"><?php 
                    echo get_text('Exit');
                    ?>
</a></h3>
                </div>
            <?php 
                } else {
                    if ($_GET['Step'] == 1) {
                        $poll = get_poll_by_reviewer_reviewee_batch($_SESSION['user_id'], $_SESSION['user_id'], get_running1_batch_id());
                        if ($poll) {
                            $poll_status = get_poll_status($poll);
                            echo '<div class="topContent">';
                            include 'includes/form/own_poll.php';
                            echo '</div>';
                        } else {
                            echo '<div class="topContent">' . get_text('Error_occured_try_again') . '</div>';
                        }
                    } else {
                        if ($_GET['Step'] == 2) {
                            echo '<div class="topContent">';
                            include 'includes/form/preferred_reviewer.php';
                            echo '</div>';
                        } else {
                            if ($_GET['Step'] == 3) {
コード例 #2
0
function get_user_info($id, $batch)
{
    $id = (int) $id;
    $batch = (int) $batch;
    $user = get_user_by_id($id);
    $reviews_given = get_number_of_reviews_given($id);
    $reviews_received = get_number_of_reviews_received($id);
    $teammember_reviews = get_number_of_poll_team_members($id);
    $notteammember_reviews = get_number_of_poll_not_team_members($id);
    $teammanager_reviews = get_number_of_poll_team_manager($id);
    $notteammanager_reviews = get_number_of_poll_not_team_manager($id);
    $preferred_reviewers = get_number_of_preferred_reviewers($id);
    $preferred_reviewees = get_number_of_preferred_reviewees($id);
    $comments = get_comments($id);
    $questions = get_questions();
    echo get_text('Reviews_received') . ": <b>{$reviews_received}</b><br />" . get_text('Reviews_from_teammember') . ": <b>{$teammember_reviews}</b><br />" . get_text('Reviews_from_not_teammember') . ": <b>{$notteammember_reviews}</b><br />" . get_text('Reviews_from_preferred_reviewer') . ": <b>{$preferred_reviewers}</b><br />";
    //        get_text('Reviews_given_to_preferred_reviewee') . ": <b>$preferred_reviewees</b><br />";
    ?>
    <h3><?php 
    echo get_Text('Average_score');
    ?>
</h3>
    <h4><?php 
    echo get_text('Legend');
    ?>
</h4>
    <p>
        1: <?php 
    echo get_answer_name(1);
    ?>
<br/>
        2: <?php 
    echo get_answer_name(2);
    ?>
<br/>
        3: <?php 
    echo get_answer_name(3);
    ?>
<br/>
        4: <?php 
    echo get_answer_name(4);
    ?>
<br/>
        5: <?php 
    echo get_answer_name(5);
    ?>
    </p>
    <table class="questions">
        <?php 
    $number = 1;
    $categories = get_categories();
    foreach ($categories as $category) {
        ?>
        <thead>
        <tr style="margin-top: 25px;">
            <th><?php 
        echo $category['Name'];
        ?>
</th>
            <th><?php 
        echo get_text('Average_score');
        ?>
</th>
            <th><?php 
        echo get_text('Your_score');
        ?>
</th>
        </tr>
        </thead>
        <tbody>
        <?php 
        foreach ($questions as $question) {
            if ($category['ID'] == $question['Category']) {
                ?>
                <tr id="poll">
                    <td><?php 
                echo $number . '. ' . $question['Question'];
                ?>
</td>
                    <td style="text-align:center;"><?php 
                $avg_score = get_average_score_user($id, $question['ID']);
                if ($avg_score == false) {
                    $avg_score = get_answer_name(6);
                }
                echo $avg_score;
                ?>
                    </td>
                    <td style="text-align:center;">
                        <?php 
                $your_score = get_answer(get_poll_by_reviewer_reviewee_batch($id, $id, $batch), $question['ID']);
                if ($your_score == 6) {
                    $your_score = get_answer_name(6);
                }
                echo $your_score;
                ?>
                    </td>
                </tr>
                <?php 
                $number++;
            }
        }
        ?>
        <tr class="spacer"></tr>
        <?php 
    }
    ?>
        </tbody>
        <?php 
    ?>
    </table>
    <!--<tr>
				<th></th>
				<th><?php 
    echo get_text('Question');
    ?>
</th>
				<th><?php 
    echo get_text('Your_score') . '-' . get_text('Average_score');
    ?>
</th>
			</tr>
		<?php 
    foreach ($questions as $key => $question) {
        ?>
			<tr>
				<td>
					<?php 
        echo $key + 1;
        ?>
				</td>
				<td>
					<?php 
        echo $question['Question'];
        ?>
				</td>
				<td style="text-align:center;">
					<?php 
        echo get_answer_name(get_answer(get_poll_by_reviewer_reviewee_batch($id, $id, $batch), $question['ID']));
        echo " - " . get_average_score($id, $question['ID']);
        ?>

				</td>
			</tr>
			<?php 
    }
    ?>
	</table>-->
    <?php 
    if ($comments) {
        echo "<h3>" . get_text('Extra_comment') . ":</h3>";
        foreach ($comments as $comment) {
            ?>
            <div class="comment"><?php 
            echo $comment['Comment'];
            ?>
</div>
        <?php 
        }
    }
}
コード例 #3
0
     $pdf->Ln(5);
     foreach ($questions as $key => $question) {
         if ($category['ID'] == $question['Category']) {
             $pdf->SetFont('Arial', '', 12);
             $pdf->Cell(10, 3, $key + 1, 0, 0);
             $pdf->MultiCell(175, 5, $question['Question'], 0, 'L');
             $pdf->SetFont('Arial', 'B', 12);
             $pdf->Cell(10);
             $avg_score = get_average_score_user($id, $question['ID']);
             if ($avg_score == false) {
                 $avg_score = get_answer_name(6);
             }
             $pdf->Cell(5, 10, get_text('Average_score') . ': ' . $avg_score, 0, 0);
             $pdf->Ln(5);
             $pdf->Cell(10);
             $your_score = get_answer(get_poll_by_reviewer_reviewee_batch($id, $id, $batch), $question['ID']);
             if ($your_score == 6) {
                 $your_score = get_answer_name(6);
             }
             $pdf->Cell(5, 10, get_text('Your_score') . ': ' . $your_score, 0, 0);
             $pdf->Ln(10);
             if ($pdf->GetY() > 250) {
                 $pdf->AddPage();
             }
         }
     }
 }
 if ($comments) {
     $pdf->Ln(5);
     $pdf->SetFont('Arial', 'B', 12);
     $pdf->Cell(175, 10, get_text('Extra') . ' ' . get_text('Comment'), 0, 'C');