shak's Help 

  1. System Concepts
  2. Managing Programming Contests
  3. Mooshak interfaces
  4. Frequently asked questions

Preparing a contest

Contest preparation is probably the most demanding part from contest directors. In order to accomplish the tasks described in this section, you first need to have a Mooshak "administrator" account (user admin) and then fulfill the following tasks:
  • New programming contest
  • Programming languages allowed
  • Adding groups and teams
  • Problem set
  • Printing command
  • Networking Mooshak
  • Check lists for the contest/

New programming contest

In order to create a new programming contest, the following steps are mandatory:
  1. Login: login into Mooshak as user admin. This leads you the Administration view of the system, meaning that you can see and touch everything within the system.

  2. Contest folder name: open the Contests folder and then give a name to a new folder that will contain all the data for your contest.

  3. Define attributes of new contest: open the folder you just created, under the Contests folder, and define the following attributes: a designation for your contest, who is organizing it, email of contact for the organization (mandatory for online contests), day and hour for starting and terminating the contest.

Now, you are ready to proceed to define the programming languages allowed in the contest.

Programming languages allowed

Inside the folder for the contest you are setting up, open the languages folder and do the following:

  1. Add new language give a name (usually the language name) to a new folder for the language you are defining.

    By default, you already have four languages set (C, Pascal, C++ and Java). If these are enough for you then you can advance directly to the next step.

  2. (Re-)Define attributes for a language: open a language folder, say the C folder, and re-define the attributes as necessary. Pay close attention to the extension-name and compilation flags. These should preferably be the same as those used by the teams (the teams should be aware of the compilation flags used; they should be explicit in the Mooshak FAQ and documentation given to teams).

Repeat the above steps for each programming language you want to use in the contest.

Note that if you have previously setup some other contest that used the same set of programming languages and corresponding configuration, then you can reuse the previous definition by copying the languages folder from that contest and and pasting it within the new contest folder. First, you may have to remove the default languages folder created by the system for the new contest.

Adding groups and teams

Teams are usually created inside groups. Groups can be viewd as an Institution or a Country, and all teams inside a group share the same group-attributes (group nickname, display-colour, and country flag).

Inside the folder for the contest you are setting up, open the Groups folder and then to create groups and teams you can either do it step by step or else by importing data from a file.

Step by step:
  1. Add new group give a name to a new folder for the group under which some teams will be created.

  2. Define attributes for the group: open the group folder and define its attributes. Note that, designation stands for full group name as will appear in the certificates (usually University names), nickname is an abbreviation of the group name that will be prefixed to the team name displayed in the submissions list and classification interfaces. You can also define a display colour and country flag that all teams inside this group will share.

  3. Add new team the last attribute within a group definition allows one to give a name to a new folder to hold a team data.

  4. Define attributes for a team: open the team folder and define its attributes. You can define the name for the team, the keyword that the team must use to access the system during the contest (this keyword can be automatically generated with button Create Keyword), email for the team (relevant for online contests), and state whether the team qualifies for the official contest.

  5. Add a team member the last attribute within a team definition allows one to give a name to a new folder to hold a team-member data.

  6. Define attributes for a team-member: open the team-member folder and define its attributes. You can define the name of the team-member, specify whether he his a contestant or a coach, specify its sex (relevant for certificates), specify date he was born and last specify his email-address.

You have to repeat

  • steps 5 and 6 to create all members within a team;
  • steps 3 and 4 to create all teams within a group (and then steps 5 and 6);
  • steps 1 and 2 to create all different groups there will be in the contest (and then repeat steps 3 till 6 as necessary).

This process is cumbersome if you are adding too many groups and teams. In such case, we advice that you use the following alternative.

Importing data from a file:

Mooshak allows data describing groups and teams to be imported from a text file. In order to it, open the Groups folder and then press the button Import and give the file name.

The file being imported must be a text file with fields separated by tabs and must obbey the format supported by the ICPC central database, that is:

	GlobalId LocalId Role Name Institution Team 

Last, Mooshak also allows you export into a text file the data describing the participating teams. This feature may be of interest in case you need to do further processing on that data, namely produce labels for team-envelopes or produce a team-list for registration purposes.

In case you need to reuse the same team-data from a previous contest you can either export it into a file and import the file into the new contest, or else make use of folder copy/past facility provided by Mooshak.

cannot open //procedures/before/teams/#stepbystep
cannot open //procedures/before/teams/#importing

Problem set

The problem set in Mooshak comprehends the definition of problem descriptions in html, figures referenced within the html file, input and output test cases and official solutions for the problem. Each problem resides in a separate folder.

Inside the folder for the contest you are setting up, open the Problems folder and then to create the problem set you can either do it step by step or else by importing from a tar-file.

Step by step:
  1. Add new problem give a name to a new folder for the problem we are going to define.

  2. Define attributes for the problem: open the problem folder and define its attributes. The name you give to problem is the used in the Contestants interface and also in the submissions and classification views. Usually, the names are capital letters or numbers. The Wording attribute is where you should specify the html-file for this problem. The Program attribute allows you to specify a program source file that is a solution for this problem. Lastly, you can specify the time limit (Timeout attribute) for this problem. The time limit can be confirmed by the system once a solution program is given, just press the Test button.

    To complete the problem definition, you need to specify the test cases and images for the html-file within folders Tests and Images. Each test case should reside in a separate folder.

  3. Add new test case open the Tests folder and then give a name to a new folder where the input and out test files will be stored. For example, if you are defining the first test case of problem A, then call the first test case folder A1.

  4. Upload the input and output test files: open the test case folder and specify the test files for input and output.

You have to repeat

  • steps 3 and 4 to create all test cases for a given problem;
  • steps 1 and 2 to create all problems to be used in the contest (and then repeat steps 3 and 4 as necessary).

Please note that at every interface where you can upload a file (say a problem description, a program solution or input and output test files) you also have the opportunity to edit those files within Mooshak, once they have been uploaded. This gives administrators greater freedom to make quick fixes if necessary.

A faster process to add the problem set data into Mooshak is by doing the following.

Importing data from a tar-file:

Mooshak allows data describing the problem set to be imported from a tar-file. In order to it, open the Problems folder and then press the button Import and give the file name.

The tar-file being imported must group the files that make the problem set in a directory hierarchy as expect by Mooshak. For example, a tar-file for a problem set with 2 problems (A and B) with 2 test cases each would produce a directory hierarchy as follows (file names are just indicative):


Last, Mooshak also allows you export the problem set into an XML file (????). CONFERIR COM ZP QUESTAO DO XML.

cannot open //procedures/before/problems/#stepbystep
cannot open //procedures/before/problems/#importing

Printing command

In some contests it is reasonable to allow the teams to print their programs so that they can debug their programs offline. Mooshak allows you to define a printing command in which you specify the printer that should be used for the contest. To this do the following:

Inside the folder for the contest you are setting up, open the Printouts folder and then define the Command attribute with the printing command line that should be used by the system when contestants try to print program listings.

The command line must include a reference to the file to be printed using the variable $Programa. Other avaliable variables may be usefull if you want to print a cover page. The following table lists all the available variables.

$Equipa Name of the team requesting the printout
$Problema Reference of the problem being solved
$Programa File containing the program to be printed
$Tempo Time counted from the start of the contest

The distribution includes a printing command that produces a cover page. To use this command relace the command line with

/home/mooshak/bin/ $Equipa $Problema $Programa $Tempo

Networking Mooshak

An important feature of Mooshak is the replication of data between servers in different machines, or in the same machine running under different users. Using this feature it is possible to create a network of servers, which can be useful for different purposes such as
  • multi-site contests
  • simultaneous public contests
  • load balancing
  • data backup

Data is replicated using a script based on RSYNC, invoked automatically every minute, and operating over SSH to provide an encrypted channel using public-key encryption.

To create a network of Mooshak servers you must configure each node, specifying where data will be replicated, and from where it can be received. In particular you have to perform the following tasks:

  1. Generate you own keys using the appropriated button on the network directory.
  2. Create Server directories for each of the nodes connecting you server. You must specify and User and Address. If the other server's base URL is not http://Address/~User then you must supply the alternative URL so that it can be reached in order to ask it for its public key. This process is done automatically when you check the Send field. You you want to receive data from that server you should check the Receive field.
  3. Check the connection, if you are sending data to the other server, by pressing the Test button in this directory.
  4. Check the network, after having configured all servers. Go up to the network directory and check local and global connections. Local connections gives you a list of servers to which you are sending data to and another list of those server you are receiving data from. Global connections propagates this query to all other servers (that in turn propagate it to other servers, if necessary) and produces a table with all the gathered data. Both table entries refer to servers. Each cell shows if the row server is sending to the column server. A symbol is written the current state of the connection:
    [-] : both sending and receiving
    [-[ : sending but not receiving
    -]] : receiving but not sending
    -][ : neither receiving nor sending
    Fully connected servers ([-]) are shown in green background unless they are the same server, in which case the background is yellow (you probably do not want a server to replicate to itself). All fully disconnected (-][) servers are shown with a gray background (you probably do not want to have them connected). Those half connected servers ([-[ or -]]) are shown in red background because they are probably misconfigured.
cannot open //procedures/before/checks