Code Monkey home page Code Monkey logo

problem-builder's Introduction

Problem Builder and Step Builder

Circle CI

This repository provides two XBlocks: Problem Builder and Step Builder.

Both blocks allow to create questions of various types. They can be used to simulate the workflow of real-life mentoring, within an edX course.

Supported features include:

  • Free-form answers (textarea) which can be shared accross different XBlock instances (for example, to allow a student to review and edit an answer they gave before).
  • Self-assessment MCQs (multiple choice questions), to display predetermined feedback to a student based on his choices in the self-assessment. Supports rating scales and arbitrary answers.
  • MRQs (Multiple Response Questions), a type of multiple choice question that allows the student to select more than one choice.
  • Answer recaps that display a read-only summary of a user's answer to a free-form question asked earlier in the course.
  • Progression tracking, to require that the student has completed a particular step before allowing them to complete the next step. Provides a link to the next step to the student.
  • Tables, which allow to present answers from the student to free-form answers in a concise way. Supports custom headers.
  • Dashboards, for displaying a summary of the student's answers to multiple choice questions. Details

The following screenshot shows an example of a Problem Builder block containing a free-form question, two MCQs and one MRQ:

Problem Builder Example

Installation

You can install Problem Builder from PyPI using this command:

pip install xblock-problem-builder

For full details, see "Open edX Installation", below.

Usage

See Usage Instructions

Workbench Installation and Settings

Prerequisites

  • Python 3.5+
  • Compiler/build tool chain
  • Python headers
  • MySQL development libraries and headers
  • Virtualenv

On Ubuntu 16.04, these can be installed by running

sudo apt-get install build-essential libpython3-dev libmysqlclient-dev virtualenv

Developer Installation

For developers, you can install this XBlock into an XBlock SDK workbench's virtualenv.

First, create a Python3 virtualenv:

~/xblock_development $ virtualenv -p python3 venv
~/xblock_development $ . venv/bin/activate

Now run the following commands from the problem builder repo root to install the problem builder dependencies:

(venv) ~/xblock_development/problem-builder $ pip install -r requirements.txt
(venv) ~/xblock_development/problem-builder $ pip install -r requirements-dev.txt

Switch to the created XBlock SDK repository, install its dependencies, and create its migrations:

(venv) ~/xblock_development/problem-builder $ cd ../venv/src/xblock-sdk
(venv) ~/xblock_development/venv/src/xblock-sdk $ make requirements

Create the following configuration file in workbench/settings_pb.py:

from settings import *

INSTALLED_APPS += ('problem_builder',)

Testing problem-builder in the workbench requires MySQL instead of the standard SQLite configuration it uses. You can quickly spin up an instance of MySQL with Docker using the following command:

# -d for detach mode
docker run --rm -it -p 3307:3306 -e MYSQL_ROOT_PASSWORD=rootpw -e MYSQL_DATABASE=db -d mysql:5.6

By default, the xblock-sdk uses the SQLite database but MySQL can be used by specifying an environment variable WORKBENCH_DATABASES in the following format.

export WORKBENCH_DATABASES='{"default": {"ENGINE": "django.db.backends.mysql", "NAME": "db", "USER": "root", "PASSWORD": "rootpw", "HOST": "127.0.0.1", "PORT": "3306"}}'

Ensure that the database name and credentials match the ones configured in the docker container.

Run this from the XBlock repository root:

./manage.py migrate --settings=workbench.settings_pb

Running the workbench

./manage.py runserver 8000 --settings=workbench.settings_pb

Access it at http://localhost:8000/.

Running tests

The integration tests require a recent Firefox and geckodriver (CI uses Firefox 70 and geckodriver 0.26). These can be installed locally for testing if required. For example on Linux:

mkdir external
cd external
wget https://archive.mozilla.org/pub/firefox/releases/70.0.1/linux-x86_64/en-US/firefox-70.0.1.tar.bz2
tar jxf firefox-70.0.1.tar.bz2
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
tar xzf geckodriver-v0.26.0-linux64.tar.gz
export PATH="$(pwd):$(pwd)/firefox/:$PATH"

# now can run integration tests using this firefox version
cd ..
make test.integration

From the problem-builder repository root, run the tests with the following command:

make test

See also the following for more scoped tests:

make quality
make test.unit
make test.integration

Debugging CI Failures

Sometimes it can be hard to figure out why some tests fail in the CI. When Circle CI browser based tests fail for unknown reasons, it can be helpful to run them with VNC enabled so that you can observe the browser (or even interact with it) while the tests are running.

To enable VNC on Circle CI, first re-run the failing test with SSH enabled: in the Circle CI UI, click the "Rerun" dropdown and select "Rerun Job with SSH". The job will be re-run with SSH enabled. You can find the IP/port combination that lets you log into the VM with your github SSH key under the "Enable SSH" step in the pipeline UI.

SSH into the VM, forwarding the VNC port:

ssh -p <port> <ip-address> -L 5900:localhost:5900

Install the required packages:

sudo apt-get install -yq xvfb x11vnc fluxbox

Start up xvfb and the VNC server:

rm -f /tmp/.X$(echo ${DISPLAY:-:0} | cut -b2-)-lock
Xvfb ${DISPLAY:-:0} -ac -listen tcp -screen 0 1440x900x24 &
/usr/bin/fluxbox -display ${DISPLAY:-:0} -screen 0 &
x11vnc -display ${DISPLAY:-:0} -forever -noxdamage -rfbport 5900 -quiet -passwd pass &

You should now be able to connect to the server via VNC. On macOS, you can use the built-in VNC viewer that you can launch by opening Finder and choosing the "Go -> Connect to Server.." from the menu. Type in localhost:5900 and enter pass when asked for the password.

You are all set up to run integration tests with screen sharing enabled. For some reason Firefox does not want to start in foreground mode when run as non-root, so you'll have to run the tests as root.

unset MOZ_HEADLESS
cd /home/circleci/project
source venv/bin/activate
make test

Working with Translations

For information about working with translations, see the Internationalization Support section of the Open edX XBlock Tutorial.

Prepare your virtualenv and ensure that the Transifex authentication file (~/.transifexrc) is properly set up.

Push new strings to Transifex:

$ make extract_translations
$ make push_translations

To get the latest translations from Transifex:

$ make pull_translations
$ make compile_translations

For testing purposes it's faster to avoid Transifex and work on dummy Esperanto translations:

$ make build_dummy_translations

The Transifex configuration is stored in .tx. For more information read transifex's documentation

If you want to add a new language:

  1. Add language to problem_builder/translations/config.yaml
  2. Make sure all tagged strings have been extracted and push to Transifex as described above.
  3. Go to Transifex and translate both of the Problem Builder and the Problem Builder JS resources.
  4. When you're done with the translations pull from Transifex as described above.

Adding custom scenarios to the workbench

Within the xblock-problem-builder repository, create the templates/xml and add XML scenarios to it - all files with the *.xml extension will be automatically loaded by the workbench:

$ mkdir templates/xml
$ cat > templates/xml/my_pb_scenario.xml

Restart the workbench to take the new scenarios into account.

Upgrading from Version 1

To upgrade a course from xblock-mentoring ("v1") to xblock-problem-builder ("v2"), run the following command on a system with edx-platform, xblock-mentoring, and xblock-problem-builder installed:

$ SERVICE_VARIANT=cms DJANGO_SETTINGS_MODULE="cms.envs.devstack" python -m problem_builder.v1.upgrade "Org/Course/Run"

Where "Org/Course/Run" is replaced with the ID of the course to upgrade.

Open edX Installation

Problem Builder releases are tagged with a version number, e.g. v2.6.0, v2.6.5. We recommend installing the most recently tagged version, with the exception of the following compatibility issues:

  • edx-platform version open-release/ironwood.2 and earlier must use versions < 4.0.0. See PR 262 for details.
  • edx-platform version open-release/eucalyptus.2 and earlier must use ≤v2.6.0. See PR 128 for details.
  • edx-platform version named-release/dogwood.3 and earlier must use v2.0.0.

The edx-platform master branch will generally always be compatible with the most recent Problem Builder tag. See the EDXAPP_PRIVATE_REQUIREMENTS setting for the version currently installed on edx.org.

To install new versions of Problem Builder (v3.1.3+), use pip install xblock-problem-builder or specify a version using e.g. pip install xblock-problem-builder==3.1.3. To do this on Open edX could look like:

$ sudo -Hu edxapp bash
edxapp $ cd && . edxapp_env  && . ./venvs/edxapp/bin/activate && cd edx-platform/
edxapp $ pip install xblock-problem-builder
edxapp $ ./manage.py lms migrate --settings=aws  # or openstack, as appropriate

Then, restart the edxapp services:

$ sudo /edx/bin/supervisorctl restart edxapp:
$ sudo /edx/bin/supervisorctl restart edxapp_workers:

To install old verions of Problem Builder (< v3.1.3) on an Open edX installation, choose the tag you wish to install, follow the above instructions but instead of the pip install xblock-problem-builder command, use:

TAG='v2.6.5' pip install "git+https://github.com/open-craft/problem-builder.git@$TAG#egg=xblock-problem-builder==$TAG"

Note that Problem Builder requires xblock-utils. If you are installing it into a virtualenv used by edx-platform, xblock-utils should already be installed. But if you are installing it into another virtualenv, you may need to first install xblock-utils manually (recent versions of it are not available on PyPI so will not be automatically installed).

See Usage Instructions for how to enable in Studio.

Publishing to PyPI

Whenever we tag a new version, e.g. v3.1.3 and push it to GitHub, CircleCI will build it and deploy it to PyPI automatically. For details on how this works, see this pull request.

License

This XBlock is available under the GNU Affero General Public License (AGPLv3).

problem-builder's People

Contributors

aboudreault avatar agrendalath avatar antoviaque avatar bradenmacdonald avatar dragonfi avatar e-kolpakov avatar filosottile avatar giovannicimolin avatar itsjeyd avatar jbzdak avatar jcdyer avatar john2x avatar kelketek avatar lgp171188 avatar moeez96 avatar msaqib52 avatar mtyaka avatar mudassir-hafeez avatar musmanmalik avatar nasirhjafri avatar ny0m avatar omarithawi avatar omarkhan avatar opencraft-requirements-bot avatar pomegranited avatar smarnach avatar umarmughal824 avatar wasifarbisoft avatar xirdneh avatar xitij2000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

problem-builder's Issues

Remove copyright footer from all problems

Hey all,

We enjoy the XBlock and have started playing around with it on our instances.
One deal-breaker for our use though is the inclusion of the copyright footer on all components:

Copyright © 2013–2015 OpenCraft, Harvard, edX, McKinsey, and The People's Science, released under the APGLv3 license

Is this a strict product requirement on your end or would you be open to removing this text?

For the time being, we're able to selectively hide it with a bit of CSS,
but wondered if it can be removed outright;
we'd prefer not to fork the repo.

.xblock .mentoring .copyright {
  display: none;
}

Let us know what you think and/or if there's a reason for including this.

Some events have duplicate structure?

It's quite strange, but some events emitted by problem-builder into the tracking log seem to have a duplicate nested in the event.

A normal problem-builder event looks like this:

{
  "username": "some-user",
  "event_type": "xblock.problem_builder.submitted",
  "ip": "(some ip)",
  "agent": "(some agent)",
  "host": "courses.ibiology.org",
  "referer": "https://courses.ibiology.org/courses/course-v1:iBiology+iBio1+2017/courseware/1a43b8b407c9443fb6637e1073c44bc5/eae5ab2493d84ff7af681a97483bbc4b/8",
  "accept_language": "en;q=1.0, en;q=0.8",
  "event": {
    "submitted_answer": {
      "Q21": [
        {
          "name": "input",
          "value": ""
        }
      ]
    },
    "num_attempts": 0,
    "grade": 1
  },
  "event_source": "server",
  "context": {
    "course_user_tags": {},
    "user_id": 123,
    "org_id": "iBiology",
    "asides": {},
    "module": {
      "usage_key": "block-v1:iBiology+iBio1+2017+type@problem-builder+block@50dbcf1cd4634e0e8db4eb28b84ba568",
      "display_name": ""
    },
    "course_id": "course-v1:iBiology+iBio1+2017",
    "path": "/courses/course-v1:iBiology+iBio1+2017/xblock/block-v1:iBiology+iBio1+2017+type@problem-builder+block@50dbcf1cd4634e0e8db4eb28b84ba568/handler/submit"
  },
  "time": "2017-08-08T20:27:53.928988+00:00",
  "page": "x_module"
}

But sometimes I see events in tracking.log like this that have a duplicate "event" key embedded in the entry

{
    "username": "some-user",
    "event_source": "server",
    "name": "xblock.problem_builder.submitted",
    "accept_language": "en-US,en;q=0.8",
    "time": "2017-08-14T19:25:32.890283+00:00",
    "agent": "(some agent)",
    "page": null,
    "host": "courses.ibiology.org",
    "session": "some session id",
    "referer": "https://courses.ibiology.org/courses/course-v1:iBiology+iBio1+2017/courseware/b4abdf5e341e4615b928f2ca3522eebc/ff454b89c93d45bca3738f9d7700e7ca/?child=first",
    "context": {
        "course_user_tags": {},
        "user_id": 123,
        "org_id": "iBiology",
        "asides": {},
        "module": {
            "usage_key": "block-v1:iBiology+iBio1+2017+type@problem-builder+block@f6be675502724bcfa6a40a37e74d79a8",
            "display_name": ""
        },
        "course_id": "course-v1:iBiology+iBio1+2017",
        "path": "/courses/course-v1:iBiology+iBio1+2017/xblock/block-v1:iBiology+iBio1+2017+type@problem-builder+block@f6be675502724bcfa6a40a37e74d79a8/handler/submit",
        "email": "[email protected]"
    },
    "ip": "(some ip)",
    "event": {
        "username": "some-user",
        "event_type": "xblock.problem_builder.submitted",
        "ip": "(some ip)",
        "agent": "(some agent)",
        "host": "courses.ibiology.org",
        "referer": "https://courses.ibiology.org/courses/course-v1:iBiology+iBio1+2017/courseware/b4abdf5e341e4615b928f2ca3522eebc/ff454b89c93d45bca3738f9d7700e7ca/?child=first",
        "accept_language": "en;q=1.0, en;q=0.8",
        "event": {
            "submitted_answer": {
                "Q27": [
                    {
                        "name": "input",
                        "value": "Here's a problem builder entry "
                    }
                ]
            },
            "num_attempts": 0,
            "grade": 1
        },
        "event_source": "server",
        "email": "[email protected]",
        "context": {
            "course_user_tags": {},
            "user_id": 123,
            "org_id": "iBiology",
            "asides": {},
            "module": {
                "usage_key": "block-v1:iBiology+iBio1+2017+type@problem-builder+block@f6be675502724bcfa6a40a37e74d79a8",
                "display_name": ""
            },
            "course_id": "course-v1:iBiology+iBio1+2017",
            "path": "/courses/course-v1:iBiology+iBio1+2017/xblock/block-v1:iBiology+iBio1+2017+type@problem-builder+block@f6be675502724bcfa6a40a37e74d79a8/handler/submit"
        },
        "time": "2017-08-14T19:25:32.890258+00:00",
        "page": "x_module"
    },
    "event_type": "xblock.problem_builder.submitted"
}


Just curious if others have seen similar issue?

Interesting that 'page':null at the top level but 'page':'x_module' in the embedded 'event'...

UI interaction using Chrome with Grammarly extension

Using the 'Long Answer' type of problem with the Grammarly extension activated in Chrome causes the following interaction with the text box.

problem_builder_bug

The following element is inserted in the page and it seems to be the cause of the bug. Is there something that can be fixed to get the text box to play nicely with Grammarly?

<grammarly-extension data-grammarly-shadow-root="true" style="position: absolute; top: -1px; left: -1px; pointer-events: none;" class="cGcvT"></grammarly-extension>

Disabling submit button breaks interactivity on standard components

Encountered on two separate instances, one on Dogwood, one on Eucalyptus, but Problem Builder version unknown. It may be the same on both.
Disabling the submit broken on a problem builder breaks standard components, like discussions and problems.

Steps to replicate:

  • Insert a problem builder component, with anything you like inside it (the use-case we encountered this with was with a long answer recap, but the same deal happens regardless of the content)
  • In the settings for the problem builder, set show submit button to false
  • Insert a discussion
  • Insert any standard problem component (multiple choice, for example)
  • Publish and view live
    You should now see nothing happening when you click Show Discussion or New Post, and the problem component will disappear entirely

Can't add "Score Summary" to problem

Hello @mtyaka @jbzdak,

I've been trying out the problem-build/step-builder on my instance of Open edX (tip of master as of July 18th, 2016).

I can't seem to add the "Score Summary" to the end of an assessment, at the Review Step. If I click the button, it just greys out, but nothing happens. I don't see any Network calls in my Chrome Developer tools on the button click. I also don't see any JS errors in the console.

Here's a screen grab:

screen shot 2016-07-21 at 4 45 42 pm

I'm just using Problem Builder for the first time, so perhaps I'm doing something wrong. If I get a chance, I'll try hooking up a JS debugger and stepping through the code.

Thanks,

Chris

Problem builder block issuing "edx.grades.problem.submitted" event?

Seems like two edx.grades.problem.submitted events are getting submitted when a user enters something into a long form pb block.

Here's an example event, (with student info removed)

{
  "username": "(some username)",
  "event_source": "server",
  "name": "edx.grades.problem.submitted",
  "accept_language": "en-us",
  "time": "2018-03-06T17:05:32.903579+00:00",
  "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.7",
  "page": None,
  "host": "courses.ibiology.org",
  "session": "(some session)",
  "referer": "https://courses.ibiology.org/courses/course-v1:iBiology+iBio1+2018/courseware/310c0318e5354bf0b76579a9044de563/33686e1e5bb94b3f8c83c0ed41d2790e/?child=first",
  "context": {
    "course_user_tags": {},
    "user_id": (some id),
    "org_id": "iBiology",
    "module": {
      "usage_key": "block-v1:iBiology+iBio1+2018+type@problem-builder+block@2daaee49e35542eb9adb90771256687b",
      "display_name": ""
    },
    "course_id": "course-v1:iBiology+iBio1+2018",
    "path": "/courses/course-v1:iBiology+iBio1+2018/xblock/block-v1:iBiology+iBio1+2018+type@problem-builder+block@2daaee49e35542eb9adb90771256687b/handler/submit"
  },
  "ip": "(some ip)",
  "event": {
    "user_id": "(some user id)",
    "weighted_earned": 1.0,
    "event_transaction_type": "edx.grades.problem.submitted",
    "event_transaction_id": "f07ff554-d287-4b29-b255-b67442e1db10",
    "course_id": "course-v1:iBiology+iBio1+2018",
    "weighted_possible": 1.0,
    "problem_id": "block-v1:iBiology+iBio1+2018+type@problem-builder+block@2daaee49e35542eb9adb90771256687b"
  },
  "event_type": "edx.grades.problem.submitted"
}

Any idea why two events would get generated?

(Edit: Updated this issue and closed after discussing with @bradenmacdonald on slack)

ID of answer in event?

Currently problem-builder sends an event through the Open edX event structure when a long form answer is submitted, which is great.

That event has an event_type xblock.problem_builder.submitted and includes an event property that looks like this:

{
    ... some basic event properties ...
 
   "event": {
        "submitted_answer": {
            "example-long-form-question": [
                {
                    "name": "input",
                    "value": "Some kind of input by student."
                }
            ]
        },
        "num_attempts": 0,
        "grade": 1.0
    },
  
   ... some context info...
}

Is there a way to get the event to include the id of the answer as stored in the id column of the problem_builder_answer table in MySQL?

I have a feeling a small adjustment could be made somewhere around line 704 in mentoring.py to capture the id of the saved submission, but it's not entirely clear to me.

Thanks for any thoughts!

Use Dashboard for a series of Long Answers

Is there a way to utilize the pb-dashboard plugin to just show a simple visualization of which of a series of Long Answers has been submitted?

e.g. the user has five Long Answers to submit, and can refer to a simple graphic to see how many steps (e.g. answers) they've gone so far.

student_id in problem_builder_answer table?

This could be really obvious, if so apologies.

The values stored in my problem_builder_answer table for the student_id column are varchar(32) look like this: 5e84393e0e8ad145ea9d9c94d33bb45b.

But they should be int(11) to match the id table on auth_users, shouldn't they?

When I try to do a join like

sql_cmd = "select pba.id, pba.name, pba.student_input, pba.created_on, pba.modified_on " \
                  "from problem_builder_answer pba, auth_user u " \
                  "where pba.student_id = u.id " \
                  "and u.id='{0}' " \
                  "and pba.course_key='{1}'".format(user_id, course_key)

I'm not getting the right data.

Translation is missing in installed Package

Hi,

I have installed the package to edx-platform ( devstack ) as well as xblock-sdk, and found translation folder is missing inside installed package hence unable to locate config.yml at runtime.

Can someone help on this?
lms-logs :
image

In case of Xblock-sdk :

image

Django 2.2 Support

edx-platform is being upgraded to Django 2.2 and we need to ensure this package will be compatible.

edX contact is @jmbowman

Student can change answer in Problem-Builder after Subsection due date passed

Apologies if this isn't a bug and I'm somehow missing a configuration step or otherwise.

I have a due date set in a subsection, which has passed:

image

In this subsection I have a problem-builder xblock (configured as long answer). Even though the due date has passed, I can still log in as my 'student' user and change my answer.

Shouldn't problem-builder disallow changes after the due date has passed?

Thanks for your help!

ImportError: cannot import name NestedXBlockSpec

I don't have a whole lot of time to look into this error at the moment, but I wanted to create this Issue before I forgot.

It seems like there was some sort of conflict between enabled XBlocks for a particular course. We had the following in the Advanced Module List:

[
    "library_content",
    "step-builder",
    "problem-builder",
    "table",
    "pdf",
    "edx_sga",
    "poll",
    "survey"
]

After trying to create a new Unit, I was redirected to Studio's 500 error page.

From /edx/var/log/supervisor/lms-stderr.log:

2016-02-02 15:05:20,951 ERROR 18990 [root] exceptions.py:9 - Uncaught exception from <class 'django.core.handlers.wsgi.WSGIHandler'>
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 109, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/http.py", line 41, in inner
    return func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 20, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/component.py", line 169, in container_handler
    component_templates = get_component_templates(course)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/component.py", line 335, in get_component_templates
    component_display_name = xblock_type_display_name(category, default_display_name=category)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/helpers.py", line 157, in xblock_type_display_name
    component_class = XBlock.load_class(category, select=settings.XBLOCK_SELECT_FUNCTION)
  File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/plugin.py", line 118, in load_class
    PLUGIN_CACHE[key] = cls._load_class_entry_point(selected_entry_point)
  File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/plugin.py", line 73, in _load_class_entry_point
    class_ = entry_point.load()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/edx/app/edxapp/xblocks/problem-builder/problem_builder/mentoring.py", line 41, in <module>
    from .step_review import ReviewStepBlock
  File "/edx/app/edxapp/xblocks/problem-builder/problem_builder/step_review.py", line 27, in <module>
    from xblockutils.studio_editable import (
ImportError: cannot import name NestedXBlockSpec
2016-02-02 15:05:20,952 ERROR 18990 [django.request] base.py:213 - Internal Server Error: /container/block-v1:Appsembler+Demo1001+Fall2015+type@vertical+block@0e5700cd5bb742b6a7e90a6c6e587bb6
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 109, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/http.py", line 41, in inner
    return func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 20, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/component.py", line 169, in container_handler
    component_templates = get_component_templates(course)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/component.py", line 335, in get_component_templates
    component_display_name = xblock_type_display_name(category, default_display_name=category)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/helpers.py", line 157, in xblock_type_display_name
    component_class = XBlock.load_class(category, select=settings.XBLOCK_SELECT_FUNCTION)
  File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/plugin.py", line 118, in load_class
    PLUGIN_CACHE[key] = cls._load_class_entry_point(selected_entry_point)
  File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/plugin.py", line 73, in _load_class_entry_point
    class_ = entry_point.load()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/edx/app/edxapp/xblocks/problem-builder/problem_builder/mentoring.py", line 41, in <module>
    from .step_review import ReviewStepBlock
  File "/edx/app/edxapp/xblocks/problem-builder/problem_builder/step_review.py", line 27, in <module>
    from xblockutils.studio_editable import (
ImportError: cannot import name NestedXBlockSpec

My workaround for this error was to remove problem-builder from the Advanced Module List. I've never encountered a conflict like this with XBlocks.

If it makes any difference, we're currently running a forked version of named-release/cypress.

Do you guys have any ideas?

Student submissions even with hidden 'submit' button?

We are now in the habit of hiding the submit button for all problem-builders in our courses after the end-date has passed (since PBs don't take account of course end date).

However, even after doing so, a few students were still able to submit answers in the days after the end of the course.

Granted maybe an enterprising student could figure out how to constuct a manual POST query, but I doubt that in this case. I think somehow students were just able to submit answers. Any thoughts on how this could happen?

(I'm creating a git issue b/c it pertains to the larger issue that we have no other way of 'turning off' problem builders than setting the 'show submit' to False.)

Thanks for any thoughts!

On pip installing in devstack platform is failing to start

On pip installing xblock-problem-builder in lms and studio container,

on checking logs
edx.devstack-juniper.master.lms | from common.djangoapps.student.models import AnonymousUserId edx.devstack-juniper.master.lms | File "/edx/app/edxapp/edx-platform/common/djangoapps/student/models.py", line 130, in <module> edx.devstack-juniper.master.lms | class AnonymousUserId(models.Model): edx.devstack-juniper.master.lms | File "/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/django/db/models/base.py", line 111, in __new__ edx.devstack-juniper.master.lms | "INSTALLED_APPS." % (module, name) edx.devstack-juniper.master.lms | RuntimeError: Model class common.djangoapps.student.models.AnonymousUserId doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

Duplicate question id after copying block

Hi!
I have Problem Builder block with Long Answer component.
When I make a copy of it, the new block has same id (Question ID)
the 1st block
Screenshot from 2020-05-06 14-36-40
and copy of it
Screenshot from 2020-05-06 14-42-15

Shouldn't new unique id generated after copy?

Thanks for any help!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.