Пример #1
0
    function show_billing_form($option, $proc, $user)
    {
        global $Itemid, $JLMS_CONFIG;
        $params2 = new JLMSParameters($proc->params);
        if ($params2->get('description', 'Use this processor if you pay fees by bank account')) {
            // do not use language files here, this is default value for 'description' parameter from processor XML
            ?>
		<br />
		<table cellpadding="0" cellspacing="2" width="100%" border="0" class="jlms_table_no_borders">		
		<tr>
			<td align="left" valign="top" width="50%">
				<?php 
            echo JLMSCSS::h2(_JLMS_DESCRIPTION);
            echo $params2->get('description', 'Use this processor if you pay fees by bank account');
            ?>
			</td>
		</tr>
		</table>
		<br />
		<?php 
        }
    }
    function jlms_room_selecting($course_id, $option, $user_id, $usertype, $recorded_session, $param_book, $en_book, $msg_name, $msg_descr, $msg_access)
    {
        global $my, $JLMS_DB, $Itemid, $JLMS_CONFIG;
        $doc =& JFactory::getDocument();
        $flashcomroot = $JLMS_CONFIG->get('flascommRoot');
        $webRoot = $JLMS_CONFIG->get('live_site');
        $maxclients = $JLMS_CONFIG->get('maxConfClients');
        //include( _JOOMLMS_FRONT_HOME."/includes/flashfix.inc.php" );
        //flashfix_init("components/com_joomla_lms/includes/js" );
        if ($usertype == 1) {
            $recorded_session = "&recorded_session=" . $recorded_session;
        } else {
            $recorded_session = '';
        }
        $room_height = 643;
        if ($JLMS_CONFIG->get('is_trial')) {
            $room_height = 687;
        }
        $doc->addScript($JLMS_CONFIG->get('live_site') . '/components/com_joomla_lms/includes/js/swfobject.js');
        ?>
		<script language="javascript" type="text/javascript">
		<!--//
			function startApp()
			{
				var y= (screen.height/2) - 359;
				var x= (screen.width/2) - 510 ;
				window.open('<?php 
        echo str_replace('&amp;', '&', sefRelToAbs("index.php?tmpl=component&option=com_joomla_lms&Itemid={$Itemid}&task=conference&mode=conference_room&course_id={$course_id}" . $recorded_session));
        ?>
','Conference_room','top='+y+', left='+x+',width=994, height=<?php 
        echo $room_height;
        ?>
, titlebar=0, menubar=no, scrollbars=0, status=1, toolbar=0, resizable=no');
				<?php 
        /* do not replace & with '&amp;' here! */
        ?>
			}
		//-->
		</script>
<?php 
        JLMS_TMPL::OpenMT();
        $hparams = array();
        $toolbar = array();
        if ($usertype == 1) {
            if ($en_book) {
                $toolbar[] = array('btn_type' => 'booking', 'btn_js' => sefRelToAbs("index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=conference&amp;id={$course_id}&amp;mode=booking"));
            }
        }
        $toolbar[] = array('btn_type' => 'archive', 'btn_js' => sefRelToAbs("index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=conference&amp;id={$course_id}&amp;mode=archive"));
        JLMS_TMPL::ShowHeader('conference', _JLMS_CONFERENCE_TITLE, $hparams, $toolbar);
        JLMS_TMPL::OpenTS();
        ?>
		<table width="100%" cellpadding="0" cellspacing="0" border="0" class="jlms_table_no_borders">
			<tr>
<?php 
        $head_msg = _JLMS_CONFERENCE_WELCOME;
        $head_desc = '';
        if ($en_book) {
            if (!$param_book) {
                $head_desc = $msg_name;
                $head_msg = '';
            } elseif ($param_book) {
                $head_msg = $msg_name;
                $head_desc = $msg_descr;
                if ($msg_access && $usertype == 1) {
                    if ($head_desc) {
                        $head_desc .= "<br /><br />" . $msg_access;
                    } else {
                        $head_desc = $msg_access;
                    }
                }
            }
        }
        ?>
				<td colspan="2"><?php 
        if ($head_msg) {
            echo JLMSCSS::h2($head_msg);
        }
        if ($head_desc) {
            ?>
<div class="joomlalms_sys_message" style="text-align: left;"><?php 
            echo $head_desc;
            ?>
</div><?php 
        }
        ?>
</td>
			</tr>
<?php 
        if ($param_book) {
            ?>
			<tr>
				<td width="280"><br />
				<div id="room_enter">
					<strong><?php 
            echo _JLMS_JS_FLASH_REQUIRES;
            ?>
</strong>
				</div>
				<?php 
            $params = 'course_id=' . $course_id . '&amp;flashcommRoot=' . $flashcomroot . '&amp;maxClients=' . $maxclients . '&amp;master=' . $usertype;
            $doc->addScriptDeclaration('
					// <![CDATA[
					window.addEvent(\'domready\', function(){
						var so = new SWFObject("' . $JLMS_CONFIG->get('live_site') . '/components/com_joomla_lms/includes/conference/room_enter_106.swf?' . $params . '", "sotester", "220", "180", "8", "#ffffff");
						so.addVariable("allowScriptAccess", "sameDomain"); // this line is optional, but this example uses the variable and displays this text inside the flash movie
						so.addVariable("wmode", "transparent"); 
						so.addVariable("flashvars", "hello there"); 
						so.addVariable("salign", "t"); 
						so.addVariable("menu", "false");
						so.write("room_enter");
					});
					// ]]>
				');
            ?>
	
				
				<?php 
            /*$params = 'course_id='.$course_id.'&amp;flashcommRoot='.$flashcomroot.'&amp;maxClients='.$maxclients.'&amp;master='.$usertype;
            		echo flashfix_html( 'components/com_joomla_lms/includes/conference/room_enter.swf?'.$params, 220, 180,	array( 'allowScriptAccess'=>'sameDomain', 'wmode'=>'transparent', 'bgcolor'=>'#ffffff',"flashvars"=> "hello there", 'salign'=>'t', 'menu'=>'false') // additional parameters
            		);*/
            ?>
	
				</td>
				<td align="left">
				<?php 
            $text = JLMS_ShowText_WithFeatures($JLMS_CONFIG->get('conf_description'));
            echo $text;
            ?>
				</td>
			</tr>
	<?php 
        }
        ?>
		</table>
<?php 
        JLMS_TMPL::CloseTS();
        JLMS_TMPL::CloseMT();
    }
    function editUser($user_data, $lists, $option, $course_id, $group_id)
    {
        global $Itemid, $JLMS_CONFIG;
        $is_dis_start = !(isset($user_data->publish_start) && $user_data->publish_start == 1);
        $is_dis_end = !(isset($user_data->publish_end) && $user_data->publish_end == 1);
        ?>
<script language="javascript" type="text/javascript">
<!--
window.addEvent('domready', function() {
	<?php 
        if ($is_dis_start) {
            ?>
	
			document.adminForm.startday.disabled = true;
			document.adminForm.startmonth.disabled = true;
			document.adminForm.startyear.disabled = true;
	<?php 
        }
        if ($is_dis_end) {
            ?>
			
			document.adminForm.endday.disabled = true;
			document.adminForm.endmonth.disabled = true;
			document.adminForm.endyear.disabled = true;	
	<?php 
        }
        ?>
	
}
);
function setgood() {
	return true;
}
function submitbutton(pressbutton) {
	var form = document.adminForm;
	try {
		form.onsubmit();
	} catch(e) {
		//alert(e);
	}
	// do field validation
	if((pressbutton == 'edit_user_save') && form.role_id && form.role_id.value == '0'){
		alert( "<?php 
        echo _JLMS_USERS_SELECT_ROLE;
        ?>
" );
		form.role_id.focus();
	} else if ((pressbutton == 'edit_user_save') || (pressbutton == 'cancel_user') ) {
		form.task.value = pressbutton;
		form.submit();
	}
}
var is_start_c = <?php 
        echo $user_data->publish_start ? '1' : '0';
        ?>
; var is_end_c = <?php 
        echo $user_data->publish_end ? '1' : '0';
        ?>
;
function jlms_Change_start() {
	var form=document.adminForm;
	if (is_start_c == 1) {
		is_start_c = 0
		form.startday.disabled = true;
		form.startmonth.disabled = true;
		form.startyear.disabled = true;
	} else {
		is_start_c = 1
		form.startday.disabled = false;
		form.startmonth.disabled = false;
		form.startyear.disabled = false;
	}
}
function jlms_Change_end() {
	var form=document.adminForm;
	if (is_end_c == 1) {
		is_end_c = 0
		form.endday.disabled = true;
		form.endmonth.disabled = true;
		form.endyear.disabled = true;
	} else {
		is_end_c = 1
		form.endday.disabled = false;
		form.endmonth.disabled = false;
		form.endyear.disabled = false;
	}
}
function jlms_um_change_type(type_elem) {
	if (type_elem.checked) {
		val = type_elem.value;
		if (val == 1 || val == '1') {
			type_elem.form.publish_end.disabled = true;
			type_elem.form.publish_start.disabled = true;
			type_elem.form.days_number.disabled = true;
			type_elem.form.endday.disabled = true;
			type_elem.form.endmonth.disabled = true;
			type_elem.form.endyear.disabled = true;
			type_elem.form.startday.disabled = true;
			type_elem.form.startmonth.disabled = true;
			type_elem.form.startyear.disabled = true;
		} else if (val == 2 || val == '2') {
			type_elem.form.publish_end.disabled = false;
			type_elem.form.publish_start.disabled = false;
			type_elem.form.days_number.disabled = true;
			if (is_start_c != 1) {
				type_elem.form.startday.disabled = true;
				type_elem.form.startmonth.disabled = true;
				type_elem.form.startyear.disabled = true;
			} else {
				type_elem.form.startday.disabled = false;
				type_elem.form.startmonth.disabled = false;
				type_elem.form.startyear.disabled = false;
			}
			if (is_end_c != 1) {
				type_elem.form.endday.disabled = true;
				type_elem.form.endmonth.disabled = true;
				type_elem.form.endyear.disabled = true;
			} else {
				type_elem.form.endday.disabled = false;
				type_elem.form.endmonth.disabled = false;
				type_elem.form.endyear.disabled = false;
			}
		} else if (val == 3 || val == '3') {
			type_elem.form.publish_end.disabled = true;
			type_elem.form.publish_start.disabled = true;
			type_elem.form.days_number.disabled = false;
			type_elem.form.endday.disabled = true;
			type_elem.form.endmonth.disabled = true;
			type_elem.form.endyear.disabled = true;
			type_elem.form.startday.disabled = true;
			type_elem.form.startmonth.disabled = true;
			type_elem.form.startyear.disabled = true;
		}
	}

}
//-->
</script>
<?php 
        JLMS_TMPL::OpenMT();
        $hparams = array();
        $toolbar = array();
        $toolbar[] = array('btn_type' => 'save', 'btn_js' => "javascript:submitbutton('edit_user_save');");
        $toolbar[] = array('btn_type' => 'cancel', 'btn_js' => "javascript:submitbutton('cancel_user');");
        JLMS_TMPL::ShowHeader('user', _JLMS_USER_EDIT_TITLE, $hparams, $toolbar);
        JLMS_TMPL::OpenTS();
        $is_lifetime = !$user_data->publish_start && !$user_data->publish_end;
        ?>
		<form action="<?php 
        echo sefRelToAbs("index.php?option={$option}&amp;Itemid={$Itemid}");
        ?>
" method="post" name="adminForm" onsubmit="setgood();">
			<table width="100%" cellpadding="0" cellspacing="0" border="0" id="jlms_item_properties">
				<tr>
					<td width="15%" valign="middle" style="vertical-align:middle ">
						<?php 
        echo _JLMS_USER_INFO;
        ?>
					</td>
					<td>
					<?php 
        echo $user_data->username . ", " . $user_data->name . " (" . $user_data->email . ")";
        ?>
					</td>
				</tr>
				<tr>
				<?php 
        if ($JLMS_CONFIG->get('use_global_groups', 1)) {
            ?>
					<td colspan="2">
					<input type="hidden" name="group_id" value="<?php 
            echo $group_id;
            ?>
" />
					</td>
					<?php 
        } else {
            ?>
					<td><br /><?php 
            echo _JLMS_USER_GROUP_INFO;
            ?>
</td>
					<td><br /><?php 
            echo $lists['groups'];
            ?>
</td>
					<?php 
        }
        ?>
				</tr>
				<tr>
					<td colspan="2"><br /><?php 
        echo JLMSCSS::h2(_JLMS_USERS_ROLE);
        ?>
</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $lists['role'];
        ?>
					</td>
				</tr>
				<tr>
					<td colspan="2"><br /><?php 
        echo JLMSCSS::h2(_JLMS_USERS_TBL_HEAD_USER_ACC_PERIOD);
        ?>
</td>
				</tr>
				<tr>
					<td colspan="2" style="text-align:left"><input onclick="jlms_um_change_type(this);" type="radio" id="access_period_type_1" name="access_period_type" value="1"<?php 
        echo $is_lifetime ? ' checked="checked"' : '';
        ?>
 /><label for="access_period_type_1"><?php 
        echo _JLMS_USERS_LIFETIME_ACC;
        ?>
</label></td>
				</tr>
				<tr>
					<td colspan="2" style="text-align:left"><br /><input onclick="jlms_um_change_type(this);" type="radio" id="access_period_type_2" name="access_period_type" value="2"<?php 
        echo !$is_lifetime ? ' checked="checked"' : '';
        ?>
 /><label for="access_period_type_2"><?php 
        echo _JLMS_USERS_DTD_ACC;
        ?>
</label></td>
				</tr>
				<tr>
					<td valign="middle"><br /><?php 
        echo _JLMS_START_DATE;
        ?>
</td>
					<td valign="middle" style="vertical-align:middle "><br />
						<table cellpadding="0" cellspacing="0" border="0" class="jlms_date_outer"><tr><td width="20" valign="middle"><input <?php 
        echo $is_lifetime ? 'disabled="disabled" ' : '';
        ?>
type="checkbox" value="1" name="publish_start" onclick="jlms_Change_start()"<?php 
        echo $user_data->publish_start ? ' checked="checked"' : '';
        ?>
 /></td>
						<td valign="middle" style="vertical-align:middle ">
						<?php 
        $s_date = $is_dis_start ? date('Y-m-d') : $user_data->start_date;
        JLMS_HTML::_('calendar.calendar', $s_date, 'start', 'start');
        ?>
						</td></tr></table>				
					</td>
				</tr>
				<tr>
					<td valign="middle"><br /><?php 
        echo _JLMS_END_DATE;
        ?>
</td>
					<td valign="middle" style="vertical-align:middle "><br />
						<table cellpadding="0" cellspacing="0" border="0" class="jlms_date_outer"><tr><td width="20" valign="middle"><input <?php 
        echo $is_lifetime ? 'disabled="disabled" ' : '';
        ?>
type="checkbox" value="1" name="publish_end" onclick="jlms_Change_end()"<?php 
        echo $user_data->publish_end ? ' checked="checked"' : '';
        ?>
 /></td>
						<td valign="middle" style="vertical-align:middle ">
						<?php 
        $e_date = $is_dis_end ? date('Y-m-d') : $user_data->end_date;
        JLMS_HTML::_('calendar.calendar', $e_date, 'end', 'end');
        ?>
					
						</td></tr></table>
					</td>
				</tr>
				<?php 
        if ($user_data->value) {
            ?>
					<tr>
					<td valign="middle"><br /><?php 
            echo _JLMS_ENROLL_TIME;
            ?>
</td>
					<td valign="middle" style="vertical-align:middle "><br />
					<table cellpadding="0" cellspacing="0" border="0" class="jlms_date_outer"><tr><td width="20" valign="middle"></td>
						<td valign="middle" style="vertical-align:middle ">
						<?php 
            JLMS_HTML::_('calendar.calendar', $user_data->enrol_time, 'enrol_time', 'enrol_time', '%Y-%m-%d %H:%M');
            ?>
 
					</td></tr></table>				
					</td>
					</tr>
				<?php 
        }
        ?>
				<tr>
					<td colspan="2" style="text-align:left"><br /><input onclick="jlms_um_change_type(this);" type="radio" id="access_period_type_3" name="access_period_type" value="3" /><label for="access_period_type_3"><?php 
        echo _JLMS_USERS_XDAYS_ACC;
        ?>
</label></td>
				</tr>
				<tr>
					<td valign="middle"><br /><?php 
        echo _JLMS_USERS_XDAYS_NUMBER;
        ?>
</td>
					<td valign="middle" style="vertical-align:middle "><br />
						<input type="text" name="days_number" value="" disabled="disabled" />
					</td>
				</tr>
				<tr>
					<td colspan="2" valign="top"><br /><?php 
        echo _JLMS_TEACHER_COMMENT;
        ?>
</td>
				</tr>
				<tr>
					<td colspan="2">
					<?php 
        JLMS_editorArea('editor1', $user_data->teacher_comment, 'teacher_comment', '100%', '250', '40', '20');
        ?>
					</td>
				</tr>
				<?php 
        if ($user_data->spec_reg) {
            echo '<tr><td colspan="2">&nbsp;</td></tr>';
            foreach ($user_data->spec_answers as $ucsra) {
                echo '<tr><td>' . $ucsra->course_question . '</td><td>' . ($ucsra->user_answer ? $ucsra->user_answer : '&nbsp;') . '</td></tr>';
            }
        }
        ?>
			</table>
			<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
			<input type="hidden" name="Itemid" value="<?php 
        echo $Itemid;
        ?>
" />
			<input type="hidden" name="task" value="add_user_save" />
			<input type="hidden" name="boxchecked" value="0" />
			<input type="hidden" name="course_id" value="<?php 
        echo $course_id;
        ?>
" />
			<input type="hidden" name="user_id" value="<?php 
        echo $user_data->value;
        ?>
" />
		</form>
	<?php 
        JLMS_TMPL::CloseTS();
        JLMS_TMPL::CloseMT();
    }
    function showTracking($id, $option, &$rows, &$lists, &$track_images, &$latest_activities, $msg = '')
    {
        global $my;
        $JLMS_ACL =& JLMSFactory::getACL();
        $JLMS_CONFIG =& JLMSFactory::getConfig();
        $Itemid = $JLMS_CONFIG->get('Itemid');
        JLMS_TMPL::OpenMT();
        $hparams = array();
        //$hparams['second_tb_header'] = _JLMS_TRACK_TITLE_ACCESS.JLMS_TRACKING_getTitle(null);
        $toolbar = array();
        if ($JLMS_ACL->CheckPermissions('tracking', 'clear_stats')) {
            $toolbar[] = array('btn_type' => 'clear', 'btn_js' => sefRelToAbs("index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=track_clear&amp;id={$id}"));
        }
        JLMS_TMPL::ShowHeader('tracking', _JLMS_TRACK_TITLE, $hparams, $toolbar);
        JLMS_TMPL::OpenTS();
        ?>
		<form action="<?php 
        echo sefRelToAbs("index.php?option={$option}&Itemid={$Itemid}");
        ?>
" method="post" name="adminForm">
			<table width="100%" cellpadding="2" cellspacing="0" border="0" class="jlms_table_no_borders">
			<tr>
				<td width="65%" valign="top">
					<?php 
        echo JLMSCSS::h2(_JLMS_TRACKING_LATEST_COURSE_ACTIVITIES);
        ?>
					<table width="100%" cellpadding="0" cellspacing="0" border="0" class="<?php 
        echo JLMSCSS::_('jlmslist');
        ?>
">
						<tr>
							<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
">
							<?php 
        echo _JLMS_TRACK_TBL_H_STU;
        ?>
							</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
							<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
">
							&nbsp;
							</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
							<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
">
							<?php 
        echo _JLMS_TRACK_TBL_H_ACTIVITY;
        ?>
							</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
							<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
">
							<?php 
        echo _JLMS_TRACK_TBL_H_TIME;
        ?>
							</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
						</tr>
<?php 
        $k = 1;
        if (!count($latest_activities)) {
            echo '<tr class="' . JLMSCSS::_('sectiontableentry' . $k) . '"><td colspan="4">' . _JLMS_TRACKING_NO_STATISTICS . '</td></tr>';
        }
        foreach ($latest_activities as $latest_activity) {
            echo '<tr class="' . JLMSCSS::_('sectiontableentry' . $k) . '">';
            echo '<td>' . $latest_activity->user . '</td>';
            echo '<td width="16"><img src="' . $JLMS_CONFIG->get('live_site') . '/components/com_joomla_lms/lms_images/' . $latest_activity->icon . '" alt="i" width="16" height="16" border="0" /></td>';
            echo '<td>' . $latest_activity->activity . '</td>';
            echo '<td>' . JLMS_dateToDisplay($latest_activity->time, true, $JLMS_CONFIG->get('offset') * 60 * 60, ' H:i:s') . '</td>';
            echo '</tr>';
            $k = 3 - $k;
        }
        ?>
					</table>
				</td>
				<td valign="top">
					<?php 
        echo JLMSCSS::h2(_JLMS_TRACKING_STATISTICS_REPORTS);
        ?>
					<table width="100%" cellpadding="0" cellspacing="0" border="0" class="<?php 
        echo JLMSCSS::_('jlmslist');
        ?>
">
						<tr>
							<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" colspan="2">
							<?php 
        echo _JLMS_TRACKING_STATISTICS_REPORTS;
        ?>
							</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
						</tr>
						<tr class="<?php 
        echo JLMSCSS::_('sectiontableentry1');
        ?>
">
							<td width="16"><img src="<?php 
        echo $JLMS_CONFIG->get('live_site');
        ?>
/components/com_joomla_lms/lms_images/toolbar/tlb_tracking.png" alt="i" width="16" height="16" border="0" /></td>
							<td><a href="<?php 
        echo JLMSRoute::_("index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=tracking&amp;id={$id}&amp;page=12");
        ?>
"><?php 
        echo _JLMS_TRACKING_DOCUMENTS_STATISTICS;
        ?>
</a></td>
						</tr>
						<tr class="<?php 
        echo JLMSCSS::_('sectiontableentry2');
        ?>
">
							<td width="16"><img src="<?php 
        echo $JLMS_CONFIG->get('live_site');
        ?>
/components/com_joomla_lms/lms_images/toolbar/tlb_tracking.png" alt="i" width="16" height="16" border="0" /></td>
							<td><a href="<?php 
        echo JLMSRoute::_("index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=tracking&amp;id={$id}&amp;page=13");
        ?>
"><?php 
        echo _JLMS_TRACKING_LPATHS_STATISTICS;
        ?>
</a></td>
						</tr>
						<tr class="<?php 
        echo JLMSCSS::_('sectiontableentry1');
        ?>
">
							<td width="16"><img src="<?php 
        echo $JLMS_CONFIG->get('live_site');
        ?>
/components/com_joomla_lms/lms_images/toolbar/tlb_tracking.png" alt="i" width="16" height="16" border="0" /></td>
							<td><a href="<?php 
        echo JLMSRoute::_("index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=tracking&amp;id={$id}&amp;page=14");
        ?>
"><?php 
        echo _JLMS_TRACKING_LATEST_COURSE_ACTIVITIES_REPORT;
        ?>
</a></td>
						</tr>
						<tr class="<?php 
        echo JLMSCSS::_('sectiontableentry2');
        ?>
">
							<td width="16"><img src="<?php 
        echo $JLMS_CONFIG->get('live_site');
        ?>
/components/com_joomla_lms/lms_images/toolbar/tlb_quiz.png" alt="i" width="16" height="16" border="0" /></td>
							<td><a href="<?php 
        echo JLMSRoute::_("index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=quizzes&amp;id={$id}&amp;page=reports");
        ?>
"><?php 
        echo _JLMS_TRACKING_QUIZZES_REPORT;
        ?>
</a></td>
						</tr>
						<tr class="<?php 
        echo JLMSCSS::_('sectiontableentry1');
        ?>
">
							<td width="16"><img src="<?php 
        echo $JLMS_CONFIG->get('live_site');
        ?>
/components/com_joomla_lms/lms_images/toolbar/tlb_quiz.png" alt="i" width="16" height="16" border="0" /></td>
							<td><a href="<?php 
        echo JLMSRoute::_("index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=quizzes&amp;id={$id}&amp;page=quiz_bars");
        ?>
"><?php 
        echo _JLMS_TRACKING_QUIZZES_ANSWERS_STATISTICS;
        ?>
</a></td>
						</tr>
					</table>
				</td>
			</tr>
			</table><br />
			<?php 
        echo JLMSCSS::h2(_JLMS_TRACK_TITLE_ACCESS . JLMS_TRACKING_getTitle(null));
        ?>
			<table width="100%" cellpadding="0" cellspacing="0" border="0" class="jlms_table_no_borders">
				<tr>
					<td align="right" style="text-align:right">
						<div align="right" style="white-space:nowrap">
						<?php 
        $lists['filter_month'] = str_replace('<option value="0" selected="selected"></option>', '<option value="0" selected="selected">&nbsp;</option>', $lists['filter_month']);
        $lists['filter_month'] = str_replace('<option value="0"></option>', '<option value="0">&nbsp;</option>', $lists['filter_month']);
        ?>
							<?php 
        echo $lists['filter'];
        ?>
&nbsp;<?php 
        echo $lists['filter_month'] . '<br />';
        if (isset($lists['filter2'])) {
            echo $lists['filter2'] . '<br />';
        }
        if (isset($lists['filter3'])) {
            echo $lists['filter3'] . '<br />';
        }
        echo $lists['filter_stu'];
        ?>
						</div>
					</td>
				</tr>
			</table>
	<?php 
        $link = "index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=tracking&amp;id={$id}";
        ?>
			<table width="100%" cellpadding="0" cellspacing="0" border="0" class="<?php 
        echo JLMSCSS::_('jlmslist');
        ?>
">
				<tr>
					<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
"><?php 
        echo _JLMS_TRACK_TBL_H_DATE;
        ?>
</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
					<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" align="center"><a href="<?php 
        echo sefRelToAbs($link . "&amp;page=1");
        ?>
" title="<?php 
        echo _JLMS_TRACK_TBL_H_DOCS;
        ?>
"><?php 
        echo _JLMS_TRACK_TBL_H_DOCS;
        ?>
</a></<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
					<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" align="center"><a href="<?php 
        echo sefRelToAbs($link . "&amp;page=2");
        ?>
" title="<?php 
        echo _JLMS_TRACK_TBL_H_LINKS;
        ?>
"><?php 
        echo _JLMS_TRACK_TBL_H_LINKS;
        ?>
</a></<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
					<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" align="center"><a href="<?php 
        echo sefRelToAbs($link . "&amp;page=3");
        ?>
" title="<?php 
        echo _JLMS_TRACK_TBL_H_DROP;
        ?>
"><?php 
        echo _JLMS_TRACK_TBL_H_DROP;
        ?>
</a></<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
					<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" align="center"><a href="<?php 
        echo sefRelToAbs($link . "&amp;page=4");
        ?>
" title="<?php 
        echo _JLMS_TRACK_TBL_H_LPATH;
        ?>
"><?php 
        echo _JLMS_TRACK_TBL_H_LPATH;
        ?>
</a></<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
					<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" align="center"><a href="<?php 
        echo sefRelToAbs($link . "&amp;page=5");
        ?>
" title="<?php 
        echo _JLMS_TRACK_TBL_H_HW;
        ?>
"><?php 
        echo _JLMS_TRACK_TBL_H_HW;
        ?>
</a></<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
					<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" align="center"><a href="<?php 
        echo sefRelToAbs($link . "&amp;page=6");
        ?>
" title="<?php 
        echo _JLMS_TRACK_TBL_H_ANNOUNC;
        ?>
"><?php 
        echo _JLMS_TRACK_TBL_H_ANNOUNC;
        ?>
</a></<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
					<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" align="center"><a href="<?php 
        echo sefRelToAbs($link . "&amp;page=7");
        ?>
" title="<?php 
        echo _JLMS_TRACK_TBL_H_CONF;
        ?>
"><?php 
        echo _JLMS_TRACK_TBL_H_CONF;
        ?>
</a></<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
					<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" align="center"><a href="<?php 
        echo sefRelToAbs($link . "&amp;page=8");
        ?>
" title="<?php 
        echo _JLMS_TRACK_TBL_H_CHAT;
        ?>
"><?php 
        echo _JLMS_TRACK_TBL_H_CHAT;
        ?>
</a></<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
					<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" align="center"><a href="<?php 
        echo sefRelToAbs($link . "&amp;page=9");
        ?>
" title="<?php 
        echo _JLMS_TRACK_TBL_H_LPPLAY;
        ?>
"><?php 
        echo _JLMS_TRACK_TBL_H_LPPLAY;
        ?>
</a></<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
					<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" align="center"><a href="<?php 
        echo sefRelToAbs($link . "&amp;page=10");
        ?>
" title="<?php 
        echo _JLMS_TRACK_TBL_H_FORUM;
        ?>
"><?php 
        echo _JLMS_TRACK_TBL_H_FORUM;
        ?>
</a></<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
					<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" align="center"><a href="<?php 
        echo sefRelToAbs($link . "&amp;page=11");
        ?>
" title="<?php 
        echo _JLMS_TRACK_TBL_H_QUIZ;
        ?>
"><?php 
        echo _JLMS_TRACK_TBL_H_QUIZ;
        ?>
</a></<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
					<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" align="center"><?php 
        echo _JLMS_TOTAL;
        ?>
</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
				</tr>
			<?php 
        $k = 1;
        $i = 0;
        $total_counts = array();
        for ($j = 0; $j < 11; $j++) {
            $total_counts[$j] = 0;
        }
        while ($i < count($rows)) {
            $row = $rows[$i];
            $subtotal = 0;
            $link = "index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=tracking&amp;id={$id}&amp;filter_month={$row->month}";
            ?>
				<tr class="<?php 
            echo JLMSCSS::_('sectiontableentry' . $k);
            ?>
">
					<td align="left" valign="middle" style="vertical-align:middle ">
					<?php 
            if ($lists['is_month']) {
                echo JLMS_dateToDisplay(mktime(0, 0, 0, $lists['month'], $row->month, $lists['year']), true);
            } else {
                echo '<a href="' . sefRelToAbs($link) . '" title="' . _JLMS_VIEW_DETAILS . '">' . month_lang(strftime("%m", mktime(0, 0, 0, $row->month + 1, 0, 0)), 0, 2) . '</a>';
            }
            ?>
					</td>
					<?php 
            $j = 1;
            $month = $rows[$i]->month;
            $year = $rows[$i]->year;
            do {
                while ($j < $rows[$i]->page_id) {
                    echo '<td align="center">0</td>';
                    $j++;
                }
                if ($rows[$i]->month == $month && $rows[$i]->year == $year) {
                    echo '<td align="center">' . $rows[$i]->count_hits . '</td>';
                    $total_counts[$j - 1] = $total_counts[$j - 1] + $rows[$i]->count_hits;
                    $subtotal = $subtotal + $rows[$i]->count_hits;
                }
                $j++;
                $i++;
            } while ($i < count($rows) && $rows[$i]->month == $month && $rows[$i]->year == $year);
            while ($j <= 11) {
                echo '<td align="center">0</td>';
                $j++;
            }
            echo '<td align="center"><strong>' . $subtotal . '</strong></td>';
            if (isset($rows[$i]->month) && $rows[$i]->month != $month) {
                $i--;
            }
            ?>
				</tr>
				<?php 
            $k = 3 - $k;
            $i++;
        }
        ?>
				<tr class="<?php 
        echo JLMSCSS::_('sectiontableentry' . $k);
        ?>
">
					<td align="left" valign="middle" style="vertical-align:middle "><?php 
        echo _JLMS_TOTAL;
        ?>
</td>
					<?php 
        $subtotal = 0;
        for ($j = 0; $j < 11; $j++) {
            echo '<td align="center"><strong>' . $total_counts[$j] . '</strong></td>';
            $subtotal = $subtotal + $total_counts[$j];
        }
        echo '<td align="center"><strong>' . $subtotal . '</strong></td>';
        ?>
				</tr>
			</table><br />
			<?php 
        if (!empty($track_images)) {
            echo "<table cellpadding='0' cellspacing='0' border='0' width='100%' class='jlms_table_no_borders'>";
            $i = 0;
            foreach ($track_images as $ti) {
                if ($i == 0) {
                    echo "<tr><td align='center' valign='top'>";
                } elseif ($i == 2) {
                    echo "</td><td align='center' valign='top'>";
                } elseif ($i == 3) {
                    echo "</td></tr><tr><td colspan='2' align='center' valign='top'>";
                } elseif ($i == 4) {
                    echo "</td></tr><tr><td colspan='2' align='center' valign='top'>";
                }
                ?>
					<?php 
                echo JLMSCSS::h2($ti->title);
                ?>
					<img src="<?php 
                echo $JLMS_CONFIG->get('live_site') . "/" . $JLMS_CONFIG->get('temp_folder', '') . "/{$ti->filename}";
                ?>
" width="<?php 
                echo $ti->width;
                ?>
" height="<?php 
                echo $ti->height;
                ?>
" alt="<?php 
                echo $ti->alt;
                ?>
" title="<?php 
                echo $ti->alt;
                ?>
" border='0' />
				<?php 
                if ($i == 4) {
                    echo "</td></tr>";
                }
                $i++;
            }
            if (count($track_images) == 4) {
                echo "</td></tr>";
            }
            echo "</table>";
        } elseif ($msg) {
            echo '<div class="joomlalms_sys_message">' . $msg . '</div>';
        }
        ?>

		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="Itemid" value="<?php 
        echo $Itemid;
        ?>
" />
		<input type="hidden" name="task" value="tracking" />
		<input type="hidden" name="state" value="0" />
		<input type="hidden" name="id" value="<?php 
        echo $id;
        ?>
" />
		</form>
<?php 
        JLMS_TMPL::CloseTS();
        JLMS_TMPL::CloseMT();
    }
Пример #5
0
    function JLMS_editCertificate_OneRole(&$row, &$fonts, $pref = '', $default = false)
    {
        global $JLMS_DB, $JLMS_CONFIG;
        $parent_id = isset($row->id) ? intval($row->id) : 0;
        $parent_course = isset($row->course_id) ? intval($row->course_id) : 0;
        $query = "SELECT * FROM #__lms_certificates WHERE parent_id = {$parent_id} AND course_id = {$parent_course} AND crtf_type = '-2' ORDER BY crtf_align";
        $JLMS_DB->SetQuery($query);
        $cmsgs_saved = $JLMS_DB->LoadObjectList();
        $f = mosHTML::selectList($fonts, 'crtf_font' . ($pref ? '_' . $pref : ''), $default ? ' disabled="disabled"' : '', 'value', 'text', isset($row->crtf_font) ? $row->crtf_font : 'arial.ttf');
        $f2 = mosHTML::selectList($fonts, 'new_txt_mes_font' . ($pref ? '_' . $pref : ''), ' style="width:180px"' . ($default ? ' disabled="disabled"' : ''), 'value', 'text');
        if ($pref) {
            ?>
		<tr>
			<td valign="middle" style="vertical-align:middle" width="25%"><br /><?php 
            echo _JLMS_CRTF_USE_DEFAULT;
            ?>
</td>
			<td>
				<br /><input size="40" onchange="jlms_changeCrtfDefaultValue(this, '<?php 
            echo $pref;
            ?>
')" class="inputbox" type="checkbox"<?php 
            echo $default ? ' checked="checked"' : '';
            ?>
 name="certificate_default<?php 
            echo $pref ? '_' . $pref : '';
            ?>
" value="1" />
			</td>
		</tr>
	<?php 
        }
        ?>
	<tr>
		<td valign="middle" style="vertical-align:middle" width="25%"><br /><?php 
        echo _JLMS_CHOOSE_FILE;
        ?>
</td>
		<td>
			<br /><input size="40" class="inputbox" type="file"<?php 
        echo $default ? ' disabled="disabled"' : '';
        ?>
 name="userfile<?php 
        echo $pref ? '_' . $pref : '';
        ?>
" />
			<?php 
        echo $row->file_id && !$default ? '<br />' . _JLMS_FILE_ATTACHED : '<br />' . _JLMS_FILE_NOT_ATTACHED;
        ?>
		</td>
	</tr>
	<tr>
		<td><br /><?php 
        echo _JLMS_GB_CRT_TEXT;
        ?>
</td>
		<td><br />
			<textarea class="inputbox" name="crtf_text<?php 
        echo $pref ? '_' . $pref : '';
        ?>
"<?php 
        echo $default ? ' disabled="disabled"' : '';
        ?>
 rows="6" cols="40"><?php 
        echo $row->crtf_text;
        ?>
</textarea>
		</td>
	</tr>
	<tr><td colspan="2"><div class="joomlalms_info_legend"><?php 
        echo _JLMS_GB_CRTF_TEXT_NOTE;
        ?>
</div></td></tr>
	<tr>
		<td valign="middle" style="vertical-align:middle"><br /><?php 
        echo _JLMS_GB_CRT_TEXT_ALIGN;
        ?>
</td>
		<td>
			<?php 
        $list_a = array();
        $list_a[] = mosHTML::makeOption('0', _JLMS_LEFT);
        $list_a[] = mosHTML::makeOption('1', _JLMS_CENTER);
        $list_a[] = mosHTML::makeOption('2', _JLMS_RIGHT);
        $rrr = mosHTML::radioList($list_a, 'crtf_align' . ($pref ? '_' . $pref : ''), $default ? ' disabled="disabled"' : '', $row->crtf_align);
        ?>
			<br /><?php 
        echo $rrr;
        ?>
		</td>
	</tr>
	<tr>
		<td valign="middle" style="vertical-align:middle"><br /><?php 
        echo _JLMS_GB_CRT_TEXT_SHADOW;
        ?>
</td>
		<td><br />
			<?php 
        echo mosHTML::yesnoRadioList('crtf_shadow' . ($pref ? '_' . $pref : ''), $default ? ' disabled="disabled"' : '', $row->crtf_shadow);
        ?>
		</td>
	</tr>
	<tr>
		<td valign="middle" style="vertical-align:middle"><br /><?php 
        echo _JLMS_GB_CRT_TEXT_X;
        ?>
</td>
		<td>
			<br /><input size="40" class="inputbox" type="text"<?php 
        echo $default ? ' disabled="disabled"' : '';
        ?>
 name="text_x<?php 
        echo $pref ? '_' . $pref : '';
        ?>
" value="<?php 
        echo $row->text_x;
        ?>
" />
		</td>
	</tr>
	<tr>
		<td valign="middle" style="vertical-align:middle"><br /><?php 
        echo _JLMS_GB_CRT_TEXT_Y;
        ?>
</td>
		<td>
			<br /><input size="40" class="inputbox" type="text"<?php 
        echo $default ? ' disabled="disabled"' : '';
        ?>
 name="text_y<?php 
        echo $pref ? '_' . $pref : '';
        ?>
" value="<?php 
        echo $row->text_y;
        ?>
" />
		</td>
	</tr>
	<tr>
		<td valign="middle" style="vertical-align:middle"><br /><?php 
        echo _JLMS_GB_CRT_TEXT_SIZE;
        ?>
</td>
		<td>
			<br /><input size="40" class="inputbox" type="text"<?php 
        echo $default ? ' disabled="disabled"' : '';
        ?>
 name="text_size<?php 
        echo $pref ? '_' . $pref : '';
        ?>
" value="<?php 
        echo $row->text_size;
        ?>
" />
			<input type="hidden" name="certificate_types[]" value="<?php 
        echo $pref;
        ?>
" />
		</td>
	</tr>
	<tr>
		<td valign="middle" style="vertical-align:middle"><br /><?php 
        echo _JLMS_CRTF_FONT . ':';
        ?>
</td>
		<td>
			<br /><?php 
        echo $f;
        ?>
		</td>
	</tr>
	<tr>
		<td colspan="2"><?php 
        echo JLMSCSS::h2(_JLMS_CRTF_TEXT_FIELDS);
        ?>
</td>
	</tr>
	<tr>
		<td colspan="2">
<?php 
        echo '<table width="100%" cellpadding="0" cellspacing="0" id="certificate_custom_msgs' . ($pref ? '_' . $pref : '') . '" class="' . JLMSCSS::_('jlmslist') . '">';
        echo '<tr>';
        echo '	<' . JLMSCSS::tableheadertag() . ' width="20" class="' . JLMSCSS::_('sectiontableheader') . '" align="center">#</' . JLMSCSS::tableheadertag() . '>';
        echo '	<' . JLMSCSS::tableheadertag() . ' class="' . JLMSCSS::_('sectiontableheader') . '" width="200">' . _JLMS_CRTF_SHORT_TEXT_FIELD . '</' . JLMSCSS::tableheadertag() . '>';
        echo '	<' . JLMSCSS::tableheadertag() . ' class="' . JLMSCSS::_('sectiontableheader') . '" width="30" align="center">' . _JLMS_CRTF_SHORT_SHADOW . '</' . JLMSCSS::tableheadertag() . '>';
        echo '	<' . JLMSCSS::tableheadertag() . ' class="' . JLMSCSS::_('sectiontableheader') . '" width="40" align="center">' . _JLMS_CRTF_SHORT_X . '</' . JLMSCSS::tableheadertag() . '>';
        echo '	<' . JLMSCSS::tableheadertag() . ' class="' . JLMSCSS::_('sectiontableheader') . '" width="40" align="center">' . _JLMS_CRTF_SHORT_Y . '</' . JLMSCSS::tableheadertag() . '>';
        echo '	<' . JLMSCSS::tableheadertag() . ' class="' . JLMSCSS::_('sectiontableheader') . '" width="40" align="center">' . _JLMS_CRTF_SHORT_HEIGHT . '</' . JLMSCSS::tableheadertag() . '>';
        echo '	<' . JLMSCSS::tableheadertag() . ' class="' . JLMSCSS::_('sectiontableheader') . '">' . _JLMS_CRTF_SHORT_FONT . '</' . JLMSCSS::tableheadertag() . '>';
        echo '<' . JLMSCSS::tableheadertag() . ' class="' . JLMSCSS::_('sectiontableheader') . '" width="20">&nbsp;</' . JLMSCSS::tableheadertag() . '>';
        echo '<' . JLMSCSS::tableheadertag() . ' class="' . JLMSCSS::_('sectiontableheader') . '" width="20">&nbsp;</' . JLMSCSS::tableheadertag() . '>';
        echo '<' . JLMSCSS::tableheadertag() . ' class="' . JLMSCSS::_('sectiontableheader') . '" width="20">&nbsp;</' . JLMSCSS::tableheadertag() . '>';
        echo '</tr>';
        $k = 1;
        $i = 1;
        foreach ($cmsgs_saved as $cmsg_s) {
            echo '<tr class="' . JLMSCSS::_('sectiontableentry' . $k) . '">';
            echo '<td align="center">' . $i . '</td>';
            echo '<td><input type="hidden" name="ctxt_mes_id' . ($pref ? '_' . $pref : '') . '[]" value="' . $cmsg_s->id . '" /><input type="text" size="24" name="ctxt_mes_text' . ($pref ? '_' . $pref : '') . '[]"' . ($default ? ' disabled="disabled"' : '') . ' value="' . $cmsg_s->crtf_text . '" /></td>';
            echo '<td align="center">';
            echo '<input type="hidden"' . ($default ? ' disabled="disabled"' : '') . ' name="ctxt_mes_shadow_hid' . ($pref ? '_' . $pref : '') . '[]" value="' . ($cmsg_s->crtf_shadow ? '1' : '0') . '" />';
            echo '<input type="checkbox"' . ($default ? ' disabled="disabled"' : '') . ' onchange="analyze_change_check2(this)" name="ctxt_mes_shadow' . ($pref ? '_' . $pref : '') . '[]"' . ($cmsg_s->crtf_shadow ? ' checked="checked"' : '') . ' value="1" />';
            echo '</td>';
            echo '<td><input type="text" size="3" name="ctxt_mes_x' . ($pref ? '_' . $pref : '') . '[]"' . ($default ? ' disabled="disabled"' : '') . ' value="' . $cmsg_s->text_x . '" /></td>';
            echo '<td><input type="text" size="3" name="ctxt_mes_y' . ($pref ? '_' . $pref : '') . '[]"' . ($default ? ' disabled="disabled"' : '') . ' value="' . $cmsg_s->text_y . '" /></td>';
            echo '<td><input type="text" size="3" name="ctxt_mes_h' . ($pref ? '_' . $pref : '') . '[]"' . ($default ? ' disabled="disabled"' : '') . ' value="' . $cmsg_s->text_size . '" /></td>';
            $f3 = mosHTML::selectList($fonts, 'ctxt_mes_font' . ($pref ? '_' . $pref : '') . '[]', ' style="width:180px"' . ($default ? ' disabled="disabled"' : ''), 'value', 'text', isset($cmsg_s->crtf_font) ? $cmsg_s->crtf_font : 'arial.ttf');
            echo '<td>' . $f3 . '</td>';
            echo '<td><a class="jlms_img_link" href="javascript:void(0);" onclick="Delete_tbl_row(this); return false;" title="Delete"><img src="' . $JLMS_CONFIG->get('live_site') . '/components/com_joomla_lms/lms_images/toolbar/btn_cancel.png" width="16" height="16" border="0" alt="Delete" /></a></td>';
            echo '<td>';
            if ($i > 1) {
                echo '<a class="jlms_img_link" href="javascript:void(0);" onclick="Up_tbl_row(this); return false;" title="' . _JLMS_MOVEUP . '"><img src="' . $JLMS_CONFIG->get('live_site') . '/components/com_joomla_lms/lms_images/toolbar/btn_uparrow.png" width="16" height="16" border="0" alt="' . _JLMS_MOVEUP . '" /></a>';
            } else {
                echo '&nbsp;';
            }
            echo '</td>';
            echo '<td>';
            if ($i < count($cmsgs_saved)) {
                echo '<a class="jlms_img_link" href="javascript:void(0);" onclick="Down_tbl_row(this); return false;" title="' . _JLMS_MOVEDOWN . '"><img src="' . $JLMS_CONFIG->get('live_site') . '/components/com_joomla_lms/lms_images/toolbar/btn_downarrow.png" width="16" height="16" border="0" alt="' . _JLMS_MOVEDOWN . '" /></a>';
            } else {
                echo '&nbsp;';
            }
            echo '</tr>';
            $k = 3 - $k;
            $i++;
        }
        /*echo '</table>';
        		echo '<br />';
        		echo '<table width="100%" cellpadding="0" cellspacing="0">';*/
        echo '<tr class="' . JLMSCSS::_('sectiontableentry' . $k) . '">';
        echo '<td>&nbsp;</td>';
        echo '	<td width="200"><br />';
        echo '	<input id="new_txt_message' . ($pref ? '_' . $pref : '') . '" class="inputbox"' . ($default ? ' disabled="disabled"' : '') . ' size="24" type="text" name="new_txt_message' . ($pref ? '_' . $pref : '') . '" />';
        echo '</td><td width="20" align="center"><br />';
        echo '	<input id="new_txt_mes_shadow' . ($pref ? '_' . $pref : '') . '"' . ($default ? ' disabled="disabled"' : '') . ' type="checkbox" name="new_txt_mes_shadow' . ($pref ? '_' . $pref : '') . '" />';
        echo '</td><td width="40"><br />';
        echo '	<input id="new_txt_message_X' . ($pref ? '_' . $pref : '') . '" class="inputbox"' . ($default ? ' disabled="disabled"' : '') . ' size="3" type="text" name="new_txt_message_X' . ($pref ? '_' . $pref : '') . '" />';
        echo '</td><td width="40"><br />';
        echo '	<input id="new_txt_message_Y' . ($pref ? '_' . $pref : '') . '" class="inputbox"' . ($default ? ' disabled="disabled"' : '') . ' size="3" type="text" name="new_txt_message_Y' . ($pref ? '_' . $pref : '') . '" />';
        echo '</td><td width="40"><br />';
        echo '	<input id="new_txt_message_H' . ($pref ? '_' . $pref : '') . '" class="inputbox"' . ($default ? ' disabled="disabled"' : '') . ' size="3" type="text" name="new_txt_message_H' . ($pref ? '_' . $pref : '') . '" />';
        echo '</td>';
        echo '<td width="100"><br />';
        echo $f2;
        echo '</td><td align="left" colspan="3"><br />';
        echo '	<input class="inputbox" type="button"' . ($default ? ' disabled="disabled"' : '') . ' name="add_new_field' . ($pref ? '_' . $pref : '') . '" style="width:70px " value="' . _JLMS_GB_ADD_NEW_FIELD . '" onclick="javascript:Add_new_tbl_field(this,\'' . ($pref ? '_' . $pref : ''), '\');" />';
        echo '</td>';
        echo '</tr>';
        echo '</table>';
        ?>
		
		
		</td>
	</tr>
<?php 
    }
    function showStepConditions($course_id, $lpath_id, $step_id, $option, &$conds, &$lists, $step_name)
    {
        global $Itemid, $JLMS_CONFIG;
        ?>
<script language="javascript" type="text/javascript">
<!--
function submitbutton_del(pressbutton) {
	var form = document.adminForm;
	if (form.boxchecked.value == '0') {
		alert('<?php 
        echo _JLMS_ALERT_SELECT_ITEM;
        ?>
');
	} else {
		form.task.value = pressbutton;
		form.submit();
	}
}
function submitbutton_add(pressbutton) {
	var form = document.newcondForm;
	form.task.value = pressbutton;
	form.submit();
}
//-->
</script>
<?php 
        JLMS_TMPL::OpenMT();
        $hparams = array();
        $toolbar = array();
        $toolbar[] = array('btn_type' => 'back', 'btn_js' => sefRelToAbs("index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=compose_lpath&amp;course_id={$course_id}&amp;id={$lpath_id}"));
        JLMS_TMPL::ShowHeader('lpath', '', $hparams, $toolbar);
        JLMS_TMPL::OpenTS();
        echo JLMSCSS::h2(_JLMS_LPATH_TITLE_CONDITIONS . $step_name);
        ?>
	<form action="<?php 
        echo sefRelToAbs("index.php?option=" . $option . "&amp;Itemid=" . $Itemid);
        ?>
" method="post" name="adminForm">
		<table width="100%" cellpadding="0" cellspacing="0" border="0" class="<?php 
        echo JLMSCSS::_('jlmslist');
        ?>
">
			<tr>
				<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 width="20" class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" align="center">#</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
				<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 width="20" class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
">&nbsp;</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
				<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
">&nbsp;</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
				<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
"><?php 
        echo _JLMS_LPATH_COND_REF_STEP;
        ?>
</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
			</tr>
		<?php 
        $k = 1;
        for ($i = 0, $n = count($conds); $i < $n; $i++) {
            $row_cond = $conds[$i];
            $checked = mosHTML::idBox($i, $row_cond->id);
            ?>
			<tr id="tree_row_<?php 
            echo $row_cond->id;
            ?>
" class="<?php 
            echo JLMSCSS::_('sectiontableentry' . $k);
            ?>
">
				<td align="center" valign="middle"><?php 
            echo $i + 1;
            ?>
</td>
				<td valign="middle"><?php 
            echo $checked;
            ?>
</td>
				<td valign="middle"><?php 
            echo _JLMS_LPATH_CONDTYPE_COMPLETE;
            ?>
</td>
				<td valign="middle" style="vertical-align:middle ">
					<?php 
            if (isset($row_cond->cond_time) && $row_cond->cond_time) {
                $row_cond->ref_step_name .= ' (' . _JLMS_LPATH_CONDTYPE_SPENT . ' ' . $row_cond->cond_time . ' ' . _JLMS_LPATH_CONDTYPE_TIME_SPENT_MIN . ')';
            }
            echo $row_cond->ref_step_name;
            ?>
				</td>
			</tr>
			<?php 
            $k = 3 - $k;
        }
        ?>
		</table>
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="Itemid" value="<?php 
        echo $Itemid;
        ?>
" />
		<input type="hidden" name="task" value="lpath_item_delete" />
		<input type="hidden" name="id" value="<?php 
        echo $step_id;
        ?>
" />
		<input type="hidden" name="step_id" value="<?php 
        echo $step_id;
        ?>
" />
		<input type="hidden" name="lpath_id" value="<?php 
        echo $lpath_id;
        ?>
" />
		<input type="hidden" name="course_id" value="<?php 
        echo $course_id;
        ?>
" />
		<input type="hidden" name="boxchecked" value="0" />
	</form>
	<form action="<?php 
        echo sefRelToAbs("index.php?option=" . $option . "&ampItemid=" . $Itemid);
        ?>
" method="post" name="newcondForm">
<?php 
        echo '<table cellpadding="0" cellspacing="0" border="0" width="100%" class="jlms_table_no_borders">';
        $controls = array();
        $controls[] = array('href' => "javascript:submitbutton_del('lpath_cond_delete');", 'title' => _JLMS_LPATH_LINK_DEL_COND, 'img' => 'buttons_22/btn_delete_22.png');
        $controls[] = array('href' => "javascript:submitbutton_add('lpath_save_cond');", 'title' => _JLMS_LPATH_LINK_NEW_COND, 'img' => 'buttons_22/btn_add_22.png');
        $custom = _JLMS_LPATH_CONDTYPE_COMPLETE . '&nbsp;' . $lists['lpath_steps'];
        if ($JLMS_CONFIG->get('enable_timetracking')) {
            $custom .= '&nbsp;' . _JLMS_LPATH_CONDTYPE_AND_SPENT . ': <input type="text" name="cond_time" value="" size="5" class="inputbox" style="text-align: center;" /> <small>min</small>';
        }
        $controls[] = array('href' => '', 'title' => '', 'img' => '', 'custom' => $custom);
        JLMS_TMPL::ShowControlsFooter($controls, '', false, true);
        echo '</table>';
        /*
        		<table width="100%" cellpadding="0" cellspacing="0" border="0">
        			<tr>
        				<td>
        					<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
        						<td align="center" valign="middle" width="16"><a href="javascript:submitbutton_del('lpath_cond_delete');" title="<?php echo _JLMS_LPATH_LINK_DEL_COND;?>"><img class="JLMS_png" src="<?php echo $JLMS_CONFIG->get('live_site');?>/components/com_joomla_lms/lms_images/toolbar/btn_remove.png" width="16" height="16" border="0" alt="<?php echo _JLMS_LPATH_LINK_DEL_COND;?>" title="<?php echo _JLMS_LPATH_LINK_DEL_COND;?>" /></a></td>
        						<td align="center" valign="middle" width="16"><a href="javascript:submitbutton_add('lpath_save_cond');" title="<?php echo _JLMS_LPATH_LINK_NEW_COND;?>"><img class="JLMS_png" src="<?php echo $JLMS_CONFIG->get('live_site');?>/components/com_joomla_lms/lms_images/toolbar/btn_add.png" width="16" height="16" border="0" alt="<?php echo _JLMS_LPATH_LINK_NEW_COND;?>" title="<?php echo _JLMS_LPATH_LINK_NEW_COND;?>" /></a></td>
        						<td align="left" valign="middle">
        							&nbsp;<?php echo _JLMS_LPATH_CONDTYPE_COMPLETE. "&nbsp;" . $lists['lpath_steps']; ?>
        							&nbsp;<?php echo _JLMS_LPATH_CONDTYPE_AND_SPENT;?>: <input type="text" name="cond_time" value="" size="5" class="inputbox" style="text-align: center;" /> <small>min</small>
        						</td>
        					</tr></table>
        				</td>
        			</tr>
        		</table>
        */
        ?>
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="Itemid" value="<?php 
        echo $Itemid;
        ?>
" />
		<input type="hidden" name="task" value="lpath_save_cond" />
		<input type="hidden" name="id" value="<?php 
        echo $step_id;
        ?>
" />
		<input type="hidden" name="step_id" value="<?php 
        echo $step_id;
        ?>
" />
		<input type="hidden" name="lpath_id" value="<?php 
        echo $lpath_id;
        ?>
" />
		<input type="hidden" name="course_id" value="<?php 
        echo $course_id;
        ?>
" />
	</form>
<?php 
        JLMS_TMPL::CloseTS();
        JLMS_TMPL::CloseMT();
    }
Пример #7
0
    function h2_js($text = 'var_js')
    {
        ob_start();
        ?>
		<script type="text/javascript">
		function JLMSCSS_h2_js(<?php 
        echo $text;
        ?>
){
			var js = '<?php 
        echo JLMSCSS::h2('{text}');
        ?>
';
			return js.replace('{text}', <?php 
        echo $text;
        ?>
);
		}
		</script>
		<?php 
        $js_fn = ob_get_contents();
        ob_get_clean();
        $js_fn = str_replace('<script type="text/javascript">', '', $js_fn);
        $js_fn = str_replace('</script>', '', $js_fn);
        return $js_fn;
    }
    function JLMS_sreportGradeFV($option, &$rows, &$pageNav, &$lists, $levels, $filt_group, $filt_cat, $user_id, $is_full)
    {
        $JLMS_CONFIG =& JLMSFactory::getConfig();
        $Itemid = $JLMS_CONFIG->get('Itemid');
        //FLMS multicat
        $multicat = array();
        if ($JLMS_CONFIG->get('multicat_use', 0)) {
            $multicat = array();
            $i = 0;
            foreach ($lists as $key => $item) {
                if (substr($key, 0, 7) == 'filter_') {
                    $multicat[] = $lists['filter_' . $i];
                    $i++;
                }
            }
        }
        JLMS_TMPL::OpenMT();
        $lists['user_id'] = isset($lists['user_id']) ? $lists['user_id'] : 0;
        if ($is_full) {
            $hparams = array('show_menu' => false);
        } else {
            $hparams = array('simple_menu' => true);
        }
        $toolbar = array();
        $page_heading = _JLMS_REPORTS_USER . ' ' . date("Y-m-d H:i:s");
        if ($JLMS_CONFIG->get('is_trial', false) && $JLMS_CONFIG->get('trial_reports_heading_text', '')) {
            $page_heading = _JLMS_REPORTS_USER . $JLMS_CONFIG->get('trial_reports_heading_text', '');
        }
        JLMS_TMPL::ShowHeader('tracking', $page_heading, $hparams, $toolbar);
        JLMS_TMPL::OpenTS();
        ?>
	<script language="javascript" type="text/javascript">
	<!--//--><![CDATA[//><!--
			var old_filters = new Array();
			function read_filter(){
				var form = document.adminForm;
				var count_levels = '<?php 
        echo count($levels);
        ?>
';
				for(var i=0;i<parseInt(count_levels);i++){
					if(form['filter_id_'+i] != null){
						old_filters[i] = form['filter_id_'+i].value;
					}
				}
			}
			function write_filter(){
				var form = document.adminForm;
				var count_levels = '<?php 
        echo count($levels);
        ?>
';
				var j;
				for(var i=0;i<parseInt(count_levels);i++){
					if(form['filter_id_'+i+''] != null && form['filter_id_'+i+''].value != old_filters[i]){
						j = i;
					}
					if(i > j){
						if(form['filter_id_'+i] != null){
							form['filter_id_'+i].value = 0;
						}
					}
				}
			}
			function submitFormView(){
				var form = document.adminForm;
			//	form.view.value = view;
				form.task.value='report_grade';
				form.submit();
			}
	//--><!]]>
	</script>
	<?php 
        $action_url = $is_full ? $JLMS_CONFIG->get('live_site') . "/index.php?tmpl=component&amp;option={$option}&amp;Itemid={$Itemid}" : sefRelToAbs("index.php?option={$option}&amp;Itemid={$Itemid}");
        ?>
			<form action="<?php 
        echo $action_url;
        ?>
" method="post" name="adminForm">
			
				<table cellpadding="0" cellspacing="0" border="0" id="TheTable" <?php 
        echo $is_full ? "" : 'width="100%"';
        ?>
 class="jlms_table_no_borders">
					<?php 
        if (!$is_full) {
            ?>
					<tr>
						<td align="<?php 
            echo $is_full ? "left" : "right";
            ?>
" <?php 
            echo !$is_full ? 'colspan="2"' : '';
            ?>
>
							<table <?php 
            echo $is_full ? '' : 'width="30%"';
            ?>
 class="jlms_table_no_borders">
								<tr>
									<td valign="top" <?php 
            echo $is_full ? 'width="400"' : 'width="40%"';
            ?>
>
										<table width="100%" border="0" class="jlms_table_no_borders">
											<tr>
												<td <?php 
            echo $is_full ? 'width="100"' : 'width="20%"';
            ?>
 nowrap="nowrap">
													Report Type:
												</td>
												<td>
													<?php 
            echo JLMS_switchType($option);
            ?>
												</td>
											</tr>
										</table>		
									</td>
								</tr>
							</table>	
						</td>
					</tr>
					<?php 
        }
        ?>
					<tr>
						<td align="left">
							<table <?php 
        echo $is_full ? '' : 'width="100%"';
        ?>
 class="jlms_table_no_borders">
								<tr>
									<td valign="top" <?php 
        echo $is_full ? 'width="400"' : 'width="40%"';
        ?>
>
										<table width="100%" border="0" class="jlms_table_no_borders">
											<?php 
        if ($is_full) {
            ?>
											<tr>
												<td <?php 
            echo $is_full ? 'width="100"' : 'width="20%"';
            ?>
 nowrap="nowrap">
													Report Type:
												</td>
												<td>
													<?php 
            echo JLMS_switchType($option);
            ?>
												</td>
											</tr>
											<?php 
        }
        ?>
											<tr>
												<td <?php 
        echo $is_full ? 'width="100"' : 'width="20%"';
        ?>
 nowrap="nowrap">
													<?php 
        if ($JLMS_CONFIG->get('multicat_use', 0)) {
            echo isset($levels[0]->cat_name) && $levels[0]->cat_name != '' ? $levels[0]->cat_name : _JLMS_COURSES_COURSES_GROUPS;
        } else {
            echo _JLMS_COURSES_COURSES_GROUPS;
        }
        ?>
												</td>
												<td>
													<?php 
        if ($JLMS_CONFIG->get('multicat_use', 0)) {
            echo $lists['filter_0'];
        } else {
            echo $lists['jlms_course_cats'];
        }
        ?>
												</td>
											</tr>
											<?php 
        if (count($multicat)) {
            for ($i = 0; $i < count($multicat); $i++) {
                if ($i > 0) {
                    ?>
														<tr>
															<td <?php 
                    echo $is_full ? 'width="100"' : 'width="20%"';
                    ?>
 nowrap="nowrap">
																<?php 
                    echo isset($levels[$i]->cat_name) && $levels[$i]->cat_name != '' ? $levels[$i]->cat_name : _JLMS_COURSES_COURSES_GROUPS;
                    ?>
															</td>
															<td>
																<?php 
                    echo $lists['filter_' . $i];
                    ?>
															</td>
														</tr>
														<?php 
                }
            }
        }
        ?>
										</table>
									</td>
									<td valign="top" <?php 
        echo $is_full ? 'width="400"' : 'width="40%"';
        ?>
>
										<table width="100%" border="0" class="jlms_table_no_borders">
											<?php 
        if ($is_full) {
            ?>
											<tr>
												<td colspan="2">
													&nbsp;
												</td>
											</tr>
											<?php 
        }
        if ($JLMS_CONFIG->get('use_global_groups', 1)) {
            ?>
											<tr>
												<td <?php 
            echo $is_full ? 'width="100"' : 'width="20%"';
            ?>
 nowrap="nowrap" style="padding-left: 5px;">
													<?php 
            echo _JLMS_USER_GROUP_INFO;
            ?>
												</td>
												<td>
													<?php 
            echo $lists['filter'];
            ?>
												</td>
											</tr>
											<?php 
        }
        ?>
											<tr>
												<td <?php 
        echo $is_full ? 'width="100"' : 'width="20%"';
        ?>
 nowrap="nowrap" style="padding-left: 5px;">
													<?php 
        echo _JLMS_USERS_TBL_HEAD_USERNAME . ':';
        ?>
												</td>
												<td>
													<?php 
        echo $lists['jlms_filt_user'];
        ?>
												</td>
											</tr>
										</table>
									</td>
									<?php 
        if (!$is_full) {
            ?>
									<td style="padding-left:15px;" align="right">
										<?php 
            $link = $JLMS_CONFIG->get('live_site') . "/index.php?tmpl=component&option=" . $option . "&amp;Itemid={$Itemid}&amp;task=report_grade&amp;is_full=1";
            if ($filt_group) {
                $link .= "&amp;filt_group=" . $filt_group;
            }
            if ($user_id) {
                $link .= "&amp;filt_user="******"<?php 
            echo $link;
            ?>
" target="_blank" title="<?php 
            echo _JLMS_FULL_VIEW_BUTTON;
            ?>
"><?php 
            echo _JLMS_FULL_VIEW_BUTTON;
            ?>
</a>
									</td>
									<?php 
        }
        ?>
								</tr>
							</table>
						</td>
					</tr>
				</table>

				<?php 
        $max_row = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $latest_max_row = 0;
            $sc_rows = array();
            if (count($lists['sc_rows'][$i])) {
                $j = 0;
                foreach ($lists['sc_rows'][$i] as $sc_row) {
                    if ($sc_row->show_in_gradebook) {
                        $sc_rows[$j] = $sc_row;
                        $j++;
                    }
                }
            }
            $latest_max_row = $latest_max_row + count($sc_rows);
            $latest_max_row = $latest_max_row + count($lists['quiz_rows'][$i]);
            $latest_max_row = $latest_max_row + count($lists['gb_rows'][$i]);
            if ($latest_max_row > $max_row) {
                $max_row = $latest_max_row;
            }
        }
        ?>

				<table cellpadding="0" cellspacing="0" border="0" width="100%" class="<?php 
        echo JLMSCSS::_('jlmslist');
        ?>
">
				<?php 
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row = $rows[$i];
            ?>
						<tr style="border: 0px none;">
							<td colspan="<?php 
            echo $max_row + 1;
            ?>
" style="border: 0px none;">
							<br />
								<?php 
            echo JLMSCSS::h2($row->course_name);
            ?>
								<span class="small"><?php 
            echo _JLMS_REPORTS_ACCESSED_TIMES . " " . $lists['hits'][$i];
            ?>
</span>
							</td>
						</tr>
						<tr class="jlms_report_fullview_row">
							<<?php 
            echo JLMSCSS::tableheadertag();
            ?>
 class="<?php 
            echo JLMSCSS::_('sectiontableheader', 'first_td');
            ?>
" style="text-align:center; white-space:nowrap"><?php 
            echo _JLMS_REPORTS_CONCLUSION_ROW;
            ?>
</<?php 
            echo JLMSCSS::tableheadertag();
            ?>
>
							<?php 
            $sc_num = 0;
            $i_row = 0;
            foreach ($lists['sc_rows'][$i] as $sc_row) {
                if ($sc_row->show_in_gradebook) {
                    $sc_num++;
                    echo '<' . JLMSCSS::tableheadertag() . ' align=\'center\' nowrap=\'nowrap\' class="' . JLMSCSS::_('sectiontableheader') . '" style="text-align:center; white-space:nowrap">' . JLMS_reports_html::Echo_tbl_header($sc_row->lpath_name) . '</' . JLMSCSS::tableheadertag() . '>';
                    $i_row++;
                }
            }
            foreach ($lists['quiz_rows'][$i] as $quiz_row) {
                echo '<' . JLMSCSS::tableheadertag() . ' align=\'center\' nowrap=\'nowrap\' class="' . JLMSCSS::_('sectiontableheader') . '" style="text-align:center; white-space:nowrap">' . JLMS_reports_html::Echo_tbl_header($quiz_row->c_title) . '</' . JLMSCSS::tableheadertag() . '>';
                $i_row++;
            }
            foreach ($lists['gb_rows'][$i] as $gb_row) {
                echo '<' . JLMSCSS::tableheadertag() . ' align=\'center\' nowrap=\'nowrap\' class="' . JLMSCSS::_('sectiontableheader') . '" style="text-align:center; white-space:nowrap">' . JLMS_reports_html::Echo_tbl_header($gb_row->gbi_name) . '</' . JLMSCSS::tableheadertag() . '>';
                $i_row++;
            }
            if ($i_row < $max_row) {
                for ($jj = $i_row; $jj < $max_row; $jj++) {
                    echo '<' . JLMSCSS::tableheadertag() . ' align=\'center\' nowrap=\'nowrap\' class="' . JLMSCSS::_('sectiontableheader') . '" style="text-align:center; white-space:nowrap">&nbsp;<!--x--></' . JLMSCSS::tableheadertag() . '>';
                }
            }
            ?>
						</tr>
					<?php 
            $k = 1;
            ?>
						<tr class="<?php 
            echo JLMSCSS::_('sectiontableentry' . $k, 'jlms_report_fullview_row_bottom');
            ?>
">
							<td align="center" valign="middle" style=" text-align:center; vertical-align:middle" class="first_td">
								<?php 
            $image = $row->user_certificate ? 'btn_accept.png' : 'btn_cancel.png';
            $alt = '';
            $state = $row->user_certificate ? 0 : 1;
            echo JLMS_reports_html::publishIcon($row->user_id, 0, $state, 'gb_crt', $alt, $image, $option);
            ?>
							</td>
							<?php 
            $sc_num2 = 0;
            foreach ($lists['sc_rows'][$i] as $sc_row) {
                if ($sc_row->show_in_gradebook) {
                    $j = 0;
                    while ($j < count($row->scorm_info)) {
                        if ($row->scorm_info[$j]->gbi_id == $sc_row->item_id) {
                            if ($sc_num2 < $sc_num) {
                                if ($row->scorm_info[$j]->user_status == -1) {
                                    echo '<td align=\'center\' style="text-align:center">-</td>';
                                } else {
                                    $image = $row->scorm_info[$j]->user_status ? 'btn_accept.png' : 'btn_cancel.png';
                                    $alt = $row->scorm_info[$j]->user_status ? 'btn_accept' : 'btn_cancel';
                                    $alt .= '" align="top';
                                    $img = JLMS_reports_html::publishIcon(0, 0, 0, '', $alt, $image, $option, false);
                                    echo '<td style="vertical-align:middle; text-align:center" nowrap="nowrap">' . $img . '&nbsp;<strong>' . $row->scorm_info[$j]->user_grade . "</strong> (" . $row->scorm_info[$j]->user_pts . ")" . '</td>';
                                }
                                $sc_num2++;
                            }
                        }
                        $j++;
                    }
                }
            }
            foreach ($lists['quiz_rows'][$i] as $quiz_row) {
                $j = 0;
                while ($j < count($row->quiz_info)) {
                    if ($row->quiz_info[$j]->gbi_id == $quiz_row->c_id) {
                        if ($row->quiz_info[$j]->user_status == -1) {
                            echo '<td align=\'center\' style="text-align:center">-</td>';
                        } else {
                            //											$image = $row->quiz_info[$j]->user_status ? 'btn_accept.png' : 'btn_cancel.png';
                            //											$alt = $row->quiz_info[$j]->user_status ? 'btn_accept' : 'btn_cancel';
                            //											$alt .= '" align="top';
                            //											$img = JLMS_reports_html::publishIcon(0, 0, 0, '', $alt, $image, $option, false );
                            //
                            //											echo '<td style="vertical-align:middle; text-align:center" nowrap="nowrap">'.$img
                            //											. '&nbsp;<strong>' . $row->quiz_info[$j]->user_grade . "</strong> (" . $row->quiz_info[$j]->user_pts_full .")"
                            //											. '</td>';
                            echo '<td style="vertical-align:middle; text-align:center" nowrap="nowrap">';
                            echo JLMS_showQuizStatus($row->quiz_info[$j], 50);
                            echo '</td>';
                        }
                    }
                    $j++;
                }
            }
            $j = 0;
            while ($j < count($row->grade_info)) {
                echo '<td align=\'center\' valign="middle" style="vertical-align:middle;text-align:center "><strong>' . $row->grade_info[$j]->user_grade . '</strong></td>';
                $j++;
            }
            if ($i_row < $max_row) {
                for ($jj = $i_row; $jj < $max_row; $jj++) {
                    echo '<td align=\'center\' style="text-align:center;">&nbsp;<!--x--></td>';
                }
            }
            ?>
						</tr>
					<?php 
            $k = 3 - $k;
        }
        ?>
					</table>
					<?php 
        if (!$lists['user_id']) {
            echo '<div class="joomlalms_page_tip"  style="text-align:center">' . _JLMS_REPORTS_SELECT_USER . '</div>';
        }
        ?>
				<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
				<input type="hidden" name="Itemid" value="<?php 
        echo $Itemid;
        ?>
" />
				<input type="hidden" name="task" value="report_grade" />
				<input type="hidden" name="state" value="0" />
				<input type="hidden" name="view" value="" />
				<input type="hidden" name="boxchecked" value="0" />
				<input type="hidden" name="is_full" value="<?php 
        echo $is_full;
        ?>
" />
	
			</form>
	<?php 
        JLMS_TMPL::CloseTS();
        JLMS_TMPL::CloseMT();
    }
    function JQ_editQuiz(&$row, &$lists, $option, $page, $course_id, &$params, $levels, $count_array)
    {
        global $Itemid, $JLMS_CONFIG;
        $toolbar = array();
        $toolbar[] = array('btn_type' => 'save', 'btn_txt' => _JLMS_QUIZ_SAVE_QUIZ_BTN, 'btn_js' => "javascript:submitbutton('save_quiz');");
        $toolbar[] = array('btn_type' => 'apply', 'btn_txt' => _JLMS_QUIZ_APPLY_BTN, 'btn_js' => "javascript:submitbutton('apply_quiz');");
        $toolbar[] = array('btn_type' => 'cancel', 'btn_txt' => _JLMS_QUIZ_CANCEL_BTN, 'btn_js' => "javascript:submitbutton('cancel_quiz');");
        $h = $row->c_id ? _JLMS_QUIZ_EDIT_QUIZ_TITLE : _JLMS_QUIZ_NEW_QUIZ_TITLE;
        JLMS_quiz_admin_html_class::showQuizHead($course_id, $option, $h, true, $toolbar);
        ?>
<script language="javascript" type="text/javascript">
<!--
function setgood() {
	return true;
}

function submitbutton(pressbutton) {
	var form = document.adminForm;

	try {
		form.onsubmit();
	} catch(e) {
		//alert(e);
	}

	if (pressbutton == 'cancel_quiz') {
		form.page.value = pressbutton;
		form.submit();
		return;
	}
	// do field validation
	if (form.c_title.value == "") {
		alert( "<?php 
        echo _JLMS_PL_ENTER_NAME;
        ?>
" );
	} else {
		form.page.value = pressbutton;
		form.submit();
	}
}

function gradebook_off(e){
	var form = document.adminForm;
	if(form['params[sh_self_verification]'].checked == 1){
		form.c_certificate.value = 0;
		form.c_certificate.disabled = 1;
		
		form.c_gradebook.value = 0;
		form.c_gradebook_chk.checked = 0;
		form.c_gradebook_chk.disabled = 1;
		
		form.c_enable_review.value = 0;
		form.c_enable_review_chk.checked = 0;
		form.c_enable_review_chk.disabled = 1;
		form['params[sh_user_answer]'].value = 0;
		form['params[sh_user_answer]'].checked = 0;
		form['params[sh_user_answer]'].disabled = 1;
	} else {
		form.c_certificate.disabled = 0;
		form.c_gradebook_chk.disabled = 0;	
		form.c_enable_review_chk.disabled = 0;
		form['params[sh_user_answer]'].disabled = 0;
	}
}
//-->
</script>
		<form action="<?php 
        echo sefRelToAbs("index.php?option={$option}&amp;Itemid={$Itemid}");
        ?>
" method="post" name="adminForm" onsubmit="setgood();">
	<?php 
        JLMS_TMPL::OpenMT('jlms_table_no_borders');
        JLMS_TMPL::OpenTS();
        $tabs = new JLMSTabs(0);
        echo $tabs->startPane("JLMS");
        echo $tabs->startTab(_JLMS_QUIZ_E_PARAMS_TAB, "jlmstab1");
        ?>
		
		<table width="100%" cellpadding="0" cellspacing="0" border="0" class="jlms_item_properties">
			<tr>
				<td width="20%" valign="middle" align="left"><?php 
        echo _JLMS_ENTER_NAME;
        ?>
</td>
				<td>
					<input size="40" class="inputbox" type="text" name="c_title" value="<?php 
        echo $row->c_title;
        ?>
" />
				</td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_ENTER_CAT;
        ?>
</td>
				<td><br /><?php 
        echo $lists['jq_categories'];
        ?>
</td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_CHOOSE_CRTF;
        ?>
</td>
				<td><br /><?php 
        echo $lists['jq_certificates'];
        ?>
</td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_TIME_LIMIT;
        ?>
</td>
				<td><br /><input class="inputbox" type="text" name="c_time_limit" size="50" maxlength="100" value="<?php 
        echo $row->c_time_limit;
        ?>
" /></td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_PASSING_SCORE;
        ?>
</td>
				<td><br /><input class="inputbox" type="text" name="c_passing_score" size="50" maxlength="100" value="<?php 
        echo $row->c_passing_score;
        ?>
" /></td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_STATUS_PUB;
        ?>
</td>
				<td><br />
					<?php 
        echo $lists['published'];
        ?>
				</td>
			</tr>
			<tr>
				<td valign="top" style="vertical-align:top "><br /><?php 
        echo _JLMS_IS_TIME_RELATED;
        ?>
</td>
				<td><br />
					<?php 
        JLMS_HTML::_('showperiod.field', $row->is_time_related, $row->show_period);
        ?>
				</td>
			</tr>
			<tr>
				<td colspan="2"><br /><?php 
        echo _JLMS_DESCRIPTION;
        ?>
</td>
			</tr>
			<tr>
				<td colspan="2">
				<?php 
        JLMS_editorArea('editor2', $row->c_description, 'c_description', '100%;', '250', '40', '20');
        ?>
				</td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _RESUME_QUIZ_FROM_LAST_QUESTION;
        ?>
</td>
				<td><br />
					<?php 
        echo $lists['c_resume'];
        ?>
				</td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _MAXIMUM_NUMBER_OF_ATTEMPTS;
        ?>
:</td>
				<td><br /><input class="inputbox" type="text" name="c_max_numb_attempts" size="50" maxlength="100" value="<?php 
        echo $row->c_max_numb_attempts;
        ?>
" /></td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_TIME_LIMIT_SAME_QUIZ;
        ?>
</td>
				<td><br /><input class="inputbox" type="text" name="c_min_after" size="50" maxlength="100" value="<?php 
        echo $row->c_min_after;
        ?>
" /></td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_SHOW_IN_SELF_VERIFICATION;
        ?>
</td>
				<td><br />
					<input type="checkbox" name="params[sh_self_verification]" value="1" <?php 
        echo $params->get('sh_self_verification') == 1 ? "checked" : "";
        ?>
 onclick="javascript: gradebook_off(this);" />
				</td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_SHOW_IN_GRADEBOOK_OPTION;
        ?>
</td>
				<td><br />
					<input type="hidden" name="c_gradebook" value="<?php 
        echo $row->c_gradebook;
        ?>
" />
					<input type="checkbox" name="c_gradebook_chk" <?php 
        echo $params->get('sh_self_verification') == 1 ? "disabled" : "";
        ?>
 onclick="javascript: this.form['c_gradebook'].value = (this.checked)?1:0;" <?php 
        echo $row->c_gradebook == 1 ? "checked" : "";
        ?>
 />
				</td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_RANDOMIZE_OPTION;
        ?>
</td>
				<td><br />
					<input type="hidden" name="c_random" value="<?php 
        echo $row->c_random;
        ?>
" />
					<input type="checkbox" name="c_random_chk" onclick="javascript: this.form['c_random'].value = (this.checked)?1:0;" <?php 
        echo $row->c_random == 1 ? "checked" : "";
        ?>
 />
				</td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_SKIP_QUEST;
        ?>
</td>
				<td><br />
					<input type="checkbox" name="params[sh_skip_quest]" value="1" <?php 
        echo $params->get('sh_skip_quest') == 1 ? "checked" : "";
        ?>
 />
				</td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_EMAIL_OPTION;
        ?>
</td>
				<td><br />
					<?php 
        echo $lists['user_email_to'];
        ?>
				</td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_PRINT_OPTION;
        ?>
</td>
				<td><br />
					<input type="hidden" name="c_enable_print" value="<?php 
        echo $row->c_enable_print;
        ?>
" />
					<input type="checkbox" name="c_enable_print_chk" onclick="javascript: this.form['c_enable_print'].value = (this.checked)?1:0;" <?php 
        echo $row->c_enable_print == 1 ? "checked" : "";
        ?>
 />
				</td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_SHOW_PANEL_CONTENT;
        ?>
</td>
				<td><br />
					<input type="hidden" name="c_slide" value="<?php 
        echo $row->c_slide;
        ?>
" />
					<input type="checkbox" name="c_slide_chk" onclick="javascript: this.form['c_slide'].value = (this.checked)?1:0;" <?php 
        echo $row->c_slide == 1 ? "checked" : "";
        ?>
 />
				</td>
			</tr>
			
		</table>
		<?php 
        echo $tabs->endTab();
        echo $tabs->startTab(_JLMS_QUIZ_QUEST_POOL, "jlmstab2");
        ?>
		<table width="100%" cellpadding="0" cellspacing="0" border="0" class="jlms_item_properties">
			<tr>
				<td colspan="2">
					<?php 
        echo JLMSCSS::h2(_JLMS_QUIZ_ADD_QUESTS_FROM_POOL);
        ?>
				</td>
			</tr>
			<tr>
				<td width="30%">
					<input type="radio" id="pool_quest_type" name="c_pool_type" value="1"<?php 
        echo $lists['pool_quest_mode'] ? ' checked="checked"' : '';
        ?>
 /><label for="pool_quest_type"><?php 
        echo _JLMS_QUIZ_ADD_POOL_MODE_QUEST;
        ?>
</label>
				</td>
				<td>
					<input type="text" name="pool_qtype_number" size="3" value="<?php 
        echo $lists['pool_quest_num'] ? $lists['pool_quest_num'] : 0;
        ?>
" />
				</td>
			</tr>
			<tr>
				<td colspan="2" align="left" style="text-align:left">
					<input type="radio" id="pool_cat_type" name="c_pool_type" value="2"<?php 
        echo !$lists['pool_quest_mode'] ? ' checked="checked"' : '';
        ?>
 /><label for="pool_cat_type"><?php 
        echo _JLMS_QUIZ_ADD_POOL_MODE_CAT;
        ?>
</label>
				</td>
			</tr>
			<?php 
        $k = 1;
        for ($i = 0, $n = count($lists['jq_pool_categories']); $i < $n; $i++) {
            $plc = $lists['jq_pool_categories'][$i];
            echo "<tr>";
            echo '<td width="30%" align="left">' . $plc->c_category . "</td>";
            echo '<td>';
            echo '<input type="hidden" name="pool_cat_id[]" value="' . $plc->c_id . '" />';
            echo '<input type="text" name="pool_cat_number[]" size="3" value="' . ($plc->items_number ? $plc->items_number : 0) . '" />';
            echo '</td></tr>';
        }
        ?>
			<?php 
        if ($JLMS_CONFIG->get('global_quest_pool')) {
            $gqp_title_text = _JLMS_QUIZ_ADD_QUESTS_FROM_GLOBAL_POOL;
            if ($JLMS_CONFIG->get('is_trial', false) && $JLMS_CONFIG->get('trial_gqp_heading_text', '')) {
                $gqp_title_text .= $JLMS_CONFIG->get('trial_gqp_heading_text', '');
            }
            ?>
				<tr>
					<td colspan="2">
						<?php 
            echo JLMSCSS::h2($gqp_title_text);
            ?>
					</td>
				</tr>
				<tr>
					<td width="30%">
					<input type="radio" id="pool_quest_type_gqp" name="c_pool_type_gqp" value="1"<?php 
            if ($row->flag == 1 || !$row->flag) {
                echo ' checked="checked"';
            } else {
                echo '';
            }
            ?>
 onclick="javascript:document.adminForm.page.value='edit_quiz'; document.adminForm.flag.value=1; document.adminForm.submit();" /><label for="pool_quest_type_gqp"><?php 
            echo _JLMS_QUIZ_ADD_POOL_MODE_QUEST;
            ?>
</label>
					</td>
					<td>
					<input type="text" name="pool_qtype_number_gqp" size="3" value="<?php 
            echo $lists['pool_quest_num_gqp'] ? $lists['pool_quest_num_gqp'] : 0;
            ?>
" />
					</td>
				</tr>
				<tr>
					<td colspan="2" align="left" style="text-align:left">
						<input type="radio" id="pool_cat_type_gqp" name="c_pool_type_gqp" value="2"<?php 
            if ($row->flag == 2) {
                echo ' checked="checked"';
            } else {
                echo '';
            }
            ?>
 onclick="javascript:document.adminForm.page.value='edit_quiz'; document.adminForm.flag.value=2; document.adminForm.submit();" />
						<label for="pool_cat_type_gqp"><?php 
            echo _JLMS_QUIZ_ADD_POOL_MODE_CAT;
            ?>
</label>
					</td>
				</tr>
				<?php 
            if ($row->flag == 2) {
                if (isset($lists['category'])) {
                    for ($i = 0; $i < count($lists['category']); $i++) {
                        ?>
							<tr>
								<td>
									<table border="0" width="100%" cellpadding="2" cellspacing="2" class="jlms_table_no_borders">
										<tr>
											<?php 
                        if ($levels[$i] != 0) {
                            JLMS_quiz_admin_html_class::view_separators($levels, $i);
                        }
                        ?>
				
											<td align="right" width="100%"><?php 
                        echo $lists['category'][$i];
                        ?>
</td>
										</tr>
									</table>
								</td>
								<td><input type="text" name="pool_cat_number_gqp[]" size="3" value="<?php 
                        if (isset($count_array[$i])) {
                            echo $count_array[$i];
                        }
                        ?>
" /></td>
							</tr>
						<?php 
                    }
                }
                ?>
					<tr>
						<td style="padding:4px;"><?php 
                echo $lists['new_category'];
                ?>
</td>
						<td><input type="text" name="pool_cat_number_gqp[]" size="3" value="" /></td>
					</tr>
				<?php 
            }
            /*
            $k = 1;
            for ($i=0, $n=count($lists['jq_pool_categories_gqp']); $i < $n; $i++) {
            	$plc = $lists['jq_pool_categories_gqp'][$i];
            	echo "<tr class='sectiontableentry$k'>";
            	echo '<td width="30%" align="left">'.$plc->c_category."</td>";
            	echo '<td>';
            	echo '<input type="hidden" name="pool_cat_id_gqp[]" value="'.$plc->id.'" />';
            	echo '<input type="text" name="pool_cat_number_gqp[]" size="3" value="'.($plc->items_number?$plc->items_number:0).'" />';
            	echo '</td></tr>';
            }
            */
            ?>
		<?php 
        }
        ?>
		</table>
		
		<?php 
        echo $tabs->endTab();
        echo $tabs->startTab(_JLMS_QUIZ_E_FEEDBACKS_TAB, "jlmstab3");
        ?>
		<table width="100%" cellpadding="0" cellspacing="0" border="0" class="jlms_item_properties">
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_FORCE_DIS_QUEST_FEEDBACK;
        ?>
</td>
				<td><br />
					<input type="checkbox" name="params[disable_quest_feedback]" value="1" <?php 
        echo $params->get('disable_quest_feedback') == 1 ? "checked" : "";
        ?>
 />
				</td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_MES_ANSWER_CORRECT;
        ?>
</td>
				<td><br /><textarea class="inputbox" name="c_right_message" cols="50" rows="5"><?php 
        echo $row->c_right_message;
        ?>
</textarea></td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_MES_ANSWER_INCORRECT;
        ?>
</td>
				<td><br /><textarea class="inputbox" name="c_wrong_message" cols="50" rows="5"><?php 
        echo $row->c_wrong_message;
        ?>
</textarea></td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_MES_USER_PASSES;
        ?>
</td>
				<td><br /><textarea class="inputbox" name="c_pass_message" cols="50" rows="5"><?php 
        echo $row->c_pass_message;
        ?>
</textarea></td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_MES_USER_FAILS;
        ?>
</td>
				<td><br /><textarea class="inputbox" name="c_unpass_message" cols="50" rows="5"><?php 
        echo $row->c_unpass_message;
        ?>
</textarea></td>
			</tr>
		</table>
		<?php 
        echo $tabs->endTab();
        echo $tabs->startTab(_JLMS_QUIZ_QUESTION_REVIEW_SETTINGS, "jlmstab4");
        ?>
		<table width="100%" cellpadding="0" cellspacing="0" border="0" class="jlms_item_properties">
			<tr>
				<td width="25%" valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_REVIEW_OPTION;
        ?>
</td>
				<td><br />
					<input type="hidden" name="c_enable_review" value="<?php 
        echo $params->get('sh_self_verification') == 1 ? 0 : $row->c_enable_review;
        ?>
" />
					<?php 
        /*
        <input type="checkbox" name="c_enable_review_chk" <?php echo ($params->get('sh_self_verification') == 1)?"disabled":""; ?> onclick="javascript: this.form['c_enable_review'].value = (this.checked)?1:0;" <?php echo ($row->c_enable_review == 1)?"checked":""; ?> />
        */
        ?>
					<?php 
        echo $lists['c_enable_review_chk'];
        ?>
				</td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_REVIEW_OPTION_USER_ANS;
        ?>
</td>
				<td><br />
					<?php 
        /*
        <input type="checkbox" name="params[sh_user_answer]" <?php echo ($params->get('sh_self_verification') == 1)?"disabled":""; ?> value="1" <?php echo ($params->get('sh_user_answer') == 1)?"checked":""; ?> />
        */
        ?>
					<?php 
        echo $lists['sh_user_answer'];
        ?>
				</td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_REVIEW_OPTION_CORRECT_ANS;
        ?>
</td>
				<td><br />
					<?php 
        /*
        <input type="checkbox" name="params[sh_user_answer]" <?php echo ($params->get('sh_self_verification') == 1)?"disabled":""; ?> value="1" <?php echo ($params->get('sh_user_answer') == 1)?"checked":""; ?> />
        */
        ?>
					<?php 
        echo $lists['sh_correct_answer'];
        ?>
				</td>
			</tr>
			<tr>
				<td valign="middle" align="left"><br /><?php 
        echo _JLMS_QUIZ_REVIEW_OPTION_EXPLAIN;
        ?>
</td>
				<td><br />
					<?php 
        echo $lists['quiz_explanation'];
        ?>
				</td>
			</tr>
		</table>
		<?php 
        echo $tabs->endTab();
        echo $tabs->startTab(_JLMS_ADVANCED, "jlmstab5");
        ?>
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="jlms_item_properties">
				<tr>
					<td width="25%"><br />
						<label for="f_page1">
						<?php 
        echo _JLMS_QUIZ_FINAL_SHOW_RESULTS;
        ?>
						</label>
					</td>
					<td><br />
						<?php 
        #echo $lists['sh_final_page_text'];
        ?>
						<input type="radio" value="0" id="sh_final_page_text" name="params[sh_final_page_text]" <?php 
        echo $params->get('sh_final_page_text') ? '' : 'checked="checked"';
        ?>
/>
						<label for="sh_final_page_text"><?php 
        echo _CMN_NO;
        ?>
</label>
						<input type="radio" value="1" id="sh_final_page_text" name="params[sh_final_page_text]" <?php 
        echo $params->get('sh_final_page_text') ? 'checked="checked"' : '';
        ?>
/>
						<label for="sh_final_page_text"><?php 
        echo _CMN_YES;
        ?>
</label>
					</td>
				</tr>
				<tr>
					<td align="left" style="text-align:left"><br />
					<?php 
        /* <!--<input type="radio" id="f_page2"  name="params[sh_final_page]" value="2"<?php echo ($params->get('sh_final_page')==2)?' checked="checked"':'';?>><label for="f_page2"><?php echo "Show content text";?></label>--> */
        ?>
						<label for="f_page2">
							<?php 
        echo _JLMS_QUIZ_FINAL_DISPLAY_BARS;
        ?>
						</label>
					</td>
					<td><br />
						<?php 
        #echo $lists['sh_final_page_grafic'];
        ?>
						<input type="radio" value="0" id="sh_final_page_grafic" name="params[sh_final_page_grafic]" <?php 
        echo $params->get('sh_final_page_grafic') ? '' : 'checked="checked"';
        ?>
/>
						<label for="sh_final_page_grafic"><?php 
        echo _CMN_NO;
        ?>
</label>
						<input type="radio" value="1" id="sh_final_page_grafic" name="params[sh_final_page_grafic]" <?php 
        echo $params->get('sh_final_page_grafic') ? 'checked="checked"' : '';
        ?>
/>
						<label for="sh_final_page_grafic"><?php 
        echo _CMN_YES;
        ?>
</label>
					</td>
				</tr>
				<tr>
					<td align="left" style="text-align:left"><br />
						<label for="f_page3">
							<?php 
        echo _JLMS_QUIZ_FINAL_SHOW_FEEDBACK;
        ?>
						</label>
					</td>
					<td><br />
						<?php 
        #echo $lists['sh_final_page_fdbck'];
        ?>
						<input type="radio" value="0" id="sh_final_page_fdbck" name="params[sh_final_page_fdbck]" <?php 
        echo $params->get('sh_final_page_fdbck') ? '' : 'checked="checked"';
        ?>
/>
						<label for="sh_final_page_fdbck"><?php 
        echo _CMN_NO;
        ?>
</label>
						<input type="radio" value="1" id="sh_final_page_fdbck" name="params[sh_final_page_fdbck]" <?php 
        echo $params->get('sh_final_page_fdbck') ? 'checked="checked"' : '';
        ?>
/>
						<label for="sh_final_page_fdbck"><?php 
        echo _CMN_YES;
        ?>
</label>
					</td>
				</tr>
			</table>
		<?php 
        echo $tabs->endTab();
        echo $tabs->endPane();
        JLMS_TMPL::CloseTS();
        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="quizzes" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="id" value="<?php 
        echo $course_id;
        ?>
" />
		<input type="hidden" name="page" value="save_quiz" />
		<input type="hidden" name="c_id" value="<?php 
        echo $row->c_id;
        ?>
" />
		<input type="hidden" name="flag" value="<?php 
        echo $row->flag;
        ?>
" />
		</form>
			
		<?php 
        if ($row->flag) {
            ?>
		<script language="javascript" type="text/javascript">
			tabPane1.setSelectedIndex(1);
		</script>
		<?php 
        }
        ?>

		<?php 
        JLMS_quiz_admin_html_class::showQuizFooter();
        ?>

		<?php 
    }
    function showLPath_MainPage($course_id, $lpath_id, $option, &$lpath_data, &$lpath_contents, &$quizzes_data)
    {
        $JLMS_CONFIG =& JLMSFactory::getConfig();
        $Itemid = $JLMS_CONFIG->get('Itemid');
        $lp_params = new JLMSParameters($lpath_data->lp_params);
        $show_lpath_contents_at_the_left = $lp_params->get('navigation_type', 0) ? true : false;
        $is_quiz = count($quizzes_data) ? true : false;
        $is_drag_drop = false;
        $c_time_limit = 0;
        $inside_lp = 1;
        $c_slide = false;
        //pri starte quiza
        $c_generated_panel = true;
        // Contents of quiz will be generated on 'satrt' action
        $c_slide_update = false;
        $quiz_id = 0;
        foreach ($quizzes_data as $qd) {
            $quiz_id = $qd->c_id;
            foreach ($qd->panel_data as $q) {
                if ($q->c_type == 4) {
                    $is_drag_drop = true;
                    break;
                }
            }
        }
        require_once _JOOMLMS_FRONT_HOME . "/includes/ajax_features.class.php";
        // preloading QUIZ languge (28.02.2007 new method) (all quizzes messages now in global quiz language)
        global $JLMS_LANGUAGE;
        JLMS_require_lang($JLMS_LANGUAGE, 'quiz.lang', $JLMS_CONFIG->get('default_language'));
        require dirname(__FILE__) . '/includes/quiz/quiz_language.php';
        global $jq_language;
        $e = true;
        // enable force echo
        $AF = new JLMS_Ajax_Features();
        $AF->set('c_slide', $c_slide);
        $AF->set('c_generated_panel', $c_generated_panel);
        $AF->set('c_slide_update', $c_slide_update);
        $AF->set('quiz_id', $quiz_id);
        if ($is_quiz) {
            $AF->GetInclude_Msgs($e);
        }
        $AF->JS_open($e);
        $AF->GetFunc_JS_in_array($e);
        $AF->GetFunc_RFE($e);
        if ($is_quiz) {
            $document =& JFactory::getDocument();
            $document->addStyleSheet($JLMS_CONFIG->getCfg('live_site') . '/components/com_joomla_lms/includes/quiz/templates/joomlaquiz_lms_template/jq_template.css');
            echo "function jlms_gotoQuestion(qid) { if (stu_step_type == 5 && user_unique_id && quiz_id) { jlms_SwitchOpenedContents();JQ_gotoQuestionOn(qid);} }";
            $AF->QUIZ_JS_DrDr_Code($e);
            $AF->QUIZ_preloadMsgs($e, $jq_language);
            $AF->QUIZ_doInitialize($e, $JLMS_CONFIG->getCfg('live_site') . "/index.php?tmpl=component&option={$option}&inside_lp={$inside_lp}&Itemid={$Itemid}&jlms=1&task=quiz_ajax_action&id={$course_id}", '');
            /* We must override this func (to reduce JS weigth)
            			$AF->QUIZ_MakeRequest($e); */
            ?>
function jq_MakeRequest(url, do_clear) {
	if (do_clear == 1) {
		jq_showLoading();
	}
	quiz_blocked == 1;
	jlms_MakeRequest('jq_AnalizeRequest', url, 'quiz');
}			
<?php 
            $req_tasks = array('start', 'seek_quest', 'review_start', 'review_next', 'review_finish', 'next', 'no_attempts', 'email_results', 'time_is_up', 'finish', 'results', 'failed');
            $AF->QUIZ_AnalizeRequest($e, 'jq_AnalizeRequest', $req_tasks);
            $AF->QUIZ_releaseblock($e);
            $AF->QUIZ_StartTickTack($e);
            $AF->QUIZ_ContinueTickTack($e);
            //$AF->QUIZ_StartQuizOn($e);
            $AF->QUIZ_StartQuizOn($e);
            $AF->QUIZ_StartQuiz($e);
            $AF->QUIZ_GoToQuestionOn($e);
            $AF->QUIZ_GoToQuestion($e);
            $AF->QUIZ_EmailResults($e);
            $AF->QUIZ_StartReview($e);
            $AF->QUIZ_ReviewNext($e);
            $AF->QUIZ_ReviewPrev($e);
            $AF->QUIZ_Check_selectRadio($e);
            $AF->QUIZ_Check_selectCheckbox($e);
            $AF->QUIZ_Check_valueItem($e);
            $AF->QUIZ_QuizNextOn($e);
            $toolbar = array();
            $toolbar[] = array('btn_type' => 'quiz_ok', 'btn_js' => "javascript:jq_QuizNextOn(); void(0);");
            if ($inside_lp && !$show_lpath_contents_at_the_left) {
                $toolbar[] = array('btn_type' => 'contents', 'btn_js' => "javascript:ajax_action('contents_lpath');");
            } else {
                if ($c_slide && !$show_lpath_contents_at_the_left) {
                    $toolbar[] = array('btn_type' => 'contents', 'btn_js' => "javascript:jq_ShowPanel();");
                }
            }
            $m_str_no_skip = JLMS_ShowToolbar($toolbar);
            //8.10.08 - (Max) - dva toolbars dlia skip i standart
            $toolbar = array();
            $toolbar[] = array('btn_type' => 'quiz_ok', 'btn_js' => "javascript:jq_QuizNextOn(); void(0);");
            $toolbar[] = array('btn_type' => 'skip', 'btn_js' => "javascript:JQ_gotoQuestion(__skip__);void(0);");
            if ($inside_lp && !$show_lpath_contents_at_the_left) {
                $toolbar[] = array('btn_type' => 'contents', 'btn_js' => "javascript:ajax_action('contents_lpath');");
            } else {
                if ($c_slide && !$show_lpath_contents_at_the_left) {
                    $toolbar[] = array('btn_type' => 'contents', 'btn_js' => "javascript:jq_ShowPanel();");
                }
            }
            $m_str_skip = JLMS_ShowToolbar($toolbar);
            $AF->QUIZ_QuizContinue($e, $m_str_no_skip, $m_str_skip);
            $cf_url = "'&atask=finish_stop&quiz='+quiz_id+'&stu_quiz_id='+stu_quiz_id";
            $AF->QUIZ_QuizContinueFinish($e, $cf_url);
            $toolbar = array();
            $toolbar[] = array('btn_type' => 'quiz_ok', 'btn_js' => "javascript:jq_QuizNextOn(); void(0);");
            if ($inside_lp && !$show_lpath_contents_at_the_left) {
                $toolbar[] = array('btn_type' => 'contents', 'btn_js' => "javascript:ajax_action('contents_lpath');");
            } else {
                if ($c_slide && !$show_lpath_contents_at_the_left) {
                    $toolbar[] = array('btn_type' => 'contents', 'btn_js' => "javascript:jq_ShowPanel();");
                }
            }
            $m_str = JLMS_ShowToolbar($toolbar);
            $AF->QUIZ_QuizBack($e, $m_str);
            $AF->QUIZ_Next($e);
            $AF->QUIZ_showLoading($e);
            /*
            			$AF->QUIZ_UpdateTaskDiv_htm($e);
            			$AF->QUIZ_UpdateTaskDiv($e, $c_slide);*/
            // We must override task div functionality for quiz
            ?>
function jq_UpdateTaskDiv_htm(htm_txt) {
	getObj('jlms_lpath_menu').innerHTML = htm_txt;
}
function jq_UpdateTaskDiv(task) {

	switch (task) {
		case 'start':
			getObj('jlms_lpath_menu').innerHTML = jq_StartButton('jq_StartQuizOn()', mes_quiz_start);
		break;
		case 'next':
			getObj('jq_quest_num_container').innerHTML = mes_quest_number.replace("{X}", cur_quest_num).replace("{Y}", quiz_count_quests);
			getObj('jq_quest_num_container').style.visibility = "visible";
			getObj('jq_points_container').innerHTML = mes_quest_points.replace("{X}", cur_quest_score);
			getObj('jq_points_container').style.visibility = "visible";
			<?php 
            if ($JLMS_CONFIG->get('quiz_progressbar', 0) == 1) {
                ?>
			if (getObj('progress_bar')) { getObj('progress_bar').style.display = "block"; }
			<?php 
            }
            ?>
		break;
		case 'review_next':
			getObj('jq_quest_num_container').innerHTML = mes_quest_number.replace("{X}", cur_quest_num).replace("{Y}", quiz_count_quests);
			getObj('jq_quest_num_container').style.visibility = "visible";
			getObj('jq_points_container').innerHTML = mes_quest_points.replace("{X}", cur_quest_score);
			getObj('jq_points_container').style.visibility = "visible";
		break;
		case 'continue':
			<?php 
            if ($JLMS_CONFIG->get('quiz_progressbar', 0) == 1) {
                ?>
			if (getObj('progress_bar')) { getObj('progress_bar').style.display = "block"; }
			<?php 
            }
            ?>
		break;
		case 'continue_finish':
			<?php 
            if ($JLMS_CONFIG->get('quiz_progressbar', 0) == 1) {
                ?>
			if (getObj('progress_bar')) { getObj('progress_bar').style.display = "block"; }
			<?php 
            }
            ?>
		break;
		case 'finish':
			getObj('jlms_lpath_menu').innerHTML = lp_menu_item_contents;
			getObj('jq_quest_num_container').style.visibility = 'hidden';
			getObj('jq_points_container').style.visibility = 'hidden';
			<?php 
            if ($JLMS_CONFIG->get('quiz_progressbar', 0) == 1) {
                ?>
			if (getObj('progress_bar')) { getObj('progress_bar').style.display = "none"; }
			<?php 
            }
            ?>
		break;
		case 'clear':
			getObj('jlms_lpath_menu').innerHTML = '';
			getObj('jq_quest_num_container').style.visibility = 'hidden';
			getObj('jq_points_container').style.visibility = 'hidden';
		break;
	}
<?php 
            if ($c_slide) {
                ?>
	
	if (result_is_shown == 1) { jq_ShowPanel(); }
<?php 
            }
            ?>
}
<?php 
            $AF->QUIZ_NextButton($e);
            $AF->QUIZ_ContinueButton($e);
            $AF->QUIZ_StartButton($e);
            $AF->QUIZ_BackButton($e);
            if ($c_slide) {
                $AF->QUIZ_ShowPanel_go($e);
                $AF->QUIZ_HidePanel_go($e);
                $AF->QUIZ_ShowPanel($e);
            }
        }
        $AF->GetFunc_JS_URLencode($e);
        $AF->GetFunc_JS_TRIM_str($e);
        $AF->JS_close($e);
        $lpc_btn = $AF->Get_LPContents_btn(false);
        $toolbar = array();
        $toolbar[] = array('btn_type' => 'next', 'btn_js' => "javascript:ajax_action('next_lpathstep');");
        if (!$show_lpath_contents_at_the_left) {
            $toolbar[] = array('btn_type' => 'contents', 'btn_js' => "javascript:ajax_action('contents_lpath');");
        }
        $rs = JLMS_ShowToolbar($toolbar);
        $rs = str_replace('"components/com_joomla_lms', '"' . $JLMS_CONFIG->getCfg('live_site') . '/components/com_joomla_lms', $rs);
        $lpc_btn = str_replace('/', '\\/', str_replace('"', "\\\"", $rs));
        ?>
<script language="javascript" type="text/javascript">
<!--//--><![CDATA[//><!--
var timer_KeepAL = 990066;
<?php 
        /* variable timer_keepAl was added 21.08.2007 - for keeping joomla session whilst SCORM playing */
        ?>
var lp_menu_item_contents = "<?php 
        echo $lpc_btn;
        ?>
";
var jlms_contents_visible = 0;
var jlms_contents_visible_only = 0;
var jlms_lpath = <?php 
        echo $lpath_id;
        ?>
;
var jlms_course = <?php 
        echo $course_id;
        ?>
;
function ajax_action(pressbutton) {
	if ((jlms_blocked == 1) && (pressbutton != 'contents_lpath') && (pressbutton != 'get_document')) {
		if (jlms_allow_pending_task == 1) {
			if (jlms_is_pending_task == 0) {
				jlms_is_pending_task = 1;
				jlms_pending_task = pressbutton;
			}
		}
	} else {
		jlms_blocked = 1;
		if ((pressbutton != 'contents_lpath') && (pressbutton != 'get_document')) {
			$('jlms_lpath_completion_msg_container').setStyles({visibility: 'hidden',display: 'none'});
		}
		switch (pressbutton) {
			case 'lpath_restart':
<?php 
        if (!$show_lpath_contents_at_the_left) {
            ?>
				jlms_SwitchOpenedContents();
<?php 
        }
        ?>
				jlms_MakeRequest('jlms_AnalizeRequest', '&action=restart_lpath&id='+jlms_lpath, 'lpath');
			break;
			case 'start_lpath':
<?php 
        if (!$show_lpath_contents_at_the_left) {
            ?>
				jlms_SwitchOpenedContents();
<?php 
        }
        ?>
				jlms_MakeRequest('jlms_AnalizeRequest', '&action=start_lpath&id='+jlms_lpath, 'lpath');
			break;
			case 'next_lpathstep':
<?php 
        if (!$show_lpath_contents_at_the_left) {
            ?>
				jlms_SwitchOpenedContents();
<?php 
        }
        ?>
				jlms_MakeRequest('jlms_AnalizeRequest', '&action=next_lpathstep&id='+jlms_lpath+'&step_id='+stu_step_id, 'lpath');
			break;
			case 'prev_lpathstep':
<?php 
        if (!$show_lpath_contents_at_the_left) {
            ?>
				jlms_SwitchOpenedContents();
<?php 
        }
        ?>
				jlms_MakeRequest('jlms_AnalizeRequest', '&action=prev_lpathstep&id='+jlms_lpath+'&step_id='+stu_step_id, 'lpath');
			break;
			case 'lpath_seek':
<?php 
        if (!$show_lpath_contents_at_the_left) {
            ?>
				jlms_SwitchOpenedContents();
<?php 
        }
        ?>
				jlms_MakeRequest('jlms_AnalizeRequest', '&action=seek_lpathstep&id='+jlms_lpath+'&step_id='+seek_step_id, 'lpath');
			break;
			case 'contents_lpath':
				jlms_blocked = 0;
<?php 
        if (!$show_lpath_contents_at_the_left) {
            ?>
				jlms_SwitchContents();
<?php 
        } else {
            ?>
				jlms_SwitchContents2();
<?php 
        }
        ?>
			break;
			case 'get_document':
				jlms_blocked = 0;
				/*window.open('index.php?tmpl=component&no_html=1&option=<?php 
        echo $option;
        ?>
&Itemid=<?php 
        echo $Itemid;
        ?>
&task=show_lpath&action=get_lpath_doc&user_unique_id=' + user_unique_id +'&user_start_id='+user_start_id+'&id='+jlms_lpath+'&course_id='+jlms_course+'&doc_id='+get_doc_id+'&step_id='+stu_step_id
				,null,"height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");*/
				window.location.href = '<?php 
        echo $JLMS_CONFIG->getCfg('live_site');
        ?>
/index.php?tmpl=component&no_html=1&option=<?php 
        echo $option;
        ?>
&Itemid=<?php 
        echo $Itemid;
        ?>
&task=show_lpath&action=get_lpath_doc&user_unique_id=' + lp_user_unique_id +'&user_start_id='+user_start_id+'&id='+jlms_lpath+'&course_id='+jlms_course+'&doc_id='+get_doc_id+'&step_id='+stu_step_id;
				//return true;
				void(0);
			break;
			default:
				jlms_blocked = 0;
			break;
		}
	}
}
<?php 
        if (JLMS_mootools12()) {
            $fxFunc = 'Tween';
        } else {
            $fxFunc = 'Style';
        }
        $additon_js = '
var mySlide_contents2;
var mySlide_contents2_width_start = 0;
var mySlide_contents2_width_end = 0;
var mySlide_contents3;
var mySlide_contents2_mode = 2;
var mySlide_contents3_margin_start = 0;
var mySlide_contents3_margin_end = 10;
var mySlide_contents4;
var winScroller2 = new Fx.Scroll(window);
function jlms_prepare_el_mySlide_contents2() {
	mySlide_contents2 = new Fx.' . $fxFunc . '(\'jlms_lpath_contents_container\', \'width\');
	mySlide_contents2_width_start = $(\'jlms_lpath_contents_container\').getStyle(\'width\');
	mySlide_contents3_margin_start = $(\'jlms_lpath_descr\').getStyle(\'margin-left\');
	mySlide_contents3 = new Fx.' . $fxFunc . '(\'jlms_lpath_descr\', \'margin-left\');
	mySlide_contents4 = new Fx.' . $fxFunc . '(\'jlms_lpath_completion_msg_container\', \'margin-left\');
	$(\'jlms_lpath_completion_msg_container\').setStyles({\'margin-left\': \'0\'});
	$(\'jlms_lpath_descr\').setStyles({\'margin-left\': \'0\'});
	//mySlide_contents2.hide();
	//$(\'jlms_lpath_contents_container\').setStyles({visibility: \'visible\',display: \'\'});
}
function jlms_SwitchContents2() {
	if (mySlide_contents2_mode == 2) {
		$(\'jlms_lpath_contents_container\').setStyles({visibility: \'visible\',display: \'\'});
		mySlide_contents2.start(0, mySlide_contents2_width_start);
		mySlide_contents3.start(0, mySlide_contents3_margin_start);
		mySlide_contents4.start(0, mySlide_contents3_margin_start);
		mySlide_contents2_mode = 1;
		$(\'left_nav_collapser_container\').setStyles({visibility: \'visible\',display: \'\'});
	} else if (mySlide_contents2_mode == 1) {
		mySlide_contents2.start(mySlide_contents2_width_end);
		mySlide_contents3.start(mySlide_contents3_margin_end);
		mySlide_contents4.start(mySlide_contents3_margin_end);
		$(\'left_nav_collapser_container\').setStyles({visibility: \'hidden\',display: \'none\'});
		mySlide_contents2_mode = 0;
	} else {
		$(\'jlms_lpath_contents_container\').setStyles({visibility: \'visible\',display: \'\'});
		mySlide_contents2.start(mySlide_contents2_width_start);
		mySlide_contents3.start(mySlide_contents3_margin_start);
		mySlide_contents4.start(mySlide_contents3_margin_start);
		mySlide_contents2_mode = 1;
		$(\'left_nav_collapser_container\').setStyles({visibility: \'visible\',display: \'\'});
	}
}
';
        if (JLMS_mootools12()) {
            $setHTML = 'set(\'html\',';
        } else {
            $setHTML = 'setHTML(';
        }
        $JLMS_CONFIG->set('jlms_aditional_js_code', $JLMS_CONFIG->get('jlms_aditional_js_code', '') . $additon_js);
        $domready = '
jlms_prepare_el_mySlide_contents2();
';
        $JLMS_CONFIG->set('web20_domready_code', $JLMS_CONFIG->get('web20_domready_code', '') . $domready);
        ?>


<?php 
        if ($JLMS_CONFIG->get('web20_effects', true) && !$show_lpath_contents_at_the_left) {
            $additon_js = '
var mySlide_contents;
function jlms_prepare_el_mySlide_contents() {
	mySlide_contents = new Fx.Slide(\'jlms_lpath_contents_container\');
	mySlide_contents.hide();
	$(\'jlms_lpath_contents_container\').setStyles({visibility: \'visible\',display: \'\'});
}
';
            $JLMS_CONFIG->set('jlms_aditional_js_code', $JLMS_CONFIG->get('jlms_aditional_js_code', '') . $additon_js);
            $domready = '
jlms_prepare_el_mySlide_contents();
';
            $JLMS_CONFIG->set('web20_domready_code', $JLMS_CONFIG->get('web20_domready_code', '') . $domready);
            ?>

function jlms_SwitchOpenedContents() {
	if ($defined(mySlide_contents)) {
		var type = typeof mySlide_contents;
		if (type == 'object') {
			mySlide_contents.hide();
		}
	} else {
		jlms_prepare_el_mySlide_contents();
	}
}
function jlms_SwitchContentsOnly(par) {
	if (par == 'show') {
		mySlide_contents.slideIn();
	} else {
		mySlide_contents.hide();
	}
}
function jlms_SwitchContents() {
	mySlide_contents.toggle();
}
<?php 
        } elseif ($show_lpath_contents_at_the_left) {
            ?>
function jlms_SwitchOpenedContents() {
	jlms_SwitchContents();
}
function jlms_SwitchContentsOnly(par) {
	if (par == 'show') {
		if (jlms_contents_visible == 1) {
			
		} else {
			var vis_style1 = 'visible';
			var disp_style1 = '';
			var jlcc = getObj('jlms_lpath_contents_container');
			jlcc.style.visibility = vis_style1;
			jlcc.style.display = disp_style1;
		}
	}
}
function jlms_SwitchContents() {
	if (jlms_contents_visible == 1) {
		
	} else {
		var vis_style1 = 'visible';
		var disp_style1 = '';
		var vis_style2 = 'visible';
		var disp_style2 = '';
		var jlcc = getObj('jlms_lpath_contents_container');
		var jldc = getObj('jlms_lpath_descr');
		jlcc.style.visibility = vis_style1;
		jlcc.style.display = disp_style1;
		jldc.style.visibility = vis_style2;
		jldc.style.display = disp_style2;
		if (jlms_contents_visible == 1) { jlms_contents_visible = 0;}
		else { jlms_contents_visible = 1; }
	}
}
<?php 
        } else {
            ?>
function jlms_SwitchOpenedContents() {
	if (jlms_contents_visible == 1) {
		jlms_SwitchContents();
	}
}
function jlms_SwitchContentsOnly(par) {
	if (par == 'show') {
		var vis_style1 = 'visible';
		var disp_style1 = '';
	} else {
		var vis_style1 = 'hidden';
		var disp_style1 = 'none';
	}
	var jlcc = getObj('jlms_lpath_contents_container');
	jlcc.style.visibility = vis_style1;
	jlcc.style.display = disp_style1;
}
function jlms_SwitchContents() {
	var vis_style1 = 'visible';
	var disp_style1 = '';
	var vis_style2 = 'hidden';
	var disp_style2 = 'none';
	if (jlms_contents_visible == 1) {
		var vis_style2 = 'visible';
		var disp_style2 = '';
		var vis_style1 = 'hidden';
		var disp_style1 = 'none';
	}
	var jlcc = getObj('jlms_lpath_contents_container');
	var jldc = getObj('jlms_lpath_descr');
	jlcc.style.visibility = vis_style1;
	jlcc.style.display = disp_style1;
	jldc.style.visibility = vis_style2;
	jldc.style.display = disp_style2;
	if (jlms_contents_visible == 1) { jlms_contents_visible = 0;}
	else { jlms_contents_visible = 1; }
}
<?php 
        }
        ?>
function jlms_SwitchContentsOnly2(par) {
	if (par == 'show') {
		mySlide_contents2.slideIn();
	} else {
		mySlide_contents2.hide();
	}
}
var stu_step_id = 0;
var stu_last_cur_id = 0;
var stu_step_type = 0;
var jlms_blocked = 0;
var jlms_is_pending_task = 0;
var jlms_pending_task = '';
var jlms_allow_pending_task = 1;
var seek_step_id = 0;
var get_doc_id = 0;
var lp_url_prefix = '<?php 
        echo $JLMS_CONFIG->get('live_site');
        ?>
/index.php?option=<?php 
        echo $option;
        ?>
&Itemid=<?php 
        echo $Itemid;
        ?>
';
var lp_user_unique_id = '';
var user_start_id = 0;
var mCfg_live_site = '';
function jlms_MakeRequest(onstate, url, mr_type) {
	var http_request = false;
	if (window.ActiveXObject) { // IE
		try { http_request = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try { http_request = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {}
		}
	} else if (window.XMLHttpRequest) { // Mozilla, Safari,...
		http_request = new XMLHttpRequest();
		if (http_request.overrideMimeType) {
			http_request.overrideMimeType('text/xml');
		}
	}
	if (!http_request) {
		return false;
	}
	http_request.onreadystatechange = function() { eval(onstate+'(http_request);') };
	var lp_url_prefix2 = '';
	var post_target = '<?php 
        echo $JLMS_CONFIG->get('live_site');
        ?>
/index.php?jlms=1';
	if (mr_type == 'lpath') {
		jlms_blocked == 1;
		jlms_showLoading();
		lp_url_prefix2 = 'jlms=1&option=<?php 
        echo $option;
        ?>
&Itemid=<?php 
        echo $Itemid;
        ?>
&task=show_lpath&user_unique_id=' + lp_user_unique_id +'&user_start_id='+user_start_id+'&id='+jlms_lpath+'&course_id='+jlms_course;
		post_target = mCfg_live_site + lp_url_prefix;
	} else if (mr_type == 'quiz'){
		lp_url_prefix2 = 'user_unique_id=' + user_unique_id + '&lp_user_unique_id=' + lp_user_unique_id +'&user_start_id='+user_start_id+'&lpath_id='+jlms_lpath+'&step_id='+stu_step_id;
		post_target = mCfg_live_site + url_prefix;
	}
	//http_request.open('GET', mCfg_live_site + lp_url_prefix + lp_url_prefix2 + url, true);
	//http_request.send(null);
	http_request.open("POST", post_target, false);
	http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	http_request.setRequestHeader("Content-length", lp_url_prefix2.length + url.length);
	//http_request.setRequestHeader("Connection", "close"); - if close - bug in IE7 - it hungs up
	http_request.send(lp_url_prefix2 + url);
	if (mr_type == 'lpath') {
		jlms_allow_pending_task = 0;
	}
}
function jlms_AnalizeRequest(http_request) {
	if (http_request.readyState == 4) {
		if ((http_request.status == 200)) {
			jlms_WStatus('');
			
			if(http_request.responseXML.documentElement == null){
				try {
					//alert(http_request.responseXML.parseError.reason);
					http_request.responseXML.loadXML(http_request.responseText)
				} catch (e) {
					/*alert("Can't load");*/
				}
			}
			response = http_request.responseXML.documentElement;
			var task = jlms_RFE(response,'task');
			jlms_blocked = 1;
			jlms_allow_pending_task = 1;
			setTimeout("jlms_releaseBlock()", 1000);
<?php 
        if (!$show_lpath_contents_at_the_left) {
            ?>
			jlms_SwitchOpenedContents();
<?php 
        }
        ?>
			switch (task) {
				case 'start_restart':
				case 'start':
					if ($('joomlalms_sys_message_container')) {
		                //hide course enrollment message (if autoredirect to lpath enabled)
		                $('joomlalms_sys_message_container').setStyles({visibility: 'hidden',display: 'none'});
					}
					lp_user_unique_id = jlms_RFE(response,'user_unique_id');
					user_start_id = jlms_RFE(response,'user_start_id');
					stu_step_type = jlms_RFE(response,'step_type');
					if (stu_step_type == 5) {
						quiz_blocked = 0;
						timer_sec = 0;
						stop_timer = 0;
						quiz_id = jlms_RFE(response,'step_item_id');
					}
					prev_step_type = stu_step_type;
					stu_step_id = jlms_RFE(response,'step_id');
					stu_last_cur_id = stu_step_id;
					prev_step_id = stu_step_id;
					jlms_ChangeFrontPage(response);
					if (task == 'start_restart') {
						$('jlms_lpath_completion_msg_container').setStyles({visibility: 'hidden',display: 'none'});
						jlms_setPendingSteps('cancel',response);
						jlms_setPendingSteps('quiz',response);
					}
					jlms_setPendingSteps('pending',response);
					jlms_setPendingSteps('accept',response);
				break;
				case 'restart':
					$('jlms_lpath_completion_msg_container').setStyles({visibility: 'hidden',display: 'none'});
					jlms_ChangeFrontPage(response);
					getObj('jlms_lpath_contents').innerHTML = jlms_RFE(response,'contents_data');
					jlms_setPendingSteps('pending',response);
				break;
				case 'check_cond':
					lp_user_unique_id = jlms_RFE(response,'user_unique_id');
					user_start_id = jlms_RFE(response,'user_start_id');	
				
					//stu_step_id = jlms_RFE(response,'step_id');
					//prev_step_id = stu_step_id;
					jlms_ChangeFrontPage(response);
					jlms_changePendingSteps();
					//jlms_setPendingSteps('pending',response);
					jlms_setPendingSteps('accept',response);
				break;
				case 'seek_step':
				case 'next_step':
					user_unique_id = '';
					quiz_id = 0;
					stu_step_type = jlms_RFE(response,'step_type');
					if (stu_step_type == 5) {
						quiz_id = jlms_RFE(response,'step_item_id');
					}
					prev_step_type = stu_step_type;
					stu_step_id = jlms_RFE(response,'step_id');
					prev_step_id = stu_step_id;
					jlms_ChangeFrontPage(response);
					jlms_setPendingSteps('pending',response);
					jlms_setPendingSteps('accept',response);
				break;
				case 'finish_lpath_quick':// without break;
					lp_user_unique_id = jlms_RFE(response,'user_unique_id');
					user_start_id = jlms_RFE(response,'user_start_id');
				case 'finish_lpath':
					jlms_ChangeFrontPage(response);

					var is_show_cmsg = jlms_RFE(response,'show_completion_msg');
					if (is_show_cmsg == 1 || is_show_cmsg == '1') {
						var cmsg_txt = jlms_RFE(response,'lpath_completion_msg');
						$('jlms_lpath_completion_msg_container').<?php 
        echo $setHTML;
        ?>
cmsg_txt);
						$('jlms_lpath_completion_msg_container').setStyles({visibility: 'visible',display: ''});
					}

					jlms_setPendingSteps('accept',response);
<?php 
        if (!$show_lpath_contents_at_the_left) {
            ?>
					jlms_SwitchContentsOnly('show');
<?php 
        }
        ?>
				break;
				case 'failed':
					getObj('jlms_lpath_descr').innerHTML = '<div class="joomlalms_sys_message"><?php 
        echo str_replace('/', '\\/', _JLMS_LPATH_LOAD_DATA_ERROR);
        ?>
<\/div>';
					//getObj('jlms_lpath_menu').innerHTML = jlms_RFE(response,'menu_contents');
				break;
				default:
					getObj('jlms_lpath_descr').innerHTML = '<div class="joomlalms_sys_message"><?php 
        echo str_replace('/', '\\/', _JLMS_LPATH_LOAD_DATA_ERROR);
        ?>
<\/div>';
					getObj('jlms_lpath_menu').innerHTML = '';
				break;
			}
		} else {
			alert('Bad Request status');
		}
	}
}
function jlms_RFE(response,elem_name) {
	return response.getElementsByTagName(''+elem_name)[0].firstChild ? response.getElementsByTagName(''+elem_name)[0].firstChild.data : 0;
}
var is_collapser_timer = 0;
<?php 
        echo JLMSCSS::h2_js();
        //JLMSCSS_h2_js function
        ?>
function jlms_ChangeFrontPage(response) {
	var head_data = jlms_RFE(response,'step_name');
	if (head_data != '') {
		getObj('jlms_lpath_head').innerHTML = JLMSCSS_h2_js(head_data);
	}
	var tmp_div = document.createElement("div");
	tmp_div.id = 'temporary_div_tst';
	tmp_div.innerHTML = jlms_RFE(response,'step_descr');
	tmp_div.style.width = '100%';
	getObj('jlms_lpath_descr').innerHTML = '';
	getObj('jlms_lpath_descr').appendChild(tmp_div);

	//getObj('jlms_lpath_descr').innerHTML = jlms_RFE(response,'step_descr');
	getObj('jlms_lpath_menu').innerHTML = jlms_RFE(response,'menu_contents');
	var temp_script = jlms_RFE(response,'step_exec_script');
	if (temp_script == 1 || temp_script == '1') {
		var exec_script = jlms_RFE(response,'step_exec_script_contents');
		var new_script_el = document.createElement("script");
		new_script_el.text = exec_script;
		new_script_el.type="text/javascript";
		document.getElementsByTagName("head")[0].appendChild(new_script_el);
		//eval(exec_script);
	}
<?php 
        if ($show_lpath_contents_at_the_left) {
            ?>
	jlms_ChangeCollapserHeight(0);
<?php 
        }
        ?>
	if (window.set_height) {
		set_height();
	}
	jlms_ScrollBrowserWindow();
	setTimeout("jlms_ScrollBrowserWindow()", 300);
}
function jlms_ScrollBrowserWindow() {
	window.scrollTo(0,$('jlms_topdiv').getTop());
}
function jlms_ChangeCollapserHeight(by_timer) {
	var leftnav_h, main_st_h = 0;
	leftnav_h = $('jlms_lpath_contents_container').getStyle('height').toInt();
	main_st_h = $('jlms_lpath_descr').getStyle('height').toInt();
	if (leftnav_h < main_st_h) {
		leftnav_h = main_st_h;
	}
	$('left_nav_collapser_container').setStyle('height', leftnav_h+'px');
	if (is_collapser_timer == 1) {
		if (by_timer == 1) {
			setTimeout("jlms_ChangeCollapserHeight(1)", 300);
		}
	} else {
		is_collapser_timer = 1;
		setTimeout("jlms_ChangeCollapserHeight(1)", 300);
	}
}
function jlms_releaseBlock() {
	jlms_blocked = 0;
	if (jlms_is_pending_task == 1) {
		if (jlms_pending_task != '') {
			jlms_is_pending_task = 0;
			eval("ajax_action('"+jlms_pending_task+"')");
			jlms_pending_task = '';
		}
	}
}
function jlms_showLoading() {
	jlms_SwitchContentsOnly('hide');
	getObj('jlms_lpath_descr').innerHTML = '<br \/><br \/><center><img src="<?php 
        echo str_replace('/', '\\/', $JLMS_CONFIG->get('live_site'));
        ?>
\/components\/com_joomla_lms\/lms_images\/loading.gif" height="32" width="32" border="0" alt="loading" \/><\/center>';
}
function jlms_setPendingSteps(step_type, response) {
	var st = 'pending_steps';
	var prfx = 'jlms_step_';
	var is_lp = true;
	switch (step_type) {
		case 'pending': st = 'pending_steps'; break;
		case 'accept': st = 'completed_steps'; break;
		case 'cancel': st = 'incompleted_steps'; break;
		case 'quiz': st = 'incompleted_quests'; prfx = 'quest_result_'; is_lp = false; break;
	}
	if (is_lp) {
		var steps_ids;
		steps_ids = jlms_RFE(response,st);
		var arr = steps_ids.split(',');
		var i = 0;
		while (i < arr.length ) {
			if (getObj(prfx+arr[i])) {
				getObj(prfx+arr[i]).innerHTML = '<img class=\'JLMS_png\' src="<?php 
        echo $JLMS_CONFIG->get('live_site');
        ?>
/components/com_joomla_lms/lms_images/toolbar/btn_'+step_type+'.png" height="16" width="16" border="0" alt="'+step_type+'" />';
			}
			i ++;
		}
		if (step_type == 'pending') {
			var r = getObj(prfx+stu_step_id);
			if (r) {r.innerHTML = '<img class=\'JLMS_png\' src="<?php 
        echo $JLMS_CONFIG->get('live_site');
        ?>
/components/com_joomla_lms/lms_images/toolbar/btn_'+step_type+'_cur.png" height="16" width="16" border="0" alt="'+step_type+'" />';}
			if (stu_last_cur_id != stu_step_id) {
				r = getObj(prfx+stu_last_cur_id);
				if (r) {r.innerHTML = '<img class=\'JLMS_png\' src="<?php 
        echo $JLMS_CONFIG->get('live_site');
        ?>
/components/com_joomla_lms/lms_images/toolbar/btn_'+step_type+'.png" height="16" width="16" border="0" alt="'+step_type+'" />';}
			}
			stu_last_cur_id = stu_step_id;
		}
	} else {
		var steps_ids;
		steps_ids = jlms_RFE(response,st);
		var arr = steps_ids.split(',');
		var i = 0;
		while (i < arr.length ) {
			if (getObj(prfx+arr[i])) {
				getObj(prfx+arr[i]).innerHTML = '-';
			}
			i ++;
		}
	}
}
function jlms_changePendingSteps() {
	r = getObj('jlms_step_'+stu_last_cur_id);
	if (r) {r.innerHTML = '<img class=\'JLMS_png\' src="<?php 
        echo $JLMS_CONFIG->get('live_site');
        ?>
/components/com_joomla_lms/lms_images/toolbar/btn_pending.png" height="16" width="16" border="0" alt="pending" />';}
}
JLMS_preloadImages('<?php 
        echo $JLMS_CONFIG->getCfg('live_site');
        ?>
/components/com_joomla_lms/lms_images/loading.gif','<?php 
        echo $JLMS_CONFIG->getCfg('live_site');
        ?>
/components/com_joomla_lms/lms_images/buttons/btn_back.png','<?php 
        echo $JLMS_CONFIG->getCfg('live_site');
        ?>
/components/com_joomla_lms/lms_images/buttons/btn_restart.png', '<?php 
        echo $JLMS_CONFIG->getCfg('live_site');
        ?>
/components/com_joomla_lms/lms_images/toolbar/btn_pending.png', '<?php 
        echo $JLMS_CONFIG->getCfg('live_site');
        ?>
/components/com_joomla_lms/lms_images/toolbar/btn_accept.png');
//--><!]]>
</script>
<?php 
        JLMS_TMPL::OpenMT();
        $hparams = array();
        //$toolbar = array();
        //$toolbar[] = array('btn_type' => 'start', 'btn_js' => "javascript:ajax_action('start_lpath');");
        JLMS_TMPL::ShowHeader('lpath', '', $hparams);
        //JLMS_TMPL::ShowToolbar($toolbar, 'right', true, $lpath_data->lpath_name, 2);
        //JLMS_TMPL::CloseMT();
        JLMS_TMPL::OpenTS();
        ?>
		<table width="100%" cellpadding="0" cellspacing="0" border="0" class="jlms_table_no_borders">
			<tr>
				<td align="left" valign="middle" id="jlms_lpath_head" width="100%">
					<?php 
        echo JLMSCSS::h2($lpath_data->lpath_name);
        ?>
				</td>
				<td align="right" style="text-align:right " valign="middle" id="jlms_lpath_menu">
					<?php 
        $toolbar = array();
        $toolbar[] = array('btn_type' => 'start', 'btn_js' => "javascript:void(0);");
        //$toolbar[] = array('btn_type' => 'start', 'btn_js' => sefrelToAbs("index.php?option=$option&amp;Itemid=$Itemid&amp;task=show_lpath_nojs&amp;course_id=$course_id&amp;id=$lpath_id&amp;action=start_lpath"));
        //no-js functionality commented (version 1.1.0) due to the lots of bugs, lack of usage/testing
        echo JLMS_ShowToolbar($toolbar);
        ?>
				</td>
			</tr>
		</table>
<?php 
        JLMS_TMPL::CloseTS();
        JLMS_TMPL::OpenTS();
        $toolbar = array();
        $toolbar[] = array('btn_type' => 'start', 'btn_js' => "javascript:ajax_action('start_lpath');");
        $rs = JLMS_ShowToolbar($toolbar);
        $rs = str_replace('"components/com_joomla_lms', '"' . $JLMS_CONFIG->getCfg('live_site') . '/components/com_joomla_lms', $rs);
        $lpc_btn = str_replace('/', '\\/', str_replace('"', "\\\"", $rs));
        $additon_js = '
var lp_menu_item_contents_pre = "' . $lpc_btn . '";
';
        $JLMS_CONFIG->set('jlms_aditional_js_code', $JLMS_CONFIG->get('jlms_aditional_js_code', '') . $additon_js);
        $domready = '
$(\'jlms_lpath_menu\').innerHTML = lp_menu_item_contents_pre;

if (document.constructor) {
	document.constructor.prototype.write = function() { };
} else {
	document.write = function() { };
}
';
        $JLMS_CONFIG->set('web20_domready_code', $JLMS_CONFIG->get('web20_domready_code', '') . $domready);
        if ($show_lpath_contents_at_the_left) {
            ?>
		<div id="jlms_lpath_contents_container" style="visibility:hidden; display:none; width:203px; float:left; overflow-x:hidden; margin-right: -1px">
		<?php 
            global $JLMS_CONFIG;
            $JLMS_CONFIG->set('show_lpath_contents_at_the_left', $show_lpath_contents_at_the_left);
            ?>

			<?php 
            JLMS_course_lpathstu_html::showLPath_contents($lpath_contents, $quizzes_data);
            ?>
<br />
		</div>
		<div id="left_nav_collapser_container" style="width:7px; float:left; overflow-x:hidden; visibility:hidden; display:none ">
			<a id="left_nav_collapser" href="javascript:jlms_SwitchContents2();"><img class="collapse_button_maximized_xxx" border="1" width="1" height="1" src="<?php 
            echo $JLMS_CONFIG->get('live_site');
            ?>
/components/com_joomla_lms/lms_images/spacer.png"/></a>
		</div>
		<div id="jlms_lpath_completion_msg_container" class="jlms_lpath_completion_message" style="visibility:hidden; display:none; margin-left:210px; width:auto;">
			<!--x-->
		</div>
		<div id="jlms_lpath_descr" style="margin-left:210px; width:auto;">
			<?php 
            $text = JLMS_ShowText_WithFeatures($lpath_data->lpath_description);
            echo $text;
            ?>
		</div>
		<br />
<?php 
        } else {
            ?>
		<div id="jlms_lpath_completion_msg_container" class="jlms_lpath_completion_message" style="visibility:hidden; display:none">
			<!--x-->
		</div>
		<div id="jlms_lpath_contents_container" style="visibility:hidden; display:none; width:100%">
			<?php 
            JLMS_course_lpathstu_html::showLPath_contents($lpath_contents, $quizzes_data);
            ?>
<br />
		</div>
		<div id="jlms_lpath_descr" style="width:100%">
			<?php 
            $text = JLMS_ShowText_WithFeatures($lpath_data->lpath_description);
            echo $text;
            ?>
		</div>
<?php 
        }
        JLMS_TMPL::CloseTS();
        JLMS_TMPL::CloseMT();
    }
    function statsHW(&$stats, &$row, $option, $course_id, &$pageNav, &$lists, $is_teacher = true)
    {
        global $JLMS_CONFIG;
        $Itemid = $JLMS_CONFIG->get('Itemid');
        $JLMS_ACL =& JLMSFactory::getACL();
        JLMS_TMPL::OpenMT();
        $hparams = array();
        JLMS_TMPL::ShowHeader('homework', '', $hparams);
        //$row->hw_name
        JLMS_TMPL::OpenTS();
        ?>
			<table width="100%" cellpadding="0" cellspacing="0" border="0" class="jlms_table_no_borders">
				<tr>
					<td colspan="2" width="80%">
						<?php 
        echo JLMSCSS::h2($row->hw_name);
        ?>
					</td>
					<td align="right" style="text-align:right; vertical-align:top " valign="top"><br />
					<?php 
        $toolbar = array();
        $toolbar[] = array('btn_type' => 'back', 'btn_js' => sefRelToAbs("index.php?option={$option}&Itemid={$Itemid}&task=homework&id={$course_id}"));
        echo JLMS_ShowToolbar($toolbar);
        ?>
					</td>
				</tr>
				<tr>
					<td width="60%" align="left" style="text-align:left "><br />
						<table align="left" width="100%" cellpadding="0" cellspacing="0" border="0" class="jlms_table_no_borders">
<?php 
        /*						<tr>
        							<td width="50%" align="left" style="text-align:left ">&nbsp;&nbsp;<?php echo _JLMS_HW_HOMEWORK_TASK;?></td>
        							<td width="50%" align="left" style="text-align:left "><?php echo $row->hw_name;?></td>
        						</tr>
        */
        ?>
						<tr>
							<td width="50%" align="left" style="text-align:left ">&nbsp;&nbsp;<?php 
        echo _JLMS_HW_HOMEWORK_DATE;
        ?>
</td>
							<td width="50%" align="left" style="text-align:left "><?php 
        echo JLMS_dateToDisplay($row->post_date);
        ?>
</td>
						</tr>
						<tr>
							<td width="50%" align="left" style="text-align:left ">&nbsp;&nbsp;<?php 
        echo _JLMS_HW_HOMEWORK_ENDDATE;
        ?>
</td>
							<td width="50%" align="left" style="text-align:left "><?php 
        echo JLMS_dateToDisplay($row->end_date);
        ?>
</td>
						</tr>
						</table>
					</td>
					<td>&nbsp;</td>
					<td>&nbsp;</td>

				</tr>
				<tr>
					<td colspan="3"><br />
						<table width="100%" cellpadding="0" cellspacing="0" border="0" class="jlms_table_no_borders">
							<tr>
								<td align="left" style="text-align:left; vertical-align:bottom " valign="bottom">
									<div><?php 
        echo $lists['filter'];
        ?>
</div>
								</td>
								<td align="right" style="text-align:right ">
									<div align="right" style="white-space:nowrap ">
									<?php 
        if ($JLMS_ACL->CheckPermissions('homework', 'manage')) {
            ?>
										<?php 
            echo $lists['filter2'] . '<br />';
            if (isset($lists['filter3'])) {
                echo $lists['filter3'] . '<br />';
            }
            echo $lists['filter_stu'] . '<br />';
            ?>
									<?php 
        } else {
            echo '&nbsp;';
        }
        ?>
									</div>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="3">
						<!-- start statistics -->
						<table width="100%" cellpadding="0" cellspacing="0" border="0" class="<?php 
        echo JLMSCSS::_('jlmslist');
        ?>
">
							<tr>
								<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 width="20" class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" align="center">#</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
								<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
"><?php 
        echo _JLMS_HW_TBL_HEAD_STU;
        ?>
</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
								<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
"><?php 
        echo _JLMS_HW_TBL_HEAD_GROUP;
        ?>
</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
								<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" colspan="2"><?php 
        echo _JLMS_HW_TBL_HEAD_GRADE;
        ?>
</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
								<<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" width="20%">&nbsp;</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
>
							</tr>
						<?php 
        $k = 1;
        for ($i = 0, $n = count($stats); $i < $n; $i++) {
            $srow = $stats[$i];
            $mail_link = "index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=hw_view_result&amp;course_id={$course_id}&amp;user_id=" . $srow->user_id . "&amp;hw_id=" . $row->id;
            $image = $srow->hw_status ? 'btn_accept.png' : 'btn_cancel.png';
            $alt = $srow->hw_status ? _JLMS_HW_STATUS_COMPLETED : _JLMS_HW_STATUS_INCOMPLETE;
            ?>
							<tr class="<?php 
            echo JLMSCSS::_('sectiontableentry' . $k);
            ?>
">
								<td align="center"><?php 
            echo $pageNav->limitstart + $i + 1;
            ?>
</td>
								<td align="left" valign="middle" style="vertical-align:middle ">
								<?php 
            if ($JLMS_ACL->CheckPermissions('homework', 'manage')) {
                if ($srow->hw_status) {
                    echo '<a href="' . sefRelToAbs($mail_link) . '" title="' . _JLMS_HW_LINK_SEND_EMAIL . '">';
                }
                echo $srow->username;
                if ($srow->hw_status) {
                    echo '</a>';
                }
            } else {
                echo $srow->username;
            }
            ?>
								</td>
								<td align="left" valign="middle" style="vertical-align:middle ">
									<?php 
            //										echo ($srow->group_id?$srow->ug_name:_JLMS_USER_NO_GROUP_NAME);
            echo $srow->ug_name;
            ?>
								</td>
								<td align="center" valign="middle" style="vertical-align:middle" width="20">
									<?php 
            $grade_num = '';
            if ($srow->hw_status) {
                if ($srow->grade != _STATUS_NOT_SELECT && $srow->grade) {
                    $img = '';
                    if ($srow->graded_activity) {
                        $img = 'btn_accept.png';
                        $grade_num = $srow->grade;
                    } else {
                        switch ($srow->grade) {
                            case _STATUS_NOT_PASSED:
                                $img = 'btn_cancel.png';
                                break;
                            case _STATUS_PASSED:
                                $img = 'btn_accept.png';
                                break;
                        }
                    }
                    echo '<img src="' . JURI::root() . '/components/com_joomla_lms/lms_images/toolbar/' . $img . '" alt="' . $srow->grade . '" />';
                } else {
                    $ttip = '<img src="' . JURI::root() . '/components/com_joomla_lms/lms_images/toolbar/btn_publish_wait.png" alt="waiting" />';
                    echo JLMS_toolTip(_JLMS_HW_AWAITING_REVIEW, '', $ttip, '', false);
                }
            }
            ?>
								</td>
								<td><?php 
            echo $grade_num ? '<b>' . $grade_num . '</b>' : '&nbsp;';
            ?>
</td>
								<td align="left" valign="middle" style="vertical-align:middle ">
									<?php 
            echo JLMS_dateToDisplay($srow->hw_date, false, $JLMS_CONFIG->get('offset') * 60 * 60, ' H:i:s');
            ?>
								</td>
							</tr>
							<?php 
            $k = 3 - $k;
        }
        ?>
						<tr>
							<td colspan="6" align="center"class="<?php 
        echo JLMSCSS::_('jlmslist-footer_td');
        ?>
"><div align="center" style="white-space:nowrap">
							<?php 
        $link = "index.php?option={$option}&amp;Itemid={$Itemid}&amp;task=hw_stats&amp;course_id={$course_id}&amp;id={$row->id}";
        echo _JLMS_PN_DISPLAY_NUM . $pageNav->getLimitBox($link) . '&nbsp;' . $pageNav->getPagesCounter();
        echo '<br />';
        echo $pageNav->writePagesLinks($link);
        ?>
 
							</div></td>
						</tr>
						</table>
						<!-- end statistics -->
					</td>
				</tr>
			</table>
<?php 
        JLMS_TMPL::CloseTS();
        JLMS_TMPL::CloseMT();
    }
    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>&nbsp;&nbsp;';
            $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>&nbsp;&nbsp;';
            $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 : '&nbsp;') . '</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 : '&nbsp;') . '</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}&amp;Itemid={$Itemid}&amp;task=gb_get_cert&amp;id={$id}" . ($cert_user_id ? "&amp;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>' : '&nbsp;') . '</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&amp;option=com_joomla_lms&amp;Itemid=' . $Itemid . '&amp;no_html=1&amp;task=print_quiz_result&amp;course_id=' . $quiz_row->course_id . '&amp;stu_quiz_id=' . $rows[0]->quiz_info[$j]->stu_quiz_id . '&amp;user_unique_id=' . $rows[0]->quiz_info[$j]->user_unique_id . '">' . _JLMS_PRINT_RESULTS . '</a></td>';
                            } else {
                                echo '<td>';
                                echo '&nbsp;';
                                echo '</td>';
                            }
                        } else {
                            echo '<td>';
                            echo '&nbsp;';
                            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 
    }
Пример #13
0
    function showElementsList($course_id, $topic_id, $elements, $linked_elements)
    {
        global $Itemid, $option, $max_lvl, $JLMS_CONFIG;
        $max_lvl = 1;
        //work out chapters... TODO
        //work out documents
        JLMS_TMPL::OpenMT();
        $hparams = array();
        $toolbar = array();
        $title = '';
        $title = _JLMS_TOPIC_T_LINK_ELEMENT;
        $toolbar[] = array('btn_type' => 'save', 'btn_js' => "javascript:submitbutton('add_submit_topic_element');");
        $toolbar[] = array('btn_type' => 'cancel', 'btn_js' => "javascript:submitbutton('details_course');");
        JLMS_TMPL::ShowHeader('doc', $title, $hparams, $toolbar);
        JLMS_TMPL::OpenTS();
        ?>
		<form name="adminForm" method="post" action="<?php 
        echo $JLMS_CONFIG->get('live_site') . "/index.php?option=" . $option . "&amp;Itemid=" . $Itemid;
        ?>
">
		<table border="0" cellpadding="0" cellspacing="0" width="100%" class="<?php 
        echo JLMSCSS::_('jlmslist');
        ?>
">
		<?php 
        $k = 2;
        //documents section
        $element_group = $elements[_DOCUMENT_ID];
        $i = 0;
        $is_any_elements = 0;
        if (!empty($element_group)) {
            foreach ($element_group as $element) {
                if (@in_array($element->id, $linked_elements[_DOCUMENT_ID])) {
                    continue;
                }
                if ($i == 0) {
                    ?>
				<tr>
					<td colspan="7"><?php 
                    echo JLMSCSS::h2(_JLMS_TOPIC_E_DOCUMENTS);
                    ?>
</td>
				</tr>	
				<?php 
                }
                $tmp = _DOCUMENT_ID . '_' . $element->id;
                $checked = '<input type="checkbox" id="doc_cb' . $i . '" name="cid[]" value="' . $tmp . '" onclick="isChecked(this.checked);" />';
                JLMS_topic_html::showDocumentRow($k, $element, $i, 0, $checked, _ROW_RO, 0, 1, 0);
                $i++;
            }
        }
        $is_any_elements = $is_any_elements + $i;
        //links section
        $element_group = $elements[_LINK_ID];
        $i = 0;
        if (!empty($element_group)) {
            foreach ($element_group as $element) {
                if (@in_array($element->id, $linked_elements[_LINK_ID])) {
                    continue;
                }
                if ($i == 0) {
                    ?>
				<tr>
					<td colspan="7"><?php 
                    echo JLMSCSS::h2(_JLMS_TOPIC_E_LINKS);
                    ?>
</td>
				</tr>	
				<?php 
                }
                $tmp = _LINK_ID . '_' . $element->id;
                $checked = '<input type="checkbox" id="link_cb' . $i . '" name="cid[]" value="' . $tmp . '" onclick="isChecked(this.checked);" />';
                JLMS_topic_html::showLinkRow($k, $element, $i, 0, $checked, _ROW_RO);
                $i++;
            }
        }
        $is_any_elements = $is_any_elements + $i;
        //quizs section
        $element_group = $elements[_QUIZ_ID];
        $i = 0;
        if (!empty($element_group)) {
            foreach ($element_group as $element) {
                if (@in_array($element->id, $linked_elements[_QUIZ_ID])) {
                    continue;
                }
                if ($i == 0) {
                    ?>
				<tr>
					<td colspan="7"><?php 
                    echo JLMSCSS::h2(_JLMS_TOPIC_E_QUIZZES);
                    ?>
</td>
				</tr>	
				<?php 
                }
                $tmp = _QUIZ_ID . '_' . $element->id;
                $checked = '<input type="checkbox" id="quiz_cb' . $i . '" name="cid[]" value="' . $tmp . '" onclick="isChecked(this.checked);" />';
                JLMS_topic_html::showQuizRow($k, $element, $i, 0, $checked, _ROW_RO);
                $i++;
            }
        }
        $is_any_elements = $is_any_elements + $i;
        //Lpaths section
        $element_group = isset($elements[_LPATH_ID]) ? $elements[_LPATH_ID] : array();
        $i = 0;
        if (!empty($element_group)) {
            foreach ($element_group as $element) {
                if (@in_array($element->id, $linked_elements[_LPATH_ID])) {
                    continue;
                }
                if ($i == 0) {
                    ?>
				<tr>
					<td colspan="7"><?php 
                    echo JLMSCSS::h2(_JLMS_TOPIC_E_LPATHS);
                    ?>
</td>
				</tr>	
				<?php 
                }
                $tmp = _LPATH_ID . '_' . $element->id;
                $checked = '<input type="checkbox" id="lpath_cb' . $i . '" name="cid[]" value="' . $tmp . '" onclick="isChecked(this.checked);" />';
                JLMS_topic_html::showLPathRow($k, $element, $i, 0, $checked, _ROW_RO);
                $i++;
            }
        }
        $is_any_elements = $is_any_elements + $i;
        if (!$is_any_elements) {
            ?>
				<tr>
					<td colspan="7"><?php 
            echo '<div class="joomlalms_user_message">' . _JLMS_TOPICS_NO_ELEMENTS . '</div>';
            ?>
</td>
				</tr>	
		<?php 
        }
        ?>
		</table>
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="Itemid" value="<?php 
        echo $Itemid;
        ?>
" />
		<input type="hidden" name="task" value="add_submit_topic_element" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="topic_id" value="<?php 
        echo $topic_id;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $course_id;
        ?>
" />
		<?php 
        $is_curtopic = intval(mosgetparam($_REQUEST, 't_id', 0));
        echo "<input type='hidden' name='t_id' value='" . $is_curtopic . "' />";
        ?>
		</form>
		<?php 
        JLMS_TMPL::CloseTS();
        JLMS_TMPL::CloseMT();
    }
Пример #14
0
 function ShowToolbar($toolbar, $align = 'right', $href_link = true, $heading = '', $pad = 0)
 {
     if ($heading) {
         if (!empty($toolbar)) {
             JLMS_TMPL::OpenTS();
             echo '		<table width="100%" cellpadding="0" cellspacing="0" border="0" class="jlms_table_no_borders">' . "\r\n" . '			<tr>' . "\r\n" . '				<td width="100%" valign="middle" style="vertical-align:middle">' . "\r\n" . '					&nbsp;' . ($heading ? JLMSCSS::h2($heading) : '') . "\r\n" . '				</td>' . "\r\n" . '				<td align="right" style="text-align:right; white-space:nowrap " nowrap="nowrap">' . "\r\n";
             echo JLMS_ShowToolbar($toolbar, $href_link, $align);
             echo '				</td>' . "\r\n";
             echo '			</tr>' . "\r\n" . '		</table>' . "\r\n";
         } else {
             JLMS_TMPL::OpenTS('', '  class="contentheading"');
             echo $heading;
         }
     } else {
         $td_style = '';
         if ($pad) {
             $td_style = ' style="padding-top:' . $pad . 'px; padding-bottom:' . $pad . 'px"' . ($align == 'center' ? ' align="center"' : '');
         }
         JLMS_TMPL::OpenTS('', $td_style);
         echo JLMS_ShowToolbar($toolbar, $href_link, $align);
     }
     JLMS_TMPL::CloseTS();
 }