summaryrefslogtreecommitdiff
path: root/server/src/server.cc
diff options
context:
space:
mode:
authordeva <deva>2009-07-24 13:59:36 +0000
committerdeva <deva>2009-07-24 13:59:36 +0000
commit408c7c5b36e1058a76741a22876593ee8c042dd4 (patch)
tree2fa4fb2a1586a0019349f3da569cbb1fc86c3dc5 /server/src/server.cc
parentc0392425fbc024084da9c626fa47814a34eba3e7 (diff)
Introduced a new template tag called 'header' to replace the macro-tag-with-header-attribute construct.
Diffstat (limited to 'server/src/server.cc')
-rw-r--r--server/src/server.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/server/src/server.cc b/server/src/server.cc
index 884284a..8bfd827 100644
--- a/server/src/server.cc
+++ b/server/src/server.cc
@@ -148,17 +148,14 @@ static std::string handleTransaction(Transaction *transaction,
while(mi2 != templ->course.macros.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";
+ if(macro.isHeader) {
+ answer += " <header caption=\"" + macro.attributes["caption"] + "\"/>\n";
mi2++;
continue;
}
bool completed = db->checkMacro(transaction->cpr, macro.attributes["name"]);
-
+
answer += " <macro completed=";
if(completed) answer += "\"true\"";
else answer += "\"false\"";