Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
4cc10b04
Commit
4cc10b04
authored
Jun 12, 2012
by
John Jarvis
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/stable' into stable-end-course
parents
ea5ed74a
bd2c2e27
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
204 additions
and
6 deletions
+204
-6
djangoapps/certificates/migrations/0006_auto__chg_field_generatedcertificate_certificate_id.py
+97
-0
djangoapps/certificates/models.py
+2
-2
djangoapps/certificates/views.py
+1
-1
djangoapps/student/survey_questions.py
+101
-0
templates/emails/certificate_ready.txt
+3
-3
No files found.
djangoapps/certificates/migrations/0006_auto__chg_field_generatedcertificate_certificate_id.py
0 → 100644
View file @
4cc10b04
# encoding: utf-8
import
datetime
from
south.db
import
db
from
south.v2
import
SchemaMigration
from
django.db
import
models
class
Migration
(
SchemaMigration
):
def
forwards
(
self
,
orm
):
# Changing field 'GeneratedCertificate.certificate_id'
db
.
alter_column
(
'certificates_generatedcertificate'
,
'certificate_id'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
max_length
=
32
,
null
=
True
))
def
backwards
(
self
,
orm
):
# Changing field 'GeneratedCertificate.certificate_id'
db
.
alter_column
(
'certificates_generatedcertificate'
,
'certificate_id'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
default
=
None
,
max_length
=
32
))
models
=
{
'auth.group'
:
{
'Meta'
:
{
'object_name'
:
'Group'
},
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'unique'
:
'True'
,
'max_length'
:
'80'
}),
'permissions'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'to'
:
"orm['auth.Permission']"
,
'symmetrical'
:
'False'
,
'blank'
:
'True'
})
},
'auth.permission'
:
{
'Meta'
:
{
'ordering'
:
"('content_type__app_label', 'content_type__model', 'codename')"
,
'unique_together'
:
"(('content_type', 'codename'),)"
,
'object_name'
:
'Permission'
},
'codename'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'100'
}),
'content_type'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
"orm['contenttypes.ContentType']"
}),
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'50'
})
},
'auth.user'
:
{
'Meta'
:
{
'object_name'
:
'User'
},
'about'
:
(
'django.db.models.fields.TextField'
,
[],
{
'blank'
:
'True'
}),
'avatar_type'
:
(
'django.db.models.fields.CharField'
,
[],
{
'default'
:
"'n'"
,
'max_length'
:
'1'
}),
'bronze'
:
(
'django.db.models.fields.SmallIntegerField'
,
[],
{
'default'
:
'0'
}),
'consecutive_days_visit_count'
:
(
'django.db.models.fields.IntegerField'
,
[],
{
'default'
:
'0'
}),
'country'
:
(
'django_countries.fields.CountryField'
,
[],
{
'max_length'
:
'2'
,
'blank'
:
'True'
}),
'date_joined'
:
(
'django.db.models.fields.DateTimeField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'date_of_birth'
:
(
'django.db.models.fields.DateField'
,
[],
{
'null'
:
'True'
,
'blank'
:
'True'
}),
'display_tag_filter_strategy'
:
(
'django.db.models.fields.SmallIntegerField'
,
[],
{
'default'
:
'0'
}),
'email'
:
(
'django.db.models.fields.EmailField'
,
[],
{
'max_length'
:
'75'
,
'blank'
:
'True'
}),
'email_isvalid'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'False'
}),
'email_key'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'32'
,
'null'
:
'True'
}),
'email_tag_filter_strategy'
:
(
'django.db.models.fields.SmallIntegerField'
,
[],
{
'default'
:
'1'
}),
'first_name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'30'
,
'blank'
:
'True'
}),
'gold'
:
(
'django.db.models.fields.SmallIntegerField'
,
[],
{
'default'
:
'0'
}),
'gravatar'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'32'
}),
'groups'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'to'
:
"orm['auth.Group']"
,
'symmetrical'
:
'False'
,
'blank'
:
'True'
}),
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'ignored_tags'
:
(
'django.db.models.fields.TextField'
,
[],
{
'blank'
:
'True'
}),
'interesting_tags'
:
(
'django.db.models.fields.TextField'
,
[],
{
'blank'
:
'True'
}),
'is_active'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'True'
}),
'is_staff'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'False'
}),
'is_superuser'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'False'
}),
'last_login'
:
(
'django.db.models.fields.DateTimeField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'last_name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'30'
,
'blank'
:
'True'
}),
'last_seen'
:
(
'django.db.models.fields.DateTimeField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'location'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'100'
,
'blank'
:
'True'
}),
'new_response_count'
:
(
'django.db.models.fields.IntegerField'
,
[],
{
'default'
:
'0'
}),
'password'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'128'
}),
'questions_per_page'
:
(
'django.db.models.fields.SmallIntegerField'
,
[],
{
'default'
:
'10'
}),
'real_name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'100'
,
'blank'
:
'True'
}),
'reputation'
:
(
'django.db.models.fields.PositiveIntegerField'
,
[],
{
'default'
:
'1'
}),
'seen_response_count'
:
(
'django.db.models.fields.IntegerField'
,
[],
{
'default'
:
'0'
}),
'show_country'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'False'
}),
'silver'
:
(
'django.db.models.fields.SmallIntegerField'
,
[],
{
'default'
:
'0'
}),
'status'
:
(
'django.db.models.fields.CharField'
,
[],
{
'default'
:
"'w'"
,
'max_length'
:
'2'
}),
'user_permissions'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'to'
:
"orm['auth.Permission']"
,
'symmetrical'
:
'False'
,
'blank'
:
'True'
}),
'username'
:
(
'django.db.models.fields.CharField'
,
[],
{
'unique'
:
'True'
,
'max_length'
:
'30'
}),
'website'
:
(
'django.db.models.fields.URLField'
,
[],
{
'max_length'
:
'200'
,
'blank'
:
'True'
})
},
'certificates.generatedcertificate'
:
{
'Meta'
:
{
'object_name'
:
'GeneratedCertificate'
},
'certificate_id'
:
(
'django.db.models.fields.CharField'
,
[],
{
'default'
:
'None'
,
'max_length'
:
'32'
,
'null'
:
'True'
}),
'download_url'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'128'
,
'null'
:
'True'
}),
'enabled'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'False'
}),
'grade'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'5'
,
'null'
:
'True'
}),
'graded_certificate_id'
:
(
'django.db.models.fields.CharField'
,
[],
{
'default'
:
'None'
,
'max_length'
:
'32'
,
'null'
:
'True'
}),
'graded_download_url'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'128'
,
'null'
:
'True'
}),
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
,
'blank'
:
'True'
}),
'user'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
"orm['auth.User']"
})
},
'contenttypes.contenttype'
:
{
'Meta'
:
{
'ordering'
:
"('name',)"
,
'unique_together'
:
"(('app_label', 'model'),)"
,
'object_name'
:
'ContentType'
,
'db_table'
:
"'django_content_type'"
},
'app_label'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'100'
}),
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'model'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'100'
}),
'name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'100'
})
}
}
complete_apps
=
[
'certificates'
]
djangoapps/certificates/models.py
View file @
4cc10b04
...
...
@@ -31,8 +31,8 @@ class GeneratedCertificate(models.Model):
# This is the name at the time of request
name
=
models
.
CharField
(
blank
=
True
,
max_length
=
255
)
certificate_id
=
models
.
CharField
(
max_length
=
32
)
graded_certificate_id
=
models
.
CharField
(
max_length
=
32
,
null
=
True
)
certificate_id
=
models
.
CharField
(
max_length
=
32
,
null
=
True
,
default
=
None
)
graded_certificate_id
=
models
.
CharField
(
max_length
=
32
,
null
=
True
,
default
=
None
)
download_url
=
models
.
CharField
(
max_length
=
128
,
null
=
True
)
graded_download_url
=
models
.
CharField
(
max_length
=
128
,
null
=
True
)
...
...
djangoapps/certificates/views.py
View file @
4cc10b04
...
...
@@ -100,7 +100,7 @@ def generate_certificate(user, grade):
try
:
generated_certificate
=
GeneratedCertificate
.
objects
.
get
(
user
=
user
)
except
GeneratedCertificate
.
DoesNotExist
:
generated_certificate
=
GeneratedCertificate
(
user
=
user
,
certificate_id
=
uuid
.
uuid4
()
.
hex
)
generated_certificate
=
GeneratedCertificate
(
user
=
user
)
generated_certificate
.
enabled
=
True
if
generated_certificate
.
graded_download_url
and
(
generated_certificate
.
grade
!=
grade
):
...
...
djangoapps/student/survey_questions.py
View file @
4cc10b04
...
...
@@ -111,6 +111,107 @@ exit_survey_questions = {
'question_name'
:
'improvement_ideas'
,
'label'
:
'Do you have any ideas on how to improve this course or the edX platform?'
},
{
'type'
:
'radio'
,
'question_name'
:
'rating_tutorials'
,
'label'
:
'How helpful were the tutorials?'
,
'choices'
:
[
'1 - Useless.'
,
'2'
,
'3'
,
'4 - Okay.'
,
'5'
,
'6'
,
'7 - Excellent.'
,
'0 - Not Applicable / I didn
\'
t use them'
,
]},
{
'type'
:
'medium_field'
,
'question_name'
:
'improvement_tutorials'
,
'label'
:
'What would you most like to see improved in the tutorials?'
},
{
'type'
:
'radio'
,
'question_name'
:
'rating_lectures'
,
'label'
:
'How helpful were the lectures?'
,
'choices'
:
[
'1 - Useless.'
,
'2'
,
'3'
,
'4 - Okay.'
,
'5'
,
'6'
,
'7 - Excellent.'
,
'0 - Not Applicable / I didn
\'
t use them'
,
]},
{
'type'
:
'medium_field'
,
'question_name'
:
'improvement_lectures'
,
'label'
:
'What would you most like to see improved in the lectures?'
},
{
'type'
:
'radio'
,
'question_name'
:
'rating_homework'
,
'label'
:
'How helpful were the homeworks?'
,
'choices'
:
[
'1 - Useless.'
,
'2'
,
'3'
,
'4 - Okay.'
,
'5'
,
'6'
,
'7 - Excellent.'
,
'0 - Not Applicable / I didn
\'
t use them'
,
]},
{
'type'
:
'medium_field'
,
'question_name'
:
'improvement_homework'
,
'label'
:
'What would you most like to see improved in the homeworks?'
},
{
'type'
:
'radio'
,
'question_name'
:
'rating_labs'
,
'label'
:
'How helpful were the labs?'
,
'choices'
:
[
'1 - Useless.'
,
'2'
,
'3'
,
'4 - Okay.'
,
'5'
,
'6'
,
'7 - Excellent.'
,
'0 - Not Applicable / I didn
\'
t use them'
,
]},
{
'type'
:
'medium_field'
,
'question_name'
:
'improvement_labs'
,
'label'
:
'What would you most like to see improved in the labs?'
},
{
'type'
:
'radio'
,
'question_name'
:
'rating_textbook'
,
'label'
:
'How helpful was the textbook?'
,
'choices'
:
[
'1 - Useless.'
,
'2'
,
'3'
,
'4 - Okay.'
,
'5'
,
'6'
,
'7 - Excellent.'
,
'0 - Not Applicable / I didn
\'
t use them'
,
]},
{
'type'
:
'medium_field'
,
'question_name'
:
'improvement_textbook'
,
'label'
:
'What would you most like to see improved in the textbook?'
},
# Level of bandwidth
# Speed of computer/RAM/etc.
...
...
templates/emails/certificate_ready.txt
View file @
4cc10b04
Congratulations on completing 6.002x! We have received your request
for a certifcate, and it is ready to download. Please visit your
<a href="http://6002x.mitx.mit.edu/Profile">Profile</a> to download your certificate.
\ No newline at end of file
for a certifcate, and it is ready to download. Please visit the 6.002x
Profile page to download your certificate.
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment