Creating an INIT.LGO file shares procedures,names and property lists that automatically load each time the student logs in. This is a great way to provide a customized environment for your class.
To create an INIT.LGO file:
This will create a “mirrored” copy of the file in each students folder and will load each time they log in.
You may update this file as needed.
Remember that the classroom storage is “~CLASS”.
Students can open the files, and edit them however they revert back when a student logs out, they can not permanently change the files.
Logo loads the top-level INIT.LGO file first, then the classroom-level INIT.LGO file, and finally, the INIT.LGO file stored in the student's folder (provides that they exist). This way, an administrator can store global settings at the top level, and a teacher can store class-specific settings at the classroom level.
As an example, look at this file (comments added for clarity):
; delete the prompt MAKE "PROMPT "|| ; set autosave to save everything PPROP "PREFS "AUTOSAVE "ALL ; define a buggy procedure TO POLYGON :SIDES :SIZE REPEAT :SIDES [FD :SIZE RT 350 / :SIDES] END ; and print stuff for the students to read PR `Today's task: What is wrong with the procedure POLYGON?` PR `Find out how to fix the procedure; use EDIT "POLYGON to edit the procedure.` (PR) PO "POLYGON
For this example, follow these steps:
If you do not want to use the editor, define POLYGON; then, define a procedure MAIN that contains all of the above settings:
TO MAIN ; delete the prompt MAKE "PROMPT "|| ; set autosave to save everything PPROP "PREFS "AUTOSAVE "ALL ; and print stuff for the students to read PR `Today's task: What is wrong with the procedure POLYGON?` PR `Find out how to fix the procedure; use EDIT "POLYGON to edit the procedure.` (PR) PO "POLYGON END
Then, simply save your workspace into the classroom folder. You can either use the File/Save/Logo File menu command, or you use Logo's
If you have logged in with a license code, you add the classroom name to the file's path to save a classroom setting:
To save global settings for eveybody, save at the top level:
If you have logged in as a teacher, your classroom has already been pre-selected, so use this command to save your classroom settings:
Whenever a student logs in, Logo loads INIT.LGO from the classroom folder and runs its MAIN procedure if it is defined, causing the same effects as if you had used the editor.
This section is for users who log in with a license code.
When you log in with a license code, you can see all of your classrooms as sub-direcories. You can save an INIT.LGO file at the top level of your
~CLASS storage to share it with all of your classrooms. Every file that you save at the top level is mirrored in every classroom folder as well as in every student folder. So, if you save an INIT.LGO file at the top level, every student in every classroom loads this INIT.LGO file every time the student logs in. You do not need to save a copy of INIT.LGO in every classroom; one shared INIT.LGO file is fine for all classrooms and students at once.
You can store other files that you want to share at the top level. If you, for example, want to share a file with certain procedures, save them under a different name at the top level. The files will be available to everybody as virtual (mirrored) read-only files.
Note that although Logo loads a top-level or class-level INIT.LGO file, the file is not mirrored. FOr teachers, the global INIT.LGO file is invisible, and for students, both the global and the class-level INIT.LGO files are invisible. This is becasue teachers may want to store a classroom-level INIT.LGO file, and students may want to store their own INIT.LGO files.
The following code snippets are useful if you would like to create settings at the global or classroom level. Please note that you can change your settings normally and then just save your (otherwise empty) workspace with these commands:
ERALL ; clear the workspace SAVE "INIT.LGO
This will save a copy of the “PREFS variable, which contains most of the important settings. These settings will be loaded when a student logs in. In the examples below, the
PPROP “PREFS commands are outlined, but you can as well just change the required setting in the Settings dialog.
Edit your functions, and save the contents of the editor as, for example, LIBRARY.LGO if you want people to load the library manually with a LOAD “LIBRARY command.
PPROP "PREFS "COLORED.TURTLES TRUE
MAKE "PROMPT "||
PPROP "PREFS "AUTOSAVE "ALL
Note that you can just change the settings and then SAVE the empty workspace.
:LAYOUTand copy the resulting list.
MAKE “LAYOUTand paste that list to set the layout with the desired values.