function JQ_view_questionReport($type, &$rows, &$option, $page, $course_id, &$lists) { global $Itemid, $JLMS_CONFIG; $stu_id = intval(mosGetParam($_REQUEST, 'stu_id', 0)); $toolbar = array(); $toolbar[] = array('btn_type' => 'back', 'btn_txt' => _JLMS_QUIZ_BACK_BTN, 'btn_js' => sefRelToAbs("index.php?option={$option}&Itemid={$Itemid}&task=quizzes&id={$course_id}&page=stu_reportA&c_id={$stu_id}")); JLMS_quiz_admin_html_class::showQuizHead($course_id, $option, _JLMS_QUIZ_QUEST_REPORT_TITLE, true, $toolbar); ?> <form action="<?php echo sefRelToAbs("index.php?option={$option}&Itemid={$Itemid}"); ?> " method="post" name="adminForm"> <?php $r_img = $JLMS_CONFIG->get('live_site') . '/components/com_joomla_lms/lms_images/toolbar/btn_accept.png'; switch ($type) { case 1: ?> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td class="sectiontableheader" width="75"><?php echo _JLMS_QUIZ_TBL_USER_CHOICE; ?> </td> <td class="sectiontableheader" width="75"><?php echo _JLMS_QUIZ_TBL_RIGHT_ANSWER; ?> </td> <td class="sectiontableheader"><?php echo _JLMS_QUIZ_TBL_QUEST_OPTIONS; ?> </td> </tr> <?php $k = 1; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row = $rows[$i]; ?> <tr class="<?php echo "sectiontableentry{$k}"; ?> "> <td align="center"> <?php if ($row->sc_id) { ?> <img src="<?php echo $r_img; ?> " width="16" height="16" border="0" alt="<?php echo _JLMS_QUIZ_TBL_USER_CHOICE; ?> " /> <?php } ?> </td> <td align="center"> <?php if ($row->c_right) { ?> <img src="<?php echo $r_img; ?> " width="16" height="16" border="0" alt="<?php echo _JLMS_QUIZ_TBL_RIGHT_ANSWER; ?> " /> <?php } ?> </td> <td align="left"> <?php echo $row->c_choice; ?> </td> </tr> <?php $k = 3 - $k; } ?> </table> <?php break; case 4: ?> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td class="sectiontableheader" colspan="2"><?php echo _JLMS_QUIZ_TBL_USER_CHOICE; ?> </td> <td class="sectiontableheader"><?php echo _JLMS_QUIZ_TBL_RIGHT_ANSWER; ?> </td> <td class="sectiontableheader"><?php echo _JLMS_QUIZ_TBL_QUEST_OPTIONS; ?> </td> </tr> <?php $k = 1; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row = $rows[$i]; ?> <tr class="<?php echo "sectiontableentry{$k}"; ?> "> <td align="center" width="75px"> <?php if ($row->c_sel_text == $row->c_right_text) { ?> <img src="<?php echo $r_img; ?> " width="16" height="16" border="0" alt="<?php echo _JLMS_QUIZ_TBL_USER_CHOICE; ?> " /> <?php } ?> </td> <td align="left"> <?php echo $row->c_sel_text; ?> </td> <td align="left"> <?php echo $row->c_right_text; ?> </td> <td align="left"> <?php echo $row->c_left_text; ?> </td> </tr> <?php $k = 3 - $k; } ?> </table> <?php break; case 6: ?> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td class="sectiontableheader"><?php echo _JLMS_QUIZ_TBL_USER_ANSWER; ?> </td> </tr> <tr class="sectiontableentry1"> <td align="left"> <?php echo $rows->c_answer; ?> </td> </tr> </table> <?php break; case 7: ?> <table><tr><td align="center"> <div style="text-align:left;"> <div id="div_hotspot_rec" style="background-color:#FFFFFF; z-index:1001; <?php if (preg_match('/MSIE ([0-9].[0-9]{1,2})/', $_SERVER['HTTP_USER_AGENT'])) { echo "filter:alpha(opacity=50);"; } ?> -moz-opacity:.50; opacity:.50; border:1px solid #000000; position:relative; left:<?php echo $lists['hotspot']->c_start_x; ?> px; top:<?php echo $lists['hotspot']->c_start_y + $lists['hotspot']->c_height + 12; ?> px; width:<?php echo $lists['hotspot']->c_width; ?> px; height:<?php echo $lists['hotspot']->c_height; ?> px; "> <img src="<?php echo $JLMS_CONFIG->get('live_site'); ?> /images/blank.png" border="0" width="1" height="1" /> </div> <div style='position:relative; z-index:1000; top:<?php echo $rows->c_select_y + 6; ?> px; left:<?php echo $rows->c_select_x - 6; ?> px'> <img src="<?php echo $JLMS_CONFIG->get('live_site'); ?> /components/com_joomla_lms/includes/quiz/hs_round.png" width='12' height='12' /> </div> <img style='position:relative; z-index:999;' src="<?php echo $JLMS_CONFIG->get('live_site'); ?> /images/joomlaquiz/images/<?php echo $lists['image']; ?> " /> </div></td></tr></table> <?php break; case 9: ?> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <?php $arr_scale = array(); for ($i = 0, $n = count($rows); $i < $n; $i++) { $qone = $rows[$i]; if ($qone->c_type == 1) { echo "<td class='sectiontableheader'>" . $qone->c_field . "</td>" . "\n"; $arr_scale[] = $qone->c_id; } } ?> <td class="sectiontableheader"><?php echo _JLMS_QUIZ_TBL_QUEST_OPTIONS; ?> </td> </tr> <?php $z = 1; for ($j = 0, $n = count($rows); $j < $n; $j++) { $qone = $rows[$j]; if ($qone->c_type == 0) { echo "<tr class='sectiontableentry" . $z . "'>" . "\n"; for ($i = 0; $i < count($arr_scale); $i++) { $chk = ' '; if ($qone->inchek && $arr_scale[$i] == $qone->inchek) { $chk = '<img src="' . $r_img . '" width="16" height="16" border="0" alt="' . _JLMS_QUIZ_TBL_USER_CHOICE . '" />'; } echo "<td align='left'>" . $chk . "</td>" . "\n"; } echo "<td align='left'>" . $qone->c_field . "</td>" . "\n"; $z = 3 - $z; echo "</tr>" . "\n"; } } ?> </table> <?php break; } ?> <br /> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td class="sectiontableheader"><?php echo _JLMS_QUIZ_TBL_QUEST_TEXT; ?> </td> </tr> <tr><td><?php echo $lists['question']; ?> </td></tr></table> <br /> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td colspan="2" class="sectiontableheader"><?php echo _JLMS_QUIZ_TBL_USER_INFO; ?> </td> </tr> </table> <?php echo JLMS_outputUserInfo($lists['user']->username, $lists['user']->name, $lists['user']->email, $lists['user']->usergroup, '15%', true); ?> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="Itemid" value="<?php echo $Itemid; ?> " /> <input type="hidden" name="task" value="quizzes" /> <input type="hidden" name="id" value="<?php echo $course_id; ?> " /> <input type="hidden" name="page" value="stu_reportA" /> <input type="hidden" name="qid" value="<?php echo $lists['qid']; ?> " /> <input type="hidden" name="boxchecked" value="0" /> </form> <?php JLMS_quiz_admin_html_class::showQuizFooter(); }
function showUserGradebook($id, $option, &$rows, &$lists) { global $Itemid, $JLMS_CONFIG; $juser = JLMSFactory::getUser(); $JLMS_ACL =& JLMSFactory::getACL(); if ($JLMS_ACL->CheckPermissions('gradebook', 'manage')) { ?> <script language="javascript" type="text/javascript"> <!-- function submitbutton(pressbutton) { var form = document.adminForm; form.task.value = pressbutton; form.submit(); } function submitbutton_crtf(pressbutton, state, cid_id) { var form = document.adminForm; if (pressbutton == 'gb_crtA'){ form.task.value = pressbutton; form.state.value = state; form.cid2.value = cid_id; form.submit(); } } //--> </script> <?php } ?> <?php echo '<table class="contentpane" id="joomlalms_usergradebook" style="width:100%" cellpadding="0" cellspacing="0" border="0">' . "\r\n"; $hparams = array(); $toolbar = array(); if ($JLMS_ACL->CheckPermissions('gradebook', 'manage')) { if (count($lists['gb_rows'])) { $toolbar[] = array('btn_type' => 'save', 'btn_js' => "javascript:submitbutton('save_grades');"); } $toolbar[] = array('btn_type' => 'pdf', 'btn_js' => JLMSRoute::_("index.php?option={$option}&Itemid={$Itemid}&task=gb_user_pdf&course_id={$id}&id=" . $lists['user_id'])); $toolbar[] = array('btn_type' => 'back', 'btn_js' => sefRelToAbs("index.php?option={$option}&Itemid={$Itemid}&task=gradebook&id={$id}")); } else { $toolbar[] = array('btn_type' => 'pdf', 'btn_js' => JLMSRoute::_("index.php?option={$option}&Itemid={$Itemid}&task=gb_user_pdf&course_id={$id}&id=" . $lists['user_id'])); } JLMS_TMPL::ShowHeader('gradebook', _JLMS_GB_TITLE, $hparams, $toolbar); $userinfo = array(); $userinfo['text'] = JLMS_outputUserInfo($rows[0]->username, $rows[0]->name, $rows[0]->email, $rows[0]->ug_name, '20%'); $crtf_txt = array(); $crtf_txt['text'] = ''; $crtf_txt['attrib'] = ' nowrap="nowrap"'; if ($JLMS_ACL->CheckPermissions('gradebook', 'manage')) { $crtf_txt['text'] = '<table width="100%" cellpadding="0" cellspacing="0" border="0" class="jlms_table_no_borders"><tr><td width="30%" nowrap="nowrap">' . _JLMS_COURSE_COMPLETED_ADMIN . '</td>'; $crtf_txt['text'] .= '<td> '; $image = $rows[0]->user_certificate ? 'btn_accept.png' : 'btn_cancel.png'; $alt = $rows[0]->user_certificate ? _JLMS_GB_USER_HAVE_CRT : _JLMS_GB_USER_HAVE_NO_CRT; $state = $rows[0]->user_certificate ? 0 : 1; $crtf_txt['text'] .= '<a class="jlms_img_link" href="javascript:submitbutton_crtf(\'gb_crtA\',' . $state . ',' . $rows[0]->user_id . ')" title="' . $alt . '"><img class="JLMS_png" src="' . $JLMS_CONFIG->get('live_site') . '/components/com_joomla_lms/lms_images/toolbar/' . $image . '" width="16" height="16" border="0" alt="' . $alt . '" /></a>'; $crtf_txt['text'] .= '</td></tr></table>'; } elseif ($JLMS_ACL->CheckPermissions('gradebook', 'view') && $rows[0]->user_certificate) { $crtf_txt['text'] = '<table width="100%" cellpadding="0" cellspacing="0" border="0" id="usergradebook_header_crtf_info" class="jlms_table_no_borders"><tr><td width="30%">' . ($juser->get('id') == $rows[0]->user_id ? _JLMS_COURSE_COMPLETED_USER : _JLMS_COURSE_COMPLETED_ADMIN) . '</td>'; $crtf_txt['text'] .= '<td> '; $image = $rows[0]->user_certificate ? 'btn_accept.png' : 'btn_cancel.png'; $alt = $rows[0]->user_certificate ? _JLMS_GB_USER_HAVE_CRT : _JLMS_GB_USER_HAVE_NO_CRT; $state = $rows[0]->user_certificate ? 0 : 1; $crtf_txt['text'] .= JLMS_gradebook_html::publishIcon($rows[0]->user_id, $id, $state, 'gb_crtA', $alt, $image, $option, ''); $crtf_txt['text'] .= '</td></tr></table>'; } $params_cs = array(); if ($JLMS_ACL->CheckPermissions('gradebook', 'manage') && !empty($lists['enrollment_answers'])) { JLMS_TMPL::OpenTS('', ' id="usergradebook_header"'); echo '<table width="100%" class="jlms_table_no_borders">'; echo '<tr><td width="50%" valign="top"><table width="100%" cellpadding="0" cellspacing="0" border="0" id="usergradebook_header_user_info" class="' . JLMSCSS::_('jlmslist') . '" style="margin:0px;padding:0px;">'; echo '<tr><' . JLMSCSS::tableheadertag() . ' class="' . JLMSCSS::_('sectiontableheader') . '" colspan="2">' . _JLMS_GB_USER_INFORMATION . '</' . JLMSCSS::tableheadertag() . '></tr>'; echo '<tr class="' . JLMSCSS::_('sectiontableentry1') . '"><td align="left">' . _JLMS_UI_USERNAME . '</td><td align="left">' . $rows[0]->username . '</td></tr>'; echo '<tr class="' . JLMSCSS::_('sectiontableentry2') . '"><td align="left">' . _JLMS_UI_NAME . '</td><td align="left">' . $rows[0]->name . '</td></tr>'; echo '<tr class="' . JLMSCSS::_('sectiontableentry1') . '"><td align="left">' . _JLMS_UI_EMAIL . '</td><td align="left">' . $rows[0]->email . '</td></tr>'; echo '<tr class="' . JLMSCSS::_('sectiontableentry2') . '"><td align="left">' . _JLMS_UI_GROUP . '</td><td align="left">' . ($rows[0]->ug_name ? $rows[0]->ug_name : ' ') . '</td></tr>'; echo '</table><br />'; echo $crtf_txt['text']; echo '</td><td width="50%" valign="top"><table width="100%" cellpadding="0" cellspacing="0" border="0" id="usergradebook_header_reg_info" class="' . JLMSCSS::_('jlmslist') . '" style="margin:0px;padding:0px;">'; echo '<tr><' . JLMSCSS::tableheadertag() . ' class="' . JLMSCSS::_('sectiontableheader') . '" colspan="2">' . _JLMS_GB_REG_INFORMATION . '</' . JLMSCSS::tableheadertag() . '></tr>'; $k = 1; foreach ($lists['enrollment_answers'] as $ea) { echo '<tr class="' . JLMSCSS::_('sectiontableentry' . $k) . '"><td>' . $ea->course_question . '</td><td>' . ($ea->user_answer ? $ea->user_answer : ' ') . '</td></tr>'; $k = 3 - $k; } echo '</table></td></tr>'; echo '</table>'; JLMS_TMPL::CloseTS(); } else { $params_cs[] = $userinfo; $params_cs[] = $crtf_txt; JLMS_TMPL::ShowCustomSection($params_cs); } /** * Certificates MOD - 04.10.2007 (DEN) * We will show the list of all achieved certificates in the User Gradebook */ global $JLMS_DB; $query = "SELECT count(*) FROM #__lms_certificates WHERE course_id = '" . $id . "' AND published = 1 AND crtf_type = 1 AND parent_id = 0"; $JLMS_DB->SetQuery($query); $is_course_certificate = $JLMS_DB->loadResult(); if (!empty($lists['user_quiz_certificates']) || isset($rows[0]->user_certificate) && $rows[0]->user_certificate && $is_course_certificate) { JLMS_TMPL::OpenTS('', ' id="usergradebook_certificates_title"'); echo '<br />'; echo JLMSCSS::h2(_JLMS_GB_CERTIFICATES); JLMS_TMPL::CloseTS(); JLMS_TMPL::OpenTS(); $old_format = $JLMS_CONFIG->get('date_format', 'Y-m-d'); $new_format = $JLMS_CONFIG->get('gradebook_certificate_date', ''); if ($new_format) { $JLMS_CONFIG->set('date_format', $new_format); } echo '<table class="' . JLMSCSS::_('jlmslist') . '" id="usergradebook_certificates" style="width:100%" cellpadding="0" cellspacing="0" border="0">' . "\r\n"; $k = 2; foreach ($lists['user_quiz_certificates'] as $crtf_row) { echo '<tr class="' . JLMSCSS::_('sectiontableentry' . $k) . '"><td width="16"><img class="JLMS_png" src="' . $JLMS_CONFIG->get('live_site') . '/components/com_joomla_lms/lms_images/toolbar/btn_certificate.png" alt="certificate" width="16" height="16" /></td><td width="30%" align="left"><strong>' . $crtf_row->quiz_name . '</strong></td>' . '<td>' . JLMS_offsetDateToDisplay($crtf_row->crtf_date) . '</td>' . '<td align=\'left\'>' . ($JLMS_ACL->CheckPermissions('gradebook', 'view') ? '<a target="_blank" href="' . ampReplace($JLMS_CONFIG->get('live_site') . "/index.php?tmpl=component&option={$option}&Itemid={$Itemid}&no_html=1&task=print_quiz_cert&course_id={$id}&stu_quiz_id={$crtf_row->stu_quiz_id}&user_unique_id={$crtf_row->user_unique_id}") . '">' . _JLMS_GB_PRINT_CERTIFICATE . '</a>' : '') . '</td></tr>'; $k = 3 - $k; } if (isset($rows[0]->user_certificate) && $rows[0]->user_certificate && $is_course_certificate) { $cert_user_id = 0; if (isset($lists['user_id']) && $lists['user_id']) { global $my; if ($my->id == $lists['user_id']) { } else { $cert_user_id = $lists['user_id']; } } $link = ampReplace(sefRelToAbs("index.php?option={$option}&Itemid={$Itemid}&task=gb_get_cert&id={$id}" . ($cert_user_id ? "&user_id={$cert_user_id}" : ''))); echo '<tr class="' . JLMSCSS::_('sectiontableentry' . $k) . '"><td width="16"><img class="JLMS_png" src="' . $JLMS_CONFIG->get('live_site') . '/components/com_joomla_lms/lms_images/toolbar/btn_certificate.png" alt="certificate" width="16" height="16" /></td><td width="30%" align="left"><strong>' . _JLMS_GB_COURSE_CERTIFICATE . '</strong></td>' . '<td>' . JLMS_offsetDateToDisplay($rows[0]->user_certificate_date) . '</td>' . '<td align=\'left\'>' . ($JLMS_ACL->CheckPermissions('gradebook', 'view') ? '<a target="_blank" href="' . $link . '">' . _JLMS_GB_PRINT_CERTIFICATE . '</a>' : ' ') . '</td></tr>'; } JLMS_TMPL::CloseMT(); JLMS_TMPL::CloseTS(); $JLMS_CONFIG->set('date_format', $old_format); } /* END of Certificates MOD */ if (count($lists['sc_rows'])) { $k = 2; $is_shown = 0; foreach ($lists['sc_rows'] as $sc_row) { if ($sc_row->show_in_gradebook) { $is_shown++; if ($is_shown == 1) { JLMS_TMPL::OpenTS('', ' id="usergradebook_scorms_title"'); echo '<br />'; echo JLMSCSS::h2(_JLMS_GB_SCORM_RESULTS); JLMS_TMPL::CloseTS(); JLMS_TMPL::OpenTS(); echo '<table class="' . JLMSCSS::_('jlmslist') . '" id="usergradebook_scorms" style="width:100%" cellpadding="0" cellspacing="0" border="0">' . "\r\n"; } $j = 0; while ($j < count($rows[0]->scorm_info)) { if ($rows[0]->scorm_info[$j]->gbi_id == $sc_row->item_id) { if ($rows[0]->scorm_info[$j]->user_status == -1) { echo '<tr class="' . JLMSCSS::_('sectiontableentry' . $k) . '"><td width="30%" align="left"><strong>' . $sc_row->lpath_name . '</strong></td>' . '<td align=\'left\' colspan="2">' . '-' . '</td></tr>'; $k = 3 - $k; } else { $image = $rows[0]->scorm_info[$j]->user_status ? 'btn_accept.png' : 'btn_cancel.png'; $alt = $rows[0]->scorm_info[$j]->user_status ? 'btn_accept' : 'btn_cancel'; $img = JLMS_gradebook_html::publishIcon(0, 0, 0, '', $alt, $image, $option, false); echo '<tr class="' . JLMSCSS::_('sectiontableentry' . $k) . '"><td width="30%" align="left"><strong>' . $sc_row->lpath_name . '</strong></td>' . '<td width="16">' . $img . '</td>' . '<td align=\'left\'>' . '<b>' . $rows[0]->scorm_info[$j]->user_grade . "</b> (" . $rows[0]->scorm_info[$j]->user_pts . _JLMS_GB_POINTS . ")" . '</td></tr>'; $k = 3 - $k; } } $j++; } } } if ($is_shown) { JLMS_TMPL::CloseMT(); JLMS_TMPL::CloseTS(); } } if (count($lists['quiz_rows'])) { JLMS_TMPL::OpenTS('', ' id="usergradebook_quizzes_title"'); echo '<br />'; echo JLMSCSS::h2(_JLMS_GB_QUIZ_RESULTS); JLMS_TMPL::CloseTS(); JLMS_TMPL::OpenTS(); /*Integration Plugin Percentiles*/ if (isset($lists['chart_percentiles']->show) && $lists['chart_percentiles']->show) { JLMS_TMPL::OpenTS(); echo $lists['chart_percentiles']->chart; JLMS_TMPL::CloseTS(); } /*Integration Plugin Percentiles*/ echo '<table class="' . JLMSCSS::_('jlmslist') . '" id="usergradebook_quizzes" style="width:100%" cellpadding="0" cellspacing="0" border="0">' . "\r\n"; $k = 2; foreach ($lists['quiz_rows'] as $quiz_row) { $j = 0; while ($j < count($rows[0]->quiz_info)) { if ($rows[0]->quiz_info[$j]->gbi_id == $quiz_row->c_id) { // if ($rows[0]->quiz_info[$j]->user_status == -1) { // echo '<tr class="'.JLMSCSS::_('sectiontableentry'.$k).'"><td width="30%" align="left"><strong>'.$quiz_row->c_title.'</strong></td>' // . '<td align=\'left\' colspan="2">' // . '-' // . '</td></tr>'; // $k = 3 - $k; // } else { // $image = $rows[0]->quiz_info[$j]->user_status ? 'btn_accept.png' : 'btn_cancel.png'; // $alt = $rows[0]->quiz_info[$j]->user_status ? 'btn_accept' : 'btn_cancel'; // $img = JLMS_gradebook_html::publishIcon(0, 0, 0, '', $alt, $image, $option, false ); echo '<tr class="' . JLMSCSS::_('sectiontableentry' . $k) . '"><td width="30%" align="left"><strong>' . $quiz_row->c_title . '</strong></td>'; //old functional // echo '<td width="16">'. $img.'</td>'; // echo '<td align=\'left\'>' // . '<b>' . $rows[0]->quiz_info[$j]->user_grade . "</b> (" . $rows[0]->quiz_info[$j]->user_pts_full .")"; // /*Integration Plugin Percentiles*/ // if (isset($rows[0]->quiz_info[$j]->user_percentile)) { // echo ' - '.$rows[0]->quiz_info[$j]->user_percentile; // } // /*Integration Plugin Percentiles*/ // echo '</td>'; //new functional echo '<td>'; echo JLMS_showQuizStatus($rows[0]->quiz_info[$j]); echo '</td>'; if (isset($rows[0]->quiz_info[$j]->user_unique_id)) { $show_print = false; if (isset($rows[0]->quiz_info[$j]->allow_user_pdf_print) && $rows[0]->quiz_info[$j]->allow_user_pdf_print) { $show_print = true; } elseif ($JLMS_ACL->CheckPermissions('gradebook', 'manage')) { $show_print = true; } elseif ($JLMS_ACL->isStaff()) { $show_print = true; } if ($show_print) { echo '' . '<td><a target="_blank" href="' . $JLMS_CONFIG->get('live_site') . '/index.php?tmpl=component&option=com_joomla_lms&Itemid=' . $Itemid . '&no_html=1&task=print_quiz_result&course_id=' . $quiz_row->course_id . '&stu_quiz_id=' . $rows[0]->quiz_info[$j]->stu_quiz_id . '&user_unique_id=' . $rows[0]->quiz_info[$j]->user_unique_id . '">' . _JLMS_PRINT_RESULTS . '</a></td>'; } else { echo '<td>'; echo ' '; echo '</td>'; } } else { echo '<td>'; echo ' '; echo '</td>'; } echo '</tr>'; $k = 3 - $k; // } } $j++; } } JLMS_TMPL::CloseMT(); JLMS_TMPL::CloseTS(); } if (count($lists['gb_rows'])) { JLMS_TMPL::OpenTS('', ' id="usergradebook_grades_title"'); echo '<br />'; echo JLMSCSS::h2(_JLMS_GB_GBI_RESULTS); JLMS_TMPL::CloseTS(); JLMS_TMPL::OpenTS(); ?> <form action="<?php echo sefRelToAbs("index.php?option={$option}&Itemid={$Itemid}"); ?> " method="post" name="adminForm"> <?php echo '<table class="' . JLMSCSS::_('jlmslist') . '" id="usergradebook_grades" style="width:100%" cellpadding="0" cellspacing="0" border="0">' . "\r\n"; $k = 2; foreach ($lists['gb_rows'] as $gb_row) { $j = 0; while ($j < count($rows[0]->grade_info)) { if ($rows[0]->grade_info[$j]->gbi_id == $gb_row->id) { echo '<tr class="' . JLMSCSS::_('sectiontableentry' . $k) . '"><td width="30%" align="left"><strong>' . $gb_row->gbi_name . '</strong></td>' . '<td align=\'left\' colspan="2">' . ($JLMS_ACL->CheckPermissions('gradebook', 'manage') ? JLMS_gradebook_html::Create_SelectList($id, $rows[0]->grade_info[$j]->scale_id, $gb_row->id) : $rows[0]->grade_info[$j]->user_grade); echo '</td></tr>'; $k = 3 - $k; } $j++; } } JLMS_TMPL::CloseMT(); ?> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="Itemid" value="<?php echo $Itemid; ?> " /> <input type="hidden" name="task" value="gradebook" /> <input type="hidden" name="state" value="0" /> <input type="hidden" name="cid2" value="0" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="id" value="<?php echo $id; ?> " /> <input type="hidden" name="user_id" value="<?php echo $lists['user_id']; ?> " /> </form> <?php JLMS_TMPL::CloseTS(); JLMS_TMPL::CloseMT(); } else { JLMS_TMPL::CloseMT(); ?> <form action="<?php echo sefRelToAbs("index.php?option={$option}&Itemid={$Itemid}"); ?> " method="post" name="adminForm"> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="Itemid" value="<?php echo $Itemid; ?> " /> <input type="hidden" name="task" value="gradebook" /> <input type="hidden" name="state" value="0" /> <input type="hidden" name="cid2" value="0" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="id" value="<?php echo $id; ?> " /> <input type="hidden" name="user_id" value="<?php echo $lists['user_id']; ?> " /> </form> <?php } ?> <?php }