Merge pull request #30621 from openedx/revert-30394-umar/move-xmdule-folder-to-root
Revert "refactor: move xmodule folder to root" Today, it's a holiday in the US. We normally don't deploy huge PRs on holiday. So just reverting it.
This commit is contained in:
@@ -5,11 +5,11 @@ source =
|
||||
cms
|
||||
common/djangoapps
|
||||
common/lib/capa
|
||||
common/lib/xmodule
|
||||
lms
|
||||
openedx
|
||||
pavelib
|
||||
scripts
|
||||
xmodule
|
||||
|
||||
omit =
|
||||
cms/envs/*
|
||||
|
||||
@@ -10,7 +10,6 @@ source =
|
||||
openedx
|
||||
pavelib
|
||||
scripts
|
||||
xmodule
|
||||
|
||||
omit =
|
||||
cms/envs/*
|
||||
|
||||
@@ -20,7 +20,7 @@ test_root/staticfiles
|
||||
common/static/xmodule
|
||||
|
||||
|
||||
# Symlinks into xmodule/js
|
||||
# Symlinks into common/lib/xmodule/xmodule/js
|
||||
cms/static/xmodule_js
|
||||
lms/static/xmodule_js
|
||||
|
||||
@@ -50,6 +50,12 @@ 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
|
||||
@@ -57,12 +63,6 @@ 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
2
.github/CODEOWNERS
vendored
@@ -3,6 +3,7 @@
|
||||
# Core
|
||||
common/djangoapps/student/
|
||||
common/djangoapps/third_party_auth/
|
||||
common/lib/xmodule/xmodule/
|
||||
lms/djangoapps/course_api/blocks
|
||||
lms/djangoapps/courseware/
|
||||
lms/djangoapps/grades/
|
||||
@@ -14,7 +15,6 @@ 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
|
||||
|
||||
@@ -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/ xmodule/ -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
|
||||
|
||||
- name: get GHA unit test paths
|
||||
shell: bash
|
||||
|
||||
2
.github/workflows/pylint-checks.yml
vendored
2
.github/workflows/pylint-checks.yml
vendored
@@ -26,8 +26,6 @@ jobs:
|
||||
path: "common"
|
||||
- module-name: cms
|
||||
path: "cms"
|
||||
- module-name: xmodule
|
||||
path: "xmodule"
|
||||
|
||||
|
||||
name: pylint ${{ matrix.module-name }}
|
||||
|
||||
6
.github/workflows/unit-test-shards.json
vendored
6
.github/workflows/unit-test-shards.json
vendored
@@ -270,11 +270,5 @@
|
||||
"paths": [
|
||||
"common/djangoapps/"
|
||||
]
|
||||
},
|
||||
"xmodule-1": {
|
||||
"settings": "lms.envs.test",
|
||||
"paths": [
|
||||
"xmodule/"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
1
.github/workflows/unit-tests.yml
vendored
1
.github/workflows/unit-tests.yml
vendored
@@ -32,7 +32,6 @@ jobs:
|
||||
"common-1",
|
||||
"common-2",
|
||||
"common-3",
|
||||
"xmodule-1"
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
xmodule/css
|
||||
common/lib/xmodule/xmodule/css
|
||||
common/static/sass/bourbon
|
||||
common/static/xmodule/modules/css
|
||||
common/test/test-theme
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -1 +1 @@
|
||||
../../xmodule/js
|
||||
../../common/lib/xmodule/xmodule/js/
|
||||
69
common/lib/xmodule/setup.py
Normal file
69
common/lib/xmodule/setup.py
Normal file
@@ -0,0 +1,69 @@
|
||||
# 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',
|
||||
],
|
||||
},
|
||||
)
|
||||
45
common/lib/xmodule/test_files/formularesponse_with_hint.xml
Normal file
45
common/lib/xmodule/test_files/formularesponse_with_hint.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<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>
|
||||
|
||||
25
common/lib/xmodule/test_files/stringresponse_with_hint.xml
Normal file
25
common/lib/xmodule/test_files/stringresponse_with_hint.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<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>
|
||||
26
common/lib/xmodule/test_files/symbolicresponse.xml
Normal file
26
common/lib/xmodule/test_files/symbolicresponse.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<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 & 1 \\ 1 & 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>
|
||||
@@ -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();
|
||||
|
||||
@@ -1072,7 +1072,7 @@ class CourseBlock(
|
||||
self._grading_policy = {}
|
||||
self.set_grading_policy(self.grading_policy)
|
||||
|
||||
if not self.discussion_topics:
|
||||
if self.discussion_topics == {}:
|
||||
self.discussion_topics = {_('General'): {'id': self.location.html_id()}}
|
||||
|
||||
try:
|
||||
1
common/lib/xmodule/xmodule/js/RequireJS-namespace-undefine.js
Symbolic link
1
common/lib/xmodule/xmodule/js/RequireJS-namespace-undefine.js
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../../common/static/js/RequireJS-namespace-undefine.js
|
||||
1
common/lib/xmodule/xmodule/js/common_static
Symbolic link
1
common/lib/xmodule/xmodule/js/common_static
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../static/
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user