{if !isset($T_OPTION)}
   {capture name='statistics_menu'}
        <tr><td class = "moduleCell" colspan="100%">
            {if $T_MODULE_HCD_INTERFACE}
                {eF_template_printIconTable title=$smarty.const._STATISTICS columns=3 links=$T_STATISTICS_OPTIONS image='32x32/gears.png'}
            {else}    
                {eF_template_printIconTable title=$smarty.const._STATISTICS columns=4 links=$T_STATISTICS_OPTIONS image='32x32/gears.png'}
            {/if}    
        </td></tr>        
    {/capture}
    <table class = "leftAlign" width="100%">
        <tr> 
           <td class = "singleColumn" id = "singleColumn" colspan="100%">
                <table class = "singleColumnData">
                    {$smarty.capture.statistics_menu}
                </table>
            </td>
        </tr>
    </table>
{elseif $T_OPTION == 'lesson'}
    {capture name = 'lesson_statistics'}
        {if $T_BASIC_TYPE == 'administrator'}
            <table class = "leftAlign">
                <tr>
                    <td>
                        {$smarty.const._CHOOSELESSON}:
                    </td>
                    <td>
                        <input type = "text" id = "autocomplete" class = "inputText" style = "width:500px"/>
                        <img id = "busy" src="images/12x12/hourglass.png" style="display:none;" alt="working ..."/> 
                        <div id="autocomplete_choices" class="autocomplete"></div>&nbsp;&nbsp;&nbsp;
                            {literal}
                                <script language = "JavaScript" type = "text/javascript">
                                    new Ajax.Autocompleter("autocomplete", "autocomplete_choices", "ask_lessons.php", {paramName: "preffix", afterUpdateElement : getSelectionId, indicator : "busy"}); 
                                    function getSelectionId(text, li) {
                                    	document.location='administrator.php?ctg=statistics&option=lesson&tab=users&sel_lesson='+li.id;
                                    }
                                </script>
                            {/literal}          
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td class = "infoCell"> {$smarty.const._STARTTYPINGFORRELEVENTMATCHES} </td>
                </tr>     
            </table>
        {elseif ($T_BASIC_TYPE == 'professor' && $T_ISPROFESSOR == true)}
            <table style = "text-align:left">
                <tr>
                    <td>
                        {$smarty.const._CHOOSELESSON}:
                    </td>
                    <td>
                        <input type="text" id="autocomplete" class = "inputText" style = "width:500px"/>
                        <img id = "busy" src="images/12x12/hourglass.png" style="display:none;" alt="working ..."/> 
                        <div id="autocomplete_choices" class="autocomplete"></div>
                        {literal}
                                <script language = "JavaScript" type = "text/javascript">
                            new Ajax.Autocompleter("autocomplete", "autocomplete_choices", "ask_lessons.php", {paramName: "preffix",afterUpdateElement : getSelectionId, indicator : "busy"}); 
                            function getSelectionId(text, li) {
                                    document.location='professor.php?ctg=statistics&option=lesson&tab=users&sel_lesson='+li.id;
                            }
                                </script>
                        {/literal}          
                        &nbsp;&nbsp;&nbsp;
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td class = "infoCell"> {$smarty.const._STARTTYPINGFORRELEVENTMATCHES} </td>
                </tr>     
            </table>
        {elseif ($T_BASIC_TYPE == 'student' && $T_ISPROFESSOR == true)}
            <table style = "text-align:left">
                <tr>
                    <td>
                        {$smarty.const._CHOOSELESSON}:
                    </td>
                    <td>
                        <input type="text" id="autocomplete" class = "inputText" style = "width:500px"/>
                        <img id = "busy" src="images/12x12/hourglass.png" style="display:none;" alt="working ..."/> 
                        <div id="autocomplete_choices" class="autocomplete"></div>
                        {literal}
                                <script language = "JavaScript" type = "text/javascript">
                            new Ajax.Autocompleter("autocomplete", "autocomplete_choices", "ask_lessons.php", {paramName: "preffix",afterUpdateElement : getSelectionId, indicator : "busy"}); 
                            function getSelectionId(text, li) {
                                    document.location='student.php?ctg=statistics&option=lesson&tab=users&sel_lesson='+li.id;
                            }
                                </script>
                        {/literal}          
                        &nbsp;&nbsp;&nbsp;
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td class = "infoCell"> {$smarty.const._STARTTYPINGFORRELEVENTMATCHES} </td>
                </tr>     
            </table>
        {/if}
        
        
        {if isset($T_LESSON_ID)}
            &nbsp;
            <table style = "text-align:left">
                <tr>
                    <td>
                        {$smarty.const._GROUPFILTER}:
                    </td>
                    <td>
                        <select name = "group_filter" onchange = "if(this.options[this.selectedIndex].value != '') document.location='professor.php?ctg=statistics&option=lesson&{if (isset($smarty.get.tab)) }&tab={$smarty.get.tab} {else}&tab=overall {/if}&sel_lesson={$T_LESSON_ID}&group_filter='+this.options[this.selectedIndex].value;">                        
                                <option value = "-1" {if !$smarty.get.group_filter}selected{/if}>----</option>
                            {foreach name = "group_options" from = $T_GROUPS item = 'group' key='id'}                       
                                <option value = "{$group.id}" {if $smarty.get.group_filter == $group.id} selected {/if}>{$group.name}</option>
                            {/foreach}
                        </select>
                    </td> 
                </tr>
            </table>
            
            <table width="100%">
                <tr>
                    <td style = "text-align:right">
                        <span style = "vertical-align:middle">{$smarty.const._EXPORTSTATS}</span>
                        <a href="{$T_BASIC_TYPE}.php?ctg=statistics&option=lesson&sel_lesson={$T_LESSON_ID}&group_filter={$smarty.get.group_filter}&excel=lesson">
                            <img src="images/file_types/xls.png" border="0px" title="{$smarty.const._XLSFORMAT}" alt="{$smarty.const._XLSFORMAT}" style = "vertical-align:middle"/>
                        </a>
                        <a href="{$T_BASIC_TYPE}.php?ctg=statistics&option=lesson&sel_lesson={$T_LESSON_ID}&group_filter={$smarty.get.group_filter}&pdf=lesson">
                            <img src="images/file_types/pdf.png" border="0px" title="{$smarty.const._PDFFORMAT}" alt="{$smarty.const._PDFFORMAT}" style = "vertical-align:middle"/>
                        </a>
                    </td>
                </tr>
            </table>            
            <br>
            
            <table class = "statisticsTable" width="100%" align="left">           
                <tr>
                    <td width="100%">
                        <table align="left" width="100%">
                            <tr class = "{cycle name = "common_lesson_info" values = "oddRowColor, evenRowColor"}">
                                <td width="30%" >{$smarty.const._NAME}</td>
                                <td style = "text-align:left"><b>{$T_LESSON_NAME}</b></td>
                            </tr>
                            <tr class = "{cycle name = "common_lesson_info" values = "oddRowColor, evenRowColor"}">
                                <td width="30%" >{$smarty.const._DIRECTION}</td>
                                <td style = "text-align:left"><b>{$T_LESSON_INFO.direction}</b></td>
                            </tr>
                            <tr class = "{cycle name = "common_lesson_info" values = "oddRowColor, evenRowColor"}">
                                <td width="30%" >{$smarty.const._STUDENTS}</td>
                                <td style = "text-align:left"><b>{$T_LESSON_INFO.students|@sizeof}</b></td>
                            </tr>
                            <tr class = "{cycle name = "common_lesson_info" values = "oddRowColor, evenRowColor"}">
                                <td width="30%" >{$smarty.const._PROFESSORS}</td>
                                <td style = "text-align:left"><b>{$T_LESSON_INFO.professors|@sizeof}</b></td>
                            </tr>
                        </table>
                    </td>
               </tr>
            </table>
            <br><br><br><br><br>
            
            <div class="tabber">                        
                <div class="tabbertab {if (isset($smarty.get.tab) &&  $smarty.get.tab == 'users')} tabbertabdefault{/if}">
                    <h3>{$smarty.const._USERS}</h3>
                    <strong>{$smarty.const._STUDENTS}:</strong>
                    <table class = "sortedTable" sortBy = 0 width="100%">    
                        <tr>
                            <td class = "topTitle">{$smarty.const._USERNAME}</td>
                            <td class = "topTitle">{$smarty.const._FIRSTNAME}</td>
                            <td class = "topTitle">{$smarty.const._LASTNAME}</td>
                            <td class = "topTitle centerAlign">{$smarty.const._COMPLETED}</td>
                            <td class = "topTitle centerAlign">{$smarty.const._TIMEINLESSON}</td>
                            <td class = "topTitle centerAlign">{$smarty.const._CONTENT}</td>
                            <td class = "topTitle centerAlign">{$smarty.const._TESTS}</td>
                            <td class = "topTitle centerAlign">{$smarty.const._PROJECTS}</td>
                            <td class = "topTitle centerAlign">{$smarty.const._COMMENTS}</td>
                            <td class = "topTitle centerAlign">{$smarty.const._MESSAGES}</td>
                        </tr>
                    {foreach name = 'student_list' key = 'login' item = "info" from = $T_STUDENTS_INFO}   
                        <tr class = "{cycle name = "student_list" values = "oddRowColor, evenRowColor"} {if !$info.active[$lesson_id]}deactivatedTableElement{/if}">
                            <td>#filter:user_login-{$login}#<a href = "{$T_BASIC_TYPE}.php?ctg=statistics&option=user&sel_user={$login}">{$login}</a></td>
                            <td>{$info.name}</td>
                            <td>{$info.surname}</td>
                            <td class = "centerAlign">
                                {if $info.completed}
                                    <img src = "images/16x16/check.png" alt = "{$smarty.const._YES}" title = "{$smarty.const._YES}" border = "0" />
                                {else}
                                    <img src = "images/16x16/forbidden.png" alt = "{$smarty.const._NO}" title = "{$smarty.const._NO}" border = "0" />
                                {/if}
                            </td>
                            <td class = "centerAlign">
                                <span style = "display:none">{$info.seconds}</span>
                                {if $info.seconds}
                                	{if $info.time.hours}{$info.time.hours}h{/if}
                                	{if $info.time.minutes}{$info.time.minutes}'{/if}
                                	{if $info.time.seconds}{$info.time.seconds}''{/if}
                                {else}
                                	{$smarty.const._NOACCESSDATA}
                                {/if}
                            </td>
                            <td class = "progressCell">
                                <span style = "display:none">{$info.content * 1000}</span>
                                <span class = "progressNumber" >#filter:score-{$info.content}#%</span>
                                <span class = "progressBar" style = "width:{$info.content}px;">&nbsp;</span>&nbsp;
                            </td>
                            <td class = "progressCell">
                                <span style = "display:none">{$info.tests * 1000}</span>
                                <span class = "progressNumber">#filter:score-{$info.tests}#%</span>
                                <span class = "progressBar" style = "width:{$info.tests}px;">&nbsp;</span>&nbsp;
                            </td>
                            <td class = "progressCell">
                                <span style = "display:none">{$info.projects * 1000}</span>
                                <span class = "progressNumber">#filter:score-{$info.projects}#%</span>
                                <span class = "progressBar" style = "width:{$info.projects}px;">&nbsp;</span>&nbsp;
                            </td>
                            <td class = "centerAlign">{$info.comments}</td>
                            <td class = "centerAlign">{$info.posts}</td>
                        </tr>                   
                    {/foreach}
	                  </table>      
                      <br>
                      <strong>{$smarty.const._PROFESSORS}:</strong>
                      <table class = "sortedTable" sortBy = 0  width = "100%">
                        <tr>
                            <td class = "topTitle">{$smarty.const._USERNAME}</td>
                            <td class = "topTitle">{$smarty.const._FIRSTNAME}</td>
                            <td class = "topTitle">{$smarty.const._LASTNAME}</td>
                            <td class = "topTitle centerAlign">{$smarty.const._TIMEINLESSON}</td>
                            <td class = "topTitle centerAlign">{$smarty.const._COMMENTS}</td>
                            <td class = "topTitle centerAlign">{$smarty.const._MESSAGES}</td>
                        </tr>
                    {foreach name = 'professor_list' key = 'login' item = "info" from = $T_PROFESSORS_INFO}   
                        <tr class = "{cycle name = "professor_list" values = "oddRowColor, evenRowColor"} {if !$info.active[$lesson_id]}deactivatedTableElement{/if}">
                            <td>#filter:user_login-{$login}#<a href = "{$T_BASIC_TYPE}.php?ctg=statistics&option=user&sel_user={$login}">{$login}</a></td>
                            <td>{$info.name}</td>
                            <td>{$info.surname}</td>
                            <td class = "centerAlign">
                                <span style = "display:none">{$info.seconds}</span>
                                {if $info.seconds}
                                	{if $info.time.hours}{$info.time.hours}h{/if}
                                	{if $info.time.minutes}{$info.time.minutes}'{/if}
                                	{if $info.time.seconds}{$info.time.seconds}''{/if}
                                {else}
                                	{$smarty.const._NOACCESSDATA}
                                {/if}
                            </td>
                            <td class = "centerAlign">{$info.comments}</td>
                            <td class = "centerAlign">{$info.posts}</td>
                        </tr>                   
                    {/foreach}
    				</table>      
                </div>
                
                {if !empty($T_TESTS_INFO)}
                <div class = "tabbertab {if (isset($smarty.get.tab) &&  $smarty.get.tab == 'tests')} tabbertabdefault{/if}">
                    <h3>{$smarty.const._TESTS}</h3>
                {foreach key = test_id item = test_info from = $T_TESTS_INFO}
                    {if !$test_info.general.scorm}
						<table style = "width:100%">
                            <tr><td>
                                    <img style = "vertical-align:middle" src="images/others/blank.gif"  class = "plus" onclick="toggleVisibility(document.getElementById('tinfo{$test_id}'),this)" title="{$smarty.const._SHOWHIDE}" alt="{$smarty.const._SHOWHIDE}"/>
                                    <a href = "javascript:void(0)" style = "vertical-align:middle;font-weight:bold" onclick="toggleVisibility(document.getElementById('tinfo{$test_id}'),this)">{$smarty.const._TEST}: {$test_info.general.name}</a>
                                </td>                                            
                                <td style = "text-align:right">
                                    <a href = "show_chart.php?id=2&lesson_id={$T_LESSON_ID}&test_id={$test_info.general.id}" onclick = "eF_js_showDivPopup('{$smarty.const._QUESTIONSKIND}', 2)" target = "POPUP_FRAME"><img src="images/16x16/pie-chart.png" border="0px" alt="{$smarty.const._QUESTIONSKIND}" title = "{$smarty.const._QUESTIONSKIND}"/></a> 
                                </td>                       
                            </tr>
                            <tr id = "tinfo{$test_id}" style="display:none;">
                                <td colspan = "2">
                                    <table width = "100%">
                                        <tr>
                                            <td class = "topTitle leftAlign">{$smarty.const._TESTINFO}</td>
                                            <td>&nbsp;</td>
                                            <td class = "topTitle leftAlign">{$smarty.const._QUESTIONINFO}</td>
                                        </tr>
                                        <tr><td style = "vertical-align:top">
                                                <table style = "width:100%">
                                                    <tr class = "{cycle name = "test_info" values = "oddRowColor, evenRowColor"}"><td>{$smarty.const._DURATION}:</td><td>{if $test_info.general.duration.hours}{$test_info.general.duration.hours}h {/if}{if $test_info.general.duration.minutes}{$test_info.general.duration.minutes}' {/if}{if $test_info.general.duration.seconds}{$test_info.general.duration.seconds}''{/if}</td></tr>
                                                    <tr class = "{cycle name = "test_info" values = "oddRowColor, evenRowColor"}"><td>{$smarty.const._REDOABLE}:</td><td>{$test_info.general.redoable_str}</td></tr>
                                                    <tr class = "{cycle name = "test_info" values = "oddRowColor, evenRowColor"}"><td>{$smarty.const._ONEBYONE}:</td><td>{$test_info.general.onebyone_str}</td></tr>
                                                    <tr class = "{cycle name = "test_info" values = "oddRowColor, evenRowColor"}"><td>{$smarty.const._CREATED}:</td><td>#filter:timestamp-{$test_info.general.timestamp}#</td></tr>
                                                </table>
                                            </td>
                                            <td>&nbsp;</td>
                                            <td style = "vertical-align:top">
                                                <table style = "width:100%">
                                                    <tr class = "{cycle name = "question_info" values = "oddRowColor, evenRowColor"}"><td>{$smarty.const._TOTALQUESTIONS}:</td><td>{$test_info.questions.total}</td></tr>
                                                    <tr class = "{cycle name = "question_info" values = "oddRowColor, evenRowColor"}"><td>{$smarty.const._DEVELOPMENT}:</td><td>{$test_info.questions.raw_text}</td></tr>
                                                    <tr class = "{cycle name = "question_info" values = "oddRowColor, evenRowColor"}"><td>{$smarty.const._MULTIPLEONE}:</td><td>{$test_info.questions.multiple_one}</td></tr>
                                                    <tr class = "{cycle name = "question_info" values = "oddRowColor, evenRowColor"}"><td>{$smarty.const._MULTIPLEMANY}:</td><td>{$test_info.questions.multiple_many}</td></tr>
                                                    <tr class = "{cycle name = "question_info" values = "oddRowColor, evenRowColor"}"><td>{$smarty.const._TRUEFALSE}:</td><td>{$test_info.questions.true_false}</td></tr>
                                                    <tr class = "{cycle name = "question_info" values = "oddRowColor, evenRowColor"}"><td>{$smarty.const._MATCH}:</td><td>{$test_info.questions.match}</td></tr>
                                                    <tr class = "{cycle name = "question_info" values = "oddRowColor, evenRowColor"}"><td>{$smarty.const._EMPTYSPACES}:</td><td>{$test_info.questions.empty_spaces}</td></tr>
                                                    <tr class = "{cycle name = "question_info" values = "oddRowColor, evenRowColor"}"><td>{$smarty.const._LOWDIFFICULTY}:</td><td>{$test_info.questions.low}</td></tr>
                                                    <tr class = "{cycle name = "question_info" values = "oddRowColor, evenRowColor"}"><td>{$smarty.const._MEDIUMDIFFICULTY}:</td><td>{$test_info.questions.medium}</td></tr>
                                                    <tr class = "{cycle name = "question_info" values = "oddRowColor, evenRowColor"}"><td>{$smarty.const._HIGHDIFFICULTY}:</td><td>{$test_info.questions.high}</td></tr> 
                                                </table>
                                            </td></tr>
                                    </table>
                                </td></tr>
						</table>
                    {else}
						<table style = "width:100%">
                            <tr><td>
                                    <span style = "vertical-align:middle;font-weight:bold">{$smarty.const._TEST}: {$test_info.general.name} (SCORM)</span>
                                </td></tr>
						</table>                    
                    {/if}
                        <table class = "sortedTable" sortBy = 0 style = "width:100%;margin-top:2px;margin-bottom:10px">
                            <tr>
                                <td class = "topTitle">{$smarty.const._USERNAME}</td>
                                <td class = "topTitle">{$smarty.const._FIRSTNAME}</td>
                                <td class = "topTitle">{$smarty.const._LASTNAME}</td>
                                <td class = "topTitle centerAlign">{$smarty.const._SCORE}</td>
                                <td class = "topTitle">{$smarty.const._DATE}</td>
                                <td class = "topTitle centerAlign">{$smarty.const._OPERATIONS}</td>							
                            </tr>
                            {foreach name = 'done_tests_list' key = "id" item = "done_test" from = $T_TESTS_INFO[$test_id].done}
                            <tr class = "{cycle name = $test_id values = "oddRowColor, evenRowColor"}">
                            	<td>#filter:user_login-{$done_test.users_LOGIN}#<a href = "{$smarty.server.PHP_SELF}.php?ctg=statistics&action=user_tab&user={$done_test.users_LOGIN}">{$done_test.users_LOGIN}</td>
                            	<td>{$done_test.name}</td>
                            	<td>{$done_test.surname}</td>
                            	<td class = "progressCell">
                                    <span style = "display:none">{$done_test.score}</span>
                                    <span class = "progressNumber">#filter:score-{$done_test.score}#%</span>
                                    <span class = "progressBar" style = "width:{$done_test.score}px;">&nbsp;</span>&nbsp;
                            	</td>
                            	<td>#filter:timestamp_time-{$done_test.timestamp}#</td>
                            	<td class = "centerAlign">
                            		{if !$test_info.general.scorm}
                                    <a href = "view_test.php?done_test_id={$done_test.id}" onclick = "eF_js_showDivPopup('{$smarty.const._VIEWTEST}', 2)" target = "POPUP_FRAME"><img src = "images/16x16/view.png" alt = "{$smarty.const._VIEWTEST}" title = "{$smarty.const._VIEWTEST}" border = "0" /></a>
                                	<a href = "javascript:void(0)" onclick = "resetTest(this, {$done_test.id})"><img src = "images/16x16/delete.png" title = "{$smarty.const._CANCELTEST}" alt = "{$smarty.const._CANCELTEST}" border = "0" onclick = "return confirm ('{$smarty.const._IRREVERSIBLEACTIONAREYOUSURE}')"/></a>
                                	{/if} 
                            	</td>
							</tr>                            
                            {foreachelse}
                            <tr class = "oddRowColor defaultRowHeight"><td colspan = "100%" class = "centerAlign emptyCategory">{$smarty.const._NODATAFOUND}</td></tr>
                            {/foreach}
                        </table>
                    {/foreach}
                    <script>
                    {literal}
                    function resetTest(el, id) {
                    	Element.extend(el);
                    	url = 'view_test.php?done_test_id='+id+'&reset=1';
                        el.down().src = 'images/others/progress1.gif';
                        new Ajax.Request(url, {
                                method:'get',
                                asynchronous:true,
                                encoding: 'UTF-8',
                                onFailure: function (transport) {
                                    el.down().writeAttribute({src:'images/16x16/delete.png', title:transport.responseText}).hide();
                                    new Effect.Appear(el.down().identify());
                                    window.setTimeout('Effect.Fade("'+el.down().identify()+'")', 10000);
                                },
                                onSuccess: function (transport) {
                                	new Effect.Fade(el.up().up());
                                }
                        });                    	
                    }
                    {/literal}
                    </script>
                </div>
                {/if}
                
                {if !empty($T_QUESTIONS_INFORMATION)}
                <div class="tabbertab {if (isset($smarty.get.tab) &&  $smarty.get.tab == 'questions')} tabbertabdefault{/if}">
                    <h3>{$smarty.const._QUESTIONS}</h3>
                    <table class = "sortedTable" width="100%">
                        <tr>
                            <td class = "topTitle leftAlign nowrap" width="40%">{$smarty.const._QUESTIONTEXT}</td>                            	
                            <td class = "topTitle centerAlign">{$smarty.const._QUESTIONTYPE}</td>
                            <td class = "topTitle centerAlign nowrap">{$smarty.const._DIFFICULTY}</td>
                            <td class = "topTitle centerAlign nowrap">{$smarty.const._TIMESDONE}</td>
                            <td class = "topTitle centerAlign nowrap">{$smarty.const._AVERAGESCORE}</td>
                        </tr>
                        {foreach name = 'questions_list' item = "question" key = "id" from = $T_QUESTIONS_INFORMATION}
                        <tr class = "{cycle values = "oddRowColor,evenRowColor"}">
                            <td>{$question.text}</td>
                            <td class = "centerAlign">
                                {if $question.type == 'match'}             <img src = "images/16x16/component.png"      title = "{$smarty.const._MATCH}"        alt = "{$smarty.const._MATCH}" />
                                {elseif $question.type == 'raw_text'}      <img src = "images/16x16/pens.png"           title = "{$smarty.const._RAWTEXT}"      alt = "{$smarty.const._RAWTEXT}" />
                                {elseif $question.type == 'multiple_one'}  <img src = "images/16x16/branch_element.png" title = "{$smarty.const._MULTIPLEONE}"  alt = "{$smarty.const._MULTIPLEONE}" />
                                {elseif $question.type == 'multiple_many'} <img src = "images/16x16/branch.png"         title = "{$smarty.const._MULTIPLEMANY}" alt = "{$smarty.const._MULTIPLEMANY}" />
                                {elseif $question.type == 'true_false'}    <img src = "images/16x16/yinyang.png"        title = "{$smarty.const._TRUEFALSE}"    alt = "{$smarty.const._TRUEFALSE}" />
                                {elseif $question.type == 'empty_spaces'}  <img src = "images/16x16/dot-chart.png"      title = "{$smarty.const._EMPTYSPACES}"  alt = "{$smarty.const._EMPTYSPACES}" />
                                {/if}
                            </td>
                            <td class = "centerAlign">
                                {if $question.difficulty     == 'low'}        <img src = "images/16x16/flag_green.png" title = "{$smarty.const._LOW}"    alt = "{$smarty.const._LOW}" />
                                {elseif $question.difficulty == 'medium'}     <img src = "images/16x16/flag_blue.png"  title = "{$smarty.const._MEDIUM}" alt = "{$smarty.const._MEDIUM}" />
                                {elseif $question.difficulty == 'high'}       <img src = "images/16x16/flag_red.png"   title = "{$smarty.const._HIGH}"   alt = "{$smarty.const._HIGH}" />
                                {/if}
                            </td>
                            <td class = "centerAlign">{$question.times_done}</td>
                            <td class = "centerAlign">#filter:score-{$question.avg_score}#%</td>
                        </tr>
                        {/foreach}
                    </table>
                </div>
                {/if}
                
                {if !empty($T_PROJECTS_INFORMATION)}
                <div class="tabbertab {if (isset($smarty.get.tab) &&  $smarty.get.tab == 'projects')} tabbertabdefault{/if}">
                    <h3>{$smarty.const._PROJECTS}</h3>
                        {foreach key = "project_id" item = "project_info" from = $T_PROJECTS_INFORMATION}
							<table style = "width:100%">
                                <tr>
                                    <td style = "text-align:left" colspan="4">
                                        <img style = "vertical-align:middle;" src = "images/others/blank.gif"  class="plus" onclick="toggleVisibility(document.getElementById('projects_info{$project_id}'),this)" title="{$smarty.const._SHOWHIDE}" alt="{$smarty.const._SHOWHIDE}"/>
                                        <a href = "javascript:void(0)" style = "vertical-align:middle;font-weight:bold" onclick="toggleVisibility(document.getElementById('projects_info{$project_id}'),this)">{$smarty.const._PROJECT}: {$project_info.general.title}</a>
                                    </td>                                            
                                    {if ( $T_BASIC_USER == 'professor' || $T_BASIC_USER == 'administrator')}
                                    <td style = "text-align:right">
                                            <a href="{$T_BASIC_TYPE}.php?ctg=statistics&oper=project_export&projects_ID={$project_info.general.id}&title={$project_info.general.title}">
                                                <img src="images/file_types/xls.png" border="0px" title="{$smarty.const._XLSFORMAT}" alt="{$smarty.const._XLSFORMAT}" />
                                            </a>
                                            <a href="{$T_BASIC_TYPE}.php?ctg=statistics&oper=project_pdf_export&projects_ID={$project_info.general.id}&title={$project_info.general.title}">
                                                <img src="images/file_types/pdf.png" border="0px" title="{$smarty.const._PDFFORMAT}" alt="{$smarty.const._PDFFORMAT}"/>
                                            </a>
                                    </td>
                                    {/if}
                                </tr>
							</table>
                            <table class = "statisticsTable" style = "">                            
                                <tr id = "projects_info{$project_id}" style = "display:none;">
                                    <td colspan = "100%">
                                        <table  width="100%" style = "text-align:left">                                        
                                            <tr><td class = "topTitle" colspan="100%">{$smarty.const._PROJECTINFO}</td></tr>
                                            <tr class = "{cycle name = "project_info" values = "oddRowColor, evenRowColor"}"><td>{$smarty.const._DESCRIPTION}:</td><td>{$project_info.general.data}</td></tr>
                                            <tr class = "{cycle name = "project_info" values = "oddRowColor, evenRowColor"}"><td>{$smarty.const._DEADLINE}:</td><td>#filter:timestamp_time-{$project_info.general.deadline}#</td></tr>                                               
                                        </table>
                                    </td>
                                </tr>                      
                                <tr>
                                	<td class = "topTitle">{$smarty.const._USERNAME}</td>
                                	<td class = "topTitle">{$smarty.const._NAME}</td>
                                	<td class = "topTitle">{$smarty.const._SURNAME}</td>
                                	<td class = "topTitle centerAlign">{$smarty.const._GRADE}</td>
                                	<td class = "topTitle">{$smarty.const._DATE}</td>
                                </tr>
                            {foreach name = 'done_projects_list' key = "key" item = "info" from = $project_info.done}
                                <tr class = "{cycle name = "done_tests" values = "oddRowColor, evenRowColor"}">
                                    <td>#filter:user_login-{$info.users_LOGIN}#<a href = "{$T_BASIC_TYPE}.php?ctg=statistics&action=user_tab&user={$info.users_LOGIN}">{$info.users_LOGIN}</a></td>
                                    <td>{$info.surname}</td>
                                    <td>{$info.name}</td>
                                    <td class = "progressCell">
                                        <span style = "display:none">{$info.grade}</span>
                                        <span class = "progressNumber">#filter:score-{$info.grade}#%</span>
                                        <span class = "progressBar" style = "width:{$info.grade}px;">&nbsp;</span>&nbsp;&nbsp;
                                    </td>
                                    <td>#filter:timestamp_time-{$info.upload_timestamp}#</td>                                
                                </tr>
                            {foreachelse}
                                <tr class = "oddRowColor defaultRowHeight"><td colspan = "100%" class = "centerAlign emptyCategory">{$smarty.const._NOONEHASBEENASSIGNEDTHISPROJECT}</td></tr>                        
                            {/foreach}
                        </table>                 
                {/foreach}
                </div>    
                {/if} 
                
                <div class="tabbertab {if (isset($smarty.get.tab) &&  $smarty.get.tab == 'overall')} tabbertabdefault{/if}">
                    <h3>{$smarty.const._MOREINFO}</h3>
                    <table class = "statisticsTable">
                        <tr class = "defaultRowHeight">
                            <td class = "topTitle" colspan = "3">{$smarty.const._GENERALLESSONINFO}</td>
                        </tr>
                        <tr>
                            <td>
                                <table style = "width:100%">
                                    <tr class = "{cycle name = "general_lesson_info" values = "oddRowColor, evenRowColor"}">
                                        <td style = "width:30%">{$smarty.const._PRICE}</td>
                                        <td><b>{$T_LESSON_INFO.price_string}</b></td>
                                    </tr>
                                    <tr class = "{cycle name = "general_lesson_info" values = "oddRowColor, evenRowColor"}">
                                        <td style = "width:30%">{$smarty.const._ACTIVENEUTRAL}</td>
                                        <td style = "text-align:left"><b>{$T_LESSON_INFO.active_string}</b></td>
                                    </tr>
                                    <tr class = "{cycle name = "general_lesson_info" values = "oddRowColor, evenRowColor"}">
                                        <td style = "width:30%">{$smarty.const._LANGUAGE}</td>
                                        <td style = "text-align:left"><b>{$T_LESSON_INFO.language}</b></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td class = "topTitle leftAlign" colspan = "3">{$smarty.const._LESSONPARTICIPATIONINFO}</td>
                        </tr>
                        <tr>
                            <td>
                                <table style = "width:100%">
                                    <tr class = "{cycle name = "participation_lesson_info" values = "oddRowColor, evenRowColor"}">
                                        <td style = "width:30%">{$smarty.const._COMMENTS}</td>
                                        <td><b>{$T_LESSON_INFO.comments}</b></td>
                                    </tr>
                                    <tr class = "{cycle name = "participation_lesson_info" values = "oddRowColor, evenRowColor"}">
                                        <td style = "width:30%">{$smarty.const._FORUMPOSTS}</td>
                                        <td><b>{$T_LESSON_INFO.messages}</b></td>
                                    </tr>
                                    <tr class = "{cycle name = "participation_lesson_info" values = "oddRowColor, evenRowColor"}">
                                        <td style = "width:30%">{$smarty.const._CHATMESSAGES}</td>
                                        <td><b>{$T_LESSON_INFO.chatmessages}</b></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td class = "topTitle leftAlign" colspan = "3">{$smarty.const._LESSONCONTENTINFO}</td>
                        </tr>
                        <tr>
                            <td>
                                <table style = "width:100%">
                                    <tr class = "{cycle name = "content_lesson_info" values = "oddRowColor, evenRowColor"}">
                                        <td style = "width:30%">{$smarty.const._THEORY}</td>
                                        <td><b>{$T_LESSON_INFO.theory}</b></td>
                                    </tr>
                                    <tr class = "{cycle name = "content_lesson_info" values = "oddRowColor, evenRowColor"}">
                                        <td style = "width:30%">{$smarty.const._EXAMPLES}</td>
                                        <td><b>{$T_LESSON_INFO.examples}</b></td>
                                    </tr>
                                    <tr class = "{cycle name = "content_lesson_info" values = "oddRowColor, evenRowColor"}">
                                        <td style = "width:30%">{$smarty.const._PROJECTS}</td>
                                        <td><b>{$T_LESSON_INFO.projects}</b></td>
                                    </tr>
                                    <tr class = "{cycle name = "content_lesson_info" values = "oddRowColor, evenRowColor"}">
                                        <td style = "width:30%">{$smarty.const._TESTS}</td>
                                        <td><b>{$T_LESSON_INFO.tests}</b></td>
                                    </tr>
                                    <tr class = "{cycle name = "content_lesson_info" values = "oddRowColor, evenRowColor"}">
                                        <td style = "width:30%">{$smarty.const._TOTAL}</td>
                                        <td>
                                            <b>{math equation="x + y + z + k" x=$T_LESSON_INFO.theory y=$T_LESSON_INFO.examples z=$T_LESSON_INFO.projects k=$T_LESSON_INFO.tests}</b>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </div>
                
                
                {if ($T_BASIC_TYPE == 'administrator' || $T_ISPROFESSOR == true) }
                <div class="tabbertab {if (isset($smarty.get.tab) &&  $smarty.get.tab == 'traffic')} tabbertabdefault{/if}">
                    <h3>{$smarty.const._TRAFFIC}</h3>
                    <form name = "period">
                    <table>
                        <tr><td class = "labelCell">{$smarty.const._FROM}:&nbsp;</td>
                            <td class = "elementCell">{eF_template_html_select_date prefix="from_" time=$T_FROM_TIMESTAMP start_year="-2" end_year="+2" field_order = 'DMY'} {$smarty.const._TIME}: {html_select_time prefix="from_" time = $T_FROM_TIMESTAMP display_seconds = false}</td></tr>
                        <tr><td class = "labelCell">{$smarty.const._TO}:&nbsp;</td>
                            <td class = "elementCell">{eF_template_html_select_date prefix="to_"   time=$T_TO_TIMESTAMP   start_year="-2" end_year="+2" field_order = 'DMY'} {$smarty.const._TIME}: {html_select_time prefix="to_"   time = $T_TO_TIMESTAMP   display_seconds = false}</td></tr>
                        <tr><td></td>
                        	<td class = "elementCell"><input type=checkbox id="showLog" {if ( isset($T_LESSON_LOG))} checked="true" {/if}>{$smarty.const._SHOWANALYTICLOG}</td></tr>                            
                        <tr><td colspan = "2">&nbsp;</td></tr>
                        <tr><td></td>
                            <td class = "elementCell"><input type = "button" value = "{$smarty.const._SHOW}" onclick = "document.location='{$smarty.session.s_type}.php?ctg=statistics&option=lesson&sel_lesson={$T_LESSON_ID}&tab=traffic&from_year='+document.period.from_Year.value+'&from_month='+document.period.from_Month.value+'&from_day='+document.period.from_Day.value+'&from_hour='+document.period.from_Hour.value+'&from_min='+document.period.from_Minute.value+'&to_year='+document.period.to_Year.value+'&to_month='+document.period.to_Month.value+'&to_day='+document.period.to_Day.value+'&to_hour='+document.period.to_Hour.value+'&to_min='+document.period.to_Minute.value+'&showlog='+document.period.showLog.checked"></td>
                        </tr>
	                </table>
	                </form>
	                
                    <table class = "statisticsTable">
                    {if (isset($T_LESSON_TRAFFIC) && $T_LESSON_TRAFFIC.total_access > 0)}
                        <tr>
                            <td colspan = "2" width = "100%" style = "text-align:right"> 
                                <a href = "show_chart.php?id=8&lesson_id={$T_LESSON_ID}&from={$T_FROM_TIMESTAMP}&to={$T_TO_TIMESTAMP}" style = "vertical-align:middle" onclick = "eF_js_showDivPopup('{$smarty.const._ACCESSSTATISTICS}', 2)", target = "POPUP_FRAME"><img src="images/16x16/chart.png" border="0px" alt="{$smarty.const._ACCESSSTATISTICS}" style = "vertical-align:middle"/>{$smarty.const._ACCESSSTATISTICS}</a> 
                            </td>                            
                        </tr>
                    {/if}
                        <tr><td class = "topTitle" colspan = "2">{$smarty.const._LESSONTRAFFIC}</td></tr> 
                    {if (isset($T_LESSON_TRAFFIC))}
                        <tr class = "oddRowColor">
                            <td style = "width:20%">{$smarty.const._TOTALACCESS}:</td>
                            <td>{$T_LESSON_TRAFFIC.total_access}</td>                                    
                        </tr> 
                        <tr class = "evenRowColor">
                            <td style = "width:20%">{$smarty.const._TOTALACCESSTIME}: </td>
                            <td>
                                {if $T_LESSON_TRAFFIC.total_seconds}
                                	{if $T_LESSON_TRAFFIC.total_time.hours}{$T_LESSON_TRAFFIC.total_time.hours}h{/if}
                                	{if $T_LESSON_TRAFFIC.total_time.minutes}{$T_LESSON_TRAFFIC.total_time.minutes}'{/if}
                                	{if $T_LESSON_TRAFFIC.total_time.seconds}{$T_LESSON_TRAFFIC.total_time.seconds}''{/if}
                                {else}
                                	{$smarty.const._NOACCESSDATA}
                                {/if}
                            </td>
                        </tr>
                    {else}
                        <tr><td colspan = "2">{$smarty.const._TOTALACCESS}: &nbsp; --</td></tr>
                    {/if}                   
                        <tr>&nbsp;</tr>
                    </table>
                    <table class = "statisticsTable">
                        <tr>
                            <td colspan="5">
                                <strong>{$smarty.const._LESSONTRAFFICANALYSIS}</strong>
                            </td>       
                            {if (isset($T_LESSON_TRAFFIC) && $T_LESSON_TRAFFIC.total_seconds > 0 )}                                 
                                <td style = "text-align:right">
                                    <a href = "show_chart.php?id=5&lesson_id={$T_LESSON_ID}&from={$T_FROM_TIMESTAMP}&to={$T_TO_TIMESTAMP}" onclick = "eF_js_showDivPopup('{$smarty.const._MOSTACTIVEUSERS}', 2)", target = "POPUP_FRAME" style = "vertical-align:middle"><img src="images/16x16/chart.png" border="0px" alt="{$smarty.const._MOSTACTIVEUSERS}" style = "vertical-align:middle"/>{$smarty.const._MOSTACTIVEUSERS}</a> 
                                </td>
                            {/if} 
                        </tr>   
                        <tr id = "traffic_analysis">
                            <td colspan = "100%">
                                <table class = "sortedTable" width="100%">
                                    <tr>
                                        <td class = "topTitle" nowrap style = "text-align:left">{$smarty.const._LOGIN}</td>
                                        <td class = "topTitle" nowrap style = "text-align:center" >{$smarty.const._ACCESSNUMBER}</td>
                                        <td class = "topTitle" nowrap style = "text-align:center" >{$smarty.const._TOTALACCESSTIME}</td>
                                        <td class = "topTitle noSort" nowrap style = "text-align:center" >{$smarty.const._OPTIONS}</td>
                                    </tr>                                   
                                    {foreach name = 'user_traffic_list' key = "login" item = "info" from = $T_LESSON_TRAFFIC.users}
                                        <tr class = "{cycle name = "usertraffic" values = "oddRowColor, evenRowColor"} {if !$info.active}deactivatedTableElement{/if}">
                                            <td>#filter:user_login-{$login}#<a href = "{$T_BASIC_TYPE}.php?ctg=statistics&action=user_tab&user={$login}">{$login}</a></td>
                                            <td style = "text-align:center">{$info.accesses}</td>
                                            <td style = "text-align:center">
                                                {if $info.total_seconds}
                                                	{if $info.hours}{$info.hours}h{/if}
                                                	{if $info.minutes}{$info.minutes}'{/if}
                                                	{if $info.seconds}{$info.seconds}''{/if}
                                                {else}
                                                	{$smarty.const._NOACCESSDATA}
                                                {/if} 
                                            </td>
                                            <td style = "text-align:center">
                                                <a href = "show_chart.php?id=10&from={$T_FROM_TIMESTAMP}&to={$T_TO_TIMESTAMP}&login={$login}&lesson_id={$T_LESSON_ID}" onclick = "eF_js_showDivPopup('{$smarty.const._ACCESSSTATISTICS}', 2)" target = "POPUP_FRAME"><img src="images/16x16/chart.png" border="0px" alt="{$smarty.const._ACCESSSTATISTICS}"/></a>     
                                            </td>
                                        </tr>                   
                                    {/foreach}                              
                                </table>                        
                            </td>
                            
                        </tr>
                        <tr>&nbsp;</tr>
                          {if isset($T_LESSON_LOG)}
                            <tr>
                                <td colspan = "100%">
                                    <img src = "images/others/blank.gif" style = "vertical-align:middle" class = "plus" onclick = "toggleVisibility(document.getElementById('lesson_log'),this)" title = "{$smarty.const._SHOWHIDE}" alt = "{$smarty.const._SHOWHIDE}"/>
                                    <a href = "javascript:void(0)" style = "vertical-align:middle;font-weight:bold"  onclick = "toggleVisibility(document.getElementById('lesson_log'),this)">{$smarty.const._ANALYTICLOG}</a>
                                </td>                        
                            </tr>
                            <tr id = "lesson_log" style = "display:none;">
								<td colspan = "100%">
                                	<table class = "statisticsTable" width = "100%">
                                		<tr>
                                            <td class = "topTitle">{$smarty.const._LOGIN}</td>
                                            <td class = "topTitle">{$smarty.const._UNIT}</td>
                                            <td class = "topTitle">{$smarty.const._ACTION}</td>
                                            <td class = "topTitle">{$smarty.const._TIME}</td>    
                                            <td class = "topTitle">{$smarty.const._IPADDRESS}</td>
                                    {foreach name = 'lesson_log_loop' key = "key" item = "info" from = $T_LESSON_LOG}
                                        <tr class = "{cycle name = "lesson_log_list" values = "oddRowColor, evenRowColor"}">
                                            <td>{$info.users_LOGIN}</td>           
                                            <td>{$info.content_name}</td>
                                            <td>{$T_ACTIONS[$info.action]}</td>           
                                            <td>#filter:timestamp_time-{$info.timestamp}#</td>
                                            <td>{$info.session_ip|eF_decodeIp}</td>           
                                        </tr>
                                    {/foreach}
                                 </table>
                            </td>        
                           </tr>
                        {/if}
                    </table>
                </div>
                {/if}
                
            </div>
        
        {/if}
      
    {/capture}
    {eF_template_printInnerTable title=$smarty.const._STATISTICSFORLESSON|cat:':'|cat:$T_LESSON_NAME data=$smarty.capture.lesson_statistics image='32x32/chart.png'}



{elseif $T_OPTION == 'user'}
    {capture name='user_statistics'}
        {if ($T_BASIC_TYPE == 'administrator')}
            <table align = "left">
                <tr>
                    <td>
                        {$smarty.const._CHOOSEUSER}:
                    </td>
                    <td>
                     <input type="text" id="autocomplete" class = "inputText" style = "width:300px"/>
                     <img id = "busy" src="images/12x12/hourglass.png" style="display:none;" alt="working ..."/> 
                     <div id="autocomplete_choices" class="autocomplete"></div>&nbsp;&nbsp;&nbsp;
                    {literal}
                            <script language = "JavaScript" type = "text/javascript">
                        <!--        
                        new Ajax.Autocompleter("autocomplete", "autocomplete_choices", "ask_users.php?type=1", {paramName: "preffix",afterUpdateElement : getSelectionId, indicator : "busy"}); 
                        function getSelectionId(text, li) {
                                document.location='administrator.php?ctg=statistics&tab=lessons&option=user&sel_user='+li.id;
                        }
                        //-->
                            </script>
                    {/literal}      
                    </td>    
                   
                </tr>
                <tr>
                    <td></td>
                    <td class = "infoCell"> {$smarty.const._STARTTYPINGFORRELEVENTMATCHES} </td>
            </tr>
            </table>
            <br>
            &nbsp;  
        {elseif ($T_BASIC_TYPE == 'professor' && $T_ISPROFESSOR == true)}
            <table align = "left">
                <tr>
                    <td>{$smarty.const._CHOOSEUSER}:</td>
                    <td>
                        <input type="text" id="autocomplete" class = "inputText" style = "width:300px"/>
                        <img id = "busy" src="images/12x12/hourglass.png" style="display:none;" alt="working ..."/> 
                        <div id="autocomplete_choices" class="autocomplete"></div>&nbsp;&nbsp;&nbsp;&nbsp;
                        {literal}
                             <script language = "JavaScript" type = "text/javascript">
                            
                            new Ajax.Autocompleter("autocomplete", "autocomplete_choices", "ask_users.php?type=1", {paramName: "preffix",afterUpdateElement : getSelectionId, indicator : "busy"}); 
                            function getSelectionId(text, li) {
                                    document.location='professor.php?ctg=statistics&tab=lessons&option=user&sel_user='+li.id;
                            }
                            
                                </script>
                        {/literal}      
                    </td>    
                </tr>
                <tr><td></td>
                	<td class = "infoCell"> {$smarty.const._STARTTYPINGFORRELEVENTMATCHES} </td>
            </tr>
            </table>
            <br>
            &nbsp;  
        {elseif ($T_BASIC_TYPE == 'student' && $T_ISPROFESSOR == true)}
            <table align = "left">
                <tr>
                    <td>{$smarty.const._CHOOSEUSER}:</td>
                    <td>
                        <input type="text" id="autocomplete" class = "inputText" style = "width:300px"/>
                        <img id = "busy" src="images/12x12/hourglass.png" style="display:none;" alt="working ..."/> 
                        <div id="autocomplete_choices" class="autocomplete"></div>&nbsp;&nbsp;&nbsp;&nbsp;
                        {literal}
                             <script language = "JavaScript" type = "text/javascript">
                            
                            new Ajax.Autocompleter("autocomplete", "autocomplete_choices", "ask_users.php?type=1", {paramName: "preffix",afterUpdateElement : getSelectionId, indicator : "busy"}); 
                            function getSelectionId(text, li) {
                                    document.location='student.php?ctg=statistics&tab=lessons&option=user&sel_user='+li.id;
                            }
                            
                            </script>
                        {/literal}      
                    </td>    
                </tr>
                <tr><td></td>
                    <td class = "infoCell"> {$smarty.const._STARTTYPINGFORRELEVENTMATCHES} </td>
                </tr>
            </table>
            <br>
            &nbsp; 
        {/if}
        
        {if (isset($T_USER_INFO))}
           {if ($T_BASIC_TYPE == 'administrator' || $T_ISPROFESSOR == true)}
            <br/><br/>
            <table width="100%">
                <tr>
                    <td style = "text-align:right">
                        <span style = "vertical-align:middle">{$smarty.const._EXPORTSTATS}</span>
                        <a href = "{$T_BASIC_TYPE}.php?ctg=statistics&option=user&sel_user={$T_USER_LOGIN}&excel=user">
                            <img src="images/file_types/xls.png" border="0px" title="{$smarty.const._XLSFORMAT}" alt="{$smarty.const._XLSFORMAT}" style = "vertical-align:middle"/>
                        </a>
                        <a href = "{$T_BASIC_TYPE}.php?ctg=statistics&option=user&sel_user={$T_USER_LOGIN}&pdf=user">
                            <img src="images/file_types/pdf.png" border="0px" title="{$smarty.const._PDFFORMAT}" alt="{$smarty.const._PDFFORMAT}" style = "vertical-align:middle"/>
                        </a>
                    </td>
                </tr>
            </table>
            {/if}
            <br/>
            <table width = "100%">
            	<tr><td style = "width:1%;padding-right:15px;padding-left:15px"><img src = "view_file.php?file={$T_AVATAR}" title = "{$smarty.const._USERAVATAR}" alt = "{$smarty.const._USERAVATAR}" style = "vertical-align:middle"></td>
            		<td>
                    <table width = "100%">                        
                        <tr class = "{cycle name = "common_user_info" values = "oddRowColor, evenRowColor"}">
                            <td style = "width:30%">{$smarty.const._USERNAME}:</td>
                            <td><b>{$T_USER_INFO.general.fullname}</b></td>
                        </tr>                                        
                        <tr class = "{cycle name = "common_user_info" values = "oddRowColor, evenRowColor"}">
                            <td style = "width:30%">{$smarty.const._USERTYPE}:</td>
                            <td><b>{if $T_USER_INFO.general.user_type == 'administrator'}{$smarty.const._ADMINISTRATOR}{elseif $T_USER_INFO.general.user_type == 'professor'}{$smarty.const._PROFESSOR}{else}{$smarty.const._STUDENT}{/if}</b></td>
                        </tr>     
                        <tr class = "{cycle name = "common_user_info" values = "oddRowColor, evenRowColor"}">
                            <td style = "width:30%">{$smarty.const._LESSONS}:</td>
                            <td><b>{$T_USER_INFO.general.total_lessons}</b></td>
                        </tr>       
                        <tr class = "{cycle name = "common_user_info" values = "oddRowColor, evenRowColor"}">
                            <td style = "width:30%">{$smarty.const._TOTALLOGINTIME}:</td>
                            <td><b>
                                    {if $T_USER_INFO.general.total_login_time.hours || $T_USER_INFO.general.total_login_time.minutes || $T_USER_INFO.general.total_login_time.seconds}
                                    	{if $T_USER_INFO.general.total_login_time.hours}{$T_USER_INFO.general.total_login_time.hours}h{/if}
                                    	{if $T_USER_INFO.general.total_login_time.minutes}{$T_USER_INFO.general.total_login_time.minutes}'{/if}
                                    	{if $T_USER_INFO.general.total_login_time.seconds}{$T_USER_INFO.general.total_login_time.seconds}''{/if}
                                    {else}
                                    	{$smarty.const._NOACCESSDATA}
                                    {/if} 
                            </td>
                        </tr>        
                    </table>
            	</td></tr>
            </table>
                        
            <div class="tabber">
                {if !empty($T_STUDENT_LESSON_INFO.lessons) || !empty($T_PROFESSOR_LESSON_INFO.lessons)}
                <div class="tabbertab {if (isset($smarty.get.tab) &&  $smarty.get.tab == 'lessons')} tabbertabdefault{/if}">
                    <h3>{$smarty.const._LESSONS}</h3>
                    {if !empty($T_STUDENT_LESSON_INFO.lessons)}
                        <strong>{$smarty.const._STUDENTROLE}:</strong>
                        <table class = "sortedTable" width="100%">
                            <tr>
                                <td class = "topTitle" >{$smarty.const._LESSON}</td>
                                <td class = "topTitle centerAlign" >{$smarty.const._TIMEINLESSON}</td>
                                <td class = "topTitle centerAlign" >{$smarty.const._CONTENT}</td>
                                <td class = "topTitle centerAlign" >{$smarty.const._TESTS}</td>
                                <td class = "topTitle centerAlign" >{$smarty.const._PROJECTS}</td>
                                <td class = "topTitle centerAlign" >{$smarty.const._COMPLETED}</td>
                                <td class = "topTitle centerAlign" >{$smarty.const._SCORE}</td>
                                <td class = "topTitle noSort centerAlign">{$smarty.const._OPTIONS}</td>
                            </tr>
                            {foreach name = 'lesson_list' key = 'lesson_id' item = 'lesson_name' from=$T_STUDENT_LESSON_INFO.lessons}
                            <tr class = "{cycle name = "user_lessons_list" values = "oddRowColor, evenRowColor "} {if !$T_STUDENT_LESSON_INFO.active[$lesson_id]}deactivatedTableElement{/if}">
                                <td>{$lesson_name}</td>
                                <td class = "centerAlign">
                                    <span style = "display:none">{$T_STUDENT_LESSON_INFO.time[$lesson_id].total_seconds}</span>
                                    {if $T_STUDENT_LESSON_INFO.time[$lesson_id].total_seconds}
                                    	{if $T_STUDENT_LESSON_INFO.time[$lesson_id].hours}{$T_STUDENT_LESSON_INFO.time[$lesson_id].hours}h{/if}
                                    	{if $T_STUDENT_LESSON_INFO.time[$lesson_id].minutes}{$T_STUDENT_LESSON_INFO.time[$lesson_id].minutes}'{/if}
                                    	{if $T_STUDENT_LESSON_INFO.time[$lesson_id].seconds}{$T_STUDENT_LESSON_INFO.time[$lesson_id].seconds}''{/if}
                                    {else}
                                    	{$smarty.const._NOACCESSDATA}
                                    {/if}
                                </td>
                                <td class = "progressCell">
                                    <span style = "display:none">{$T_STUDENT_LESSON_INFO.content[$lesson_id]*1000}</span>
                                    <span class = "progressNumber">#filter:score-{$T_STUDENT_LESSON_INFO.content[$lesson_id]}#%</span>
                                    <span class = "progressBar" style = "width:{$T_STUDENT_LESSON_INFO.content[$lesson_id]}px;">&nbsp;</span>&nbsp;&nbsp;
                                </td>     
                                <td class = "progressCell">                       
                                    <span style = "display:none">{$T_STUDENT_LESSON_INFO.tests[$lesson_id]*1000}</span>
                                    <span class = "progressNumber">#filter:score-{$T_STUDENT_LESSON_INFO.tests[$lesson_id]}#%</span>
                                    <span class = "progressBar" style = "width:{$T_STUDENT_LESSON_INFO.tests[$lesson_id]}px">&nbsp;</span>&nbsp;&nbsp;
                                </td>  
                                <td class = "progressCell">                       
                                    <span style = "display:none">{$T_STUDENT_LESSON_INFO.projects[$lesson_id] * 1000}</span>
                                    <span class = "progressNumber">#filter:score-{$T_STUDENT_LESSON_INFO.projects[$lesson_id]}#%</span>
                                    <span class = "progressBar" style = "width:{$T_STUDENT_LESSON_INFO.projects[$lesson_id]}px;">&nbsp;</span>&nbsp;&nbsp;
                                </td>  
                                <td class = "centerAlign">
                            	{if $T_STUDENT_LESSON_INFO.completed[$lesson_id]}
                                    <img src = "images/16x16/check.png" alt = "{$smarty.const._YES}" title = "{$smarty.const._YES}" border = "0" />
                                {else}
                                    <img src = "images/16x16/forbidden.png" alt = "{$smarty.const._NO}" title = "{$smarty.const._NO}" border = "0" />
                            	{/if}
                            	</td>
                            	<td class = "centerAlign">#filter:score-{$T_STUDENT_LESSON_INFO.score[$lesson_id]}#</td>
                                <td class = "centerAlign">
                                    <a href = "user_lesson.php?user={$T_USER_LOGIN}&lesson={$lesson_id}" onclick = "eF_js_showDivPopup('{$lesson_name}', new Array('700px', '400px'))" target = "POPUP_FRAME">
                                    	<img src="images/16x16/about.png" border="0px" title="{$smarty.const._MOREINFO}" alt="{$smarty.const._MOREINFO}"></a>
                                </td>
                            </tr>
                            {/foreach}    
                        </table>
                        <br>
                    {/if}
                    {if !empty($T_PROFESSOR_LESSON_INFO.lessons)}
                        <strong>{$smarty.const._PROFESSORROLE}:</strong>
                        <table class = "sortedTable" width = "100%">                        
                            <tr>
                                <td class = "topTitle" >{$smarty.const._LESSON}</td>
                                <td class = "topTitle centerAlign" >{$smarty.const._TIMEINLESSON}</td>
                                <td class = "topTitle centerAlign" >{$smarty.const._CONTENT}</td>
                                <td class = "topTitle centerAlign" >{$smarty.const._TESTS}</td>
                                <td class = "topTitle centerAlign" >{$smarty.const._PROJECTS}</td>
                            </tr>
                            {foreach name = 'lesson_list' key = 'lesson_id' item = 'lesson_name' from=$T_PROFESSOR_LESSON_INFO.lessons}
                            <tr class = "{cycle name = "professor_lessons_list" values = "oddRowColor, evenRowColor"} {if !$T_PROFESSOR_LESSON_INFO.active[$lesson_id]}deactivatedTableElement{/if}">
                                <td>{$lesson_name}</td>
                                <td class = "centerAlign">
                                    <span style = "display:none">{$T_PROFESSOR_LESSON_INFO.time[$lesson_id].total_seconds}</span>
                                    {if $T_PROFESSOR_LESSON_INFO.time[$lesson_id].total_seconds}
                                    	{if $T_PROFESSOR_LESSON_INFO.time[$lesson_id].hours}{$T_PROFESSOR_LESSON_INFO.time[$lesson_id].hours}h{/if}
                                    	{if $T_PROFESSOR_LESSON_INFO.time[$lesson_id].minutes}{$T_PROFESSOR_LESSON_INFO.time[$lesson_id].minutes}'{/if}
                                    	{if $T_PROFESSOR_LESSON_INFO.time[$lesson_id].seconds}{$T_PROFESSOR_LESSON_INFO.time[$lesson_id].seconds}''{/if}
                                    {else}
                                    	{$smarty.const._NOACCESSDATA}
                                    {/if}
                                </td>
                                <td class = "centerAlign">{$T_PROFESSOR_LESSON_INFO.content[$lesson_id]}</td>     
                                <td class = "centerAlign">{$T_PROFESSOR_LESSON_INFO.tests[$lesson_id]}</td>  
                                <td class = "centerAlign">{$T_PROFESSOR_LESSON_INFO.projects[$lesson_id]}</td>  
                            </tr>
                            {/foreach}    
                        </table>
                    {/if}
                </div>
                {/if}          
                
                {if !empty($T_USER_STUDENT_COURSE_INFO) || !empty($T_USER_PROFESSOR_COURSE_INFO)}
                <div class="tabbertab {if (isset($smarty.get.tab) &&  $smarty.get.tab == 'courses')} tabbertabdefault{/if}">
                    <h3>{$smarty.const._COURSES}</h3>    
                    {if !empty($T_USER_STUDENT_COURSE_INFO)}
                        <strong>{$smarty.const._USERCAPITAL}:</strong>
                        <table class = "sortedTable" width="100%">
                            <tr>
                                <td class = "topTitle" >{$smarty.const._COURSE}</td>
                                <td class = "topTitle centerAlign" >{$smarty.const._LESSONS}</td>
                                <td class = "topTitle centerAlign" >{$smarty.const._SCORE}</td>
                                <td class = "topTitle centerAlign" >{$smarty.const._COMPLETED}</td>
                                <td class = "topTitle centerAlign" >{$smarty.const._OPTIONS}</td>
                            </tr>
                            {foreach name = 'course_list' key = 'course_id' item = 'course_name' from=$T_USER_STUDENT_COURSE_INFO.name}
                            <tr class = "{cycle name = "user_courses_list" values = "oddRowColor, evenRowColor"} {if !$T_USER_STUDENT_COURSE_INFO.active[$course_id]}deactivatedTableElement{/if}">
                                <td>{$T_USER_STUDENT_COURSE_INFO.name[$course_id]}</td>
                                <td class = "centerAlign">{$T_USER_STUDENT_COURSE_INFO.lessons[$course_id]}</td>
                                <td class = "progressCell">
                                    <span style = "display:none">{$T_USER_STUDENT_COURSE_INFO.score[$course_id] * 1000}</span>
                                    <span class = "progressNumber">#filter:score-{$T_USER_STUDENT_COURSE_INFO.score[$course_id]}#%</span>
                                    <span class = "progressBar" style = "width:{$T_USER_STUDENT_COURSE_INFO.score[$course_id]}px;">&nbsp;</span>&nbsp;&nbsp;
                                </td>  
                                <td class = "centerAlign">
                                {if $T_USER_STUDENT_COURSE_INFO.completed[$course_id]}
                                    <img src = "images/16x16/check.png" alt = "{$smarty.const._YES}" title = "{$smarty.const._YES}" border = "0" />
                                {else}
                                    <img src = "images/16x16/forbidden.png" alt = "{$smarty.const._NO}" title = "{$smarty.const._NO}" border = "0" />
                                {/if}
                                </td>   
                                <td class = "centerAlign">
                                    <a href = "user_course.php?user={$T_USER_LOGIN}&course={$course_id}" onclick = "eF_js_showDivPopup('{$T_USER_STUDENT_COURSE_INFO.name[$course_id]}', 2)" target = "POPUP_FRAME"><img src="images/16x16/about.png" border="0px" title="{$smarty.const._MOREINFO}" alt="{$smarty.const._MOREINFO}"></a>
                                </td>
                            </tr>
                            {/foreach}    
                        </table>
                        <br>
                    {/if}
                    {if !empty($T_USER_PROFESSOR_COURSE_INFO)}
                        <strong>{$smarty.const._PROFESSORCAPITAL}:</strong>
                        <table class = "sortedTable" width="100%">
                            <tr>
                                <td class = "topTitle" >{$smarty.const._COURSE}</td>
                                <td class = "topTitle centerAlign" >{$smarty.const._LESSONS}</td>
                                <td class = "topTitle centerAlign" >{$smarty.const._USERS}</td>
                                <td class = "topTitle centerAlign" >{$smarty.const._PROFESSORS}</td>
                            </tr>
                            {foreach name = 'p_course_list' key = 'course_id' item = 'course_name' from=$T_USER_PROFESSOR_COURSE_INFO.name}
                            <tr class = "{cycle name = "professor_courses_list" values = "oddRowColor, evenRowColor"} {if !$T_USER_PROFESSOR_COURSE_INFO.active[$course_id]}deactivatedTableElement{/if}">
                                <td>{$T_USER_PROFESSOR_COURSE_INFO.name[$course_id]}</td>
                                <td class = "centerAlign">{$T_USER_PROFESSOR_COURSE_INFO.lessons[$course_id]}</td>
                                <td class = "centerAlign">{$T_USER_PROFESSOR_COURSE_INFO.students[$course_id]}</td>
                                <td class = "centerAlign">{$T_USER_PROFESSOR_COURSE_INFO.professors[$course_id]}</td>
                            </tr>
                            {/foreach}    
                        </table>
                    {/if}
                
                </div>
                {/if}
                
                <div class="tabbertab">
                    <h3>{$smarty.const._MOREINFO}</h3>
                    <table class = "statisticsTable">                       
                        <tr><td>
                            <table width="100%">
                                <tr>
                                    <td class = "topTitle" colspan = "100%">{$smarty.const._GENERALUSERINFO}</td>
                                </tr>
                                <tr class = "{cycle name = "general_user_info" values = "oddRowColor, evenRowColor"}">
                                        <td width="30%">{$smarty.const._LANGUAGE}:</td>
                                        <td><b>{$T_USER_INFO.general.language}</b></td>
                                </tr>
                                <tr class = "{cycle name = "general_user_info" values = "oddRowColor, evenRowColor"}">
                                        <td width="30%">{$smarty.const._ACTIVE}:</td>
                                        <td><b>{$T_USER_INFO.general.active_str}</b></td>
                                </tr>
                                <tr class = "{cycle name = "general_user_info" values = "oddRowColor, evenRowColor"}">
                                        <td width="30%">{$smarty.const._JOINED}:</td>
                                        <td><b>#filter:timestamp-{$T_USER_INFO.general.joined}#</b></td>
                                </tr>
                            </table>
                        </td></tr>
                        <tr><td>
                            <table width="100%">
                                <tr><td class = "topTitle" colspan = "100%">{$smarty.const._USERCOMMUNICATIONINFO}</td></tr>                                 
                                    <tr class = "{cycle name = "communication_info" values = "oddRowColor, evenRowColor"}">
                                        <td width="30%">{$smarty.const._FORUMPOSTS}:</td>
                                        <td><b>{$T_USER_INFO.communication.forum_messages|@sizeof}</b></td>
                                    </tr>
                                    <tr class = "{cycle name = "communication_info" values = "oddRowColor, evenRowColor"}">
                                        <td width="30%">{$smarty.const._FORUMLASTMESSAGE}:</td>
                                        {if isset($T_USER_INFO.communication.last_message)}
                                            <td><b>#filter:timestamp-{$T_USER_INFO.communication.last_message.timestamp}#</b></td>
                                        {else}
                                            <td><b>---</b></td>
                                        {/if}
                                    </tr>
                                    <tr class = "{cycle name = "communication_info" values = "oddRowColor, evenRowColor"}">
                                        <td width="30%" style = "text-align:left">{$smarty.const._PERSONALMESSAGES}:</td>
                                        <td><b>{$T_USER_INFO.communication.personal_messages|@sizeof}</b></td>
                                    </tr>
                                    <tr class = "{cycle name = "communication_info" values = "oddRowColor, evenRowColor"}">
                                        <td width="30%" style = "text-align:left">{$smarty.const._MESSAGESFOLDERS}:</td>
                                        <td><b>{$T_USER_INFO.communication.personal_folders|@sizeof}</b></td>
                                    </tr>
                                    <tr class = "{cycle name = "communication_info" values = "oddRowColor, evenRowColor"}">
                                        <td width="30%" style = "text-align:left">{$smarty.const._FILES}:</td>
                                        <td><b>{$T_USER_INFO.communication.files|@sizeof}</b></td>
                                    </tr>
                                    <tr class = "{cycle name = "communication_info" values = "oddRowColor, evenRowColor"}">
                                        <td width="30%" style = "text-align:left">{$smarty.const._FOLDERS}:</td>
                                        <td><b>{$T_USER_INFO.communication.folders|@sizeof}</b></td>
                                    </tr>
                                    <tr class = "{cycle name = "communication_info" values = "oddRowColor, evenRowColor"}">
                                        <td width="30%" style = "text-align:left">{$smarty.const._TOTALSIZE}:</td>
                                        <td><b>{$T_USER_INFO.communication.total_size}KB</b></td>
                                    </tr>
                                    <tr class = "{cycle name = "communication_info" values = "oddRowColor, evenRowColor"}">
                                        <td width="30%" style = "text-align:left">{$smarty.const._CHATMESSAGES}:</td>
                                        <td><b>{$T_USER_INFO.communication.chat_messages|@sizeof}</b></td>
                                    </tr>
                                    <tr class = "{cycle name = "communication_info" values = "oddRowColor, evenRowColor"}">
                                        <td width="30%" style = "text-align:left">{$smarty.const._CHATLASTMESSAGE}:</td>
                                        {if isset($T_USER_INFO.communication.last_chat)}
                                            <td><b>#filter:timestamp-{$T_USER_INFO.communication.last_caht.timestamp}#</b></td>
                                        {else}
                                            <td><b>---</b></td>
                                        {/if}
                                    </tr>
                                    <tr class = "{cycle name = "communication_info" values = "oddRowColor, evenRowColor"}">
                                        <td width="30%">{$smarty.const._COMMENTS}:</td>
                                        <td><b>{$T_USER_INFO.communication.comments|@sizeof}</b></td>
                                    </tr>
                            </table>
                        </td></tr>
                        <tr><td>
                            <table width="100%">
                                <tr><td class = "topTitle" colspan = "100%">{$smarty.const._USERUSAGEINFO}</td></tr>                                    
                                <tr class = "{cycle name = "user_usage" values = "oddRowColor, evenRowColor"}">
                                        <td width="30%">{$smarty.const._LASTLOGIN}:</td>
                                        {if isset($T_USER_INFO.usage.last_login)}
                                            <td><b>#filter:timestamp-{$T_USER_INFO.usage.last_login.timestamp}#</b></td>
                                        {else}
                                            <td><b>---</b></td>
                                        {/if}
                                </tr>
                                <tr class = "{cycle name = "user_usage" values = "oddRowColor, evenRowColor"}">
                                    <td width="30%">{$smarty.const._TOTALLOGINS}:</td>
                                    <td><b>{$T_USER_INFO.usage.logins|@sizeof}</b></td>    
                                </tr>
                                <tr class = "{cycle name = "user_usage" values = "oddRowColor, evenRowColor"}">
                                    <td width="30%">{$smarty.const._MONTHLOGINS}:</td>
                                    <td><b>{$T_USER_INFO.usage.month_logins|@sizeof}</b></td>    
                                </tr>
                                <tr class = "{cycle name = "user_usage" values = "oddRowColor, evenRowColor"}">
                                    <td width="30%">{$smarty.const._WEEKLOGINS}:</td>
                                    <td><b>{$T_USER_INFO.usage.week_logins|@sizeof}</b></td>    
                                </tr>
                                <tr class = "{cycle name = "user_usage" values = "oddRowColor, evenRowColor"}">
                                    <td width="30%">{$smarty.const._MEANDURATION}:</td>
                                    <td><b>{$T_USER_INFO.usage.mean_duration}&#039;</b></td>    
                                </tr>
                                <tr class = "{cycle name = "user_usage" values = "oddRowColor, evenRowColor"}">
                                    <td width="30%">{$smarty.const._MONTHMEANDURATION}:</td>
                                    <td><b>{$T_USER_INFO.usage.month_mean_duration}&#039;</b></td>    
                                </tr>
                                 <tr class = "{cycle name = "user_usage" values = "oddRowColor, evenRowColor"}">
                                    <td width="30%">{$smarty.const._WEEKMEANDURATION}:</td>
                                    <td><b>{$T_USER_INFO.usage.week_mean_duration}&#039;</b></td>    
                                </tr>
                            </table>
                        </td></tr>
                    </table>
                </div>
                {if (isset($T_BASIC_TYPE) && $T_BASIC_TYPE == 'administrator')}     
                <div class = "tabbertab {if (isset($smarty.get.tab) &&  $smarty.get.tab == 'usertraffic')} tabbertabdefault{/if}">
                    <h3>{$smarty.const._TRAFFIC}</h3>
                    <form name = "period">
                    <table>
                        <tr><td class = "labelCell">{$smarty.const._FROM}:&nbsp;</td>
                            <td class = "elementCell">{eF_template_html_select_date prefix="from_" time=$T_FROM_TIMESTAMP start_year="-2" end_year="+2" field_order = 'DMY'} {$smarty.const._TIME}: {html_select_time prefix="from_" time = $T_FROM_TIMESTAMP display_seconds = false}</td></tr>
                        <tr><td class = "labelCell">{$smarty.const._TO}:&nbsp;</td>
                            <td class = "elementCell">{eF_template_html_select_date prefix="to_"   time=$T_TO_TIMESTAMP   start_year="-2" end_year="+2" field_order = 'DMY'} {$smarty.const._TIME}: {html_select_time prefix="to_"   time = $T_TO_TIMESTAMP   display_seconds = false}</td></tr>
                        <tr><td></td>
                        	<td class = "elementCell"><input type=checkbox id="showLog" {if ( isset($T_LESSON_LOG))} checked="true" {/if}>{$smarty.const._SHOWANALYTICLOG}</td></tr>                            
                        <tr><td colspan = "2">&nbsp;</td></tr>
                        <tr><td></td>
                            <td class = "elementCell"><input type = "button" value = "{$smarty.const._SHOW}" onclick = "document.location='administrator.php?ctg=statistics&option=user&sel_user={$T_USER_LOGIN}&tab=usertraffic&from_year='+document.period.from_Year.value+'&from_month='+document.period.from_Month.value+'&from_day='+document.period.from_Day.value+'&from_hour='+document.period.from_Hour.value+'&from_min='+document.period.from_Minute.value+'&to_year='+document.period.to_Year.value+'&to_month='+document.period.to_Month.value+'&to_day='+document.period.to_Day.value+'&to_hour='+document.period.to_Hour.value+'&to_min='+document.period.to_Minute.value+'&showlog='+document.period.showLog.checked"></td>
                        </tr>
	                </table>
                    </form>
                                       
                    <table class = "statisticsTable" >
                        <tr><td colspan="2" width="100%" style = "text-align:right">
                                <a href = "show_chart.php?id=11&from={$T_FROM_TIMESTAMP}&to={$T_TO_TIMESTAMP}&login={$T_USER_LOGIN}" onclick = "eF_js_showDivPopup('{$smarty.const._ACCESSSTATISTICS}', 2)" target = "POPUP_FRAME" style = "vertical-align:middle">
                                	<img src = "images/16x16/chart.png" border = "0px" alt = "{$smarty.const._ACCESSSTATISTICS}" title = "{$smarty.const._ACCESSSTATISTICS}" style = "vertical-align:middle"/>{$smarty.const._ACCESSSTATISTICS}</a>     
                            </td></tr>
                        <tr><td class = "topTitle" colspan = "2">{$smarty.const._USERTRAFFIC}</td></tr>
                        <tr class = "oddRowColor">
                        	<td width = "30%">{$smarty.const._TOTALLOGINS}: </td>
                        	<td>{if isset($T_USER_TRAFFIC)} {$T_USER_TRAFFIC.total_logins} {else}--{/if}</td></tr>
                        <tr class = "evenRowColor">
                        	<td width = "30%">{$smarty.const._LESSONACCESS}: </td>
                        	<td>{if isset($T_USER_TRAFFIC)} {$T_USER_TRAFFIC.total_access} {else}--{/if}</td></tr>
                    </table>
                    <br/>
                    <table class = "statisticsTable" >
                        <tr><td colspan = "5" style = "font-weight:bold">{$smarty.const._ACCESSPERLESSON}</td></tr>   
                        <tr id = "user_traffic_analysis">
                            <td>
                                <table class = "sortedTable" width="100%">
                                    <tr>
                                        <td class = "topTitle">{$smarty.const._LESSON}</td>
                                        <td class = "topTitle centerAlign">{$smarty.const._ACCESSNUMBER}</td>
                                        <td class = "topTitle centerAlign">{$smarty.const._TOTALACCESSTIME}</td>
                                        <td class = "topTitle noSort centerAlign">{$smarty.const._OPTIONS}</td>
                                    </tr>                                   
                                    {foreach name='lesson_traffic_list' key = "id" item = "lesson" from = $T_USER_TRAFFIC.lessons}
                                        <tr class = "{cycle name = "lessontraffic" values = "oddRowColor, evenRowColor"} {if !$lesson.active}deactivatedTableElement{/if}">
                                            <td>{$lesson.name}</a></td>
                                            <td class = "centerAlign">{$lesson.accesses}</td>   
                                            <td class = "centerAlign">
                                                <span style="display:none">{$lesson.total_seconds}</span>
                                                {if $lesson.total_seconds}
                                                	{if $lesson.hours}{$lesson.hours}h{/if}
                                                	{if $lesson.minutes}{$lesson.minutes}'{/if}
                                                	{if $lesson.seconds}{$lesson.seconds}''{/if}
                                                {else}
                                                	{$smarty.const._NOACCESSDATA}
                                                {/if} 
                                            </td>  
                                            <td class = "centerAlign">
                                                <a href = "show_chart.php?id=10&from={$T_FROM_TIMESTAMP}&to={$T_TO_TIMESTAMP}&login={$T_USER_LOGIN}&lesson_id={$id}" onclick = "eF_js_showDivPopup('{$smarty.const._ACCESSSTATISTICS}', 2)" target = "POPUP_FRAME"><img src="images/16x16/chart.png" border="0px" alt="{$smarty.const._ACCESSSTATISTICS}"/></a>     
                                            </td>
                                        </tr>                   
                                    {foreachelse}
                                    	<tr class = "oddRowColor defaultRowHeight"><td colspan = "100%" class = "centerAlign emptyCategory">{$smarty.const._NODATAFOUND}</td></tr>
                                    {/foreach}                              
                                </table>                        
                            </td>
                        </tr>
                    </table>
                    <br/>
                  {if isset($T_USER_LOG)}
                    <table class = "statisticsTable" >
                        <tr>&nbsp;</tr>
                            <tr>
                                <td colspan = "100%">
                                    <img src = "images/others/blank.gif" style = "vertical-align:middle" class = "plus" onclick = "toggleVisibility(document.getElementById('user_log'),this)" title = "{$smarty.const._SHOWHIDE}" alt = "{$smarty.const._SHOWHIDE}"/>
                                    <a href = "javascript:void(0)" style = "vertical-align:middle;font-weight:bold"  onclick = "toggleVisibility(document.getElementById('user_log'),this)">{$smarty.const._ANALYTICLOG}</a>
                                </td>                        
                            </tr>
                            <tr id = "user_log" style = "display:none;">
                              <td colspan = "100%">
                                  <table class = "statisticsTable" width = "100%">
                                      <td class = "topTitle">{$smarty.const._LESSON}</td>
                                      <td class = "topTitle">{$smarty.const._UNIT}</td>
                                      <td class = "topTitle">{$smarty.const._ACTION}</td>
                                      <td class = "topTitle">{$smarty.const._TIME}</td>    
                                      <td class = "topTitle">{$smarty.const._IPADDRESS}</td>
{*                                      <td class = "topTitle centerAlign">{$smarty.const._MOREINFO}</td>*}                       
                                        {foreach name = 'user_log_loop' key = "key" item = "info" from = $T_USER_LOG}
                                        <tr class = "{cycle name = "user_log_list" values = "oddRowColor, evenRowColor"}">
                                            <td>{$info.lesson_name}</td>           
                                            <td>{$info.content_name}</td>
                                            <td>{$T_ACTIONS[$info.action]}</td>           
                                            <td>#filter:timestamp_time-{$info.timestamp}#</td>
                                            <td>{$info.session_ip|eF_decodeIp}</td>           
{*
                                            <td class = "centerAlign">
                                            	<a href = "show_log.php?id={$info.id}" target = "POPUP_FRAME" onclick = "eF_js_showDivPopup('{$smarty.const._LOGRECORD}', 1)">
                                            	<img src = "images/16x16/about.png" border = "0"></a>
                                            </td>
*}
                                        </tr>
                                    {/foreach}
                                 </table>
                            </td>        
                           </tr>
                    </table>                    
                {/if}                
                </div>
            {/if}
            </div>
        {/if}
    {/capture}
    {eF_template_printInnerTable title=$smarty.const._USERSTATISTICS|cat:':'|cat:$T_USER_LOGIN data=$smarty.capture.user_statistics image='32x32/user1.png'}   

{elseif $T_OPTION == 'course'}
    {capture name='course_statistics'}
    {if ($T_BASIC_TYPE == 'professor')}
        <table align = "left">
            <tr>
                <td>
                    {$smarty.const._CHOOSECOURSE}:
                </td>
                <td> 
                    <input type="text" id="autocomplete" class = "inputText" style = "width:300px"/>
                    <img id = "busy" src="images/12x12/hourglass.png" style="display:none;" alt="working ..."/> 
                    <div id="autocomplete_choices" class="autocomplete"></div>&nbsp;&nbsp;&nbsp;
                    {literal}
                        <script language = "JavaScript" type = "text/javascript">
                            new Ajax.Autocompleter("autocomplete", "autocomplete_choices", "ask_courses.php", {paramName: "preffix",afterUpdateElement : getSelectionId, indicator : "busy"}); 
                            function getSelectionId(text, li) {
                                    document.location='professor.php?ctg=statistics&option=course&sel_course='+li.id;
                            }
                        </script>
                    {/literal}          
                </td>
            </tr>
            <tr>
                <td></td>
                <td class = "infoCell"> {$smarty.const._STARTTYPINGFORRELEVENTMATCHES} </td>
            </tr>  
         </table>   
    {/if}
       
    {if ($T_BASIC_TYPE == 'student')}
        <table align = "left">
            <tr>
                <td>
                    {$smarty.const._CHOOSECOURSE}:
                </td>
                <td> 
                    <input type="text" id="autocomplete" class = "inputText" style = "width:300px"/>
                    <img id = "busy" src="images/12x12/hourglass.png" style="display:none;" alt="working ..."/> 
                    <div id="autocomplete_choices" class="autocomplete"></div>&nbsp;&nbsp;&nbsp;
                    {literal}
                        <script language = "JavaScript" type = "text/javascript">
                            new Ajax.Autocompleter("autocomplete", "autocomplete_choices", "ask_courses.php", {paramName: "preffix",afterUpdateElement : getSelectionId, indicator : "busy"}); 
                            function getSelectionId(text, li) {
                                    document.location='student.php?ctg=statistics&option=course&sel_course='+li.id;
                            }
                        </script>
                    {/literal}          
                </td>
            </tr>
            <tr>
                <td></td>
                <td class = "infoCell"> {$smarty.const._STARTTYPINGFORRELEVENTMATCHES} </td>
            </tr>   
         </table>  
    {/if}
    {if ($T_BASIC_TYPE == 'administrator')}
        <table style = "text-align:left">
            <tr>
                <td>
                    {$smarty.const._CHOOSECOURSE}:
                </td>
                <td> 
                    <input type="text" id="autocomplete" class = "inputText" style = "width:300px"/>
                    <img id = "busy" src="images/12x12/hourglass.png" style="display:none;" alt="working ..."/> 
                    <div id="autocomplete_choices" class="autocomplete"></div>&nbsp;&nbsp;&nbsp;
                    {literal}
                        <script language = "JavaScript" type = "text/javascript">
                            new Ajax.Autocompleter("autocomplete", "autocomplete_choices", "ask_courses.php", {paramName: "preffix",afterUpdateElement : getSelectionId, indicator : "busy"}); 
                            function getSelectionId(text, li) {
                                    document.location='administrator.php?ctg=statistics&option=course&sel_course='+li.id;
                            }                    
                        </script>
                    {/literal}          
                </td>
            </tr>
            <tr>
                <td></td>
                <td class = "infoCell"> {$smarty.const._STARTTYPINGFORRELEVENTMATCHES} </td>
            </tr>   
        </table>  
    {/if}    
    &nbsp;

    {if isset($T_COURSE_INFO)} 
        <br>
        <table width="100%">
            <tr>
                <td style = "text-align:right">
                    <span style = "vertical-align:middle">{$smarty.const._EXPORTSTATS}</span>
                    <a href="{$T_BASIC_TYPE}.php?ctg=statistics&option=course&sel_course={$T_COURSE_ID}&excel=1">
                        <img src="images/file_types/xls.png" border="0px" title="{$smarty.const._XLSFORMAT}" alt="{$smarty.const._XLSFORMAT}" style = "vertical-align:middle"/>
                    </a>
                    <a href="{$T_BASIC_TYPE}.php?ctg=statistics&option=course&sel_course={$T_COURSE_ID}&pdf=1">
                        <img src="images/file_types/pdf.png" border="0px" title="{$smarty.const._PDFFORMAT}" alt="{$smarty.const._PDFFORMAT}" style = "vertical-align:middle"/>
                    </a>
                </td>
            </tr>
        </table>            
		<br/>       
        <table width="100%">
            <tr class = "{cycle name = "course_common_info" values = "oddRowColor, evenRowColor"}">                
                <td width="30%" >{$smarty.const._NAME}:</td><td style = "text-align:left"><b>{$T_COURSE_INFO.name}</b></td></tr>
            </tr>
            <tr class = "{cycle name = "course_common_info" values = "oddRowColor, evenRowColor"}">                
                <td width="30%" >{$smarty.const._DIRECTION}:</td><td style = "text-align:left"><b>{$T_COURSE_INFO.direction}</b></td></tr>
            </tr>
            <tr class = "{cycle name = "course_common_info" values = "oddRowColor, evenRowColor"}">                
                <td width="30%" >{$smarty.const._LESSONS}:</td><td style = "text-align:left"><b>{$T_COURSE_INFO.lessons}</b></td></tr>
            </tr>
            <tr class = "{cycle name = "course_common_info" values = "oddRowColor, evenRowColor"}">                
                <td width="30%" >{$smarty.const._STUDENTS}:</td><td style = "text-align:left"><b>{$T_COURSE_INFO.students}</b></td></tr>
            </tr>
            <tr class = "{cycle name = "course_common_info" values = "oddRowColor, evenRowColor"}">                
                <td width="30%" >{$smarty.const._PROFESSORS}:</td><td style = "text-align:left"><b>{$T_COURSE_INFO.professors}</b></td></tr>
            </tr>
            <tr class = "{cycle name = "course_common_info" values = "oddRowColor, evenRowColor"}">                
                <td width="30%" >{$smarty.const._PRICE}:</td><td style = "text-align:left"><b>{$T_COURSE_INFO.price}</b></td></tr>
            </tr>
            <tr class = "{cycle name = "course_common_info" values = "oddRowColor, evenRowColor"}">                
                <td width="30%" >{$smarty.const._LANGUAGE}:</td><td style = "text-align:left"><b>{$T_COURSE_INFO.language}</b></td></tr>
            </tr>
        </table>
    {/if}
    <br>
    
    {if $T_COURSE_USERS_STATS|@sizeof > 0 || $T_COURSE_PROFESSORS_STATS|@sizeof > 0 || $T_COURSE_LESSON_NAMES|@sizeof > 0}
        <div class="tabber">                        
        {if $T_COURSE_USERS_STATS|@sizeof > 0 || $T_COURSE_PROFESSORS_STATS|@sizeof > 0}
            <div class="tabbertab {if (isset($smarty.get.tab) &&  $smarty.get.tab == 'users')} tabbertabdefault{/if}">
                <h3>{$smarty.const._USERS}</h3>
                <strong>{$smarty.const._STUDENTS}:</strong>
                <table class = "sortedTable" width="100%">
                    <tr>
                        <td class = "topTitle">{$smarty.const._LOGIN}</td>
                        <td class = "topTitle">{$smarty.const._NAME}</td>
                        <td class = "topTitle">{$smarty.const._SURNAME}</td>
                        <td class = "topTitle centerAlign">{$smarty.const._COMPLETED}</td>
                        {*<td class = "topTitle centerAlign">{$smarty.const._TOTALTIME}</td>*}
                        <td class = "topTitle centerAlign">{$smarty.const._SCORE}</td>
                        <td class = "topTitle noSort centerAlign">{$smarty.const._OPTIONS}</td>
                    </tr>                                   
                    {foreach name = 'student_list' key = "login" item = "info" from = $T_COURSE_USERS_STATS}   
                        <tr class = "{cycle values = "oddRowColor, evenRowColor"} {if !$info.active}deactivatedTableElement{/if}">
                            <td>#filter:user_login-{$login}#<a href = "{$T_BASIC_TYPE}.php?ctg=statistics&option=user&sel_user={$login}">{$login}</a></td>
                            <td>{$info.name}</td>
                            <td>{$info.surname}</td>
                            <td class = "centerAlign">
                                {if $info.completed}
                                    <img src = "images/16x16/check.png" alt = "{$smarty.const._YES}" title = "{$smarty.const._YES}" border = "0" />
                                {else}
                                    <img src = "images/16x16/forbidden.png" alt = "{$smarty.const._NO}" title = "{$smarty.const._NO}" border = "0" />
                                {/if}
                            </td>
                            {*<td class = "centerAlign">
                                <span style = "display:none">{$info.seconds}</span>
                                {if $info.seconds}
                                	{if $info.time.hours}{$info.time.hours}h{/if}
                                	{if $info.time.minutes}{$info.time.minutes}'{/if}
                                	{if $info.time.seconds}{$info.time.seconds}''{/if}
                                {else}
                                	{$smarty.const._NOACCESSDATA}
                                {/if}
                            </td>*}
                            <td class = "progressCell">
                                <span style = "display:none">{$info.score * 1000}</span>
                                <span class = "progressNumber">#filter:score-{$info.score}#%</span>
                                <span class = "progressBar" style = "width:{$info.score}px;">&nbsp;</span>&nbsp;
                            </td>
                            <td class = "centerAlign">
                                <a href = "user_course.php?user={$login}&course={$T_COURSE_ID}" onclick = "eF_js_showDivPopup('{$T_COURSE_NAME}', new Array('700px', '400px'))" target = "POPUP_FRAME"><img src="images/16x16/about.png" border="0px" title="{$smarty.const._MOREINFO}" alt="{$smarty.const._MOREINFO}"></a>
                            </td>
                        </tr>                   
                    {/foreach}
              </table>      
              <br>
              <strong>{$smarty.const._PROFESSORS}:</strong>
              <table class = "sortedTable" width="100%">
                    <tr>
                        <td class = "topTitle">{$smarty.const._LOGIN}</td>
                        <td class = "topTitle">{$smarty.const._NAME}</td>
                        <td class = "topTitle">{$smarty.const._SURNAME}</td>
                        {*<td class = "topTitle centerAlign">{$smarty.const._TOTALTIME}</td>*}
                    </tr>
                    {foreach name = 'professor_list' item = 'info' key = "login" from = $T_COURSE_PROFESSORS_STATS}   
                        <tr class = "{cycle name = "cprofessor_list" values = "oddRowColor, evenRowColor"} {if !$info.active}deactivatedTableElement{/if}">
                            <td> #filter:user_login-{$login}#<a href = "{$T_BASIC_TYPE}.php?ctg=statistics&option=user&sel_user={$login}">{$login}</a></td>
                            <td>{$info.name}</td>
                            <td>{$info.surname}</td>
                            {*<td class = "centerAlign">
                                <span style = "display:none">{$info.seconds}</span>
                                {if $info.seconds}
                                	{if $info.time.hours}{$info.time.hours}h{/if}
                                	{if $info.time.minutes}{$info.time.minutes}'{/if}
                                	{if $info.time.seconds}{$info.time.seconds}''{/if}
                                {else}
                                	{$smarty.const._NOACCESSDATA}
                                {/if}
                            </td>*}
                        </tr>                   
                    {/foreach}
              </table>      
            </div>
        {/if}
        
        {if $T_COURSE_LESSON_STATS|@sizeof > 0}
            <div class="tabbertab {if (isset($smarty.get.tab) &&  $smarty.get.tab == 'lessons')} tabbertabdefault{/if}">
                <h3>{$smarty.const._LESSONS}</h3>
                <table class = "sortedTable" width="100%">
                    <tr>
                        <td class = "topTitle">{$smarty.const._LESSON}</td>
                        <td class = "topTitle centerAlign">{$smarty.const._CONTENT}</td>
                        <td class = "topTitle centerAlign">{$smarty.const._TESTS}</td>
                        <td class = "topTitle centerAlign">{$smarty.const._PROJECTS}</td>
                    </tr>
                    {foreach name = 'lesson_list' key ="id" item = "info" from = $T_COURSE_LESSON_STATS}   
                        <tr class = "{cycle values = "oddRowColor, evenRowColor"} {if !$info.active}deactivatedTableElement{/if}" >
                            <td><a href = "{$T_BASIC_TYPE}.php?ctg=statistics&option=lesson&sel_lesson={$id}">{$info.name}</a></td>
                            <td class = "centerAlign">{$info.content}</td>
                            <td class = "centerAlign">{$info.tests}</td>
                            <td class = "centerAlign">{$info.projects}</td>
                        </tr>                   
                    {/foreach}
              </table>      
            </div>
        {/if}
        
        </div>
    {/if}

    {/capture}
    {eF_template_printInnerTable title=$smarty.const._COURSESTATISTICS|cat:':'|cat:$T_COURSE_NAME data=$smarty.capture.course_statistics image='32x32/books.png'}   
{elseif $T_OPTION == 'test'}
    {capture name='test_statistics'}
    {if ($T_BASIC_TYPE == 'professor')}
        <table>
            <tr><td>
                    {$smarty.const._CHOOSETEST}:
                </td>
                <td> 
                    <input type="text" id="autocomplete" class = "inputText" style = "width:300px"/>
                    <img id = "busy" src="images/12x12/hourglass.png" style="display:none;" alt="working ..."/> 
                    <div id="autocomplete_choices" class="autocomplete"></div>&nbsp;&nbsp;&nbsp;
                    {literal}
                        <script language = "JavaScript" type = "text/javascript">
                            new Ajax.Autocompleter("autocomplete", "autocomplete_choices", "ask_tests.php", {paramName: "preffix",afterUpdateElement : getSelectionId, indicator : "busy"}); 
                            function getSelectionId(text, li) {
                                    document.location='professor.php?ctg=statistics&option=test&sel_test='+li.id;
                            }
                        </script>
                    {/literal}          
                </td>
            </tr>
            <tr>
                <td></td>
                <td class = "infoCell"> {$smarty.const._STARTTYPINGFORRELEVENTMATCHES} </td>
            </tr>  
         </table>   
    {/if}
       
    {if ($T_BASIC_TYPE == 'student')}
        <table>
        	<tr><td>
                    {$smarty.const._CHOOSETEST}:
                </td>
                <td> 
                    <input type="text" id="autocomplete" class = "inputText" style = "width:300px"/>
                    <img id = "busy" src="images/12x12/hourglass.png" style="display:none;" alt="working ..."/> 
                    <div id="autocomplete_choices" class="autocomplete"></div>&nbsp;&nbsp;&nbsp;
                    {literal}
                        <script language = "JavaScript" type = "text/javascript">
                            new Ajax.Autocompleter("autocomplete", "autocomplete_choices", "ask_tests.php", {paramName: "preffix",afterUpdateElement : getSelectionId, indicator : "busy"}); 
                            function getSelectionId(text, li) {
                                    document.location='student.php?ctg=statistics&option=test&sel_test='+li.id;
                            }
                        </script>
                    {/literal}          
                </td>
            </tr>
            <tr>
                <td></td>
                <td class = "infoCell"> {$smarty.const._STARTTYPINGFORRELEVENTMATCHES} </td>
            </tr>   
         </table>  
    {/if}
    {if ($T_BASIC_TYPE == 'administrator')}
        <table>
            <tr><td>
                    {$smarty.const._CHOOSETEST}:
                </td>
                <td> 
                    <input type="text" id="autocomplete" class = "inputText" style = "width:300px"/>
                    <img id = "busy" src="images/12x12/hourglass.png" style="display:none;" alt="working ..."/> 
                    <div id="autocomplete_choices" class="autocomplete"></div>&nbsp;&nbsp;&nbsp;
                    {literal}
                        <script language = "JavaScript" type = "text/javascript">
                            new Ajax.Autocompleter("autocomplete", "autocomplete_choices", "ask_tests.php", {paramName: "preffix",afterUpdateElement : getSelectionId, indicator : "busy"}); 
                            function getSelectionId(text, li) {
                                    document.location='administrator.php?ctg=statistics&option=test&sel_test='+li.id;
                            }                    
                        </script>
                    {/literal}          
                </td>
            </tr>
            <tr>
                <td></td>
                <td class = "infoCell"> {$smarty.const._STARTTYPINGFORRELEVENTMATCHES} </td>
            </tr>   
        </table>  
    {/if}    
    &nbsp;
        
    {if isset($T_TEST_INFO)}
        <table width="100%">
            <tr>
                <td style = "text-align:right">
                    <span style = "vertical-align:middle">{$smarty.const._EXPORTSTATS}</span>
                    <a href="{$T_BASIC_TYPE}.php?ctg=statistics&option=test&sel_test={$smarty.get.sel_test}&excel=1">
                        <img src="images/file_types/xls.png" border="0px" title="{$smarty.const._XLSFORMAT}" alt="{$smarty.const._XLSFORMAT}" style = "vertical-align:middle"/>
                    </a>
                    <a href="{$T_BASIC_TYPE}.php?ctg=statistics&option=test&sel_test={$smarty.get.sel_test}&pdf=1">
                        <img src="images/file_types/pdf.png" border="0px" title="{$smarty.const._PDFFORMAT}" alt="{$smarty.const._PDFFORMAT}" style = "vertical-align:middle"/>
                    </a>
                </td>
            </tr>
        </table>            
        <br>&nbsp;
        
        <table width="100%">           
            <tr class = "{cycle name = "test_common_info" values = "oddRowColor, evenRowColor"}">                
                <td width="30%">{$smarty.const._NAME}:</td>
                <td><b>{$T_TEST_INFO.general.name}</b></td></tr>
            </tr>
            <tr class = "{cycle name = "test_common_info" values = "oddRowColor, evenRowColor"}">                
                <td width="30%" >{$smarty.const._LESSON}:</td>
                <td><b>{$T_TEST_INFO.general.lesson_name}</b></td></tr>
            </tr>
            <tr class = "{cycle name = "test_common_info" values = "oddRowColor, evenRowColor"}">                
                <td width="30%" >{$smarty.const._DURATION}:</td>
                <td><b>
                	{if $T_TEST_INFO.general.duration_str.hours > 1}{$T_TEST_INFO.general.duration_str.hours} {$smarty.const._HOURS}
                	{elseif $T_TEST_INFO.general.duration_str.hours == 1}{$T_TEST_INFO.general.duration_str.hours} {$smarty.const._HOUR}{/if}
                	{if $T_TEST_INFO.general.duration_str.minutes > 1}{$T_TEST_INFO.general.duration_str.minutes} {$smarty.const._MINUTES}
                	{elseif $T_TEST_INFO.general.duration_str.minutes == 1}{$T_TEST_INFO.general.duration_str.minutes} {$smarty.const._MINUTE}{/if}
                	{if $T_TEST_INFO.general.duration_str.seconds > 1}{$T_TEST_INFO.general.duration_str.seconds} {$smarty.const._SECONDS}
                	{elseif $T_TEST_INFO.general.duration_str.seconds == 1}{$T_TEST_INFO.general.duration_str.seconds} {$smarty.const._SECOND}{/if}
                	</b></td></tr>
            </tr>
            <tr class = "{cycle name = "test_common_info" values = "oddRowColor, evenRowColor"}">                
                <td width="30%" >{$smarty.const._QUESTIONS}:</td>
                <td><b>{$T_TEST_INFO.questions.total}</b></td></tr>
            </tr>
        </table>                

        
        <div class="tabber">                        
            <div class="tabbertab">
                <h3>{$smarty.const._QUESTIONS}</h3>
                <table class = "sortedTable" width="100%">
                    <tr>
                        <td class="topTitle">{$smarty.const._QUESTIONTEXT}</td>
                        <td class="topTitle centerAlign">{$smarty.const._QUESTIONTYPE}</td>
                        <td class="topTitle centerAlign">{$smarty.const._DIFFICULTY}</td>
                        <td class="topTitle centerAlign">{$smarty.const._WEIGHT}</td>   
                    </tr>
                    {foreach name = 'question_list' key = "key" item = "question" from = $T_TEST_QUESTIONS}
                        <tr class = "{cycle name = "test_questions" values = "oddRowColor, evenRowColor"}">                                                
                            <td>{$question->question.plain_text}</td>
                            <td class = "centerAlign">
                            	{assign var = "qtype" value = $question->question.type}
                            	<span style = "display:none">{$question->question.type}</span>
                            	<img src = "{$question->question.type_icon}" title = "{$T_TEST_QUESTIONS_TRANSLATIONS[$qtype]}" alt = "{$T_TEST_QUESTIONS_TRANSLATIONS[$qtype]}"></td>
                            <td class = "centerAlign">
                                <span style = "display:none">{$question->question.difficulty}</span>
                                {if $question->question.difficulty == 'low'}        <img src = "images/16x16/flag_green.png" title = "{$smarty.const._LOW}"    alt = "{$smarty.const._LOW}" />
                                {elseif $question->question.difficulty == 'medium'} <img src = "images/16x16/flag_blue.png"  title = "{$smarty.const._MEDIUM}" alt = "{$smarty.const._MEDIUM}" />
                                {elseif $question->question.difficulty == 'high'}   <img src = "images/16x16/flag_red.png"   title = "{$smarty.const._HIGH}"   alt = "{$smarty.const._HIGH}" />
                                {/if}
                            </td>
                            <td class = "centerAlign">{$question->question.weight}</td>
                        </tr>                                                
                    {foreachelse}
                            <tr class = "oddRowColor defaultRowHeight"><td colspan = "100%" class = "centerAlign emptyCategory">{$smarty.const._NODATAFOUND}</td></tr>
                    {/foreach}      
                </table>
            </div>
        </div>
    {/if}
        
    {/capture}
    {eF_template_printInnerTable title=$smarty.const._TESTSTATISTICS|cat:':'|cat:$T_TEST_NAME data=$smarty.capture.test_statistics image='32x32/edit.png'}   

{elseif $T_OPTION == 'system'}
        {capture name='display_system_statistics'}
             <div class="tabber">   
                <div class="tabbertab {if (isset($smarty.get.tab) &&  $smarty.get.tab == 'system_traffic')} tabbertabdefault{/if}">
                    <h3>{$smarty.const._TRAFFIC}</h3>
                    <form name="systemperiod">
                    <table>
                        <tr><td class = "labelCell">{$smarty.const._FROM}:&nbsp;</td>
                            <td class = "elementCell">{eF_template_html_select_date prefix="from_" time=$T_FROM_TIMESTAMP start_year="-2" end_year="+2" field_order = 'DMY'} {$smarty.const._TIME}: {html_select_time prefix="from_" time = $T_FROM_TIMESTAMP display_seconds = false}</td></tr>
                        <tr><td class = "labelCell">{$smarty.const._TO}:&nbsp;</td>
                            <td class = "elementCell">{eF_template_html_select_date prefix="to_"   time=$T_TO_TIMESTAMP   start_year="-2" end_year="+2" field_order = 'DMY'} {$smarty.const._TIME}: {html_select_time prefix="to_"   time = $T_TO_TIMESTAMP   display_seconds = false}</td></tr>
                        <tr><td></td>
                        	<td class = "elementCell"><input type=checkbox id="showLog" {if ( isset($T_SYSTEM_LOG))} checked="true" {/if}>{$smarty.const._SHOWANALYTICLOG}</td></tr>                            
                        <tr><td></td>
                        	<td class = "elementCell"><input type=checkbox id="showUsers" {if ( isset($smarty.get.showusers))} checked="true" {/if}>{$smarty.const._SHOWALLUSERS}</td></tr>                            
                        <tr><td></td>
                        	<td class = "elementCell"><input type=checkbox id="showLessons" {if ( isset($smarty.get.showlessons))} checked="true" {/if}>{$smarty.const._SHOWALLLESSONS}</td></tr>                            
                        <tr><td></td>
                            <td class = "elementCell"><input type = "button" value = "{$smarty.const._SHOW}" onclick = "document.location='administrator.php?ctg=statistics&option=system&tab=system_traffic&from_year='+document.systemperiod.from_Year.value+'&from_month='+document.systemperiod.from_Month.value+'&from_day='+document.systemperiod.from_Day.value+'&from_hour='+document.systemperiod.from_Hour.value+'&from_min='+document.systemperiod.from_Minute.value+'&to_year='+document.systemperiod.to_Year.value+'&to_month='+document.systemperiod.to_Month.value+'&to_day='+document.systemperiod.to_Day.value+'&to_hour='+document.systemperiod.to_Hour.value+'&to_min='+document.systemperiod.to_Minute.value+'&showlog='+document.systemperiod.showLog.checked+'&showusers='+document.systemperiod.showUsers.checked+'&showlessons='+document.systemperiod.showLessons.checked"></td>
                        </tr>
                        </table>
                    </form> 
                    <table class = "statisticsTable" width="100%">
                       <tr><td style = "text-align:right">
                                <img src="images/16x16/chart.png" border="0px" alt="{$smarty.const._ACCESSSTATISTICS}" style = "vertical-align:middle"/>
                                <a href = "show_chart.php?id=9&from={$T_FROM_TIMESTAMP}&to={$T_TO_TIMESTAMP}" style = "vertical-align:middle" onclick = "eF_js_showDivPopup('{$smarty.const._ACCESSSTATISTICS}', 2)", target = "POPUP_FRAME">{$smarty.const._ACCESSSTATISTICS}</a> 
                            </td>
                        </tr>
                    </table>
                    <table class = "statisticsTable" width="100%">
                        <tr><td class = "topTitle" colspan="100%">{$smarty.const._TOTALSTATISTICS}</td></tr>
                        <tr class = "{cycle name = "active_users" values = "oddRowColor, evenRowColor"}">
                            <td width="20%">{$smarty.const._TOTALLOGINS}:</td>
                            <td>{$T_TOTAL_USER_ACCESSES}</td>
                        </tr>
                        <tr class = "{cycle name = "active_users" values = "oddRowColor, evenRowColor"}">
                            <td width="20%">{$smarty.const._TOTALACCESSTIME}:</td>
                            <td>
                                {if $T_TOTAL_USER_TIME}
                                	{if $T_TOTAL_USER_TIME.hours}{$T_TOTAL_USER_TIME.hours}h{/if}
                                	{if $T_TOTAL_USER_TIME.minutes}{$T_TOTAL_USER_TIME.minutes}'{/if}
                                	{if $T_TOTAL_USER_TIME.seconds}{$T_TOTAL_USER_TIME.seconds}''{/if}
                                {else}
                                	{$smarty.const._NODATAFOUND}
                                {/if}                                            	                                             
                            </td>
                        </tr>
                    </table>
                    <br/>
                    <table class = "statisticsTable" width="100%">
                        <td><strong>{if $smarty.get.showusers}{$smarty.const._USERSACTIVITY}{else}{$smarty.const._MOSTACTIVEUSERS}{/if}</strong></td>   
                            <td style = "text-align:right">
                                <img src="images/16x16/chart.png" border="0px" alt="{$smarty.const._MOSTACTIVEUSERS}" title = "{$smarty.const._MOSTACTIVEUSERS}" style = "vertical-align:middle"/>
                                <a href = "show_chart.php?id=6&logins={$T_USER_TIMES.logins}&seconds={$T_USER_TIMES.times}" onclick = "eF_js_showDivPopup('{$smarty.const._MOSTACTIVEUSERS}', 2)", target = "POPUP_FRAME" style = "vertical-align:middle">{$smarty.const._MOSTACTIVEUSERS}</a> 
                            </td>                                        
                        </tr>                           
                    </table>
                    <table class = "statisticsTable" width="100%">
                        <tr id="most_active_users">
                            <td colspan="100%">
                                <table class = "sortedTable" width="100%">
                                    <tr>
                                        <td class = "topTitle">{$smarty.const._LOGIN}</td>
                                        <td class = "topTitle">{$smarty.const._NAME}</td>
                                        <td class = "topTitle">{$smarty.const._SURNAME}</td>
                                        <td class = "topTitle centerAlign">{$smarty.const._ACCESSNUMBER}</td>
                                        <td class = "topTitle centerAlign">{$smarty.const._TOTALACCESSTIME}</td>
                                     </tr>
                                    {foreach name='active_users'  key = "login" item = "info" from=$T_ACTIVE_USERS}
                                        <tr class = "{cycle name = "active_users" values = "oddRowColor, evenRowColor"} {if !$info.active}deactivatedTableElement{/if}">
                                            <td>#filter:user_login-{$login}#<a href = "{$T_BASIC_TYPE}.php?ctg=statistics&option=user&sel_user={$login}">{$login}</a>
                                            </td>
                                            <td>{$info.name}</td>
                                            <td>{$info.surname}</td>
                                            <td class = "centerAlign">{$info.accesses}</td>
                                            <td class = "centerAlign">
                                            	<span style = "display:none">{$info.seconds}</span>
                                                {if $info.seconds}
                                                	{if $info.time.hours}{$info.time.hours}h {/if}
                                                	{if $info.time.minutes}{$info.time.minutes}'{/if}
                                                	{if $info.time.seconds}{$info.time.seconds}''{/if}
                                                {else}
                                                	{$smarty.const._NOACCESSDATA}
                                                {/if}                                            	 
                                            </td>
                                        </tr>
                                    {/foreach}
                                </table>
                            </td>
                        </tr>
                    </table>
                    <br/>
                    <table class = "statisticsTable" width="100%">
                        <tr><td colspan="100%"><strong>{if $smarty.get.showlessons}{$smarty.const._LESSONSACTIVITY}{else}{$smarty.const._MOSTACTIVELESSONS}{/if}</strong></td></tr>
					</table>
                    <table class = "sortedTable" width="100%">
                        <tr>
                            <td class = "topTitle">{$smarty.const._LESSON}</td>
                            <td class = "topTitle centerAlign">{$smarty.const._ACCESSNUMBER}</td>
                            <td class = "topTitle centerAlign">{$smarty.const._TOTALACCESSTIME}</td>
                         </tr>
                        {foreach name='active_lessons' key = "id" item = "info" from=$T_ACTIVE_LESSONS}
                            <tr class = "{cycle name = "active_lessons" values = "oddRowColor, evenRowColor"} {if !$info.active}deactivatedTableElement{/if}">
                                <td>{$info.name}</td>
                                <td class = "centerAlign">{$info.accesses}</td>
                                <td class = "centerAlign">
                                	<span style = "display:none">{$info.seconds}</span>
                                    {if $info.seconds}
                                    	{if $info.time.hours}{$info.time.hours}h {/if}
                                    	{if $info.time.minutes}{$info.time.minutes}' {/if}
                                    	{if $info.time.seconds}{$info.time.seconds}''{/if}
                                    {else}
                                    	{$smarty.const._NOACCESSDATA}
                                    {/if}                                            	 
                                </td>
                            </tr>
                        {foreachelse}
                        	<tr class = "oddRowColor defaultRowHeight"><td colspan = "100%" class = "centerAlign emptyCategory">{$smarty.const._NODATAFOUND}</td></tr>
                        {/foreach}
                    </table>
				{if isset($T_SYSTEM_LOG)}
                    <table class = "statisticsTable" >
                        <tr>&nbsp;</tr>
                            <tr>
                                <td colspan = "100%">
                                    <img src = "images/others/blank.gif" style = "vertical-align:middle" class = "plus" onclick = "toggleVisibility(document.getElementById('system_log'),this)" title = "{$smarty.const._SHOWHIDE}" alt = "{$smarty.const._SHOWHIDE}"/>
                                    <a href = "javascript:void(0)" style = "vertical-align:middle;font-weight:bold"  onclick = "toggleVisibility(document.getElementById('system_log'),this)">{$smarty.const._ANALYTICLOG}</a>
                                </td>                        
                            </tr>
                            <tr id = "system_log" style = "display:none;">
                              <td colspan = "100%">
                                  <table class = "statisticsTable" width = "100%">
                                		<tr>
                                            <td class = "topTitle">{$smarty.const._LOGIN}</td>
                                            <td class = "topTitle">{$smarty.const._LESSON}</td>
                                            <td class = "topTitle">{$smarty.const._UNIT}</td>
                                            <td class = "topTitle">{$smarty.const._ACTION}</td>
                                            <td class = "topTitle">{$smarty.const._TIME}</td>    
                                            <td class = "topTitle">{$smarty.const._IPADDRESS}</td>
                                    {foreach name = 'lesson_log_loop' key = "key" item = "info" from = $T_SYSTEM_LOG}
                                        <tr class = "{cycle name = "lesson_log_list" values = "oddRowColor, evenRowColor"}">
                                            <td>{$info.users_LOGIN}</td>           
                                            <td>{$info.lesson_name}</td>
                                            <td>{$info.content_name}</td>
                                            <td>{$T_ACTIONS[$info.action]}</td>           
                                            <td>#filter:timestamp_time-{$info.timestamp}#</td>
                                            <td>{$info.session_ip|eF_decodeIp}</td>           
                                        </tr>
                                    {/foreach}
                                 </table>
                            </td>        
                           </tr>
                    </table>                    
				{/if}
                </div>
                
                <div class="tabbertab {if (isset($smarty.get.tab) &&  $smarty.get.tab == 'user_types')} tabbertabdefault{/if}">
                    <h3>{$smarty.const._USERTYPES}</h3>
                    <table class = "statisticsTable" width="100%">
                        <tr><td style = "text-align:right">
                                <img src="images/16x16/chart.png" border="0px" alt="{$smarty.const._USERSKIND}" style = "vertical-align:middle"/>
                                <a href = "show_chart.php?id=4" onclick = "eF_js_showDivPopup('{$smarty.const._USERSKIND}', 2)" target = "POPUP_FRAME" style = "vertical-align:middle">{$smarty.const._USERSKIND}</a> 
                            </td>
                        </tr>
                    </table>
                    <table class = "statisticsTable" width="100%">
                    	<tr class = "topTitle">
                            <td class = "topTitle">{$smarty.const._USERTYPE}</td>
                            <td class = "topTitle centerAlign">{$smarty.const._OVERALL}</tD>
                    	</tr>                                        
                    {foreach name='user_types' key='key' item='usertype' from = $T_USER_TYPES}
                        <tr class = "{cycle name = "userkinds_info" values = "oddRowColor, evenRowColor"}">
                            <td>
                            	{if $usertype.user_type == 'administrator'}{$smarty.const._ADMINISTRATOR}
                            	{elseif $usertype.user_type == 'professor'}{$smarty.const._PROFESSOR}
                            	{elseif $usertype.user_type == 'student'}{$smarty.const._STUDENT}
                            	{/if}
                            </td>
                            <td class = "centerAlign">{$usertype.num}</td>
                        </tr>
                    {/foreach}
                    </table>
                </div>
            </div>
        {/capture}
        {eF_template_printInnerTable title=$smarty.const._SYSTEMSTATISTICS data=$smarty.capture.display_system_statistics image='32x32/chart.png'}   
{/if}