     for w of weekOk
         if w<firstWeek
             delete weekOk[w]
+
+    if user._id == DEBUG_USER_ID
+        console.log "activity=", activity, "rating=", rating
 
     activity *= (1 - WEEK_ACTIVITY_EXP) # make this averaged
     return {

            if probSolved[prob._id]
                continue
            rating += levelScore(level)

    for week of wasSubmits
        if !weekSolved[week]

        if r.solved == 1 
            inc(weekSolved, week)
            rating += levelScore(level)
            if user._id == DEBUG_USER_ID
                console.log "add rating 1 ", r.table, level, levelScore(level), rating
            activity += activityScore(level, r.lastSubmitTime)
            probSolved[r.table] = true
        else if r.solved < 0  # DQ
