From 10364887d2d2a9417c304cc8aff23482cb1f113d Mon Sep 17 00:00:00 2001 From: jsa Date: Tue, 4 Feb 2014 12:25:06 -0500 Subject: [PATCH 1/2] don't show the add response button if responses are not allowed. JIRA: FOR-452 --- .../coffee/src/discussion/views/discussion_thread_view.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/static/coffee/src/discussion/views/discussion_thread_view.coffee b/common/static/coffee/src/discussion/views/discussion_thread_view.coffee index 95cda6b255..57297a1a1e 100644 --- a/common/static/coffee/src/discussion/views/discussion_thread_view.coffee +++ b/common/static/coffee/src/discussion/views/discussion_thread_view.coffee @@ -130,7 +130,7 @@ if Backbone? view.afterInsert() renderAddResponseButton: -> - if @model.hasResponses() + if @model.hasResponses() and @model.can('can_reply') @$el.find('div.add-response').show() else @$el.find('div.add-response').hide() From a0efe6e0de5415d1224c212fe5a96702ab085f11 Mon Sep 17 00:00:00 2001 From: Julia Hansbrough Date: Wed, 5 Feb 2014 20:24:08 +0000 Subject: [PATCH 2/2] Make receipt-ids actually generate UUIDs LMS-2192 --- lms/djangoapps/verify_student/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/verify_student/models.py b/lms/djangoapps/verify_student/models.py index e8387dff08..2fab204615 100644 --- a/lms/djangoapps/verify_student/models.py +++ b/lms/djangoapps/verify_student/models.py @@ -42,7 +42,7 @@ log = logging.getLogger(__name__) def generateUUID(): # pylint: disable=C0103 """ Utility function; generates UUIDs """ - return str(uuid.uuid4) + return str(uuid.uuid4()) class VerificationException(Exception): @@ -142,7 +142,7 @@ class PhotoVerification(StatusModel): # user IDs or something too easily guessable. receipt_id = models.CharField( db_index=True, - default=generateUUID, + default=lambda: generateUUID(), max_length=255, )