From 77272458e7a8906d871b241b5385bbd0f783d861 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 30 Jul 2009 08:36:12 +0000 Subject: Removed the term 'course' everywhere, and replaced it by 'template'. This reduced/simplified the Template class structure a bit. --- server/src/server.cc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'server/src/server.cc') diff --git a/server/src/server.cc b/server/src/server.cc index 924ad84..f75aeab 100644 --- a/server/src/server.cc +++ b/server/src/server.cc @@ -63,13 +63,13 @@ static std::string error_box(std::string message) std::string errorbox = "\n" "\n" - " \n" + " \n" "\n"; return errorbox; } @@ -77,7 +77,7 @@ static std::string error_box(std::string message) class NotFoundException : public Exception { public: NotFoundException(Request &r) - : Exception("Macro " + r.macro + " not found in course " + r.course) {} + : Exception("Macro " + r.macro + " not found in template " + r.templ) {} }; @@ -99,7 +99,7 @@ static std::string handleCommits(Transaction *transaction, Database &db, db.commitTransaction(transaction->user, transaction->cpr, *macro, commit.fields); if(resume != "") { - journalwriter.addEntry(*transaction, commit, resume, commit.course); + journalwriter.addEntry(*transaction, commit, resume, commit.templ); } i++; @@ -122,26 +122,26 @@ static std::string handleRequest(Transaction *transaction, while(i != transaction->requests.end()) { Request &request = *i; - PRACRO_DEBUG(server, "Handling request - macro: %s, course: %s\n", - request.macro.c_str(), request.course.c_str()); + PRACRO_DEBUG(server, "Handling request - macro: %s, template: %s\n", + request.macro.c_str(), request.templ.c_str()); // Read and parse the template file. - TemplateParser tp(templatelist.getLatestVersion(request.course)); + TemplateParser tp(templatelist.getLatestVersion(request.templ)); tp.parse(); Template *templ = tp.getTemplate(); - answer += " course.attributes["name"]; + answer += " \n"; i++; } @@ -432,7 +432,7 @@ bool pracro_is_running = true; char request[] = "\n" "\n" - " \n" + " \n" "\n"; int main() -- cgit v1.2.3