refactor: added enrolled status to program card
diff --git a/erpnext/education/utils.py b/erpnext/education/utils.py
index 09ac22c..c19bd19 100644
--- a/erpnext/education/utils.py
+++ b/erpnext/education/utils.py
@@ -84,7 +84,7 @@
 		return None
 
 	program_list = [frappe.get_doc("Program", program) for program in published_programs]
-	portal_programs = [program for program in program_list if allowed_program_access(program.name) or program.allow_self_enroll]
+	portal_programs = [{'program': program, 'has_access': allowed_program_access(program.name)} for program in program_list if allowed_program_access(program.name) or program.allow_self_enroll]
 
 	return portal_programs
 
diff --git a/erpnext/www/lms/all-programs.html b/erpnext/www/lms/all-programs.html
index 088498b..02df51a 100644
--- a/erpnext/www/lms/all-programs.html
+++ b/erpnext/www/lms/all-programs.html
@@ -42,7 +42,7 @@
 	<div class='container'>
 		<div class="row mt-5">
 			{% for program in all_programs %}
-				{{ program_card(program) }}
+				{{ program_card(program.program, program.has_access) }}
 			{% endfor %}
 		</div>
 	</div>
diff --git a/erpnext/www/lms/content.py b/erpnext/www/lms/content.py
index 67e3508..25d5bc7 100644
--- a/erpnext/www/lms/content.py
+++ b/erpnext/www/lms/content.py
@@ -16,7 +16,7 @@
 		frappe.local.flags.redirect_location = '/lms'
 		raise frappe.Redirect
 
-	context.content = frappe.get_doc(content_type, content).as_dict()
+	context.content = frappe.get_doc(content_type, content)
 	context.content_type = content_type
 
 	context.course = frappe.form_dict['course']
diff --git a/erpnext/www/lms/index.html b/erpnext/www/lms/index.html
index ba3034c..6661e22 100644
--- a/erpnext/www/lms/index.html
+++ b/erpnext/www/lms/index.html
@@ -46,7 +46,7 @@
 	<div class='container'>
 		<div class="row mt-5">
 			{% for program in featured_programs %}
-				{{ program_card(program) }}
+				{{ program_card(program.program, program.has_access) }}
 			{% endfor %}
 		</div>
 		<p class='mt-4'>
diff --git a/erpnext/www/lms/macros/card.html b/erpnext/www/lms/macros/card.html
index 8cf8a78..a0e4dab 100644
--- a/erpnext/www/lms/macros/card.html
+++ b/erpnext/www/lms/macros/card.html
@@ -1,4 +1,4 @@
-{% macro program_card(program) %}
+{% macro program_card(program, has_access) %}
 <div class="col-sm mb-4 text-left">
 	<a href="/lms/program?program={{ program.name }}" class="no-decoration no-underline">
 	<div class="card h-100">
@@ -14,7 +14,9 @@
 			<div>{{ program.description }}</div>
 		</div>
 		<div class='card-footer'>
-			<span class='small'>Watch Intro</span>
+			{% if has_access %} <span class="indicator green">Enrolled</span>
+			{% else %} <span>Watch Intro</span>
+			{% endif %}
 		</div>
 	</div>
 	</a>