Commit bb9901c5 authored by Ray Rafael Abenido's avatar Ray Rafael Abenido

Fix: corrected minor bugs when displaying names in forum and announcemnts...

Fix: corrected minor bugs when displaying names in forum and announcemnts page. corrected bug where passing grade displays zero all the time.
parent 3e8f264f
...@@ -2,13 +2,11 @@ ...@@ -2,13 +2,11 @@
<h2>ANNOUNCEMENTS: </h2> <h2>ANNOUNCEMENTS: </h2>
{% for announcement in announcements%} {% for announcement in announcements%}
<p><b>{{announcement.announcement_title}}</b> by {{announcement.author}} dated {{announcement.pub_date}}</p> <p><b>{{announcement.announcement_title}}</b> by {{announcement.author.first_name}} {{announcement.author.last_name}} dated {{announcement.pub_date}}</p>
<p>{{announcement.announcement_body}}</p> <p>{{announcement.announcement_body}}</p>
<p>{% include "reactions_list.html" with reactions=announcement.reaction_list %}</p> <p>{% include "reactions_list.html" with reactions=announcement.reaction_list %}</p>
{{ value|linebreaks }} {{ value|linebreaks }}
{% endfor %} {% endfor %}
</p> </p>
\ No newline at end of file
# Generated by Django 3.2.12 on 2022-04-06 05:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('assignments', '0008_alter_assignment_assignment_passing_score'),
]
operations = [
migrations.AlterField(
model_name='assignment',
name='assignment_passing_score',
field=models.IntegerField(),
),
]
...@@ -9,7 +9,7 @@ class Assignment(models.Model): ...@@ -9,7 +9,7 @@ class Assignment(models.Model):
assignment_name = models.CharField(max_length=100) assignment_name = models.CharField(max_length=100)
assignment_description = models.CharField(max_length=1000) assignment_description = models.CharField(max_length=1000)
assignment_max_points = models.IntegerField(default=0) assignment_max_points = models.IntegerField(default=0)
assignment_passing_score = models.IntegerField(editable=False) assignment_passing_score = models.IntegerField(editable=True)
assignment_course = models.ForeignKey('Course', on_delete=models.CASCADE, blank=True, null= True) assignment_course = models.ForeignKey('Course', on_delete=models.CASCADE, blank=True, null= True)
def __str__(self): def __str__(self):
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<p> <p>
{% for post in posts %} {% for post in posts %}
<p><b>{{post.post_title}}</b> by {{post.author}} dated {{post.pub_date}}:</p> <p><b>{{post.post_title}}</b> by {{post.author.first_name}} {{post.author.last_name}} dated {{post.pub_date}}:</p>
<p> {{ post.post_body }} </p> <p> {{ post.post_body }} </p>
{% if post.reply_chain != NULL %} {% if post.reply_chain != NULL %}
......
<p><i>Reply by {{reply.author}} dated {{reply.pub_date}}:</i></p> <p>
<i> Reply by {{post.author.first_name}} {{post.author.last_name}} dated {{reply.pub_date}}: </i>
</p>
<p>{{reply.reply_body}}</p> <p>{{reply.reply_body}}</p>
{% if reply.reply_chain != NULL %} {% if reply.reply_chain != NULL %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment