Skip to content

Commit

Permalink
created student view
Browse files Browse the repository at this point in the history
  • Loading branch information
nicole-brewer committed Apr 1, 2024
1 parent 669e611 commit 5df81d4
Show file tree
Hide file tree
Showing 6 changed files with 242 additions and 39 deletions.
10 changes: 9 additions & 1 deletion jupyter_mentor/_modidx.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,12 @@
'jupyter_mentor.file_viewer.FileViewer.__init__': ( 'file_viewer.html#fileviewer.__init__',
'jupyter_mentor/file_viewer.py')},
'jupyter_mentor.login': { 'jupyter_mentor.login.Login': ('login.html#login', 'jupyter_mentor/login.py'),
'jupyter_mentor.login.Login.__init__': ('login.html#login.__init__', 'jupyter_mentor/login.py')}}}
'jupyter_mentor.login.Login.__init__': ('login.html#login.__init__', 'jupyter_mentor/login.py')},
'jupyter_mentor.student_course_overview': { 'jupyter_mentor.student_course_overview.StudentCourseOverview': ( 'student_course_overview.html#studentcourseoverview',
'jupyter_mentor/student_course_overview.py'),
'jupyter_mentor.student_course_overview.StudentCourseOverview.__init__': ( 'student_course_overview.html#studentcourseoverview.__init__',
'jupyter_mentor/student_course_overview.py')},
'jupyter_mentor.student_profile': { 'jupyter_mentor.student_profile.StudentProfile': ( 'student_profile.html#studentprofile',
'jupyter_mentor/student_profile.py'),
'jupyter_mentor.student_profile.StudentProfile.__init__': ( 'student_profile.html#studentprofile.__init__',
'jupyter_mentor/student_profile.py')}}}
60 changes: 60 additions & 0 deletions jupyter_mentor/student_course_overview.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/14_student_course_overview.ipynb.

# %% auto 0
__all__ = ['StudentCourseOverview']

# %% ../nbs/14_student_course_overview.ipynb 1
from .file_viewer import FileViewer
import ipywidgets as widgets
from ipywidgets import VBox, HBox, HTML, Button, Label, Text, Checkbox, Accordion, FileUpload
from IPython.display import display, clear_output
import ipyvuetify as v
from traitlets import observe

# %% ../nbs/14_student_course_overview.ipynb 2
class StudentCourseOverview(VBox):

def __init__(self, file_viewer):
super().__init__()

# File Upload button
self.file_upload = FileUpload(accept='', multiple=False)
self.file_upload_button = Button(description='Upload')

# global file viewer (that has model)
self.file_viewer = file_viewer

# Course overview text
self.course_overview_label = Label('Course Overview:')
self.course_overview_text = Text(placeholder='Enter course overview')

# AI Guidelines text
self.ai_guidelines_label = Label('AI Guidelines:')


# Binary features checkboxes
self.step_by_step_checkbox = Checkbox(description='Step-by-Step')
self.metaphor_checkbox = Checkbox(description='Metaphor')
self.hints_checkbox = Checkbox(description='Hints')
self.ai_guided_questions_checkbox = Checkbox(description='AI Guided Questions')


# Open-ended response textbox
self.open_ended_label = Label('Open-ended Response:')
self.open_ended_text = Text(placeholder='Enter open-ended response')

# Next button
self.next_button = Button(description='Next')

# Arrange widgets vertically
self.children = [
HTML('<h2>Course Overview</h2>'), # Heading
HBox([self.file_upload, self.file_upload_button]), # File upload button
self.file_viewer,
self.course_overview_label, self.course_overview_text, # Course overview
self.ai_guidelines_label, # AI Guidelines
VBox([self.step_by_step_checkbox, self.metaphor_checkbox,
self.hints_checkbox, self.ai_guided_questions_checkbox]), # Binary features checkboxes
self.open_ended_label, self.open_ended_text, # Open-ended response
HBox([self.next_button], layout={'justify_content': 'flex-end'}),
]
1 change: 0 additions & 1 deletion jupyter_mentor/student_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def __init__(self):
self.interests_label = Label('List your outside interests:')
self.interests_input = Textarea(placeholder='Enter your outside interests', password=True)



# Next button
self.next_button = Button(description='Next')
Expand Down
19 changes: 16 additions & 3 deletions nbs/00_main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"from ipywidgets import Tab, Output, Button\n",
"from jupyter_mentor.login import Login\n",
"from jupyter_mentor.educator_profile import EducatorProfile\n",
"from jupyter_mentor.student_profile import StudentProfile\n",
"from jupyter_mentor.educator_course_overview import EducatorCourseOverview\n",
"from jupyter_mentor.student_course_overview import StudentCourseOverview\n",
"from jupyter_mentor.chatbot import ChatBot\n",
"from jupyter_mentor.file_viewer import FileViewer"
]
Expand Down Expand Up @@ -101,7 +103,7 @@
"outputs": [],
"source": [
"#| export\n",
"class EducatorMain(widgets.Tab):\n",
"class StudentMain(widgets.Tab):\n",
" \n",
" def __init__(self):\n",
" super().__init__()\n",
Expand All @@ -111,10 +113,10 @@
" \n",
" # initialize views\n",
" self.first = Login()\n",
" self.second = EducatorProfile()\n",
" self.second = StudentProfile()\n",
" self.file_viewer = FileViewer()\n",
"\n",
" self.third = EducatorCourseOverview(self.file_viewer)\n",
" self.third = StudentCourseOverview(self.file_viewer)\n",
" self.fourth = ChatBot()\n",
"\n",
" \n",
Expand Down Expand Up @@ -142,6 +144,17 @@
" self.selected_index = 3"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "36cabf8d-427b-4d24-9c5d-8a6f8e4ab6b5",
"metadata": {},
"outputs": [],
"source": [
"student_main = StudentMain()\n",
"student_main"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
48 changes: 14 additions & 34 deletions nbs/12_student_profile.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "2df4d2d5-3e88-45a1-ba93-33884367b767",
"metadata": {},
"outputs": [],
Expand All @@ -12,7 +12,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "04513d03-ca81-4315-bd67-4a6e10cec378",
"metadata": {},
"outputs": [],
Expand All @@ -26,7 +26,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "0c3f213a-6037-4df2-a402-b10e146f1794",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -89,26 +89,10 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "11eb898f-c1c0-4651-ae5d-64270f663d2f",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "eca20a9d55d843d9988d2513153cdf15",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"StudentProfile(children=(HTML(value='<h2>Student User Profile</h2>'), HBox(children=(Label(value='Name/ID:'), …"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"profile = StudentProfile()\n",
"profile"
Expand All @@ -124,25 +108,21 @@
"#| hide\n",
"import nbdev; nbdev.nbdev_export()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "379bd6a2-06a3-47bb-9493-7ffb632b68de",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "python3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.19"
}
},
"nbformat": 4,
Expand Down
143 changes: 143 additions & 0 deletions nbs/14_student_course_overview.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "b8b8cb16-2ceb-4b93-b5f5-615270d1b9b2",
"metadata": {},
"outputs": [],
"source": [
"#| default_exp student_course_overview"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0320fe7e-0ec7-4dd1-90c2-74a3e25bab86",
"metadata": {},
"outputs": [],
"source": [
"#| export\n",
"from jupyter_mentor.file_viewer import FileViewer\n",
"import ipywidgets as widgets\n",
"from ipywidgets import VBox, HBox, HTML, Button, Label, Text, Checkbox, Accordion, FileUpload\n",
"from IPython.display import display, clear_output\n",
"import ipyvuetify as v\n",
"from traitlets import observe"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f0e47085-1303-4292-b752-0ee05eef872d",
"metadata": {},
"outputs": [],
"source": [
"#| export\n",
"\n",
"class StudentCourseOverview(VBox):\n",
" \n",
" def __init__(self, file_viewer):\n",
" super().__init__()\n",
"\n",
" # File Upload button\n",
" self.file_upload = FileUpload(accept='', multiple=False)\n",
" self.file_upload_button = Button(description='Upload')\n",
"\n",
" # global file viewer (that has model)\n",
" self.file_viewer = file_viewer\n",
" \n",
" # Course overview text\n",
" self.course_overview_label = Label('Course Overview:')\n",
" self.course_overview_text = Text(placeholder='Enter course overview')\n",
" \n",
" # AI Guidelines text\n",
" self.ai_guidelines_label = Label('AI Guidelines:')\n",
" \n",
" \n",
" # Binary features checkboxes\n",
" self.step_by_step_checkbox = Checkbox(description='Step-by-Step')\n",
" self.metaphor_checkbox = Checkbox(description='Metaphor')\n",
" self.hints_checkbox = Checkbox(description='Hints')\n",
" self.ai_guided_questions_checkbox = Checkbox(description='AI Guided Questions')\n",
" \n",
" \n",
" # Open-ended response textbox\n",
" self.open_ended_label = Label('Open-ended Response:')\n",
" self.open_ended_text = Text(placeholder='Enter open-ended response')\n",
"\n",
" # Next button\n",
" self.next_button = Button(description='Next')\n",
" \n",
" # Arrange widgets vertically\n",
" self.children = [\n",
" HTML('<h2>Course Overview</h2>'), # Heading\n",
" HBox([self.file_upload, self.file_upload_button]), # File upload button\n",
" self.file_viewer,\n",
" self.course_overview_label, self.course_overview_text, # Course overview\n",
" self.ai_guidelines_label, # AI Guidelines\n",
" VBox([self.step_by_step_checkbox, self.metaphor_checkbox,\n",
" self.hints_checkbox, self.ai_guided_questions_checkbox]), # Binary features checkboxes\n",
" self.open_ended_label, self.open_ended_text, # Open-ended response\n",
" HBox([self.next_button], layout={'justify_content': 'flex-end'}), \n",
" ]"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "54fb4f23-dabc-4109-a482-feee5c130f36",
"metadata": {},
"outputs": [],
"source": [
"file_viewer = FileViewer()\n",
"main = StudentCourseOverview(file_viewer)\n",
"main"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "55ed3ffc-d154-4b77-9117-6f580fbeb0fe",
"metadata": {},
"outputs": [],
"source": [
"v.Container(children=[\n",
" v.Html(\n",
" tag='h1',\n",
" attributes={'title': 'a title'},\n",
" children=['My heading']\n",
" )\n",
"])"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "11872b33-a907-4acb-9537-0a2f4237d791",
"metadata": {},
"outputs": [],
"source": [
"#| hide\n",
"import nbdev; nbdev.nbdev_export()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7a9f3ff0-90e3-4cbb-a37e-ee9a28e6bf46",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "python3",
"language": "python",
"name": "python3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

0 comments on commit 5df81d4

Please sign in to comment.