3
function info_incomplete($user) {
4
if (!$user->bolt->birth_year) return true;
5
if (!$user->bolt->sex) return true;
9
function birth_year_select($user) {
10
$this_year = date("Y");
11
$x = "<select name=birth_year>\n";
12
for ($i=$this_year-100; $i<$this_year; $i++) {
13
$s = ($i == $user->bolt->birth_year)?"selected":"";
14
$x .= "<option value=$i $s>$i</option>\n";
16
$s = (!$user->bolt->birth_year)?"selected":"";
17
$x .= "<option value=$0 $s>Unspecified</option>\n";
22
function sex_select($user) {
23
$x = "<select name=sex>\n";
24
$s = ($user->bolt->sex == 0)?"selected":"";
25
$x .= "<option value=0 $s>Unspecified</option>\n";
26
$s = ($user->bolt->sex == 1)?"selected":"";
27
$x .= "<option value=1 $s>Male</option>\n";
28
$s = ($user->bolt->sex == 2)?"selected":"";
29
$x .= "<option value=2 $s>Female</option>\n";
34
function request_info($user, $course) {
35
page_head("About you");
37
You may optionally tell us some facts about yourself.
38
This information will help us improve this course,
39
and will be kept private.
41
<form action=bolt_sched.php>
42
<input type=hidden name=action value=update_info>
43
<input type=hidden name=course_id value=$course->id>
46
row2("Birth year", birth_year_select($user));
47
row2("Sex", sex_select($user));
48
row2("", "<input type=submit value=OK>");