- Modifications in SafeExec
One of the major improvements in this version is in SafeExec - the
sandbox where programs are executed in Mooshak - resulting from a
contribution of Mohit Nanda
made this contribution while working for
Tata Consultancy Services, a
software consultancy firm based out of India. With
this performance enhancement Mooshak is able to support more
teams per server.
A paper describing these modifications was published in the
"International Conference for Computer Applications 2010 [ICCA
'10]" and presented in Pondicherry, India on 26th December, 2010.
- Web services
Mooshak was originally designed as a web application for
managing contests and later adapted for e-learning. Mooshak now
exposes also two of its core functions as RESTful web services:
With this service a remote program can invoke a Mooshak
server to evaluate a program. It must provide the program
itself, an URL to download the programming exercise (or a local
problem reference) and a reference to the evaluation capability
(basically the contest and programming language configured in
With this service Mooshak can be used as a programming
problem repository. Using just an URL a remote program can
download programming problems/exercises from a Mooshak
installation. Hence, a Mooshak installation can act as a
repository for other Mooshak installations acting as an evaluator.
To activate these features you need to set the service type
you want to provide (or both) at the Service field in the
contest folder. There is a new contest type Service that
activates all the required fields for this type of contest. To set
the contest type use the Contest > Type ... command on the
To grant access to a remote system you must create a "team"
with its IP number. Note that the dots in IP numbers must be
replaced by underscores. If you try to enter an IP number as
team id then Mooshak will automatically replace these characters.
There is a
proto_service contest on the distribution
of Mooshak that exemplifies these configurations,
To test these features just add
service.html to the URL of
your Mooshak installation. If you Mooshak is accessible at
http://localhost/~mooshak/ you will find the service sandbox at
- Support for Mono
Mono is an open source implementation of Microsoft's .NET
Framework based on the ECMA standards for C# and the Common
Language Runtime. With Mono it is possible to use Windows
languages that traditionally require IDEs available only on that
operating system. Support for Mono was introduced in Mooshak
following suggestions of Mohit Nanda.
The major issue is the fact that Mono processes must run on a
specific user ID (UID). By default Mooshak uses a range of UIDs to
be able to control forks, as these in Linux are controlled per
user. Thus, when configuring a language supported by Mono you must
enter a specific UID created for that purpose.
- Bulk reevaluation
The reevaluation is a feature available since the first versions
of Mooshak. In a contest it is sometimes necessary to reevaluate
submissions, for instance: if an error is detected in a test case; or if the
evaluation process was not completed, due to the excessive load of
the server. When used on a regular basis as a pedagogical tool,
the occurrence of this kind of problem increase significantly.
There is now a menu on submission folders named Reeval
aggregating bulk reevaluation commands. The first command in this
menu reevaluates all submissions in the folder. The other commands
provide different criteria to select the submissions that must be
reevaluated: by classification, by programming language, or by
- Improvements in quizzes
Mooshak has support for quizzes as a complement for automatic
evaluation of programs but this feature is being used in courses
from other areas, such as mathematics. To support this use were
introduced two new features:
- LaTeX import command
This command imports quizzes in LaTeX format. Imported
quizzes must follow a special LaTeX style that is available
on the dialog box of the import command.
- MathJax support
LaTeX expressions in these quizzes will be displayed using
MathJax. Mooshak proxies the latest version of MathJax to ensure
that quizzes can be used in a controlled setting where students
computers can only access the Mooshak server.
- LaTeX expressions in problem descriptions -
Although MathJax support was introduced for quizzes, it can also
be used in HTML problem descriptions. To use MathJax in HTML files
uploaded to Mooshak make sure they contain in the header the
In that HTML file you can include LaTeX math expressions
\( \) or
\[ \ ].
- Listings optimizations
Mooshak generates lots of listings: submissions, rankings,
questions. These listings are produced when teams/students
submit a problem or ask a questions, but they are also regularly
pooled just to update the interface.
When Mooshak is used in very large contests or classes, with
several thousands submissions, large listings become a burden
to the server. The creation of a network of servers balances
the load of compiling and executing programs, but not the load
of generating listings. To cope with this issue the following
features were implemented in Mooshak.
- Incremental ranking listings
In contests with thousands of submissions rankings take
too long to compute. Mooshak now supports policies that compute
rankings incrementally. In this version there is an incremental
variant of the ICPC policy, also used as default
policy. Other incremental policies may by added in future
- Listing cache
Listings take time to compute and produce a considerable
amount of I/O. On the other hand, Mooshak has to produce
many similar listings since by default they are updated by
pooling the server on regular intervals (typically 5
minutes). This new feature
reused a similar listing (a request with the same parameters)
produced recently (be default, less than 1 minute ago). The cache
is not used if the user has made a recent change (less than 1
minute). Thus, if a team submits a problem, or asks a question
then a fresh listing is produced.
To activate this feature you need to set to yes
the Incremental flag on the contest folder. This
feature is not automatically set since it was reported to
occasionally produce inconsistent listings, in situation that
were not possible to reproduce. Hence, you should only use this
feature in contest with a large number of participants
Note: this feature requires tcl version 8.6 or
higher and will be automatically disabled on previous
versions, even if the flag is set.
- Searchable questions
During contests (or classes) teams (or students) ask the same questions
repeatedly. To avoid this question listings are now searchable.
On the header of these listings there is a field where the users
can type query terms to filter questions listing. The questions
are sorted by relevance and questions where the search terms occur
in the subject are considered more relevant than those where they
occur in the text.
- Problem release schedule
A start and stop date/time can now assign to each individual
problem. If a problem has a start date/time them neither
is the problem description shown before that moment, nor are
submission to that problem accepted. By the same token, if a
problem has top date/time them neither the problem
description are shown after that moment, nor submission to that
problem are accept.
These date/time are absolute and should be within the
start-stop interval of the contest. However, if the contest is
used on virtual mode then these date/times are adjusted to the
moment the team/student first logged to that contest.
- Single simultaneous team session
In large on-line contests team members tend to open several
sessions, thus increasing the server(s) load. To prevent it
Mooshak can be configured to disallow multiple simultaneous
sessions on team accounts.
This configuration is available on
data/configs/sessions folder with
the Single session field set as no. It affects
only teams. Other profiles, such as
judge continue to be able to have multiple
session, even if this configuration is set.
- Importing teams data from CSV files
A new command
Data > import ... in
Groups folder enables the import of
a Comma-Separated Values (CSV) file with teams data. The file
content must have 1 record per line and columns separated by
commas, semi-colons or tabs. Separators are automatically
An optional header line may assign a names to columns. The
type of each column is automatically inferred from the headers, if
- Generate and export passwords in Excel format
A new command for generating and exporting passwords to an Excel
format is now available on
Group folders. This
feature was a contribution of Arjun R P and Pranav M,
both BSc final year students in Amrita University, in India.
- Arabic translation
Mooshak interface is now also available in Arabic thanks to
- Session count broken by profiles
On the header of the left column in the admin interface, the
number of open sessions is displayed broken by profiles. So, now
you can check how many teams, or guests are using Mooshak.