This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-12-14 02:02:45

hsshah
New Scratcher
Registered: 2011-11-30
Posts: 4

Automatic Scratch Skills Evaluator

Hi

I teach scratch programming to kids ranging in ages from 8 - 14. I spend quite a bit of time in reviewing their projects to assess their progress (example: have they mastered loops, how about threads etc).

I would like to automate some of that work by codifying these assessment criteria.
I don't know Squeak (did small Smalltalk programming many years back).

How can I easily export/translate a project file such I can iterate through the objects in the file? I already discovered the project file format but I am trying to figure out if there is a solution other than writing a translator in Squeak.

Thanks in advance for your help and suggestions.

Offline

 

#2 2011-12-14 08:18:50

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Automatic Scratch Skills Evaluator

You could try the "Write Project Summary" option.
Find it by shift-clicking the File menu and clicking "Write project summary" and selecting a destination.

I don't know how much that will help you, but you can find information such as sprite numbers, scripts...

Offline

 

#3 2011-12-14 08:32:22

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: Automatic Scratch Skills Evaluator

Hmm. This is another project where something like a Python library to parse Scratch project files would be really cool...


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#4 2011-12-14 14:52:45

hsshah
New Scratcher
Registered: 2011-11-30
Posts: 4

Re: Automatic Scratch Skills Evaluator

LS97 wrote:

You could try the "Write Project Summary" option.
Find it by shift-clicking the File menu and clicking "Write project summary" and selecting a destination.

I don't know how much that will help you, but you can find information such as sprite numbers, scripts...

This is great. I can write a parser based on this file. And then process it from there.
Only remaining question for me is: give a .sb project file, how to generate the project summary programmatically? Any pointers?

Offline

 

#5 2011-12-14 15:11:52

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Automatic Scratch Skills Evaluator

hsshah wrote:

LS97 wrote:

You could try the "Write Project Summary" option.
Find it by shift-clicking the File menu and clicking "Write project summary" and selecting a destination.

I don't know how much that will help you, but you can find information such as sprite numbers, scripts...

This is great. I can write a parser based on this file. And then process it from there.
Only remaining question for me is: give a .sb project file, how to generate the project summary programmatically? Any pointers?

... I just noticed how little programming skills I have. I can hardly understand what you are saying. XD

But I think I do.

I have no clue... perhaps you could program it so when the project saves it automatically writes it out, but I still am not sure if I understand.

If so:
1. Open up the Scratch exe
2. hold shift while clicking the R in the scratch logo in the top left corner of the scratch exe window.
3. Click "turn fill screen on"
4. Right click the whiteish grey space that appears in the bottom and right edges.
5. Click open
6. click browser
7. In the top left pane (should show "Scratch-Objects", "Scratch-Blocks" etc) click "Scratch-UI-Panes"
8. In the next pane click "ScratchFrameMorph"
9. In the third pane click "-- all --"
10. Click in the pane below where there is text highlighted in bright green.
11. Backspace the whole text.
12. Copy and paste the following script/text into the place:

Code:

saveScratchProject
    | t1 t2 |
    self closeMediaEditorsAndDialogs ifFalse: [^ self].
    self stopAll.
    t1 _ ScratchFileChooserDialog saveScratchFileFor: self.
    (t1 size = 0 or: [t1 = #cancelled])
        ifTrue: [^ self].
    [(t2 _ ScratchFileChooserDialog confirmFileOverwriteIfExisting: t1) = false]
        whileTrue: 
            [t1 _ ScratchFileChooserDialog saveScratchFileFor: self.
            (t1 size = 0 or: [t1 = #cancelled])
                ifTrue: [^ self]].
    t2 = #cancelled ifTrue: [^ self].
    self updateLastHistoryEntryIfNeeded.
    t1 _ (self nameFromFileName: t1)
                , '.sb'.
    projectDirectory _ FileDirectory on: (FileDirectory dirPathFor: t1).
    projectName _ FileDirectory localNameFor: t1.
    projectInfo at: 'author' put: author.
    self updateHistoryProjectName: projectName op: 'save'.
    self writeScratchProject.
    self writeSummaryFile

13. Left click the text.
14. Click accept.
15. If it asks for your initials input them, it doesn't save it or anything.




Only problem i just noticed with this script is the user saving the project would have to select where to save the project summery.

Last edited by Pecola1 (2011-12-14 15:12:57)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#6 2011-12-14 17:15:10

hsshah
New Scratcher
Registered: 2011-11-30
Posts: 4

Re: Automatic Scratch Skills Evaluator

@Pecola1  -  Believe me, I am not that good with programming. (not sure if you were teasing me  smile 

Let me try to describe my earlier post in a different way.   

When my students are done with their scratch projects, they upload their .sb files to me. Now I have multiple .sb files for which I want to generate their "Project Summaries".

One way is to manually open those files in Scratch and Shift Click on File Menu and Select "Write Project Summary'. I was hoping to find a way (via a script or something) to do that without having to manually open each file in Scratch application. 

BTW, just discovered the 'Write Multiple Project Summaries" option. This certainly makes it a whole lot better than what I was imagining earlier.  Still a script would be nice!

I tried your suggestion, but in the final step - Right Clicking on text - I don't see a save/accept option. Can you please elaborate on what your script does? Will it save a project summary every time I save a project? Is so, I can give my students this "modified" version of scratch and ask them to upload their project summaries as well.

Thanks so much for your help.

Offline

 

#7 2011-12-14 17:25:45

Archon
New Scratcher
Registered: 2011-12-14
Posts: 1

Re: Automatic Scratch Skills Evaluator

Well, you could see if there's a function in the source for that  smile

Offline

 

#8 2011-12-14 20:00:47

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Automatic Scratch Skills Evaluator

hsshah wrote:

@Pecola1  -  Believe me, I am not that good with programming. (not sure if you were teasing me  smile 

Let me try to describe my earlier post in a different way.   

When my students are done with their scratch projects, they upload their .sb files to me. Now I have multiple .sb files for which I want to generate their "Project Summaries".

One way is to manually open those files in Scratch and Shift Click on File Menu and Select "Write Project Summary'. I was hoping to find a way (via a script or something) to do that without having to manually open each file in Scratch application. 

BTW, just discovered the 'Write Multiple Project Summaries" option. This certainly makes it a whole lot better than what I was imagining earlier.  Still a script would be nice!

I tried your suggestion, but in the final step - Right Clicking on text - I don't see a save/accept option. Can you please elaborate on what your script does? Will it save a project summary every time I save a project? Is so, I can give my students this "modified" version of scratch and ask them to upload their project summaries as well.

Thanks so much for your help.

I wasn't teasing you.  wink
Maybe you have a lot bigger vocabulary. XD

Also, yes, every-time a student saves their project it would afterwards have them select where a project should be saved.


Also just so you know, I just took one simple command call and added it to the regular scratch saving script, it didn't take me any time really.  smile

Also as for the save option you can also just press alt-S at the same time. (without right clicking) I use windows there might be a different way for macs...  hmm


Also someone possibly make a script which would be a block which would automatically open a project from a list of path files then it would save the txt file to a place on another location from another list... but that would be confusing and I'm not sure how to code it so it would chose where to save the project summary. (rather than having the user choose)

Last edited by Pecola1 (2011-12-14 20:05:37)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

Board footer