summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/src/server.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/src/server.cc b/server/src/server.cc
index 2f2ee69..d7fdbc1 100644
--- a/server/src/server.cc
+++ b/server/src/server.cc
@@ -140,6 +140,15 @@ static std::string handleTransaction(Transaction *transaction,
while(mi2 != templ->course.macroes.end()) {
Macro &macro = (*mi2);
+ // FIXME: This is to be made in some other way in a later version.
+ if(macro.attributes.find("header") != macro.attributes.end()) {
+ // Macro is a special headline macro
+ // Simply output a headline, and ignore the rest of it.
+ answer += " <macro header=\"" + macro.attributes["header"] + "\"></macro>\n";
+ mi2++;
+ continue;
+ }
+
bool completed = db->checkMacro(transaction->cpr, macro.attributes["name"]);
answer += " <macro completed=";