Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/arielfayol37/Dr_R into 'cou…
Browse files Browse the repository at this point in the history
…rsecover'
  • Loading branch information
NgoYves1802 committed Nov 19, 2023
2 parents 4a26f3a + 5369dd6 commit b5371ee
Show file tree
Hide file tree
Showing 104 changed files with 3,816 additions and 2,634 deletions.
Binary file modified Dr_R/__pycache__/settings.cpython-311.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion Dr_R/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,6 @@
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'no.reply.dr.r.valpo@gmail.com' # Your Gmail address
EMAIL_HOST_PASSWORD = 'jxey ewuu mrsq fvnb' # Your Gmail password
EMAIL_HOST_PASSWORD = 'azuv oucz hahf sfqp' # Your Gmail password


65 changes: 0 additions & 65 deletions PHYSICS QUESTION BANK/question_extract.py

This file was deleted.

11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,6 @@ python manage.py runserver
```
Then copy and paste the url from the terminal to your browser.

8. Credentials:
If you want to test the app with some prefilled data,
use the following for instructor login
```bash
email: andy.richter@valpo.edu password: la
```
use the following for student login
```bash
email:arielfayol37@gmail.com password:la
```



## Impressive Features
Expand Down
Binary file modified astros/__pycache__/views.cpython-311.pyc
Binary file not shown.
4 changes: 3 additions & 1 deletion astros/static/astros/css/registration_style.css
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ input.form-control {
}

@media screen and (max-width: 450px){

.landing-container {
margin-top:20%;
}
div#registration-container.bs-overrides {
flex-direction: column;
}
Expand Down
29 changes: 11 additions & 18 deletions astros/static/astros/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,12 @@ li{
height: 60vh;
padding: 20px;
border-radius: 5px;
/*box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);*/
background-color: white;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);

position:relative;

display: flex;
flex-direction: column;

}
/* Assignment displays need less height */
.assignment-li {
Expand All @@ -279,14 +279,13 @@ li{


div.course-section {
display: flex;
flex-direction: column;
position: relative;
height: 70%;
}
/* Set the height of .image-container to 50% of the height of .course-li */
div.image-container {
position: absolute;
top: 0;
left: 0;
height: 85%;
width: 100%; /* Make the image container full-width within .course-li */
overflow: hidden; /* Ensure the image doesn't overflow the container */
Expand All @@ -295,22 +294,16 @@ div.image-container {
/* Style the image to fill the .image-container */
div.image-container img.course-image {
height: 100%;
width: 100%;
/*max-height: 100%; Ensure the image height fits within the container */
/*max-width: 100%; Ensure the image width fits within the container */
width: 100%;
object-fit: cover; /* Maintain aspect ratio and cover the container */
border-radius: 10px 10px 10px 10px; /* Optional: Add border radius to the top corners */
border-radius: 10px; /* Optional: Add border radius to the top corners */
}
div.c-text {
position: absolute;
top: 87%;
height: 30%;
.c-text {
height: 15%;
}

.a-text.c-text {
top: 25%;
.c-description {
overflow: hidden;
}

.edit-section {
bottom: 5%;
position: absolute;
Expand Down
3 changes: 2 additions & 1 deletion astros/templates/astros/all_courses.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ul>
</div>
<div id="sf-container">
<input id="search-field" type="text" name="search" placeholder="search course"/>
<input id="search-field" type="text" name="search" class="page-search" data-name="course-name" placeholder="search course"/>
</div>
<br/>
<h4>All courses</h4>
Expand All @@ -41,4 +41,5 @@ <h4>All courses</h4>
{% endblock %}
{% block scripts %}
<script src="{% static 'astros/js/course_enroll.js' %}"></script>
<script src="{% static 'deimos/js/search_generic.js' %}"></script>
{% endblock %}
3 changes: 0 additions & 3 deletions astros/templates/astros/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
</div>
-->
<div class="welcome-section">
<h4>Welcome to <span class="brand-name">Dr. R</span>!</h4>
<p class="sub-heading">Are you a student or an instructor?</p>
<p>Login to continue or create courses.</p>
<p><a href="{% url 'astros:login' %}"><button class="btn btn-primary" id="login-button"> Login </button></a></p>
</div>

Expand Down
10 changes: 3 additions & 7 deletions astros/templates/astros/prof_course_display.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
{% endif %}
</div>
<div class="c-text">
<span class="c-name"><strong>{{course.name}}</strong></span>
<p class="c-description">{% if course.description|length > 90 %}
{{ course.description|slice:":90" }}...
{% else %}
{{ course.description }}
{% endif %}</p>

<span class="c-name course-name"><strong>{{course.name}}</strong></span>
<p class="c-description">
{{ course.description }}</p>
<p class="timestamp" style="display: none;">Created on {{ course.timestamp|date:"m/d/Y" }}</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion astros/templates/astros/stud_course_display.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% endif %}
</div>
<div class="c-text">
<span class="c-name"><strong>{{course.name}}</strong></span>
<span class="c-name course-name"><strong>{{course.name}}</strong></span>
<p class="c-description">{% if course.description|length > 90 %}
{{ course.description|slice:":90" }}...
{% else %}
Expand Down
8 changes: 4 additions & 4 deletions astros/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ def course_enroll(request, course_id, code):
return HttpResponse(json.dumps({'state':False,'response':'Invalid code'}))
if code.expiring_date >= date.today():
# If not enrolled, create a new Enrollment instance
enrollment = Enrollment.objects.create(student=student, course=course)
enrollment, created = Enrollment.objects.get_or_create(student=student, course=course)
enrollment.save()
for assignment in course.assignments.all():
if assignment.is_assigned == True:
assign = AssignmentStudent.objects.create(assignment=assignment, student=student)
assign, created = AssignmentStudent.objects.get_or_create(assignment=assignment, student=student)
assign.save()

return HttpResponse(json.dumps({'state': True, 'response':'valid code',\
Expand Down Expand Up @@ -138,14 +138,14 @@ def generate_auth_code(request):
code_base[str_email] = []
code_base[str_email].append(code)
send_mail(
'Authentify', # subject
'Authentication', # subject
f'Enter the following authentification code on DR-R: {code}', # message
'no.reply.dr.r.valpo@gmail.com', # from email
[email], # recipient list
fail_silently=False, # Raises an error if there's a problem
)
return JsonResponse({'success':True,
'message':'An authentification code was sent to email. Please enter the code in the field that will appear at the bottom.'})
'message':'An authentication code was sent to email. Please enter the code in the field that will appear at the bottom.'})
except:
return JsonResponse({'success':False,
'message':'Something went wrong during the mailing process'})
Expand Down
Binary file modified deimos/__pycache__/models.cpython-311.pyc
Binary file not shown.
Binary file modified deimos/__pycache__/urls.cpython-311.pyc
Binary file not shown.
Binary file added deimos/__pycache__/utils.cpython-311.pyc
Binary file not shown.
Binary file modified deimos/__pycache__/views.cpython-311.pyc
Binary file not shown.
23 changes: 23 additions & 0 deletions deimos/migrations/0019_note_title_notetemporary_title.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.3 on 2023-11-08 05:43

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('deimos', '0018_alter_questionattempt_submitted_answer_and_more'),
]

operations = [
migrations.AddField(
model_name='note',
name='title',
field=models.CharField(blank=True, max_length=200, null=True),
),
migrations.AddField(
model_name='notetemporary',
name='title',
field=models.CharField(blank=True, max_length=200, null=True),
),
]
19 changes: 19 additions & 0 deletions deimos/migrations/0020_alter_questionstudent_num_units_attempts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 4.2.3 on 2023-11-10 23:36

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('deimos', '0019_note_title_notetemporary_title'),
]

operations = [
migrations.AlterField(
model_name='questionstudent',
name='num_units_attempts',
field=models.IntegerField(blank=True, default=0, null=True, validators=[django.core.validators.MinValueValidator(0)]),
),
]
18 changes: 18 additions & 0 deletions deimos/migrations/0021_questionstudent_is_complete.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.3 on 2023-11-11 22:19

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('deimos', '0020_alter_questionstudent_num_units_attempts'),
]

operations = [
migrations.AddField(
model_name='questionstudent',
name='is_complete',
field=models.BooleanField(default=False),
),
]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit b5371ee

Please sign in to comment.