}
    echo '
										<option value="' . $id_tool . '" ' . $checkedEItool . '>' . $title_tool . '</option>
	';
}
echo '
									</select>
								</td>
							</tr>
	
							<tr>
								<td style="text-align:right">' . get_string('pon_EI', 'block_evalcomix') . $OUTPUT->help_icon('pon_EI', 'block_evalcomix') . '</td>
								<td>
';
$extraEI = $disabledEI . ' onchange="javascript:check_weighing(this);"';
echo add_select_range('pon_EI', 0, 100, $weighingEI, $extraEI);
echo '
		
								</td>
							</tr>
		
							<tr>
								<td style="text-align:right">' . get_string('anonymous_EI', 'block_evalcomix') . $OUTPUT->help_icon('anonymous_EI', 'block_evalcomix') . '</td>
								<td>
';
$checked = '';
if ($anonymousEI == 1) {
    $checked = 'checked';
}
echo '
									<input type="checkbox" ' . $checked . ' ' . $disabledEI . ' id="anonymousEI" name="anonymousEI">
Esempio n. 2
0
function add_date_time_selector($name, $timestamp, $extra)
{
    if (!isset($timestamp) && !is_number($timestamp)) {
        $timestamp = time();
    }
    $day = date('j', $timestamp);
    $month = date('n', $timestamp);
    $year = date('Y', $timestamp);
    $hour = date('G', $timestamp);
    $minute = date('i', $timestamp);
    if ($min = $minute % 5 != 0) {
        $minute -= $min;
    }
    $months = array(1 => '"' . get_string('january', 'block_evalcomix') . '"', 2 => '"' . get_string('february', 'block_evalcomix') . '"', 3 => '"' . get_string('march', 'block_evalcomix') . '"', 4 => '"' . get_string('april', 'block_evalcomix') . '"', 5 => '"' . get_string('may', 'block_evalcomix') . '"', 6 => '"' . get_string('june', 'block_evalcomix') . '"', 7 => '"' . get_string('july', 'block_evalcomix') . '"', 8 => '"' . get_string('august', 'block_evalcomix') . '"', 9 => '"' . get_string('september', 'block_evalcomix') . '"', 10 => '"' . get_string('october', 'block_evalcomix') . '"', 11 => '"' . get_string('november', 'block_evalcomix') . '"', 12 => '"' . get_string('december', 'block_evalcomix') . '"');
    $result = add_select_range('day_' . $name, 1, 31, $day, $extra);
    $result .= add_select('month_' . $name, $months, $month, $extra);
    $result .= add_select_range('year_' . $name, 1970, 2020, $year, $extra);
    $result .= add_select_range('hour_' . $name, 0, 23, $hour, $extra);
    $minutes = array(0 => '00', 5 => '05', 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30, 35 => 35, 40 => 40, 45 => 45, 50 => 50, 55 => 55);
    $result .= add_select('minute_' . $name, $minutes, $minute, $extra);
    return $result;
}