Skip to content

Commit

Permalink
Beispiel-Aufgabensammlung
Browse files Browse the repository at this point in the history
  • Loading branch information
zgtm committed Dec 7, 2023
1 parent 8cbb147 commit 6f85c99
Show file tree
Hide file tree
Showing 116 changed files with 4,581 additions and 0 deletions.
29 changes: 29 additions & 0 deletions beispiel_aufgabensammlung.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Beispiel-Aufgabensammlung"
protected: false
duration_minutes: 0
public_listing: false
secret: "beispiel"
language: "blockly"


tasks:
"Einleitung: Bausteine zusammensetzen":
"training/training-intro": {stars: 4}
"Befehlsfolgen":
"training/training-sequence-marble": {stars: 4}
"Wiederholungen":
"Btraining/training-repeat-marble": {stars: 4}
"Muster malen":
"Btraining/training-repeat-paint": {stars: 4}
"Bedingte Anweisung":
"Btraining/training-repeat-if-paint": {stars: 4}
"Labyrinth":
"Btraining/training-repeat-if-obstacles": {stars: 4}
"Mehr Wiederholungen":
"Btraining/training-repeat-nested-marbles": {stars: 4}
"Zick-Zack":
"Btraining/training-repeat-nested-obstacles": {stars: 4}
"Murmeln finden":
"Btraining/training-repeat-nested-if-marbles": {stars: 4}
"Abschluss: Haus malen":
"Btraining/training-repeat-nested-if-paint": {stars: 4}
Binary file added training/training-intro/bedienung.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added training/training-intro/ergebnis.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added training/training-intro/geschwindigkeit.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added training/training-intro/green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added training/training-intro/green_robot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added training/training-intro/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
89 changes: 89 additions & 0 deletions training/training-intro/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>training-intro</title>
<script>
window.stringsLanguage = 'de';
</script>
<script class="remove" type="text/javascript" src="../../../_common/modules/pemFioi/importModules-1.4-mobileFirst.js" id="import-modules"></script>
<script class="remove" type="text/javascript">
var modulesPath = '../../../_common/modules/';
importModules([
'jquery-1.7.1', 'JSON-js', 'raphael-2.2.1', 'beaver-task-2.0', 'jschannel', 'raphaelFactory-1.0', 'delayFactory-1.0', 'simulationFactory-1.0',
'platform-pr', 'buttonsAndMessages', 'beav-1.0', 'installationAPI.01', 'miniPlatform',
'taskStyles-mobileFirst', 'blockly-robot-0.9', 'jwinf_css']);
// set Blockly as default language when none is specified through ?language=
importLanguageModules('blockly');
</script>
<script class="remove" type="text/javascript">
var json = {
"id": "jwinf-aufgaben/training-intro",
"language": "fr",
"version": "fr.01",
"authors": "Mathias Hiron",
"translators": [],
"license": "",
"taskPathPrefix": "",
"modulesPathPrefix": "",
"browserSupport": [],
"fullFeedback": true,
"minWidth": "auto"
};
</script>
<script type="text/javascript" src="task.js"></script>

</head>
<body onresize="task.displayedSubTask.updateScale()">
<div id="task">
<h1>Beispielaufgabe</h1>
<img src="obstacle.png" style="display:none" />
<img src="green.png" style="display:none" />
<img src="demo.gif" style="display:none" />
<img src="green_robot.png" style="display:none" />
<img src="icon.png" style="display:none" />

<div id="tabsContainer"></div>
<div id="taskContent" style="text-align:left;position:relative">
<div id="taskIntro" style="width: 100%">
<p>
Programmiere den Roboter:<br>
Der Roboter soll das grüne Feld erreichen, ohne gegen die Hindernisse zu laufen.
</p>
<p data-lang="blockly scratch">
Benutze dafür die Bausteine und hänge sie an den Startbaustein <code>Roboter-Programm</code> an.
</p>
<p>
Klicke anschließend auf <img style="height:2.5ex" src="play.jpg">, um das Programm überprüfen zu lassen.
</p>
<div class="long">
<p><img style="height:7ex" src="play.jpg"> Mit diesem Button startest du dein Programm.</p>
<p><img style="height:7ex" src="neustart.jpg"> Mit diesem Button setzt du den Roboter auf die Startposition zurück.</p>
<p><img style="height:7ex" src="schritte.jpg"> Mit diesem Button kannst du dein Programm Schritt für Schritt durchgehen.</p>
<p><img style="height:7ex" src="ergebnis.jpg"> Mit diesem Button wird direkt das Ergbenis deines Programms angezeigt.</p>
<p><img style="height:5ex" src="geschwindigkeit.jpg"> Mit dem Schieberegler kannst du die Geschwindigkeit einstellen, mit der der Roboter das Programm ausführt.</p>
</div>
<div data-lang="python">
<div class="long">
Um den Roboter zu bewegen verwenden wir Funktionen, die uns zur Verfügung gestellt werden. In der ersten Zeile muss
immer stehen:
<pre data-lang="python">
from robot import *
</pre>
Hier stehen uns die folgenden Funktionen (erkennbar an den runden Klammern) zur Verfügung:
<pre data-lang="python">
rechts() : bewegt den Roboter einen Schritt nach rechts
</pre>
<pre data-lang="python">
oben() : bewegt den Roboter einen Schritt nach oben
</pre>
</div>
</div>
</div>
<div id="gridContainer"></div>
<div id="blocklyLibContent"></div>
</div>

</div><!-- task -->
</body>
</html>
90 changes: 90 additions & 0 deletions training/training-intro/index_new.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>training-intro</title>
<script>
window.stringsLanguage = 'de';
</script>
<script class="remove" type="text/javascript" src="../../../_common/modules/pemFioi/importModules-1.4-mobileFirst.js" id="import-modules"></script>
<script class="remove" type="text/javascript">
var modulesPath = '../../../_common/modules/';
importModules([
'jquery-1.7.1', 'JSON-js', 'raphael-2.2.1', 'beaver-task-2.0', 'jschannel', 'raphaelFactory-1.0', 'delayFactory-1.0', 'simulationFactory-1.0',
'platform-pr', 'buttonsAndMessages', 'beav-1.0', 'installationAPI.01', 'miniPlatform', 'conceptDisplay-1.0', 'conceptViewer-1.0', 'conceptViewer_css-1.0',
'taskStyles-mobileFirst', 'blockly-robot-1.1', 'jwinf_css']);
// set Blockly as default language when none is specified through ?language=
importLanguageModules('blockly');
</script>
<script class="remove" type="text/javascript">
var json = {
"id": "jwinf-aufgaben/training-intro",
"language": "fr",
"version": "fr.01",
"authors": "Mathias Hiron",
"translators": [],
"license": "",
"taskPathPrefix": "",
"modulesPathPrefix": "",
"browserSupport": [],
"fullFeedback": true,
"minWidth": "auto"
};
</script>
<script type="text/javascript" src="task_new.js"></script>

</head>
<body onresize="task.displayedSubTask.updateScale()">
<div id="task">
<h1>Einführung</h1>
<img src="obstacle.png" style="display:none" />
<img src="green.png" style="display:none" />
<img src="demo.gif" style="display:none" />
<img src="green_robot.png" style="display:none" />
<img src="icon.png" style="display:none" />

<div id="tabsContainer"></div>
<div id="taskContent" style="text-align:left;position:relative">
<div id="taskIntro" style="width: 100%">
<p>
Programmiere den Roboter:<br>
Der Roboter soll das Feld mit der roten Flagge erreichen, ohne gegen die Hindernisse (Büsche) zu laufen.
</p>
<p data-lang="blockly scratch">
Benutze dafür die Bausteine und hänge sie an den Startbaustein <img src="start.png" style='vertical-align: middle'>.
</p>
<p>
Klicke anschließend auf <img style="height:2.5ex" src="play.jpg">, um das Programm überprüfen zu lassen.
</p>
<div class="long">
<p><img style="height:7ex" src="play.jpg"> Mit diesem Button startest du dein Programm.</p>
<p><img style="height:7ex" src="neustart.jpg"> Mit diesem Button setzt du den Roboter auf die Startposition zurück.</p>
<p><img style="height:7ex" src="schritte.jpg"> Mit diesem Button kannst du dein Programm Schritt für Schritt durchgehen.</p>
<p><img style="height:7ex" src="ergebnis.jpg"> Mit diesem Button wird direkt das Ergbenis deines Programms angezeigt.</p>
<p><img style="height:5ex" src="geschwindigkeit.jpg"> Mit dem Schieberegler kannst du die Geschwindigkeit einstellen, mit der der Roboter das Programm ausführt.</p>
</div>
<div data-lang="python">
<div class="long">
Um den Roboter zu bewegen verwenden wir Funktionen, die uns zur Verfügung gestellt werden.
Jeder Befehl muss in einer eigenen Zeile stehen. In der ersten Zeile muss
immer stehen:
<pre data-lang="python">
from robot import *
</pre>
Hier stehen uns die folgenden Funktionen (erkennbar an den runden Klammern) zur Verfügung:
<pre data-lang="python">
rechts() : bewegt den Roboter einen Schritt nach rechts
</pre>
<pre data-lang="python">
oben() : bewegt den Roboter einen Schritt nach oben
</pre>
</div>
</div>
</div>
<div id="gridContainer"></div>
<div id="blocklyLibContent"></div>
</div>

</div><!-- task -->
</body>
</html>
Binary file added training/training-intro/neustart.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added training/training-intro/obstacle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added training/training-intro/play.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added training/training-intro/schritte.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added training/training-intro/start.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions training/training-intro/task.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
function initTask(subTask) {
var cellSide = 60;

subTask.gridInfos = {
hideSaveOrLoad: true,
cellSide: cellSide,
actionDelay: 200,
itemTypes: {
green_robot: { img: "green_robot.png", side: 80, nbStates: 9, isObstacle: true, offsetX: -14, category: "robot", team: 0 },
obstacle: { num: 2, img: "obstacle.png", side: cellSide, category: "obstacle", isObstacle: true },
green: { num: 3, img: "green.png", side: cellSide, category: "paint", isObstacle: false, hasColor: true, color: "vert" }
},
maxInstructions: 6,
includeBlocks: {
groupByCategory: false,
generatedBlocks: {
robot: ["east", "north"]
},
standardBlocks: {
includeAll: false,
wholeCategories: [],
singleBlocks: []
},
},
blocklyColourTheme: "bwinf",
ignoreInvalidMoves: false,
groupByCategory: false,
includedAll: false,
includedCategories: [ ],
includedBlocks: [],
checkEndEveryTurn: true,
checkEndCondition: robotEndConditions.checkReachGreenArea,
};

subTask.data = {
easy: [
{
tiles: [
[2, 2, 2, 2, 2, 2, 2, 2],
[2, 1, 1, 1, 1, 1, 1, 2],
[2, 1, 1, 2, 2, 1, 1, 2],
[2, 1, 1, 2, 1, 3, 1, 2],
[2, 1, 1, 1, 1, 2, 1, 2],
[2, 1, 1, 1, 1, 1, 1, 2],
[2, 2, 2, 2, 2, 2, 2, 2]
],
initItems: [
{ row: 4, col: 3, dir: 0, type: "green_robot" },
]
}
]
};

initBlocklySubTask(subTask);
}

initWrapper(initTask, null, null, true);

10 changes: 10 additions & 0 deletions training/training-intro/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: "Bausteine zusammensetzen"
standalone: true
public_listing: true

languages:
- blockly
- python

tags:
- Einleitung
58 changes: 58 additions & 0 deletions training/training-intro/task_new.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
function initTask(subTask) {
var cellSide = 60;

subTask.gridInfos = {
hideSaveOrLoad: true,
conceptViewer: false,
contextType: "course",
actionDelay: 200,
//itemTypes: {
//green_robot: { img: "green_robot.png", side: 80, nbStates: 9, isRobot: true, offsetX: -14, zOrder: 2, team: 0 },
//obstacle: { num: 2, img: "grey_brick_wall.png", side: cellSide, isObstacle: true },
//green: { num: 3, img: "green.png", side: cellSide, category: "paint", isObstacle: false, hasColor: true, color: "vert" }
//},
maxInstructions: 6,
includeBlocks: {
groupByCategory: false,
generatedBlocks: {
robot: ["east", "north"]
},
standardBlocks: {
includeAll: false,
wholeCategories: [],
singleBlocks: []
},
},
blocklyColourTheme: "bwinf",
ignoreInvalidMoves: false,
groupByCategory: false,
includedAll: false,
includedCategories: [],
includedBlocks: [],
checkEndEveryTurn: true,
};

subTask.data = {
hard: [
{
tiles: [
[2, 2, 2, 2, 2, 2, 2, 2],
[2, 1, 1, 1, 1, 1, 1, 2],
[2, 1, 1, 2, 2, 1, 1, 2],
[2, 1, 1, 2, 1, 3, 1, 2],
[2, 1, 1, 1, 1, 2, 1, 2],
[2, 1, 1, 1, 1, 1, 1, 2],
[2, 2, 2, 2, 2, 2, 2, 2]
],
initItems: [
{ row: 4, col: 3, type: "robot" },
]
}
]
};

initBlocklySubTask(subTask);
}

initWrapper(initTask, ["hard"], "hard", true);

Binary file added training/training-intro/temp2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added training/training-repeat-if-obstacles/green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added training/training-repeat-if-obstacles/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6f85c99

Please sign in to comment.