Revert "Revert "refactor: move xmodule folder to root""

This commit is contained in:
Muhammad Umar Khan
2022-06-20 18:20:06 +05:00
committed by GitHub
parent 46d848be41
commit a389a9ff10
487 changed files with 216 additions and 339 deletions

View File

@@ -5,11 +5,11 @@ source =
cms
common/djangoapps
common/lib/capa
common/lib/xmodule
lms
openedx
pavelib
scripts
xmodule
omit =
cms/envs/*

View File

@@ -10,6 +10,7 @@ source =
openedx
pavelib
scripts
xmodule
omit =
cms/envs/*

View File

@@ -20,7 +20,7 @@ test_root/staticfiles
common/static/xmodule
# Symlinks into common/lib/xmodule/xmodule/js
# Symlinks into xmodule/js
cms/static/xmodule_js
lms/static/xmodule_js
@@ -50,12 +50,6 @@ common/lib/capa/capa/tests/test_files/js/test_problem_display.js
common/lib/capa/capa/tests/test_files/js/test_problem_generator.js
common/lib/capa/capa/tests/test_files/js/test_problem_grader.js
common/lib/capa/capa/tests/test_files/js/xproblem.js
common/lib/xmodule/xmodule/js/spec/annotatable/display_spec.js
common/lib/xmodule/xmodule/js/spec/capa/display_spec.js
common/lib/xmodule/xmodule/js/spec/html/edit_spec.js
common/lib/xmodule/xmodule/js/spec/problem/edit_spec_hint.js
common/lib/xmodule/xmodule/js/spec/problem/edit_spec.js
common/lib/xmodule/xmodule/js/spec/tabs/edit.js
lms/static/js/spec/calculator_spec.js
lms/static/js/spec/courseware_spec.js
lms/static/js/spec/feedback_form_spec.js
@@ -63,6 +57,12 @@ lms/static/js/spec/helper.js
lms/static/js/spec/histogram_spec.js
lms/static/js/spec/modules/tab_spec.js
lms/static/js/spec/requirejs_spec.js
xmodule/js/spec/annotatable/display_spec.js
xmodule/js/spec/capa/display_spec.js
xmodule/js/spec/html/edit_spec.js
xmodule/js/spec/problem/edit_spec_hint.js
xmodule/js/spec/problem/edit_spec.js
xmodule/js/spec/tabs/edit.js
!**/.eslintrc.js

2
.github/CODEOWNERS vendored
View File

@@ -3,7 +3,6 @@
# Core
common/djangoapps/student/
common/djangoapps/third_party_auth/
common/lib/xmodule/xmodule/
lms/djangoapps/course_api/blocks
lms/djangoapps/courseware/
lms/djangoapps/grades/
@@ -15,6 +14,7 @@ openedx/core/djangoapps/oauth_dispatch
openedx/core/djangoapps/user_api/
openedx/core/djangoapps/user_authn/
openedx/features/course_experience/
xmodule/
# Core Extensions
common/lib/xmodule/xmodule/capa_module.py

View File

@@ -7,7 +7,7 @@ runs:
shell: bash
run: |
echo "root_cms_unit_tests_count=$(pytest --collect-only --ds=cms.envs.test cms/ -q | head -n -2 | wc -l)" >> $GITHUB_ENV
echo "root_lms_unit_tests_count=$(pytest --collect-only --ds=lms.envs.test lms/ openedx/ common/djangoapps/ common/lib/ -q | head -n -2 | wc -l)" >> $GITHUB_ENV
echo "root_lms_unit_tests_count=$(pytest --collect-only --ds=lms.envs.test lms/ openedx/ common/djangoapps/ common/lib/ xmodule/ -q | head -n -2 | wc -l)" >> $GITHUB_ENV
- name: get GHA unit test paths
shell: bash

View File

@@ -26,6 +26,8 @@ jobs:
path: "common"
- module-name: cms
path: "cms"
- module-name: xmodule
path: "xmodule"
name: pylint ${{ matrix.module-name }}

View File

@@ -270,5 +270,11 @@
"paths": [
"common/djangoapps/"
]
},
"xmodule-1": {
"settings": "lms.envs.test",
"paths": [
"xmodule/"
]
}
}

View File

@@ -32,6 +32,7 @@ jobs:
"common-1",
"common-2",
"common-3",
"xmodule-1"
]

View File

@@ -1,4 +1,4 @@
common/lib/xmodule/xmodule/css
xmodule/css
common/static/sass/bourbon
common/static/xmodule/modules/css
common/test/test-theme

View File

@@ -123,7 +123,7 @@
'backbone.paginator': 'common/js/vendor/backbone.paginator',
'tinymce': 'js/vendor/tinymce/js/tinymce/tinymce.full.min',
'jquery.tinymce': 'js/vendor/tinymce/js/tinymce/jquery.tinymce.min',
'xmodule': '/xmodule/xmodule',
'xmodule': '/xmodule',
'xblock/cms.runtime.v1': 'cms/js/xblock/cms.runtime.v1',
'xblock': 'common/js/xblock',
'utility': 'js/src/utility',

View File

@@ -1 +1 @@
../../common/lib/xmodule/xmodule/js/
../../xmodule/js

View File

@@ -1,69 +0,0 @@
# lint-amnesty, pylint: disable=missing-module-docstring
from setuptools import find_packages, setup
XBLOCKS = [
"about = xmodule.html_module:AboutBlock",
"book = xmodule.template_module:TranslateCustomTagBlock",
"annotatable = xmodule.annotatable_module:AnnotatableBlock",
"chapter = xmodule.seq_module:SectionBlock",
"conditional = xmodule.conditional_module:ConditionalBlock",
"course = xmodule.course_module:CourseBlock",
"course_info = xmodule.html_module:CourseInfoBlock",
"customtag = xmodule.template_module:CustomTagBlock",
"custom_tag_template = xmodule.template_module:CustomTagTemplateBlock",
"discuss = xmodule.template_module:TranslateCustomTagBlock",
"error = xmodule.error_module:ErrorBlock",
"hidden = xmodule.hidden_module:HiddenDescriptor",
"html = xmodule.html_module:HtmlBlock",
"image = xmodule.template_module:TranslateCustomTagBlock",
"library = xmodule.library_root_xblock:LibraryRoot",
"library_content = xmodule.library_content_module:LibraryContentBlock",
"library_sourced = xmodule.library_sourced_block:LibrarySourcedBlock",
"lti = xmodule.lti_module:LTIBlock",
"nonstaff_error = xmodule.error_module:NonStaffErrorBlock",
"poll_question = xmodule.poll_module:PollBlock",
"problem = xmodule.capa_module:ProblemBlock",
"randomize = xmodule.randomize_module:RandomizeBlock",
"sequential = xmodule.seq_module:SequenceBlock",
"slides = xmodule.template_module:TranslateCustomTagBlock",
"split_test = xmodule.split_test_module:SplitTestBlock",
"static_tab = xmodule.html_module:StaticTabBlock",
"unit = xmodule.unit_block:UnitBlock",
"vertical = xmodule.vertical_block:VerticalBlock",
"video = xmodule.video_module:VideoBlock",
"videoalpha = xmodule.video_module:VideoBlock",
"videodev = xmodule.template_module:TranslateCustomTagBlock",
"word_cloud = xmodule.word_cloud_module:WordCloudBlock",
"wrapper = xmodule.wrapper_module:WrapperBlock",
]
XBLOCKS_ASIDES = [
'tagging_aside = cms.lib.xblock.tagging:StructuredTagsAside',
]
setup(
name="XModule",
version="0.1.2",
packages=find_packages(exclude=["tests"]),
install_requires=[
'setuptools',
'docopt',
'capa',
'path.py',
'webob',
'edx-opaque-keys>=0.4.0',
],
package_data={
'xmodule': ['js/module/*'],
},
# See https://setuptools.readthedocs.io/en/latest/setuptools.html#dynamic-discovery-of-services-and-plugins
# for a description of entry_points
entry_points={
'xblock.v1': XBLOCKS,
'xblock_asides.v1': XBLOCKS_ASIDES,
'console_scripts': [
'xmodule_assets = xmodule.static_content:main',
],
},
)

View File

@@ -1,45 +0,0 @@
<problem>
<script type="loncapa/python">
# from loncapa import *
x1 = 4 # lc_random(2,4,1)
y1 = 5 # lc_random(3,7,1)
x2 = 10 # lc_random(x1+1,9,1)
y2 = 20 # lc_random(y1+1,15,1)
m = (y2-y1)/(x2-x1)
b = y1 - m*x1
answer = "%s*x+%s" % (m,b)
answer = answer.replace('+-','-')
inverted_m = (x2-x1)/(y2-y1)
inverted_b = b
wrongans = "%s*x+%s" % (inverted_m,inverted_b)
wrongans = wrongans.replace('+-','-')
</script>
<text>
<p>Hints can be provided to students, based on the last response given, as well as the history of responses given. Here is an example of a hint produced by a Formula Response problem.</p>
<p>
What is the equation of the line which passess through ($x1,$y1) and
($x2,$y2)?</p>
<p>The correct answer is <tt>$answer</tt>. A common error is to invert the equation for the slope. Enter <tt>
$wrongans</tt> to see a hint.</p>
</text>
<formularesponse samples="x@-5:5#11" id="11" answer="$answer">
<responseparam description="Numerical Tolerance" type="tolerance" default="0.001" name="tol" />
<text>y = <formulaequationinput size="25" /></text>
<hintgroup>
<formulahint samples="x@-5:5#11" answer="$wrongans" name="inversegrad">
</formulahint>
<hintpart on="inversegrad">
<text>You have inverted the slope in the question.</text>
</hintpart>
</hintgroup>
</formularesponse>
</problem>

View File

@@ -1,25 +0,0 @@
<problem >
<text><h2>Example: String Response Problem</h2>
<br/>
</text>
<text>Which US state has Lansing as its capital?</text>
<stringresponse answer="Michigan" type="ci">
<textline size="20" />
<hintgroup>
<stringhint answer="wisconsin" type="cs" name="wisc">
</stringhint>
<stringhint answer="minnesota" type="cs" name="minn">
</stringhint>
<hintpart on="wisc">
<text>The state capital of Wisconsin is Madison.</text>
</hintpart>
<hintpart on="minn">
<text>The state capital of Minnesota is St. Paul.</text>
</hintpart>
<hintpart on="default">
<text>The state you are looking for is also known as the 'Great Lakes State'</text>
</hintpart>
</hintgroup>
</stringresponse>
</problem>

View File

@@ -1,26 +0,0 @@
<problem>
<text>
<h2>Example: Symbolic Math Response Problem</h2>
<p>
A symbolic math response problem presents one or more symbolic math
input fields for input. Correctness of input is evaluated based on
the symbolic properties of the expression entered. The student enters
text, but sees a proper symbolic rendition of the entered formula, in
real time, next to the input box.
</p>
<p>This is a correct answer which may be entered below: </p>
<p><tt>cos(theta)*[[1,0],[0,1]] + i*sin(theta)*[[0,1],[1,0]]</tt></p>
<text>Compute [mathjax] U = \exp\left( i \theta \left[ \begin{matrix} 0 &amp; 1 \\ 1 &amp; 0 \end{matrix} \right] \right) [/mathjax]
and give the resulting \(2 \times 2\) matrix. <br/>
Your input should be typed in as a list of lists, eg <tt>[[1,2],[3,4]]</tt>. <br/>
[mathjax]U=[/mathjax] <symbolicresponse cfn="symmath_check" answer="[[cos(theta),i*sin(theta)],[i*sin(theta),cos(theta)]]" options="matrix,imaginary" id="filenamedogi0VpEBOWedxsymmathresponse_1" state="unsubmitted">
<textline size="80" math="1" response_id="2" answer_id="1" id="filenamedogi0VpEBOWedxsymmathresponse_2_1"/>
</symbolicresponse>
<br/>
</text>
</text>
</problem>

View File

@@ -1 +0,0 @@
../../../../../common/static/js/RequireJS-namespace-undefine.js

View File

@@ -1 +0,0 @@
../../../../static/

View File

@@ -1 +0,0 @@
../../../../../test/data/

View File

@@ -3,7 +3,7 @@
padding: 10px;
background-color: #fff;
/* keep font-family in sync with CUSTOM_FONTS constant in Html editor XModule
* (edx-platform/common/lib/xmodule/xmodule/js/src/html/edit.js)
* (edx-platform/xmodule/js/src/html/edit.js)
* and with acceptance tests in cms/djangoapps/contentstore/features/html-editor.feature
*/
font-family: 'Open Sans', Verdana, Arial, Helvetica, sans-serif;

View File

@@ -21,7 +21,7 @@ root = Path('../..').abspath()
sys.path.insert(0, root)
sys.path.append(root / "docs/guides")
sys.path.append(root / "common/lib/capa")
sys.path.append(root / "common/lib/xmodule")
# Use a settings module that allows all LMS and Studio code to be imported
# without errors. If running sphinx-apidoc, we already set a different
@@ -222,9 +222,9 @@ autodoc_mock_imports = [
modules = {
'cms': 'cms',
'common/lib/capa/capa': 'common/lib/capa',
'common/lib/xmodule/xmodule': 'common/lib/xmodule',
'lms': 'lms',
'openedx': 'openedx',
'xmodule': 'xmodule',
}

View File

@@ -9,4 +9,3 @@ out from edx-platform into separate packages at some point.
:maxdepth: 2
common/lib/capa/modules
common/lib/xmodule/modules

View File

@@ -8,3 +8,4 @@ Python Docstrings
common_index
lms_index
openedx/modules
xmodule/modules

View File

@@ -74,7 +74,7 @@ Test Locations
located in ``common/lib/capa/capa/tests``.
- Javascript unit tests: Located in ``spec`` folders. For example,
``common/lib/xmodule/xmodule/js/spec`` and
``xmodule/js/spec`` and
``{cms,lms}/static/js/spec`` For consistency, you should use the
same directory structure for implementation and test. For example,
the test for ``src/views/module.js`` should be written in
@@ -122,7 +122,7 @@ Various ways to run tests using pytest::
For example, this command runs a single python unit test file::
pytest common/lib/xmodule/xmodule/tests/test_stringify.py
pytest xmodule/tests/test_stringify.py
Note -
edx-platorm has multiple services (lms, cms) in it. The environment for each service is different enough that we run some tests in both environments in jenkins. To make sure tests will pass in each of these environments (especially for tests in "common" directory), you will need to test in each seperately. Add --rootdir flag at end of your pytest call and specify the env you are testing in::
@@ -133,7 +133,7 @@ Various tools like ddt create tests with very complex names, rather than figurin
1. Select tests to run based on their name, provide an expression to the `pytest -k option`_ which performs a substring match on test names::
pytest common/lib/xmodule/xmodule/tests/test_stringify.py -k test_stringify
pytest xmodule/tests/test_stringify.py -k test_stringify
.. _pytest -k option: https://docs.pytest.org/en/latest/example/markers.html#using-k-expr-to-select-tests-based-on-their-name
.. _node ID: https://docs.pytest.org/en/latest/example/markers.html#node-id
@@ -141,7 +141,7 @@ Various tools like ddt create tests with very complex names, rather than figurin
2. Alternatively, you can the get the name of all test methods in a class, file, or project, including all ddt.data variations, by running pytest with `--collectonly`::
pytest common/lib/xmodule/xmodule/tests/test_stringify.py --collectonly
pytest xmodule/tests/test_stringify.py --collectonly
Testing with migrations
***********************
@@ -215,7 +215,7 @@ Use this command to generate an HTML report::
coverage html
The report is then saved in reports/common/lib/xmodule/cover/index.html
The report is then saved in reports/xmodule/cover/index.html
To run tests for stub servers, for example for `YouTube stub server`_, you can
run one of these commands::

View File

@@ -1345,7 +1345,7 @@ paths:
percent_graded: (float) the percentage of total points the user has received a grade for in a given subsection
show_correctness: (str) a str representing whether to show the problem/practice scores based on due date
('always', 'never', 'past_due', values defined in
common/lib/xmodule/xmodule/modulestore/inheritance.py)
xmodule/modulestore/inheritance.py)
show_grades: (bool) a bool for whether to show grades based on the access the user has
url: (str) the absolute path url to the Subsection
enrollment_mode: (str) a str representing the enrollment the user has ('audit', 'verified', ...)

View File

@@ -19,13 +19,13 @@ from django.utils.translation import gettext as _
from edx_django_utils.cache import RequestCache
from opaque_keys.edx.keys import CourseKey
from pytz import UTC
from capa.tests.response_xml_factory import StringResponseXMLFactory
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory, SampleCourseFactory
from xmodule.x_module import XModuleMixin
from capa.tests.response_xml_factory import StringResponseXMLFactory
from common.djangoapps.edxmako.shortcuts import render_to_response
from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentAllowed
from common.djangoapps.student.roles import CourseCcxCoachRole, CourseInstructorRole, CourseStaffRole

View File

@@ -112,7 +112,7 @@ class ProgressTabView(RetrieveAPIView):
possible: (float) number of possible points
show_correctness: (str) a str representing whether to show the problem/practice scores based on due date
('always', 'never', 'past_due', values defined in
common/lib/xmodule/xmodule/modulestore/inheritance.py)
xmodule/modulestore/inheritance.py)
show_grades: (bool) a bool for whether to show grades based on the access the user has
url: (str or None) the absolute path url to the Subsection or None if the Subsection is no longer
accessible to the learner due to a hide_after_due course team setting

View File

@@ -57,7 +57,7 @@ class BaseTestXmodule(ModuleStoreTestCase):
USER_COUNT = 2
COURSE_DATA = {}
# Data from YAML common/lib/xmodule/xmodule/templates/NAME/default.yaml
# Data from YAML xmodule/templates/NAME/default.yaml
CATEGORY = "vertical"
DATA = ''
# METADATA must be overwritten for every instance that uses it. Otherwise,

View File

@@ -7,9 +7,6 @@ from unittest.mock import patch
from crum import set_current_request
from django.urls import reverse
from milestones.tests.utils import MilestonesTestCaseMixin
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory
from lms.djangoapps.courseware.entrance_exams import (
course_has_entrance_exam,
@@ -17,6 +14,9 @@ from lms.djangoapps.courseware.entrance_exams import (
user_can_skip_entrance_exam,
user_has_passed_entrance_exam
)
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
from lms.djangoapps.courseware.model_data import FieldDataCache
from lms.djangoapps.courseware.module_render import get_module, handle_xblock_callback, toc_for_course
from lms.djangoapps.courseware.tests.helpers import LoginEnrollmentTestCase

View File

@@ -4,13 +4,13 @@
These test data read from xml, not from mongo.
We have a ModuleStoreTestCase class defined in
common/lib/xmodule/xmodule/modulestore/tests/django_utils.py.
xmodule/modulestore/tests/django_utils.py.
You can search for usages of this in the cms and lms tests for examples.
You use this so that it will do things like point the modulestore
setting to mongo, flush the contentstore before and after, load the
templates, etc.
You can then use the CourseFactory and XModuleItemFactory as defined in
common/lib/xmodule/xmodule/modulestore/tests/factories.py to create the
xmodule/modulestore/tests/factories.py to create the
course, section, subsection, unit, etc.
"""

View File

@@ -25,7 +25,7 @@ Terminology
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Assignment-Type Grade | Aggregated grade for an assignment category, like Homework or Final. Grading can be configured to drop the lowest n assignments when calculating an assignment-type grade - otherwise all assignments count equally (i.e. there is no weighting of assignments within an assignment category). The course grading policy specifies the minimum number of assignments expected for each category in advance. |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Overall Percentage | Float value between 0 and 1 that marks the student's percentage for the course. This is calculated by weighing each assignment-type according to the rules specified in CourseDescriptor.grader. The grader is an `extensible interface <https://github.com/edx/edx-platform/blob/master/common/lib/xmodule/xmodule/graders.py#L109>`_, but the only rules currently used in practice are simple weight by assignment-type (e.g. 30% Final, 40% HW, etc.). The grader will return the actual percentage as a value between 0 and 1. The overall grade calculation process will then take this number and do a small bit of rounding up: round(actual_percent * 100 + 0.05) / 100. This is so that someone who has been scoring an 89.5% and has been seeing their average rounded to 90% on the progress page is not suddenly surprised at the end of the course. The denominator for this is based on the total possible at the end of the course, and does not adjust for unreleased assignments getting a perfect score on your first homework may only give you a 4% overall percentage. |
| Overall Percentage | Float value between 0 and 1 that marks the student's percentage for the course. This is calculated by weighing each assignment-type according to the rules specified in CourseDescriptor.grader. The grader is an `extensible interface <https://github.com/edx/edx-platform/blob/master/xmodule/graders.py#L109>`_, but the only rules currently used in practice are simple weight by assignment-type (e.g. 30% Final, 40% HW, etc.). The grader will return the actual percentage as a value between 0 and 1. The overall grade calculation process will then take this number and do a small bit of rounding up: round(actual_percent * 100 + 0.05) / 100. This is so that someone who has been scoring an 89.5% and has been seeing their average rounded to 90% on the progress page is not suddenly surprised at the end of the course. The denominator for this is based on the total possible at the end of the course, and does not adjust for unreleased assignments getting a perfect score on your first homework may only give you a 4% overall percentage. |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Overall Grade | Letter grade based on CourseDescriptor.grade_cutoffs and the Overall Percentage (so after rounding up). |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -55,7 +55,7 @@ The edX course is built as a hierarchical structure of `xBlocks <https://open.ed
- with max_score values, as computed from the xBlock content
- with weight values, as designated by the course author
* All "subsections" with a graded value of True or False, as designated by the course author
* The containing "course" with its grading policy, as designated by the course author
@@ -78,22 +78,22 @@ Overall Course Grade
* Grade range and Passing cutoff
- A learner's overall numerical grade in the course can range anywhere between 0% to 100%.
- Course teams set the `grade range <http://edx.readthedocs.io/projects/edx-partner-course-staff/en/latest/grading/grade_range.html>`_ and specify the Pass / Fail threshold (for example, a minimum of 50/100 is required to Pass).
- The Passing grade range can be further divided into letter grades, such as A, B, etc.
Assignment Weights
* Course teams set the `assignment types <http://edx.readthedocs.io/projects/edx-partner-course-staff/en/latest/grading/configure_assignment_type.html>`_ used in the course, along with their weights and the number of allowed drops (number of assignments with the lowest grades that can be discarded in the final grade computation).
Computation
* Although the platform provides support for custom `course graders <https://github.com/edx/edx-platform/blob/master/common/lib/xmodule/xmodule/graders.py#L115>`_, in practice, only the computation described here is used, as implemented by the `WeightedSubsectionsGrader <https://github.com/edx/edx-platform/blob/master/common/lib/xmodule/xmodule/graders.py#L164>`_.
* Although the platform provides support for custom `course graders <https://github.com/edx/edx-platform/blob/master/xmodule/graders.py#L115>`_, in practice, only the computation described here is used, as implemented by the `WeightedSubsectionsGrader <https://github.com/edx/edx-platform/blob/master/xmodule/graders.py#L164>`_.
* The overall grade is the weighted sum of all assignment types in the course, allowing for droppable assignments.
- Which subsections to drop are determined only after calculating each subsection's grade, as only the ones with the lowest grades are dropped.
.. image:: images/background_overall_grade.png
Assignment Grades
@@ -173,7 +173,7 @@ Today, we support the following features to `adjust grades <https://edx.readthed
- delete a student state for a problem
* In `Gradebook <https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-koa.master/student_progress/course_grades.html#adjust-grades-for-one-or-all-learners>`_:
* In `Gradebook <https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-koa.master/student_progress/course_grades.html#adjust-grades-for-one-or-all-learners>`_:
- override a subsection grade for a learner
- override subsection grades in bulk (master's track only)
@@ -191,4 +191,4 @@ It is relevant to note that ORA2 has its own immutable data model and thus, an i
* All scores and submissions are also immutable.
* So given a user's record, one can reliably determine the exact rubric it was evaluated against and its accurate score.
* So given a user's record, one can reliably determine the exact rubric it was evaluated against and its accurate score.

View File

@@ -8,11 +8,11 @@ from datetime import datetime
import ddt
from django.urls import reverse
from pytz import UTC
from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.tests.django_utils import TEST_DATA_MONGO_AMNESTY_MODULESTORE, SharedModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory
from common.djangoapps.student.tests.factories import GlobalStaffFactory
from common.djangoapps.student.tests.factories import StaffFactory
from common.djangoapps.student.tests.factories import UserFactory

View File

@@ -4,10 +4,10 @@ Base file for Grades tests
from crum import set_current_request
from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory
from common.djangoapps.student.models import CourseEnrollment
from common.djangoapps.student.tests.factories import UserFactory
from lms.djangoapps.course_blocks.api import get_course_blocks

View File

@@ -5,6 +5,8 @@ import itertools
import ddt
import pytz
from crum import set_current_request
from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory
from xmodule.graders import ProblemScore
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.tests.django_utils import (
@@ -13,8 +15,6 @@ from xmodule.modulestore.tests.django_utils import (
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
from xmodule.modulestore.tests.utils import TEST_DATA_DIR
from xmodule.modulestore.xml_importer import import_course_from_xml
from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory
from common.djangoapps.student.models import CourseEnrollment
from common.djangoapps.student.tests.factories import UserFactory
from lms.djangoapps.course_blocks.api import get_course_blocks

View File

@@ -9,6 +9,7 @@ from unittest.mock import patch
import ddt
import pytest
from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory
from ccx_keys.locator import CCXLocator
from crum import set_current_request
from django.conf import settings
@@ -16,10 +17,9 @@ from django.utils.translation import get_language
from django.utils.translation import override as override_language
from opaque_keys.edx.locator import CourseLocator
from submissions import api as sub_api
from xmodule.modulestore.tests.django_utils import TEST_DATA_MONGO_AMNESTY_MODULESTORE, SharedModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory
from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentAllowed, anonymous_id_for_user
from common.djangoapps.student.roles import CourseCcxCoachRole
from common.djangoapps.student.tests.factories import AdminFactory, UserFactory

View File

@@ -13,17 +13,17 @@ from unittest.mock import Mock, patch
from uuid import uuid4
import unicodecsv
from capa.tests.response_xml_factory import OptionResponseXMLFactory
from celery.states import FAILURE, SUCCESS
from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user
from django.urls import reverse
from opaque_keys.edx.keys import CourseKey
from opaque_keys.edx.locations import Location
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.tests.django_utils import TEST_DATA_MONGO_AMNESTY_MODULESTORE, ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
from capa.tests.response_xml_factory import OptionResponseXMLFactory
from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory
from lms.djangoapps.courseware.model_data import StudentModule
from lms.djangoapps.courseware.tests.tests import LoginEnrollmentTestCase

View File

@@ -14,10 +14,10 @@ from django.conf import settings
from django.test import override_settings
from django.urls import reverse, reverse_lazy
from edx_toggles.toggles.testutils import override_waffle_flag
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory as ModuleStoreCourseFactory
from lti_consumer.models import LtiConfiguration
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory as ModuleStoreCourseFactory
from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory
from lms.djangoapps.learner_dashboard.config.waffle import ENABLE_PROGRAM_TAB_VIEW
from lms.djangoapps.program_enrollments.rest_api.v1.tests.test_views import ProgramCacheMixin

View File

@@ -1 +1 @@
../../common/lib/xmodule/xmodule/js/
../../xmodule/js

View File

@@ -44,7 +44,8 @@ class EnrollmentTrackPartitionGroupsOutlineProcessor(OutlineProcessor):
self.user,
partition_dict_key='id'
)
self.user_group = self.enrollment_track_groups.get(ENROLLMENT_TRACK_PARTITION_ID)
# TODO: fix type annotation: https://github.com/openedx/tcril-engineering/issues/313
self.user_group = self.enrollment_track_groups.get(ENROLLMENT_TRACK_PARTITION_ID) # type: ignore
def _is_user_excluded_by_partition_group(self, user_partition_groups):
"""

View File

@@ -4,12 +4,13 @@ Tests for discussions tasks.
import ddt
import mock
from xmodule.modulestore.tests.django_utils import TEST_DATA_MONGO_AMNESTY_MODULESTORE, ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
from openedx_events.learning.data import DiscussionTopicContext
from openedx.core.djangoapps.discussions.tasks import update_discussions_settings_from_course
from xmodule.modulestore.tests.django_utils import TEST_DATA_MONGO_AMNESTY_MODULESTORE, ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
@ddt.ddt
@mock.patch('openedx.core.djangoapps.discussions.tasks.DiscussionsConfiguration', mock.Mock())

View File

@@ -90,7 +90,7 @@ class RuntimeShim:
def can_execute_unsafe_code(self):
"""
Determine if capa problems in this context/course are allowed to run
unsafe code. See common/lib/xmodule/xmodule/util/sandboxing.py
unsafe code. See xmodule/util/sandboxing.py
Seems only to be used by capa.
"""

View File

@@ -376,7 +376,7 @@ class XModuleAssetsWatcher(PatternMatchingEventHandler):
"""
Register files with observer
"""
observer.schedule(self, 'common/lib/xmodule/', recursive=True)
observer.schedule(self, 'xmodule/', recursive=True)
@debounce()
def on_any_event(self, event):
@@ -889,7 +889,7 @@ def watch_assets(options):
observer = Observer(timeout=wait)
SassWatcher().register(observer, sass_directories)
XModuleSassWatcher().register(observer, ['common/lib/xmodule/'])
XModuleSassWatcher().register(observer, ['xmodule/'])
XModuleAssetsWatcher().register(observer)
print("Starting asset watcher...")

View File

@@ -203,7 +203,7 @@ def _count_pylint_violations(report_file):
"""
num_violations_report = 0
# An example string:
# common/lib/xmodule/xmodule/tests/test_conditional.py:21: [C0111(missing-docstring), DummySystem] Missing docstring
# xmodule/xmodule/tests/test_conditional.py:21: [C0111(missing-docstring), DummySystem] Missing docstring
# More examples can be found in the unit tests for this method
pylint_pattern = re.compile(r".(\d+):\ \[(\D\d+.+\]).")

View File

@@ -189,8 +189,8 @@ class Env:
REPO_ROOT / 'cms/static/karma_cms_squire.conf.js',
REPO_ROOT / 'cms/static/karma_cms_webpack.conf.js',
REPO_ROOT / 'lms/static/karma_lms.conf.js',
REPO_ROOT / 'common/lib/xmodule/xmodule/js/karma_xmodule.conf.js',
REPO_ROOT / 'common/lib/xmodule/xmodule/js/karma_xmodule_webpack.conf.js',
REPO_ROOT / 'xmodule/js/karma_xmodule.conf.js',
REPO_ROOT / 'xmodule/js/karma_xmodule_webpack.conf.js',
REPO_ROOT / 'common/static/karma_common.conf.js',
REPO_ROOT / 'common/static/karma_common_requirejs.conf.js',
]

View File

@@ -69,6 +69,7 @@ django-user-tasks
django-waffle
django-webpack-loader # Used to wire webpack bundles into the django asset pipeline
djangorestframework
docopt
done-xblock
edx-ace
edx-api-doc-tools
@@ -85,6 +86,7 @@ edx-drf-extensions
edx-enterprise
edx-milestones
edx-name-affirmation
edx-opaque-keys
edx-organizations
edx-proctoring>=2.0.1
edx-proctoring-proctortrack==1.0.5 # Intentionally and permanently pinned to ensure code changes are reviewed
@@ -124,6 +126,7 @@ openedx-calc # Library supporting mathematical calculatio
openedx-events # Open edX Events from Hooks Extension Framework (OEP-50)
openedx-filters # Open edX Filters from Hooks Extension Framework (OEP-50)
ora2>=4.4.0
path
piexif # Exif image metadata manipulation, used in the profile_images app
Pillow # Image manipulation library; used for course assets, profile images, invoice PDFs, etc.
py2neo # Driver for converting Python modulestore structures to Neo4j's schema (for Coursegraph).
@@ -163,6 +166,7 @@ staff-graded-xblock # An XBlock that allows for off-site bulk sc
super-csv # Generic CSV processor
unicodecsv # Easier support for CSV files with unicode text
user-util # Functionality for retiring users (GDPR compliance)
webob
web-fragments # Provides the ability to render fragments of web pages
XBlock # Courseware component architecture
xblock-utils # Provides utilities used by the Discussion XBlock

View File

@@ -7,9 +7,7 @@
-e git+https://github.com/openedx/blockstore.git@1.2.1#egg=blockstore==1.2.1
# via -r requirements/edx/github.in
-e common/lib/capa
# via
# -r requirements/edx/local.in
# xmodule
# via -r requirements/edx/local.in
-e git+https://github.com/edx/codejail.git@3.1.3#egg=codejail==3.1.3
# via -r requirements/edx/github.in
-e git+https://github.com/edx/django-wiki.git@1.1.0#egg=django-wiki
@@ -26,8 +24,6 @@
# via -r requirements/edx/local.in
-e git+https://github.com/edx-solutions/xblock-google-drive.git@2d176468e33c0713c911b563f8f65f7cf232f5b6#egg=xblock-google-drive
# via -r requirements/edx/github.in
-e common/lib/xmodule
# via -r requirements/edx/local.in
acid-xblock==0.2.1
# via -r requirements/edx/base.in
aiohttp==3.8.1
@@ -409,7 +405,7 @@ djangorestframework==3.12.4
djangorestframework-xml==2.0.0
# via edx-enterprise
docopt==0.6.2
# via xmodule
# via -r requirements/edx/base.in
docutils==0.17.1
# via
# -c requirements/edx/../constraints.txt
@@ -492,6 +488,7 @@ edx-name-affirmation==2.3.4
# via -r requirements/edx/base.in
edx-opaque-keys[django]==2.3.0
# via
# -r requirements/edx/base.in
# -r requirements/edx/paver.txt
# edx-bulk-grades
# edx-ccx-keys
@@ -506,7 +503,6 @@ edx-opaque-keys[django]==2.3.0
# lti-consumer-xblock
# openedx-events
# ora2
# xmodule
edx-organizations==6.11.1
# via -r requirements/edx/base.in
edx-proctoring==4.10.2
@@ -662,6 +658,7 @@ lti-consumer-xblock==4.1.1
lxml==4.9.0
# via
# -r requirements/edx/base.in
# capa
# edxval
# lti-consumer-xblock
# olxcleaner
@@ -765,6 +762,7 @@ pansi==2020.7.3
# via py2neo
path==16.4.0
# via
# -r requirements/edx/base.in
# -r requirements/edx/paver.txt
# edx-i18n-tools
# path-py
@@ -773,7 +771,6 @@ path-py==12.5.0
# edx-enterprise
# ora2
# staff-graded-xblock
# xmodule
paver==1.3.4
# via -r requirements/edx/paver.txt
pbr==5.9.0
@@ -894,6 +891,7 @@ pytz==2022.1
# -r requirements/edx/base.in
# babel
# blockstore
# capa
# celery
# django
# django-ses
@@ -1113,8 +1111,8 @@ webencodings==0.5.1
# tinycss2
webob==1.8.7
# via
# -r requirements/edx/base.in
# xblock
# xmodule
wrapt==1.14.1
# via
# -r requirements/edx/paver.txt

View File

@@ -7,9 +7,7 @@
-e git+https://github.com/openedx/blockstore.git@1.2.1#egg=blockstore==1.2.1
# via -r requirements/edx/testing.txt
-e common/lib/capa
# via
# -r requirements/edx/testing.txt
# xmodule
# via -r requirements/edx/testing.txt
-e git+https://github.com/edx/codejail.git@3.1.3#egg=codejail==3.1.3
# via -r requirements/edx/testing.txt
-e git+https://github.com/edx/django-wiki.git@1.1.0#egg=django-wiki
@@ -26,8 +24,6 @@
# via -r requirements/edx/testing.txt
-e git+https://github.com/edx-solutions/xblock-google-drive.git@2d176468e33c0713c911b563f8f65f7cf232f5b6#egg=xblock-google-drive
# via -r requirements/edx/testing.txt
-e common/lib/xmodule
# via -r requirements/edx/testing.txt
acid-xblock==0.2.1
# via -r requirements/edx/testing.txt
aiohttp==3.8.1
@@ -512,9 +508,7 @@ djangorestframework-xml==2.0.0
# -r requirements/edx/testing.txt
# edx-enterprise
docopt==0.6.2
# via
# -r requirements/edx/testing.txt
# xmodule
# via -r requirements/edx/testing.txt
docutils==0.17.1
# via
# -c requirements/edx/../constraints.txt
@@ -624,7 +618,6 @@ edx-opaque-keys[django]==2.3.0
# lti-consumer-xblock
# openedx-events
# ora2
# xmodule
edx-organizations==6.11.1
# via -r requirements/edx/testing.txt
edx-proctoring==4.10.2
@@ -866,6 +859,7 @@ lti-consumer-xblock==4.1.1
lxml==4.9.0
# via
# -r requirements/edx/testing.txt
# capa
# edxval
# lti-consumer-xblock
# olxcleaner
@@ -1012,7 +1006,6 @@ path-py==12.5.0
# edx-enterprise
# ora2
# staff-graded-xblock
# xmodule
paver==1.3.4
# via -r requirements/edx/testing.txt
pbr==5.9.0
@@ -1246,6 +1239,7 @@ pytz==2022.1
# -r requirements/edx/testing.txt
# babel
# blockstore
# capa
# celery
# django
# django-ses
@@ -1593,7 +1587,6 @@ webob==1.8.7
# via
# -r requirements/edx/testing.txt
# xblock
# xmodule
wheel==0.37.1
# via
# -r requirements/edx/pip-tools.txt

View File

@@ -1,6 +1,5 @@
# Python libraries to install that are local to the edx-platform repo
-e .
-e common/lib/capa
-e common/lib/xmodule
-e openedx/core/lib/xblock_builtin/xblock_discussion

View File

@@ -7,9 +7,7 @@
-e git+https://github.com/openedx/blockstore.git@1.2.1#egg=blockstore==1.2.1
# via -r requirements/edx/base.txt
-e common/lib/capa
# via
# -r requirements/edx/base.txt
# xmodule
# via -r requirements/edx/base.txt
-e git+https://github.com/edx/codejail.git@3.1.3#egg=codejail==3.1.3
# via -r requirements/edx/base.txt
-e git+https://github.com/edx/django-wiki.git@1.1.0#egg=django-wiki
@@ -26,8 +24,6 @@
# via -r requirements/edx/base.txt
-e git+https://github.com/edx-solutions/xblock-google-drive.git@2d176468e33c0713c911b563f8f65f7cf232f5b6#egg=xblock-google-drive
# via -r requirements/edx/base.txt
-e common/lib/xmodule
# via -r requirements/edx/base.txt
acid-xblock==0.2.1
# via -r requirements/edx/base.txt
aiohttp==3.8.1
@@ -497,9 +493,7 @@ djangorestframework-xml==2.0.0
# -r requirements/edx/base.txt
# edx-enterprise
docopt==0.6.2
# via
# -r requirements/edx/base.txt
# xmodule
# via -r requirements/edx/base.txt
docutils==0.17.1
# via
# -c requirements/edx/../constraints.txt
@@ -608,7 +602,6 @@ edx-opaque-keys[django]==2.3.0
# lti-consumer-xblock
# openedx-events
# ora2
# xmodule
edx-organizations==6.11.1
# via -r requirements/edx/base.txt
edx-proctoring==4.10.2
@@ -828,6 +821,7 @@ lti-consumer-xblock==4.1.1
lxml==4.9.0
# via
# -r requirements/edx/base.txt
# capa
# edxval
# lti-consumer-xblock
# olxcleaner
@@ -962,7 +956,6 @@ path-py==12.5.0
# edx-enterprise
# ora2
# staff-graded-xblock
# xmodule
paver==1.3.4
# via -r requirements/edx/base.txt
pbr==5.9.0
@@ -1177,6 +1170,7 @@ pytz==2022.1
# -r requirements/edx/base.txt
# babel
# blockstore
# capa
# celery
# django
# django-ses
@@ -1478,7 +1472,6 @@ webob==1.8.7
# via
# -r requirements/edx/base.txt
# xblock
# xmodule
wrapt==1.14.1
# via
# -r requirements/edx/base.txt

View File

@@ -116,7 +116,7 @@ case "${TEST_SUITE}" in
mv reports/${TEST_SUITE}.coverage reports/.coverage.commonlib
;;
[1-2])
paver test_lib -l common/lib/xmodule --disable_capture --eval-attr="shard==$SHARD" ${PAVER_ARGS} 2> common-tests.${SHARD}.log
paver test_lib -l ./xmodule --disable_capture --eval-attr="shard==$SHARD" ${PAVER_ARGS} 2> common-tests.${SHARD}.log
mv reports/${TEST_SUITE}.coverage reports/.coverage.commonlib.${SHARD}
;;
3|"noshard")

View File

@@ -35,10 +35,14 @@ exclude+='|^common/test/data/?.*$'
# in each chlid directory).
# However, we do NOT want to exclude the source directories *within* the sub-projects.
# Example:
# * common/lib/xmodule -> EXCLUDE from check.
# * common/lib/xmodule/xmodule/modulestore -> INCLUDE in check.
# * common/lib/capa -> EXCLUDE from check.
# * common/lib/capa/capa/safe_exec -> INCLUDE in check.
exclude+='|^common/lib$'
exclude+='|^common/lib/(capa|xmodule)$'
exclude+='|^common/lib/capa$'
# xmodule data folder
exclude+='|^xmodule/tests/data/xml-course-root/capa$'
exclude+='|^xmodule/tests/data/xml-course-root/uploads/python_lib_zip$'
# Docs, scripts.
exclude+='|^docs/.*$'

View File

@@ -4,6 +4,46 @@ Setup script for the Open edX package.
from setuptools import setup
XBLOCKS = [
"about = xmodule.html_module:AboutBlock",
"book = xmodule.template_module:TranslateCustomTagBlock",
"annotatable = xmodule.annotatable_module:AnnotatableBlock",
"chapter = xmodule.seq_module:SectionBlock",
"conditional = xmodule.conditional_module:ConditionalBlock",
"course = xmodule.course_module:CourseBlock",
"course_info = xmodule.html_module:CourseInfoBlock",
"customtag = xmodule.template_module:CustomTagBlock",
"custom_tag_template = xmodule.template_module:CustomTagTemplateBlock",
"discuss = xmodule.template_module:TranslateCustomTagBlock",
"error = xmodule.error_module:ErrorBlock",
"hidden = xmodule.hidden_module:HiddenDescriptor",
"html = xmodule.html_module:HtmlBlock",
"image = xmodule.template_module:TranslateCustomTagBlock",
"library = xmodule.library_root_xblock:LibraryRoot",
"library_content = xmodule.library_content_module:LibraryContentBlock",
"library_sourced = xmodule.library_sourced_block:LibrarySourcedBlock",
"lti = xmodule.lti_module:LTIBlock",
"nonstaff_error = xmodule.error_module:NonStaffErrorBlock",
"poll_question = xmodule.poll_module:PollBlock",
"problem = xmodule.capa_module:ProblemBlock",
"randomize = xmodule.randomize_module:RandomizeBlock",
"sequential = xmodule.seq_module:SequenceBlock",
"slides = xmodule.template_module:TranslateCustomTagBlock",
"split_test = xmodule.split_test_module:SplitTestBlock",
"static_tab = xmodule.html_module:StaticTabBlock",
"unit = xmodule.unit_block:UnitBlock",
"vertical = xmodule.vertical_block:VerticalBlock",
"video = xmodule.video_module:VideoBlock",
"videoalpha = xmodule.video_module:VideoBlock",
"videodev = xmodule.template_module:TranslateCustomTagBlock",
"word_cloud = xmodule.word_cloud_module:WordCloudBlock",
"wrapper = xmodule.wrapper_module:WrapperBlock",
]
XBLOCKS_ASIDES = [
'tagging_aside = cms.lib.xblock.tagging:StructuredTagsAside',
]
setup(
name="Open edX",
version='0.13',
@@ -15,7 +55,11 @@ setup(
"cms",
"lms",
"openedx",
"xmodule",
],
package_data={
'xmodule': ['js/module/*'],
},
entry_points={
"openedx.course_tab": [
"ccx = lms.djangoapps.ccx.plugins:CcxCourseTab",
@@ -137,5 +181,10 @@ setup(
'enrollment_track = xmodule.partitions.enrollment_track_partition_generator:create_enrollment_track_partition', # lint-amnesty, pylint: disable=line-too-long
'content_type_gating = openedx.features.content_type_gating.partitions:create_content_gating_partition'
],
'xblock.v1': XBLOCKS,
'xblock_asides.v1': XBLOCKS_ASIDES,
'console_scripts': [
'xmodule_assets = xmodule.static_content:main',
],
}
)

View File

@@ -12,7 +12,7 @@ module.exports = {
path.resolve(__dirname, '../common/static/common/js/components/utils/view_utils.js'),
/descriptors\/js/,
/modules\/js/,
/common\/lib\/xmodule\/xmodule\/js\/src\//,
/xmodule\/js\/src\//,
path.resolve(__dirname, '../openedx/features/course_bookmarks/static/course_bookmarks/js/views/bookmark_button.js')
],

View File

@@ -15,7 +15,7 @@ var filesWithRequireJSBlocks = [
path.resolve(__dirname, 'common/static/common/js/components/utils/view_utils.js'),
/descriptors\/js/,
/modules\/js/,
/common\/lib\/xmodule\/xmodule\/js\/src\//
/xmodule\/js\/src\//
];
var defineHeader = /\(function ?\(((define|require|requirejs|\$)(, )?)+\) ?\{/;
@@ -72,7 +72,7 @@ module.exports = Merge.smart({
// Studio
Import: './cms/static/js/features/import/factories/import.js',
CourseOrLibraryListing: './cms/static/js/features_jsx/studio/CourseOrLibraryListing.jsx',
LibrarySourcedBlockPicker: './common/lib/xmodule/xmodule/assets/library_source_block/LibrarySourcedBlockPicker.jsx', // eslint-disable-line max-len
LibrarySourcedBlockPicker: './xmodule/assets/library_source_block/LibrarySourcedBlockPicker.jsx', // eslint-disable-line max-len
'js/factories/textbooks': './cms/static/js/factories/textbooks.js',
'js/factories/container': './cms/static/js/factories/container.js',
'js/factories/context_course': './cms/static/js/factories/context_course.js',
@@ -115,8 +115,8 @@ module.exports = Merge.smart({
// Common
ReactRenderer: './common/static/js/src/ReactRenderer.jsx',
XModuleShim: 'xmodule/js/src/xmodule.js',
VerticalStudentView: './common/lib/xmodule/xmodule/assets/vertical/public/js/vertical_student_view.js',
XModuleShim: './xmodule/js/src/xmodule.js',
VerticalStudentView: './xmodule/assets/vertical/public/js/vertical_student_view.js',
commons: 'babel-polyfill'
},
@@ -391,9 +391,9 @@ module.exports = Merge.smart({
'cms/static/cms/js',
'cms/templates/js',
'lms/static',
'common/lib/xmodule',
'common/lib/xmodule/xmodule/js/src',
'common/lib/xmodule/xmodule/assets/word_cloud/src/js',
path.resolve(__dirname),
'xmodule/js/src',
'xmodule/assets/word_cloud/src/js',
'common/static',
'common/static/coffee/src',
'common/static/common/js',
@@ -437,4 +437,3 @@ module.exports = Merge.smart({
}
}, {web: xmoduleJS}, workerConfig());

View File

@@ -9,7 +9,7 @@
// to the server.
import BookmarkButton from 'course_bookmarks/js/views/bookmark_button';
import {markBlocksCompletedOnViewIfNeeded} from '../../../../../../../../lms/static/completion/js/CompletionOnViewService.js';
import {markBlocksCompletedOnViewIfNeeded} from '../../../../../lms/static/completion/js/CompletionOnViewService.js';
var SEEN_COMPLETABLES = new Set();

View File

@@ -1072,7 +1072,7 @@ class CourseBlock(
self._grading_policy = {}
self.set_grading_policy(self.grading_policy)
if self.discussion_topics == {}:
if not self.discussion_topics:
self.discussion_topics = {_('General'): {'id': self.location.html_id()}}
try:

Some files were not shown because too many files have changed in this diff Show More