500) { show_old_reading($id); exit; } //limited_access: step 2 if(!can_access_member_page(5)) { exit; } //restricted access: if(!validate_id($id) || !cross_level_check(2, $id)) { $msg = ""; if(is_logged_on()) { $msg = "User cannot access module $id. Exam Guide ID: " . $_SESSION['user']['exam_guide_id']; } show_user_error("", $msg); exit; } $custom_js = get_learning_module_jquery_js($id); if(is_guest()) { $exam_guide_id = get_exam_guide_id_by_reading_id($id); set_up_exam_guide_id_for_guest($exam_guide_id); } $query = "select ss.ssid as ssid, ss.number as ssnumber, ss.value as ssvalue, r.rid as rid, r.ssid as rssid, r.number as rnumber, r.value as rvalue, r.status as rstatus " . "from study_session ss, reading r where r.rid= $id and ss.ssid = r.ssid"; $result = do_mysqli_query($query); if(mysqli_num_rows($result) == 0) { show_restricted_access("no module for rid " . $id); exit; } $rrow = mysqli_fetch_array($result); $reading_status = $rrow['rstatus']; //Consistent with session.inc //unless the user manipulate the url param, it should not get here. //don't show the module link to: the module is 'not ready' (status = 3), and the user is paid. //for other users, show all subjects to lure them. if($reading_status == 3 && is_paid_user()) { show_restricted_access("module not ready yet: $id"); exit; } //get complete and bookmarked subjects: one query instead of one subject per query! $completeids = array(); $bookmarkids = array(); $my_reading_status = 0; if(is_logged_on()) { $my_reading_status = get_notes_status($id, 2); $query = "select sua.subid, sua.status, bookmark from sub_user_assgnmt sua, subject sub where sua.subid = sub.subid " . "and sub.rid = " . $id . " and (sua.status != 0 or sua.bookmark != 0) and sua.userId = " . $_SESSION['user']['id']; $result = do_mysqli_query($query); $count = mysqli_num_rows($result); $completecount = 0; $bookmarkcount = 0; //the real complete:bookmark ratio = 25:1. focus on complete. for($i=0; $i<$count; $i++) { $rowsua = mysqli_fetch_array($result); if($rowsua['status'] == 1) { $completeids[$completecount++] = $rowsua['subid']; } if($rowsua['bookmark'] == 1) { $bookmarkids[$bookmarkcount++] = $rowsua['subid']; } } } $exam_name = get_exam_name_for_user(); $link_study_all = build_study_all_link(); $link_topic = build_topic_link_title($rrow['ssid']); $link_module = build_module_link_title($id); $private_note = get_private_note($id, 1); $breadcrumb = array(array($link_study_all, "$exam_name"), array($link_topic, "Topic " . $rrow['ssnumber'] . ". " . $rrow['ssvalue']), array("", "Learning Module " . $rrow['rnumber'] . ". " . $rrow['rvalue'])); print_page_header("Topic " . $rrow['ssnumber'] . ". " . $rrow['ssvalue'] . " - Learning Module " . $rrow['rnumber'] . ". " . $rrow['rvalue'], $link_module); print_breadcrumb($breadcrumb); print_container_start(); print_main_section_start(); print_subject_list_card(); print_section_end(); //side print_side_section_start(); print_rotating_image(); print_testimonial(); print_flashcard_box(1); print_reading_action_links(); print_side_section_end(); print_container_end(); print_footer(); //the underlying link is the same. just the list shown is sujects, not los. function print_subject_list_card() { global $rrow, $show_pay_info; $rssid = $rrow['rssid']; $id = $rrow['rid']; if(!validate_id($id)) { return; } $subids = array(); //special: ethics readings (don't show los repeatly) or CFAI visits. $show_los = show_los_for_reading($id) && can_show_los(); print_card_start(); ?>
Learning Outcome Statements PDF Download
"; if(is_logged_on()) { if($blocked) { echo ""; } else if($available) { if(in_array($row['subid'], $completeids)) { $desc = 'Mark this LOS as incomplete'; $image = 'checked.gif'; } else { $desc = 'Mark this LOS as complete'; $image = 'unchecked.gif'; } echo "" . $desc . ""; } else {//not available for paid or logged on trial users. echo ""; } } else {//guest echo ""; } echo ""; if(!$blocked && $available) { echo "$value"; if(in_array($row['subid'], $bookmarkids)) { echo " "; } } else if ($blocked) { echo "$value"; } else {//not available echo "$value"; } if($can_show_los) { $query = "select * from los_main where id in (select losid from los_subject where subid = " . $row['subid'] . ")"; $result_lm = do_mysqli_query($query); echo "
"; while($row_lm = mysqli_fetch_array($result_lm)) { echo "" . $row_lm['value'] . ""; } } echo ""; } function get_module_id_clause() { $exam_guide_id = get_user_exam_guide_id(); $min_rid = ($exam_guide_id -1) * 100; return " and rid > $min_rid and rid < " . ($min_rid + 100); } function show_los_list_for_not_ready_reading($rid) { if(!validate_id($rid)) { return; } $query = "select * from los_main where rid = ". $rid . " order by id"; $result = do_mysqli_query($query); print_study_table_start(); while($row = mysqli_fetch_array($result)) { echo "" . $row['value'] . ""; } print_study_table_end(); } function show_old_reading($id) { //query the same table again but ok: no need to complicate by simplifying. $result = do_mysqli_query("select * from old_reading where rid = " . $id); //should not be possible as id exists, and redundent, but check anyway. if(mysqli_num_rows($result) == 0) { show_user_error(); return; } $row = mysqli_fetch_array($result); do_mysqli_query("update old_reading set visit = visit + 1 where rid = $id"); $breadcrumb = array(); print_page_header("Learning Outcome Statements", $row['link']); print_breadcrumb($breadcrumb); print_container_start(); //main: print_main_section_start_with_card_header("Learning Outcome Statements", "bars"); $thead = "" . $row['title'] . ""; print_study_table_start($thead); $query = "select * from old_subject where rid = $id order by subid"; $result = do_mysqli_query($query); while($row = mysqli_fetch_array($result)) { echo ""; echo "" . cleanup_notes_html($row['title']) . " "; echo ""; } print_study_table_end(); print_card_section_end(); //side_column print_side_section_start(); print_rotating_image(); print_side_study_title_only("Learning Outcome Statements from a previous year's CFA study guide."); print_side_section_end(); print_container_end(); print_footer(); } function get_learning_module_jquery_js($id) { if(is_guest()) { return ""; } $js = ""; return $js; } function print_module_action_msgs() { ?>