Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore response_count to its former glory on central-develop #3482

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
class Migration(SchemaMigration):

def forwards(self, orm):
# Deleting field 'AttemptLog.response_count'
db.delete_column(u'main_attemptlog', 'response_count')

# Adding field 'AttemptLog.assessment_item_id'
db.add_column(u'main_attemptlog', 'assessment_item_id',
Expand All @@ -18,10 +16,6 @@ def forwards(self, orm):


def backwards(self, orm):
# Adding field 'AttemptLog.response_count'
db.add_column(u'main_attemptlog', 'response_count',
self.gf('django.db.models.fields.IntegerField')(default=0),
keep_default=False)

# Deleting field 'AttemptLog.assessment_item_id'
db.delete_column(u'main_attemptlog', 'assessment_item_id')
Expand All @@ -42,6 +36,7 @@ def backwards(self, orm):
'id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}),
'points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'response_log': ('django.db.models.fields.TextField', [], {'default': "'[]'"}),
'seed': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'signature': ('django.db.models.fields.CharField', [], {'max_length': '360', 'null': 'True', 'blank': 'True'}),
Expand Down
2 changes: 1 addition & 1 deletion kalite/main/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ class AttemptLog(DeferredCountSyncedModel):
time_taken = models.IntegerField(blank=True, null=True) # time spent on exercise before initial response (in ms)
version = models.CharField(blank=True, max_length=100) # the version of KA Lite at the time the answer was given
response_log = models.TextField(default="[]")
response_count = models.IntegerField(default=0),
response_count = models.IntegerField(default=0)
assessment_item_id = models.CharField(max_length=100, blank=True, default="")

class Meta:
Expand Down