Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Bundler.py
diff options
context:
space:
mode:
authoraccayetano <almiracayetano@gmail.com>2012-05-17 07:26:09 (GMT)
committer accayetano <almiracayetano@gmail.com>2012-05-17 07:26:09 (GMT)
commit2798d1c8b03a1ab53325fcce1378e08e919a71c9 (patch)
tree58bc5befb1489fc18b8609a4b42aeb9e0e6b7556 /Bundler.py
parent0f4bc904a9506c371efe33a056d2454d10ac7a64 (diff)
version 2HEADmaster
Diffstat (limited to 'Bundler.py')
-rw-r--r--Bundler.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/Bundler.py b/Bundler.py
index a00ee14..9f3bb6a 100644
--- a/Bundler.py
+++ b/Bundler.py
@@ -1,4 +1,5 @@
from Models import *
+import logging
class Bundler():
@@ -9,7 +10,9 @@ class Bundler():
str(project.publish_date)+"|"+\
str(project.is_owned) + "|"+str(project.is_shared)+"|"+\
str(project.rubric_id) +"|"+project.xo_name+"|"+\
- project.project_sha
+ project.project_sha + "|"+str(project.total_score)
+
+ logging.debug(project_bundle)
return project_bundle
@@ -18,7 +21,9 @@ class Bundler():
rubric_bundle = "Rubric|" + str(rubric.rubric_id)+"|"+rubric.title+"|"+\
rubric.author+"|"+rubric.description+"|"+\
str(rubric.is_predefined) +"|"+rubric.xo_name +"|"+\
- rubric.rubric_sha
+ rubric.rubric_sha+"|"+str(rubric.enable_points)
+
+ logging.debug(rubric_bundle)
return rubric_bundle
@@ -28,9 +33,9 @@ class Bundler():
for category in categories:
bundle = "Category|" + str(category.category_id)+"|"+category.name+"|"+\
str(category.rubric_id) +"|"+\
- category.category_sha
+ category.category_sha +"|"+str(category.percentage)
categorylist.append(bundle)
-
+ logging.debug(bundle)
return categorylist
def bundle_level(self, levels):
@@ -39,8 +44,9 @@ class Bundler():
for level in levels:
bundle = "Level|" + str(level.level_id) +"|"+ level.name+"|"+level.description+"|"+\
str(level.category_id)+"|"+str(level.rubric_id)+"|"+\
- level.level_sha
+ level.level_sha +"|"+str(level.points)
levelist.append(bundle)
+ logging.debug(bundle)
return levelist
@@ -50,6 +56,7 @@ class Bundler():
score_bundle = "Score|" + str(score.score_id) + "|" + str(score.project_id) + "|" + \
str(score.rubric_id) + "|" + str(score.category_id) + "|" + str(score.level_id) + "|" + \
score.project_sha + "|" + score.rubric_sha + "|" + score.category_sha + "|" +\
- score.level_sha + "|" + str(score.count)
+ score.level_sha + "|" + str(score.score_count)
+ logging.debug(score_bundle)
return score_bundle