. // Utililty functions for student pages function info_incomplete($user) { if (!$user->bolt->birth_year) return true; if (!$user->bolt->sex) return true; return false; } function birth_year_select($user) { $this_year = date("Y"); $x = "\n"; return $x; } function sex_select($user) { $x = "\n"; return $x; } function request_info($user, $course) { page_head("About you"); echo " You may optionally tell us some facts about yourself. This information will help us improve this course, and will be kept private.

id> "; start_table(); row2("Birth year", birth_year_select($user)); row2("Sex", sex_select($user)); row2("", ""); end_table(); echo "
\n"; page_tail(); } //////////// show refresh schedule ////////////// function show_refresh($r) { echo " $r->name ".time_str($r->due_time)." "; if ($r->last_view_id) { echo " course_id&refresh_id=$r->id&action=start>Restart | course_id&refresh_id=$r->id&action=resume>Resume "; } else { echo " course_id&refresh_id=$r->id&action=start>Start "; } echo " "; } function show_refreshes() { global $user; global $course; $refreshes = BoltRefreshRec::enum("user_id=$user->id and course_id=$course->id"); if (!count($refreshes)) return; start_table(); echo "Refresh schedule\n"; foreach ($refreshes as $r) { show_refresh($r); } end_table(); } ?>