|
BLUEJ EXTENSIONS The BlueJ Submitter ExtensionOverviewBlueJ now includes a mechanism for writing and deploying extensions to its core functionality, for which general documentation can be found here. At the moment, there is only one extension which is distributed with BlueJ: support for online submission of BlueJ projects for assessment or assistance -- the "submitter". The submitter extension shipped with BlueJ is pre-installed as a "System
level" extension. If you do not wish to use it, remove the file The Submitter ExtensionThe submitter extension allows course tutors to set up mechanisms by which their students can submit work to them. The system is designed to encompass a broad range of uses, ranging from an installation that has only one or two courses running on it, to one that has a structured hierarchy involving a number of different people, departments and computers.The extension does not provide mechanisms for dealing with work once it has been submitted. The submitter allows submission of BlueJ projects, or specific files from them, using a number of "transport" mechanisms: file copy, file transfer (ftp), email, or by sending them to a script on a web server. Files may be included or excluded from the submission, and may be packed into a JAR file before shipping. The actions of the submitter are guided by one or more
The contents of these files are combined (in the order given above) to form a list of "schemes", the submission actions available at any given time. A simple Overview of features added January 2007If you are already familiar with the submitter, then you may want to know that the new features in the January 2007 release are:
There are no changes to the The new version of the submitter can be downloaded here. Install it by overwriting the existing file of the same name in your BlueJ installation. The User's ViewSetupBefore using any of the features of the Submitter, users must fill in appropriate fields in the Preferences panel. These settings are remembered by BlueJ.
UseTo submit an open project, the user clicks on the 'Submit' menu item (on BlueJ's Tools menu), and a dialog is opened (see right) showing the name of a submission scheme, with a 'Browse' button alongside; a 'Submit' button and a 'Cancel' button. Pressing the 'Submit' button will immediately proceed with the submission, displaying the progress along the way and finally a results window. Should further information be required (such as an FTP password), a dialog box is shown requesting that information before the submission proceeds. A valid scheme has to be entered before Submit can be pressed, either by directly typing in the name of the scheme, or by Browsing the available schemes. If the user presses 'Browse', another dialog is presented (see left) with a tree view of available schemes. The user should select an appropriate leaf (expanding branches where necessary to navigate to it) and press the 'OK' button. If the 'Cancel' button is pressed instead, the dialog will close and any selection is ignored. The last-used scheme is remembered as a default for the current project. Writing Submission SchemesA So that different departments and/or people can have control of their own schemes, other schemes can be inserted into the tree at appropriate points by reading their definitions from a specified URL. These will only be followed up should the user expand the branch containing such an insert. The files to be sent with a particular submission are defined by those that are included, less those which are excluded. Files that are essential must be present when submission is attempted, and are automatically also included. If no file options are present, all the files in the BlueJ project are included. The transport used to send the files from the user to the desired recipient
is defined by a URL. The URL protocols supported are: Parts of the tree can be disabled. By placing a All configuration definitions are reloaded whenever the user invokes the Submit menu item. Some examplesA simple configuration might beSend to Mrs Smith { .file.include = *.java; .transport = mailto:jks@hiskool.com; } This offers just one scheme to the user, Send to Mrs Smith. It
sends all Supposing Mrs Smith had several classes, and wanted to receive submissions with different titles. Here, the three classes are all leaves, but with no further configuration, so they inherit the configuration of their enclosing scheme. The subject of the email sent is the title of the scheme, egSend to Mrs Smith { .file.include = *.java; .transport = mailto:jks@hiskool.com?subject=<title>; Class 1A; Class 2A; Class 3B; } Class 1A or
whichever the user selected.
If Mrs Smith wanted her students to be able to type a short message to go with the email, the transport URL might be: The user will be issued a dialog box called Message in which to type a multi-line message. This will then become the body of the email.mailto:jks@hiskool.com?subject=<title>&body=<area:Message>; In a more complicated scenario, there may be a more structured tree. For the Computer Science branch, all schemes just send all theComputer Science { .file.include = *.java; CS101 Introduction to Programming { .transport = mailto:cs101tutor@bigskool.com?subject=<title>; Assignment 1 { .file.essential = Stars.java; } Assignment 2 { .file.essential = Picture.java; } Assignment 3 { .file.essential = Person.java, Student.java; } } CS102 Advanced Programming { .transport=mailto:cs102tutor@bigskool.com?subject=<title>; Noughts and Crosses; Chessboard; Foxes and Rabbits; } Java Help! { .transport=mailto:javahelp@bigskool.com?subject=Help&body=<area:Problem>; } } Software Engineering { .insert = http://cs.bigskool.com/softeng/submission.defs; } .java
files. For the three assignments of CS101, specific .java files
must be present for the submission to go ahead. This aids automatic testing,
but also helps to ensure that the student has submitted through the appropriate
scheme.
The Software Engineering department have been given control of their own configuration file, which must be accessible if a user attempts to expand their branch of the scheme tree. GrammarNewlines, together with the spaces that surround them, are treated as a single space character, and appear as such in Strings.Statements: Statement Statements Statement Statement: BLOCK_START Statements BLOCK_END EMPTY_SCHEME CONFIG Comment WHITESPACE EMPTY BLOCK_START: SchemeTitle { BLOCK_END: } EMPTY_SCHEME: SchemeTitle ; CONFIG: ConfigurationToken = ConfigurationValue ; Comment: // { Any characters but \n } \n /* { Any characters but */ } */ SchemeTitle: #opt { Any characters but {}=;/ } ConfigurationToken: . { Any characters of .a-z } ConfigurationValue: { Any characters but {}; } Quoted strings in "" allow the otherwise unacceptable characters. Configuration TokensThe actual configuration data, as described by aConfigurationToken
can be:
Configuration Values: the transport URLThe scheme's transport protocol is defined by the parameter.transport
= URL
Several protocols are available (currently In the case of the ftp: and file: URLs, the files submitted from the project will be created in a folder with the same name as the project, at the target location (with sub-directories created as necessary), but note that all of the directories in the transport URL must already exist. In the case of the mailto: URL, the files from the project will be attached (with content type text/plain) to the generated email message. The structure of the project folder (sub-folders etc) cannot be transmitted using this transport mechanism, due to restrictions imposed by MIME (see RFC 2183 section 2.3). In the case of the http: URL, the files will be sent to the given URL using HTTP POST. Any HTML returned by the target URL will be displayed to the user in a dialog box. Clickable links in the returned HTML will be active in this window, and if the user clicks them will cause an external browser to be displayed. In the case of the https: URL, the functionality is the same as the http: URL, except that an SSL connection is used. Further enhancements to the URL format allow special information to be included, or the user to be presented with a dialog box requesting information. These are inserted into the URL where the information should go. The available parameters are listed here:
=parameter
which will then use that parameter as the default value. It is not recommended
for password .Note that substitution is not performed for message: protocol.
Although user entries are escaped, the URL read from configuration
files is not, so you should do this manually. This means changing all
spaces into Configuration Values: files to send.file.include = Files that should be included in the submission..file.exclude = Files that should then be excluded from
the list..file.essential = Files that must be present in order to
allow the submission to proceed.
Any or all of these three parameters can be present. If a file is referenced
by both the As an alternative to sending files one-by-one, they can be packaged
into a .file.jar = Filename of the .jar file. Parameters
which do not prompt for user input (i.e. InsertsIn order to distribute submission data, reference can be made to a file accessible by URL that contains additional parameters. This allows individual tutors to control their own submission mechanisms, and can ensure that students are using the most up-to-date versions. The file referenced by the URL is inserted literally at that point, so follow the syntax as if the text was all in the one file.Disabling parts of the treeIf you want to temporarily 'switch off' a part of the tree - perhaps because a deadline has passed, or you are not yet ready to receive a set of submissions - place a # in front of the title of the branch or scheme. Everything in the hierarchy below that branch is then also disabled. This saves having to carefully comment out sections of the tree that you want to deactivate - you only need to make a change to the title itself.Some tips and tricksTo include a subject and message body in an email, use URL parameterssubject
and body , eg
.transport = mailto:jack@my.highschool.com?subject=<title>&body=Here%27s+one+I+made+earlier Here the subject of the email will be set to the scheme's title, and the message will contain the text Here's one I made earlier.Note the escaping. There should be no spaces in the URL line. Or try .transport = mailto:jack@my.highschool.com?subject=Help%21&body=<area:Message> so that the student can enter their own message for the body of the email.If using a CGI script to process the sent files, add the necessary parameters in the usual way. For example, suppose it needed the user's name and a PIN to validate them, you could do .transport = http://cs.texasuni.edu/cs2/uploader.php?identity=<field:Username=username>&pin=<password:PIN>&folder=<simpletitle> This prompts the user for a Username, but provides by default
whatever is in the settings, and a password scheme (in which characters
typed are shown as stars) called PIN. An extra parameter is also
sent, called If using a CGI script which validates the information passed to it (or even tests the submitted files!) its response will be shown to the user. This can provide comforting assurance that their files have been successfully submitted. Clickable links in the response will (if followed) be displayed to the user in an external browser window. If any
configuration item in the file (or a file referenced by a To lookup ASCII codes, see www.asciitable.com. Depending on how your FTP server is set up, you may be able to use a double slash at the beginning of a path to go to the root, if that is not where you normally start from. Supposing your student has an account on the .transport = ftp://<field:Username=username>:<password:Password>@cs.newyorkuni.edu//courses/cs101/<00>/ The user must enter their username (which defaults to the one set) and password (hidden by stars) and the files will be placed in a directory appropriate to them and their course. If the username wasjgp the path
in this case would be /courses/cs101/jgp/ . Remember that the
<00> in this case refers to the username entered. This
is validated by the fact that they managed to log into the FTP server in
the first place. Note that the path MUST already exist!
If you
need to use a Proxy Server for HTTP access, you'll need to start BlueJ
with the appropriate settings for the Java VM property settings for There is a known issue with Java's socket classes, the submission extension's email system and Norton Anti Virus's "scan outgoing email" option. Until this is resolved between Sun and Symantec, Norton's "scan outgoing email" option will need to be disabled for email submission of BlueJ projects to succeed. To see
the JavaMail debug log, have a file named For DIGEST-MD5 authentication, set the saslrealm property in the If you are getting an
SSL-handshake exception, it may be because your server's public-key certificate is not one
that your JVM trusts, as is the case with self-signed certificates. Use the keytool -import -alias <a-unique-alias-you-make-up> -file <file-containing-certificate-to-import> -keystore <JAVA_HOME>/jre/lib/security/cacerts> The initial password of |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maintained by Michael Kölling. |