コード例 #1
0
ファイル: locallib.php プロジェクト: nfreear/moodle-mod_game
function game_showcheckbox($name, $value)
{
    $a = array();
    $a[0] = get_string('no');
    $a[1] = get_string('yes');
    return game_showselectcontrol($name, $a, $value);
    $ret = '<input type="checkbox" name="' . $name . '"  value="' . $value . '"';
    if ($value == 1) {
        $ret .= 'checked="checked"';
    }
    $ret .= '/>';
    return $ret;
}
コード例 #2
0
function game_showcheckbox($name, $value)
{
    $a = array();
    $a[0] = get_string('no');
    $a[1] = get_string('yes');
    return game_showselectcontrol($name, $a, $value);
}
コード例 #3
0
ファイル: questions.php プロジェクト: vinoth4891/clinique
echo '<td><center>' . get_string('bookquiz_chapters', 'game') . '</td>';
echo '<td><center>' . get_string('bookquiz_categories', 'game') . '</td>';
echo '<td><center>' . get_string('bookquiz_numquestions', 'game') . '</td>';
echo "</tr>\r\n";
$ids = '';
if (($recs = $DB->get_records('book_chapters', array('bookid' => $game->bookid), 'pagenum', 'id,title')) != false) {
    foreach ($recs as $rec) {
        echo '<tr>';
        echo '<td>' . $rec->title . '</td>';
        echo '<td>';
        if (array_key_exists($rec->id, $categories)) {
            $categoryid = $categories[$rec->id];
        } else {
            $categoryid = 0;
        }
        echo game_showselectcontrol('categoryid_' . $rec->id, $a, $categoryid, '');
        echo '</td>';
        echo '<td>';
        if (array_key_exists($rec->id, $numbers)) {
            echo '<center>' . $numbers[$rec->id] . '</center>';
        } else {
            echo '&nbsp;';
        }
        echo '</td>';
        echo "</tr>\r\n";
        $ids .= ',' . $rec->id;
    }
}
?>
</table>
<br>