def addDiscussion(request):
    try:
        response = httpconnection.listCourse_Connect()
        print "response status = ", response.status_code
        convertToJson = response.json()
        print "Return Course Json is",convertToJson
        return render_to_response("addDiscussion.html",{"course":convertToJson,"user":request.session['username']})
    except:
        return render_to_response('error.html',{"message": sys.exc_info()[0]})
def dropCourse(request):
    try:
        response = httpconnection.listCourse_Connect()
        print "response status = ", response.status_code
        convertToJson = response.json()
        #print "Return Course Json is",convertToJson
        return render_to_response("dropCourse.html",{"list":convertToJson})
    except:
        return render_to_response('error.html',{"message": sys.exc_info()[0]})
def dropCourse(request):
    try:
        response = httpconnection.listCourse_Connect()
        print "response status = ", response.status_code
        convertToJson = response.json()
        #print "Return Course Json is",convertToJson
        return render_to_response("dropCourse.html", {"list": convertToJson})
    except:
        return render_to_response('error.html', {"message": sys.exc_info()[0]})
def listCourseDiscussionDelete(request):
    try:
        print"inside list course discussion"
        response = httpconnection.listCourse_Connect()
        print "response status = ", response.status_code
        convertToJson = response.json()
        print "Return Course Json is",convertToJson
        return render_to_response("listCourseDiscussionDelete.html",{"list":convertToJson})
    except:
        return render_to_response('error.html',{"message": sys.exc_info()[0]})
def listCourseDiscussionDelete(request):
    try:
        print "inside list course discussion"
        response = httpconnection.listCourse_Connect()
        print "response status = ", response.status_code
        convertToJson = response.json()
        print "Return Course Json is", convertToJson
        return render_to_response("listCourseDiscussionDelete.html",
                                  {"list": convertToJson})
    except:
        return render_to_response('error.html', {"message": sys.exc_info()[0]})
def addDiscussion(request):
    try:
        response = httpconnection.listCourse_Connect()
        print "response status = ", response.status_code
        convertToJson = response.json()
        print "Return Course Json is", convertToJson
        return render_to_response("addDiscussion.html", {
            "course": convertToJson,
            "user": request.session['username']
        })
    except:
        return render_to_response('error.html', {"message": sys.exc_info()[0]})