Evil educators

About the new version 12.2.1, I would be really curious about the “extension tweaks for evil educators with no courage or imagination” :slightly_smiling_face:

Thanks in advance!

Heres what I noticed.

In objects.js:

+StageMorph.prototype.runInitScripts = function () {
+    // Allow each sprite to run one first step before sending the
+    // green flag event.
+    // usage example: reset the sprite to its original state
+    this.receiveUserInteraction('init', true, true);
+    this.children.forEach(morph => {
+        if (morph instanceof SpriteMorph) {
+            morph.receiveUserInteraction('init', true, true);
         }
     });
 };

And, some new extensions

SnapExtensions.primitives.set(
+    'ide_stepping([on?])',
+    function (bool) {
+        var stage = this.parentThatIsA(StageMorph),
+            ide = stage.parentThatIsA(IDE_Morph);
+        if (bool === '') {return Process.prototype.enableSingleStepping; }
+        Process.prototype.enableSingleStepping = !!bool;
+        ide.controlBar.steppingButton.refresh();
+        ide.controlBar.refreshSlider();
+        if (!Process.prototype.enableSingleStepping) {
+            stage.threads.processes.forEach(proc => {
+                if (!proc.isPaused) {
+                    proc.unflash();
+                }
+            });
+        }
+    }
+);
+
+SnapExtensions.primitives.set(
+    'ide_flash([secs])',
+    function (flashTime) {
+        var ide = this.parentThatIsA(IDE_Morph);
+        if (flashTime === '') {return Process.prototype.flashTime; }
+        Process.prototype.flashTime = Math.min(
+            Math.max(flashTime, 0), 0.6
+        );
+        ide.controlBar.refreshSlider();
+    }
+);
+
+SnapExtensions.primitives.set(
+    'ide_livecode([on?])',
+    function (bool) {
+        if (bool === '') {return Process.prototype.enableLiveCoding; }
+        Process.prototype.enableLiveCoding = !!bool;
+    }
+);
+
+SnapExtensions.primitives.set(
+    'ide_palette_buttons([on?])',
+    function (bool) {
+        var ide = this.parentThatIsA(IDE_Morph);
+        if (bool === '') {return ide.scene.showPaletteButtons; }
+        ide.scene.showPaletteButtons = !!bool;
+        ide.flushBlocksCache();
+        ide.refreshPalette();
+    }
+);
+
+SnapExtensions.primitives.set(
+    'ide_start_button([on?])',
+    function (bool) {
+        var ide = this.parentThatIsA(IDE_Morph);
+        if (bool === '') {return ide.controlBar.startButton.isVisible(); }
+        if (!ide.isAppMode) {
+            if (bool) {
+                ide.controlBar.startButton.show();
+            } else {
+                ide.controlBar.startButton.hide();
+            }
+        }
+    }
+);

Guessing these are for tutorial makers who might want a button on the stage to start the tutorial (or maybe a button on the tutorial) so they may be able to do a handful of resetting, or to prevent blocks frombeing made, etc etc

I see. Thanks!