diff options
author | deva <deva> | 2008-12-02 11:14:03 +0000 |
---|---|---|
committer | deva <deva> | 2008-12-02 11:14:03 +0000 |
commit | 4dcca60cd3113676cae1410119c3dd6accfb48af (patch) | |
tree | 462e043edaf2d693eb4f1847ee0b18694831fb67 /server | |
parent | 4ef42a9bae0bd8c17391d1fbb5aa21d78fbe92ce (diff) |
Added hacked support for headlines in templates.
Diffstat (limited to 'server')
-rw-r--r-- | server/src/server.cc | 9 |
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 ¯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 += " <macro header=\"" + macro.attributes["header"] + "\"></macro>\n"; + mi2++; + continue; + } + bool completed = db->checkMacro(transaction->cpr, macro.attributes["name"]); answer += " <macro completed="; |