In addition to its direct benefits for students, LearnCS! is designed as a research platform for studying how novices learn to program. Snapshots of student progress are automatically saved on the LearnCS! server. Student activity, such as running the program, operations of the debugger (setting or clearing a breakpoint, stepping through the program, etc.), and opening or closing the memory depiction are also stored.
The following steps will install a working version of LearnCS!.
-
Create a virtual machine and install 64-bit Kubuntu 14.04 Linux. ( LearnCS! has been shown to work well on 64-bit Kubuntu 14.04. It has not been tested on most other distributions. A hard requirement, for use with the node modules in this git repository, is 64-bit.)
-
Ensure that required packages are installed
apt-get install git sqlite3 nodejs
-
Obtain LearnCS!
git clone https://github.com/derrell/LearnCS.git LearnCS.git
-
**LearnCS!**
uses some libraries that have their own git repositories. These are called
"submodules." Retrieve the code for the submodules. This will take a few
minutes.
cd LearnCS.git; git submodule init; git submodule update
-
Build the C interpreter.
cd desktop/compilers/ansic; make
-
There are a number of programs and tests that are used to verify that the interpreter is working properly. Run those tests.
cd canning; ./dotests.sh
-
Create the LearnCS! configuration file. This file is in a directory called private, at the top level.
cd ../../../.. mkdir private cp learncs-config-TEMPLATE.json private/learncs-config.json
-
Edit your private configuration file, as required for your site.
-
url: The URL which your users will use to access LearnCS! . This URL will be used in the link emailed to registering users.
-
notifyRecipients: a comma-separated list of email addresses to whom notifications will be sent to notify them of user registrations. (Notice that in the template configuration file, there is a leading X, changing the configuration key from notifyRecipients to XnotifyRecipients. The leading X comments out this entry, so notifications are not sent to anyone. If you wish to have notifications sent, remove the leading X.)
-
email: The entries inside of the braces provide the information necessary for contacting your outbound SMTP mail server. This is how LearnCS! will send registration links to registering users.
-
The graphical user interface and backend server are built via a single command, from the backend directory. Change into that directory.
cd backend-nodesqlite
-
Build the frontend GUI and the backend server.
./generate.py build
-
Add a few template programs that will be available to all users.
tar -xvzf USERCODE-initial.tgz
-
Change into the deploy directory, from which LearnCS! is run.
cd deploy
-
Start the LearnCS! server. Note that HTTPS is disabled (by setting its port to 0) because these installation steps do not cover how to create (self-signed or otherwise) HTTPS keys/certificates.
nodejs ./backend.js http.port=8080 https.port=0 &
-
Create your primary (initial) user account. (Additional accounts are created via the Create a new account button in the user interface. Be sure to test that, later, to ensure that your email configuration is correct.)
nodejs newuser.js <your_email_address> <password>, "<full_name>"
-
Connect to LearnCS! using the Chrome browser, at http://YOUR_SERVER_NAME_OR_IP:8080/
-
Click the botton at the bottom of the page, to create a new account. Follow the instructions.
-
Create your course. (This currently requires a bit of SQL entry in the database. Contact me for assistance.)
-
Enjoy!