Hi all,
I have read news about Class2Go and Edx! I very happy but now I still research about class2go!
I post question in here I don't know who will is guide me! My skill python is not good! Thanks for you help me!
I have a problem with class2go : I want to view information of instructors outside homepage (name, photo) And this is the code I add in course/landing/view.py :
#################################################################
def landing(request):
if not request.user.is_authenticated():
course_list = Course.objects.filter(mode='ready', institution_only = 0)
else:
course_list = Course.objects.filter(Q(mode='ready',
institution_only = 0) | Q(mode='ready', institution__id__in=request.user.get_profile().institutions.all()))
course_instructors = CourseInstructor.objects.getByCourse(course=request.common_page_data['course'])
instructors = []
for ci in course_instructors:
instructors.append(ci.instructor)
site = getattr(settings, 'SITE_NAME_SHORT')
r = render_to_response("sites/%s/landing.html" % site,
{'hiring': hiring,
'course_list':course_list,
'instructors': instructors,
'display_login': request.GET.__contains__('login')},
context_instance=context)
return r
##########################################################################
In landing.html I use but not success
#############################
{% for instructor in instructors %}
{% endfor %}
############################
Thanks for help!