Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_group17
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vaughn Nephi Fajardo
widget_group17
Commits
4705e736
Commit
4705e736
authored
Apr 06, 2022
by
Joan Denise Nocos
Browse files
Options
Browse Files
Download
Plain Diff
fix: resolving commit issues
parents
fa3e04bd
8bdb1dc7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
3 deletions
+3
-3
models.cpython-39.pyc
...et_group_17/assignments/__pycache__/models.cpython-39.pyc
+0
-0
0006_alter_assignment_passing_score.cpython-39.pyc
...ache__/0006_alter_assignment_passing_score.cpython-39.pyc
+0
-0
models.py
widget_group_17/assignments/models.py
+1
-3
views.py
widget_group_17/assignments/views.py
+2
-0
No files found.
widget_group_17/assignments/__pycache__/models.cpython-39.pyc
View file @
4705e736
No preview for this file type
widget_group_17/assignments/migrations/__pycache__/0006_alter_assignment_passing_score.cpython-39.pyc
0 → 100644
View file @
4705e736
File added
widget_group_17/assignments/models.py
View file @
4705e736
...
...
@@ -11,10 +11,8 @@ class Assignment(models.Model):
name
=
models
.
CharField
(
max_length
=
50
)
description
=
models
.
CharField
(
max_length
=
500
)
max_points
=
models
.
IntegerField
(
default
=
0
)
#def set_passing_score():
# return (max_points * 60) / 100
passing_score
=
models
.
IntegerField
(
default
=
0
)
def
_str_
(
self
):
return
self
.
name
widget_group_17/assignments/views.py
View file @
4705e736
...
...
@@ -6,6 +6,8 @@ def index(request):
assignments_view
=
"ASSIGNMENTS: <br>"
schoolwork
=
Assignment
.
objects
.
all
()
for
assignment
in
schoolwork
:
score
=
assignment
.
max_points
assignment
.
passing_score
=
(
score
*
60
)
//
100
assignments_view
+=
"Assignment Name: {}<br>Description: {}<br>Perfect Score: {}<br>Passing Score: {}<br>Course/Section: {} {} {}<br><br>"
.
\
format
(
assignment
.
name
,
assignment
.
description
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment