Example #1
0
?>
,
				use_templates:<?php 
echo $templated;
?>
,
				associations:<?php 
echo $ass_str;
?>
,
				lang:'<?php 
echo $kfm_language;
?>
',
				subcontext_categories:<?php 
echo js_array($kfm->setting('subcontext_categories'), true);
?>
,
				subcontext_size:<?php 
echo $kfm->setting('subcontext_size');
?>
,
				show_admin_link:<?php 
echo $kfm->setting('show_admin_link') ? 'true' : 'false';
?>
,
				version:'<?php 
echo KFM_VERSION;
?>
'
			};
Example #2
0
}
//print_r($question);
$suma = array();
if ($question != NULL) {
    echo "<table bgcolor=white border=1><tr><td>№ Питання</td><td>Питання по групам</td><td>Графік</td><td>Складність <br> питання</td><td>Дискримінативність <br> питання</td><td>Показник</td>";
} else {
    echo "<table bgcolor=white border=1>";
}
for ($j = 0; $j < count($question); $j++) {
    $suma[0] = $question[$j]['gr1'];
    $suma[1] = $question[$j]['gr2'];
    $suma[2] = $question[$j]['gr3'];
    $suma[3] = $question[$j]['gr4'];
    $suma[4] = $question[$j]['gr5'];
    echo "<tr><td>Питання " . ($j + 1) . "</td><td> [" . $suma[0] . "%] [" . $suma[1] . "%] [" . $suma[2] . "%] [" . $suma[3] . "%] [" . $suma[4] . "%] </td><td>";
    echo "\n\t<style>\n\t#chart_div" . $j . "{\n    width:100px;\n    height:70px;\n    \t}\n\t</style>\n\t\n\t<script type='text/javascript'>\n\t\n\tgoogle.load('visualization', '1', {packages:['corechart']});\n      google.setOnLoadCallback(drawChart" . $j . ");\n      function drawChart" . $j . "() {\n\t\t\n        var data" . $j . " = new google.visualization.DataTable();\n        data" . $j . ".addColumn('string', 'Валідність');\n        data" . $j . ".addColumn('number', 'Невалідні питання');\n\t\tfor (var i=0;i<mas" . $j . ".length;i++){\n\t\tdata" . $j . ".addRows([[String(i+1), parseFloat(mas" . $j . "[i])]]);\n\t\t}\t\n         var options = {legend: 'none',title: 'Загальний вигляд %',vAxis:{maxValue:100,minValue:0}, hAxis: { title: 'Групи', titleTextStyle: {color: 'green'} }\n        };\n        var chart = new google.visualization.ColumnChart(document.getElementById('chart_div" . $j . "'));\n        chart.draw(data" . $j . ", options);\n      }\n\t  var pos=1;</script>\n\t ";
    echo "<div id='chart_div" . $j . "'></div></td><td>" . round($question[$j]['check'] / $question[$j]['sumstyd'], 2) . "</td><td>" . $question[$j]['discrit'] . "</td>";
    if ($question[$j]['validn'] != "") {
        echo "<td bgcolor=yellow>" . $question[$j]['validn'];
    } else {
        echo "<td> ";
    }
    echo "</td>";
    echo "<script type='text/javascript'>\n\t \n\t\$('#chart_div" . $j . "').on('mousedown', function(e){\n\t\n\t   if ( pos == 1) \n\t\t\t{\t\t\t\n\t\t\$(this).css({\n\t    width:'400px',\n        height:'300px' \n\t\t});\n\t\tdrawChart" . $j . "();\t\npos=2;\t\t\n\t\t\t}\t\t\n\t\t\telse \t\t\t\n\t\t\t{\t\t\t\t\n\t\t\$(this).css({\n\t    width:'100px',\n        height:'70px' \n\t\t});\n\t\tdrawChart" . $j . "();\t\npos=1;\t\t\n\t\t\t}\n\n\t\t})\n\t\t\n\t  var mas" . $j . " = " . js_array($suma) . ";\n\t  </script>";
}
?>
 </table></td><td width=200px valign='top'>
<?
include ("wood_script.php");
?>
 <script type="text/javascript" src="script/ser.js"></script>
Example #3
0
    width:10%;
}
div.row div.formw2 {
    width:90%;
    float:left
}
div.divTicket {
    padding-top: 100px;
}
</style>';
$types = TicketManager::get_all_tickets_categories();
$htmlHeadXtra[] = '<script language="javascript">
    var projects = ' . js_array($types, 'projects', 'project_id') . '
    var course_required = ' . js_array($types, 'course_required', 'course_required') . '
    var other_area = ' . js_array($types, 'other_area', 'other_area') . '
    var email = ' . js_array($types, 'email', 'email') . '</script>';
/**
 * @param $s
 * @return string
 */
function js_str($s)
{
    return '"' . addcslashes($s, "..\"\\") . '"';
}
/**
 * @param $array
 * @param $name
 * @param $key
 * @return string
 */
function js_array($array, $name, $key)
Example #4
0
 public static function split($sep, $limit)
 {
     $obj = jsrt::this()->toStr()->value;
     $limit = $limit == jsrt::$undefined ? 0xffffffff : $limit->toUInt32()->value;
     if (get_class($sep) == "js_regexp") {
         // XXX finish me once RegExp is there
         throw new js_exception(new js_error("string::split(//) not implemented"));
     }
     $sep = $sep->toStr()->value;
     $array = explode($sep, $obj);
     return js_array(count($array), $array);
 }
Example #5
0
	var modifications   = 0;
	var newBase         = 1;
	var loadingDelay    = 7000;
	var canEdit         = 1;
	var hideWallCount   = 0;
	var isAttack        = false;
	var maxDeployable   = 240; 
	var troopsDeployed  = 0;
	var mobileDevice = 0;
	
	<?php 
echo 'var _levels = ', js_intarray($towerMaxLVL), ';';
echo 'var _MAXlevels = ', js_intarray($towerMaxLVL), ';';
echo 'var _towers = ', js_array($towerIMG), ';';
echo 'var _towerId = ', js_array($towerName), ';';
echo 'var _towerRid = ', js_array($towerID), ';';
?>

var ToggleLevel = false;
$('#toggleLevel').click(function() {
	if (!ToggleLevel) {
		$('#toggleLevel').addClass('toggleOn');
		<?php 
for ($i = 0; $i < count($towerName); $i++) {
    echo 'document.getElementById(_towerId[' . $i . ']).onclick = function() { ChangeLevel(' . $i . ') };';
}
?>
		ToggleLevel = true;
	} else {
		$('#toggleLevel').removeClass('toggleOn');
		
Example #6
0
	width:10%;
}
div.row div.formw2 {
    width:90%;
	float:left
}
div.divTicket {
    padding-top: 100px;
}
</style>';
$types = TicketManager::get_all_tickets_categories();
$htmlHeadXtra[] = '<script language="javascript">
                        var projects = ' . js_array($types, 'projects', 'project_id') . '
                        var course_required = ' . js_array($types, 'course_required', 'course_required') . '
                        var other_area = ' . js_array($types, 'other_area', 'other_area') . '
                        var email = ' . js_array($types, 'email', 'email') . '
		   </script>';
$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link  href="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/tag/style.css" rel="stylesheet" type="text/css" />';

/**
 * @param $s
 * @return string
 */
function js_str($s)
{
    return '"' . addcslashes($s, "\0..\37\"\\") . '"';
}

/**
 * @param $array
Example #7
0
$procentLegkuh[$k] = array();
$procentVashkuh[$k] = array();
echo "<table border=1>";
for($k=1;$k<$data->predmet;$k++){
	$procentLegkuh[$k] = round(($lehki[$k]*100)/$numQueation, 2);
	$procentVashkuh[$k] = round(($vashki[$k]*100)/$numQueation, 2);
	
	if ($procentLegkuh[$k] + $procentVashkuh[$k]<99){
	$suma[$k] = $procentLegkuh[$k] + $procentVashkuh[$k];
	
	echo "<tr><td>Предмет: " . $k . " - Питань: " . $numQueation . " - Легкі: " . $procentLegkuh[$k] . "(" . $lehki[$k] . ")" . "% - Важкі: " . $procentVashkuh[$k] . "(" . $vashki[$k] . ")" . "% - Не валідні: " . $suma[$k] . "% <br />";
	}
}
echo "</table>";
echo "<script type='text/javascript'>var mas = ".js_array($suma).";</script>";
echo "<script type='text/javascript'>var masl = ".js_array($procentLegkuh).";masv = ".js_array($procentVashkuh).";</script>";
echo "<table><tr><td><div id='chart_div' style='width: 300px; height: 400px;'></div></td><td>";
echo "<div id='chart_divlv' style='width: 500px; height: 400px;'></div></td></tr></table>";
//---------------END NEW----------------------
$strResult2 = $strResultHeader;
$fp2 = fopen('report/72.doc', 'w');
for($k=1;$k<$data->predmet;$k++){

	$procentLegkuh = round(($lehki[$k]*100)/$numQueation, 2);
	$procentVashkuh = round(($vashki[$k]*100)/$numQueation, 2);

	$suma = $procentLegkuh + $procentVashkuh;
	$strResult2 .= "Предмет: " . $k . " - Питань: " . $numQueation . " - Легкі: " . $procentLegkuh . "(" . $lehki[$k] . ")" . "% - Важкі: " . $procentVashkuh . "(" . $vashki[$k] . ")" . "% - Не валідні: " . $suma . "% <br>";
	

}
Example #8
0
     }
     $sql_year_sem .= ") AND BT.EDUYEAR=" . $sem[$i][0] . ") ";
     if ($sem[$i + 1][0] != null) {
         $sql_year_sem .= "OR ";
     }
 }
 //echo "<p>chb=";
 //print_r($chb);
 //echo "<p>sem0=";
 //print_r($sem);
 //echo "<p>id_sql=";
 //print_r($id_sql);
 //echo "<p>sql_year_sem=";
 //print_r($sql_year_sem);
 //echo "<p>";
 echo " <script type='text/javascript'> var mas = " . js_array($id) . "</script>";
 //upd 2013-06: convert 120/80 ECTS level back to the 12-ball grade system
 $zagalne = $contingent->select("select\n avg(\ncase\n when (S2T.CREDITS_CUR>=40)and(S2T.CREDITS_CUR<=66) then 4\n when S2T.CREDITS_CUR=69 then 4.5\n when S2T.CREDITS_CUR=72 then 5\n when S2T.CREDITS_CUR=75 then 5.5\n when S2T.CREDITS_CUR=78 then 6\n when S2T.CREDITS_CUR=81 then 6.5\n when S2T.CREDITS_CUR=84 then 7\n when S2T.CREDITS_CUR=87 then 7.5\n when S2T.CREDITS_CUR=90 then 8\n when S2T.CREDITS_CUR=93 then 8.5\n when S2T.CREDITS_CUR=96 then 9\n when S2T.CREDITS_CUR=99 then 9.5\n when S2T.CREDITS_CUR=102 then 10\n when S2T.CREDITS_CUR=105 then 10.5\n when S2T.CREDITS_CUR=108 then 11\n when S2T.CREDITS_CUR=111 then 11.5\n when S2T.CREDITS_CUR>=112 then 12\n else 0\n END \n ) avg_of_credits_cur,\n  avg(\n case\n when S2T.credits_test=50 then 5.5\n when S2T.credits_test=52 then 6\n when S2T.credits_test=54 then 6.5\n when S2T.credits_test=56 then 7\n when S2T.credits_test=58 then 7.5\n when S2T.credits_test=60 then 8\n when S2T.credits_test=62 then 8.5\n when S2T.credits_test=64 then 9\n when S2T.credits_test=66 then 9.5\n when S2T.credits_test=68 then 10\n when S2T.credits_test=70 then 10.5\n when S2T.credits_test=72 then 11\n when S2T.credits_test=74 then 11.5\n when S2T.credits_test>=76 then 12\n else 0\n END \n  ) avg_of_credits_test\nfrom STUDENT2TESTLIST S2T\ninner join B_TESTLIST BT\n  on (BT.TESTLISTID = S2T.TESTLISTID)\ninner join B_VARIANT_ITEMS BVI_M \n  on (BVI_M.VARIANTID = BT.VARIANTID)\ninner join B_VARIANT_ITEMS BVI_V \n  on (BVI_V.VARIANTID = BVI_M.PARENTVARIANTID)\nwhere BVI_V.VARIANTID in (" . $id_sql . ")\n  and BVI_V.DISCIPLINEID = " . $_GET['DISCIPLINE'] . "\n  and BVI_V.SPECIALITYID = " . $_GET['SPECIALITY'] . "\n  and BT.DEPARTMENTID = " . $_GET['DEPARTMENT'] . " \n " . $exampl . " AND (" . $sql_year_sem . ");");
 echo " <table bgcolor='white' border=1 width = 100% class='ser'><tr><td colspan=3>Результат по вибраних відомостях (" . $id_sql . ")</td></tr>\n<tr><td><center><b>Поточна</td><td><center><b>Екзаменаційна</td><td><center><b>Загальна</td></tr>";
 for ($i = 0; $i < count($zagalne); $i++) {
     echo "<tr>";
     $avg_curr = $zagalne[$i][0];
     $avg_test = $zagalne[$i][1];
     $avg_total = round($avg_curr * 0.6 + $avg_test * 0.4, 1);
     echo "<td><center>" . $zagalne[$i][0] . "</td>";
     //Поточна
     echo "<td><center>" . $zagalne[$i][1] . "</td>";
     //Екзаменаційна
     echo "<td><center>" . $avg_total . "</td>";
     //Загальна
     echo "</tr>";