}
public String replaceVariables(String html) {
// get i18n support
Messages messages = module.getMessages();
// replace user variable with current user
if (html.indexOf("$user") != -1) {
user = module.getUserAccount().getName();
html = html.replaceAll("\\$user", String.valueOf(user));
}
// replace module name
if (html.indexOf("$moduleName") != -1) {
StringBuilder sb = new StringBuilder();
sb.append("<b>");
sb.append(messages.getString("ModuleInfoPanel.label.moduleName"));
sb.append("</b> ");
sb.append(module.getName());
html = html.replaceAll("\\$moduleName", sb.toString());
}
// get information from the module scheduler
ModuleScheduler moduleScheduler = module.getModuleScheduler();
if (moduleScheduler != null) {
String numSessions = moduleScheduler.getSchedulerNumSessions(module);
String lastSessionDate = moduleScheduler.getSchedulerLastSessionDate(module);
// number of sessions
StringBuilder sb = new StringBuilder();
sb.append("<b>");
sb.append(messages.getString("ModuleInfoPanel.label.numSessions"));
sb.append("</b> ");
sb.append(" " + "<span class='highlight_red'>");
sb.append(String.valueOf(numSessions));
sb.append("</span>");
html = html.replaceAll("\\$numSessions", sb.toString());
// last session date
StringBuilder sb2 = new StringBuilder();
sb2.append("<b>");
sb2.append(messages.getString("ModuleInfoPanel.label.lastSession"));
sb2.append("</b> ");
sb2.append(String.valueOf(lastSessionDate));
html = html.replaceAll("\\$lastSessionDate", sb2.toString());
}
// get information about last export date
StringBuilder sb = new StringBuilder();
sb.append("<b>");
sb.append(messages.getString("ModuleInfoPanel.label.lastExport"));
sb.append("</b> ");
if (lastExportDate != null) {
DateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
sb.append(dateFormat.format(lastExportDate));
} else {