From 4dcca60cd3113676cae1410119c3dd6accfb48af Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 2 Dec 2008 11:14:03 +0000 Subject: Added hacked support for headlines in templates. --- server/src/server.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'server/src') 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 ¯o = (*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 += " \n"; + mi2++; + continue; + } + bool completed = db->checkMacro(transaction->cpr, macro.attributes["name"]); answer += "