Skip to content

Commit

Permalink
feat: show assignment information to students (#22)
Browse files Browse the repository at this point in the history
* feat: show submission information to students

* chore: update translations

* test: update current unit test

* refactor: address PR review
  • Loading branch information
BryanttV authored Sep 22, 2023
1 parent becfb01 commit c27b707
Show file tree
Hide file tree
Showing 13 changed files with 375 additions and 190 deletions.
15 changes: 13 additions & 2 deletions mindmap/edxapp_wrapper/backends/student_p_v1.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"""
Student module definitions for Open edX Palm release.
"""

from common.djangoapps.student.models import user_by_anonymous_id # pylint: disable=import-error
# pylint: disable=import-error
from common.djangoapps.student.models import user_by_anonymous_id
from lms.djangoapps.courseware.models import StudentModule


def get_user_by_anonymous_id(*args, **kwargs):
Expand All @@ -13,3 +14,13 @@ def get_user_by_anonymous_id(*args, **kwargs):
User: User object.
"""
return user_by_anonymous_id(*args, **kwargs)


def get_student_module():
"""
Get StudentModule model.
Returns:
StudentModule: StudentModule object.
"""
return StudentModule
10 changes: 10 additions & 0 deletions mindmap/edxapp_wrapper/student.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,14 @@ def get_anonymous_user_id_function(*args, **kwargs):
return backend.get_user_by_anonymous_id(*args, **kwargs)


def get_student_module_function():
"""Get StudentModule model."""

backend_function = settings.MINDMAP_STUDENT_MODULE_BACKEND
backend = import_module(backend_function)

return backend.get_student_module()


student_module = get_student_module_function
user_by_anonymous_id = get_anonymous_user_id_function
101 changes: 58 additions & 43 deletions mindmap/locale/en/LC_MESSAGES/text.po
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-21 14:45-0500\n"
"POT-Creation-Date: 2023-09-22 10:12-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Bryann Valderrama <[email protected]>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -22,11 +22,23 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: mindmap.py:38 public/html/mindmap_edit.html:14
#: mindmap.py:36
msgid "Not attempted"
msgstr ""

#: mindmap.py:37
msgid "Submitted"
msgstr ""

#: mindmap.py:38
msgid "Completed"
msgstr ""

#: mindmap.py:49 public/html/mindmap_edit.html:14
msgid "Is scorable?"
msgstr ""

#: mindmap.py:40
#: mindmap.py:51
msgid ""
"Whether the component is scorable. If is scorable, the student can submit "
"the mind map and receive a score from the instructor. If it is not scorable, "
Expand All @@ -35,65 +47,65 @@ msgid ""
"grade will not be reset."
msgstr ""

#: mindmap.py:52 public/html/mindmap_edit.html:7
#: mindmap.py:63 public/html/mindmap_edit.html:7
msgid "Display name"
msgstr ""

#: mindmap.py:59
#: mindmap.py:70
msgid ""
"Whether the mind map is static or not. If it is static, the instructor can "
"create a mind map and it will be the same for all students. If it is not "
"static, the students can create their own mind maps."
msgstr ""

#: mindmap.py:63 public/html/mindmap_edit.html:40
#: mindmap.py:74 public/html/mindmap_edit.html:40
msgid "Is a static mindmap?"
msgstr ""

#: mindmap.py:70
#: mindmap.py:81
msgid ""
"The mind map that will be shown to students if the\"Is a static mindmap?\" "
"field is set to \"True\""
msgstr ""

#: mindmap.py:73
#: mindmap.py:84
msgid "Mindmap body"
msgstr ""

#: mindmap.py:93
#: mindmap.py:104
msgid ""
"The body of the mind map. It is a dictionary with the following structure: "
"{'root': {'text': 'Root', 'children': [{'text': 'Child 1', 'children': []}]}}"
msgstr ""

#: mindmap.py:96
#: mindmap.py:107
msgid "Mindmap student body"
msgstr ""

#: mindmap.py:102
#: mindmap.py:113
msgid "Problem Weight"
msgstr ""

#: mindmap.py:104
#: mindmap.py:115
msgid ""
"Defines the number of points each problem is worth. If the value is not set, "
"the problem is worth the sum of the option point values."
msgstr ""

#: mindmap.py:113
#: mindmap.py:124
msgid "Maximum score"
msgstr ""

#: mindmap.py:114
#: mindmap.py:125
msgid "Maximum grade score given to assignment by instructors."
msgstr ""

#: mindmap.py:120
msgid "Submitted"
#: mindmap.py:131
msgid "Submission status"
msgstr ""

#: mindmap.py:121
msgid "Whether the student has submitted their submission."
#: mindmap.py:132
msgid "The submission status of the assignment."
msgstr ""

#: public/html/mindmap.html:8
Expand Down Expand Up @@ -140,24 +152,23 @@ msgstr ""
msgid "→ Space: Expand or collapse the selected node."
msgstr ""

#: public/html/mindmap.html:57
#: public/html/mindmap.html:57 public/html/mindmap.html:59
msgid "points"
msgstr ""

#: public/html/mindmap.html:63
msgid "Save assignment"
msgstr ""

#: public/html/mindmap.html:58
#: public/js/src/mindmap.js:161
#: public/js/src/mindmap.js:171 public/html/mindmap.html:64
msgid "Submit"
msgstr ""

#: public/html/mindmap.html:60 public/html/mindmap_edit.html:62
#: public/html/mindmap.html:66 public/html/mindmap_edit.html:62
msgid "Save"
msgstr ""

#: public/html/mindmap.html:64
msgid "Your score is:"
msgstr ""

#: public/html/mindmap.html:68
#: public/html/mindmap.html:70
msgid "Grade submissions"
msgstr ""

Expand Down Expand Up @@ -193,66 +204,70 @@ msgstr ""
msgid "Uploaded"
msgstr ""

#: public/js/src/mindmap.js:85 public/js/src/mindmap.js:165
#: public/js/src/mindmap.js:85
msgid "Submission Status"
msgstr ""

#: public/js/src/mindmap.js:86 public/js/src/mindmap.js:171
msgid "Grade"
msgstr ""

#: public/js/src/mindmap.js:86
#: public/js/src/mindmap.js:87
msgid "Actions"
msgstr ""

#: public/js/src/mindmap.js:108
#: public/js/src/mindmap.js:109
msgid "Mindmap submissions"
msgstr ""

#: public/js/src/mindmap.js:109
#: public/js/src/mindmap.js:110
msgid "Review"
msgstr ""

#: public/js/src/mindmap.js:110
#: public/js/src/mindmap.js:111
msgid "Search"
msgstr ""

#: public/js/src/mindmap.js:111
#: public/js/src/mindmap.js:112
msgid "Showing _START_ to _END_ of _TOTAL_ entries"
msgstr ""

#: public/js/src/mindmap.js:112
#: public/js/src/mindmap.js:113
msgid "No data available in table"
msgstr ""

#: public/js/src/mindmap.js:113
#: public/js/src/mindmap.js:114
msgid "Showing 0 to 0 of 0 entries"
msgstr ""

#: public/js/src/mindmap.js:114
#: public/js/src/mindmap.js:115
msgid "No matching records found"
msgstr ""

#: public/js/src/mindmap.js:115
#: public/js/src/mindmap.js:116
msgid "(filtered from _MAX_ total entries)"
msgstr ""

#: public/js/src/mindmap.js:162
#: public/js/src/mindmap.js:168
msgid "Remove grade"
msgstr ""

#: public/js/src/mindmap.js:163
#: public/js/src/mindmap.js:169
msgid "Loading..."
msgstr ""

#: public/js/src/mindmap.js:164
#: public/js/src/mindmap.js:170
msgid "Back"
msgstr ""

#: public/js/src/mindmap.js:186
#: public/js/src/mindmap.js:192
msgid "Reviewing Mindmap for student: "
msgstr ""

#: public/js/src/mindmap.js:230
#: public/js/src/mindmap.js:236
msgid "Invalid grade must be a number"
msgstr ""

#: public/js/src/mindmap.js:231
#: public/js/src/mindmap.js:237
msgid "Please enter a lower grade, maximum grade allowed is:"
msgstr ""
Binary file modified mindmap/locale/es_419/LC_MESSAGES/text.mo
Binary file not shown.
Loading

0 comments on commit c27b707

Please sign in to comment.