ANNOUNCEMENT: Staff Graded Assignment (SGA) XBlock

1,821 views
Skip to first unread message

Peter Pinch

unread,
Jun 20, 2014, 10:17:39 AM6/20/14
to edx-...@googlegroups.com
MIT's Office of Digital learning has released an XBlock for a Staff Graded Assignment (SGA). When placed in a course, this XBlock allows students to upload documents which can be viewed and graded by course staff. While this approach does not scale well for MOOC-sized courses, we have found it useful for small courses where there time to review and grade every student submission. 


Installation instructions and (minimal) course author instructions are available in the readme. 


We are planning some enhancements to SGA this summer:
- refactoring to use the new submissions app
- roles support and workflow, so instructors can approve staff grades

Special thanks to Jazkarta and Chris Rossi who did the coding for MIT.  

If you have any questions or suggestions, please let us know on this list. 

- Peter Pinch

Peter Pinch |  Production Manager, Office of Digital Learning
Massachusetts Institute of Technology
11 Cambridge Center  |  Cambridge MA 02142
pdp...@mit.edu | T 617-253-6256C 617-652-0183



Sarina Canelake

unread,
Jun 20, 2014, 10:28:31 AM6/20/14
to edx-code
This is awesome!! 

Miki Goyal

unread,
Jun 20, 2014, 12:21:48 PM6/20/14
to edx-...@googlegroups.com
Peter,

Nice work! Looking forward to see it land. Where are the documents stored? Can I ask you to Sync up with Steve Sanchez on the ORA team who is working on something related?

Thanks,
Miki

Peter Pinch

unread,
Jun 20, 2014, 3:58:15 PM6/20/14
to edx-...@googlegroups.com
On Jun 20, 2014, at 12:21 PM, Miki Goyal <mi...@edx.org> wrote:
Where are the documents stored?

It's a django app, so it will store them wherever your install of Open edX is configured to store them. We're using S3 on campus. 

Can I ask you to Sync up with Steve Sanchez on the ORA team who is working on something related?

Absolutely. We had some internal discussion about how this function overlapped with ORA at the time we started development, but we were in a rush and it was too early in the ORA2 development cycle.

Trinh Nguyen

unread,
Jun 20, 2014, 10:18:49 PM6/20/14
to edx-...@googlegroups.com
Awesome! It's pretty helpful for my school!

Thanks!

Trinh Nguyen

unread,
Jun 23, 2014, 4:20:03 AM6/23/14
to edx-...@googlegroups.com
Hi Peter,

I'm trying to use the edx-sga but have no luck. What I have done so far are:

+ Installed edx-sga (install from source) and added it to the /edx/app/edxapp/edx-platform/cms/envs/common.py
+ Added edx_sga to advanced_modules in Settings

But I could not find the Staff Grade Assignment:




Am I missing something?


Thanks,

Trinh

Sarina Canelake

unread,
Jun 23, 2014, 8:47:32 AM6/23/14
to edx-code
Yes - the "Advanced" section you are looking for will not be under "problem", it will be its own green button:



See the "Advanced" green button there? That's what you'll want to click.

Peter Pinch

unread,
Jun 23, 2014, 9:21:58 AM6/23/14
to edx-...@googlegroups.com
Thanks Sarina. I added your screenshot to the README.

- Peter




Peter Pinch |  Production Manager, Office of Digital Learning
Massachusetts Institute of Technology
11 Cambridge Center  |  Cambridge MA 02142
pdp...@mit.edu | T 617-253-6256C 617-652-0183



On Jun 23, 2014, at 8:47 AM, Sarina Canelake <sar...@edx.org> wrote:

Yes - the "Advanced" section you are looking for will not be under "problem", it will be its own green button:

<Screen Shot 2014-06-23 at 8.46.36 AM.png>

See the "Advanced" green button there? That's what you'll want to click.
On Mon, Jun 23, 2014 at 4:19 AM, Trinh Nguyen <dangt...@gmail.com> wrote:
Hi Peter,

I'm trying to use the edx-sga but have no luck. What I have done so far are:

+ Installed edx-sga (install from source) and added it to the /edx/app/edxapp/edx-platform/cms/envs/common.py
+ Added edx_sga to advanced_modules in Settings

But I could not find the Staff Grade Assignment:

<edx_sga.png>

Trinh Nguyen

unread,
Jun 23, 2014, 10:24:36 AM6/23/14
to edx-...@googlegroups.com
Hi Sarina,

I could not see that Advanced button either:




BTW, I added edx_sga to both these files:

+ /edx/app/edxapp/edx-platform/cms/envs/common.py
+ /edx/app/edxapp/edx-platform/lms/envs/common.py


And extended the "advanced_modules" key as following:



Is there anything wrong?


Carson Gee

unread,
Jun 23, 2014, 10:30:05 AM6/23/14
to edx-...@googlegroups.com
Have you added the feature flag to enable the advanced problem types? Per https://github.com/edx/edx-platform/blob/master/docs/en_us/developers/source/xblocks.rst#deploying-your-xblock You may need to add:
'ALLOW_ALL_ADVANCED_COMPONENTS': True,
To your FEATURE dictionary.

Carson

Trinh Nguyen

unread,
Jun 23, 2014, 10:33:31 AM6/23/14
to edx-...@googlegroups.com
Oh, totally forgot that part. Thank Carson a lot!

Ned Batchelder

unread,
Jun 23, 2014, 10:34:02 AM6/23/14
to edx-...@googlegroups.com
Peter (and Carson, etc): Thanks so much for adding to the Open edX ecosystem.  There's a little-known page on the wiki (I just re-found it!) listing XBlocks: https://github.com/edx/edx-platform/wiki/List-of-XBlocks     This block is already there (thanks Paul!), but we should remember to keep this up-to-date.

It would be great to add a description to the wiki page so we can start to build an interesting catalog there.

--Ned.

Trinh Nguyen

unread,
Jun 23, 2014, 10:40:41 AM6/23/14
to edx-...@googlegroups.com
Awesome! I got it to work! Thanks again!

Trinh Nguyen

unread,
Jun 23, 2014, 11:02:48 AM6/23/14
to edx-...@googlegroups.com
FYI, I got this error when trying to create a Staff Graded Assignment:

TemplateDoesNotExist: staff_graded_assignment/show.html

That is because I installed edx_sga using the setup.py file (pip could not find edx_sga). It turned out that the templates folder was not copied, so to solve this issue I have to copy it to /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/edx_sga-0.1-py2.7.egg/edx_sga manually.

And everything is fine now!

Carson Gee

unread,
Jun 23, 2014, 2:04:44 PM6/23/14
to edx-...@googlegroups.com

Yeah, I think we had to install it with the -e flag to get around that (I added an issue to the repo to fix setup.py so that won’t be needed in the future). So the command is

pip install -e git+https://github.com/mitodl/edx-sga#egg=edx-sga

I also added it to PyPi, but again until the setup.py file is fixed up, that won’t work right as you pointed out.

Tinko Minko

unread,
Jun 25, 2014, 6:09:29 PM6/25/14
to edx-...@googlegroups.com
Hi Peter,

I was trying to install edx-sga. I installed it to "/edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages". I also added "edx_sga" to  /edx/app/edxapp/edx-platform/cms/envs/common.py and /edx/app/edxapp/edx-platform/lms/envs/common.py, and set ALLOW_ALL_ADVANCED_COMPONENTS to True

But in Studio when I try to add "Staff Graded Assignment", I get an error. The screenshot is attached.

edx_sga-error.png

Tinko Minko

unread,
Jun 25, 2014, 7:22:40 PM6/25/14
to edx-...@googlegroups.com
cmd error log is attached.
error_log.txt

Trinh Nguyen

unread,
Jun 25, 2014, 7:45:22 PM6/25/14
to edx-...@googlegroups.com
How about the "advanced_modules"?



Tinko Minko

unread,
Jun 26, 2014, 5:59:52 AM6/26/14
to edx-...@googlegroups.com
I also did that, but still get the same error when I try to create SGA.  Trinh, can you tell me how did you install edx-sga (the command that you used and installation location)?

Thanks.

Carson Gee

unread,
Jun 26, 2014, 11:54:17 AM6/26/14
to edx-...@googlegroups.com

Ah, this error is related to the opaque-keys change and we haven’t caught up yet. You will need to use release tag release-2014-05-20 or earlier for this xblock to work until we can get it updated. The command for installing on an ansible built system is

sudo -u edxapp /edx/bin/pip.edxapp install -e git+[https://github.com/mitodl/edx-sga#egg=edx-sga](https://github.com/mitodl/edx-sga#egg=edx-sga)

However I would recommend making a change in the edx-platform repo adding -e git+[https://github.com/mitodl/edx-sga#egg=edx-sga](https://github.com/mitodl/edx-sga#egg=edx-sga) to requirements/edx/github.txt so that it gets picked up by the configuration and paver commands.

Carson Gee

unread,
Jun 26, 2014, 12:05:48 PM6/26/14
to edx-...@googlegroups.com
Sorry about the weird formatting there...should be:
sudo -u edxapp /edx/bin/pip.edxapp install -e git+https://github.com/mitodl/edx-sga#egg=edx-sga

and
-e git+https://github.com/mitodl/edx-sga#egg=edx-sga

Anas El Hadj Amor

unread,
Jun 27, 2014, 6:33:39 AM6/27/14
to edx-...@googlegroups.com
Hi guys. 

I tried to install SGA using only the command Carson suggested. The installation seemed to work. However, whenever I try to use SGA (when I create a unit in a course) I get the same error as Tinko, the exact same thing. 

Anyone has any ideas ?

Regards, 

Anas

Prabhanshu Pandit

unread,
Jun 27, 2014, 7:42:01 AM6/27/14
to edx-...@googlegroups.com
Thank you very much for this SGA xblock, just want to know is there any limitation on filetypes which is going to be uploaded (I mean what are the filestype supported for the file uplaod)

Carson Gee

unread,
Jun 27, 2014, 9:34:41 AM6/27/14
to edx-...@googlegroups.com
There aren't any file type limitations, but it would be a nice feature to be able to configure it in studio per problem.

Carson Gee

unread,
Jul 2, 2014, 1:54:42 PM7/2/14
to edx-...@googlegroups.com
I just wanted to update this that thanks to the coding efforts of David Adams, SGA now works off of the edx-platform master branch /post opaque-keys.  I have tagged the release that worked pre opaque keys as 0.1.0 in case you are still on older edx-platform code and created a new release in the repo as 0.2.0 that is the latest.  Thanks again to David for the help.


Anas El Hadj Amor

unread,
Jul 3, 2014, 6:38:38 AM7/3/14
to edx-...@googlegroups.com
Hi, it is far better now ! 

I do not get the " 'Location' is not iterable " error anymore (the update was great and fast, thank you guys).

However, I still get an error, and I can't upload files. I used the "inspect element" of Chrome to try to understand what happened. I get this : 



When I try to upload something this is what happens :
I click on the "Select a file" button, I pick my file, I click on the "Upload name_of_the_file".
The "Uploading..." message appears, and then it get stuck at 100%. The console prompts then the error of the attached file above.
Nothing else happens. 
If I refresh the page the "No file has been uploaded." message is still here.

Sorry to bring you bad news (again)... I hope it's just a small error.

Best Regards,

Anas

Prathibha B

unread,
Jul 3, 2014, 6:59:28 AM7/3/14
to edx-...@googlegroups.com
I'm getting the following error:

We're having trouble rendering your component

Students will not be able to access this component. Re-edit your component to fix the error.

Error: staff_graded_assignment/show.html         



Peter Pinch

unread,
Jul 3, 2014, 7:20:09 AM7/3/14
to edx-...@googlegroups.com
Hi Anas. How big is the file you are trying to upload? We have seen this behavior when the uploaded file is larger than the nginx limit. I forget what the default configuration is in the production stack, but I think it's on the order of a few MB. 

One of the things on our todo list is better feedback to users when and why the upload fails. 

Please try a smaller file and let us know if that is successful. 

- Peter



Peter Pinch |  Production Manager, Office of Digital Learning
Massachusetts Institute of Technology
11 Cambridge Center  |  Cambridge MA 02142
pdp...@mit.edu | T 617-253-6256C 617-652-0183



Peter Pinch

unread,
Jul 3, 2014, 7:21:20 AM7/3/14
to edx-...@googlegroups.com
I haven't seen that particular error. Is that in Studio (CMS)? Do you get a stack trace in the log files?

- Peter



Peter Pinch |  Production Manager, Office of Digital Learning
Massachusetts Institute of Technology
11 Cambridge Center  |  Cambridge MA 02142
pdp...@mit.edu | T 617-253-6256C 617-652-0183



Prathibha B

unread,
Jul 3, 2014, 7:30:11 AM7/3/14
to edx-...@googlegroups.com
Its in studio. It shows 

Prathibha B

unread,
Jul 3, 2014, 7:30:26 AM7/3/14
to edx-...@googlegroups.com
it shows TemplateDoesNotExist: staff_graded_assignment/show.html

Prathibha B

unread,
Jul 3, 2014, 7:50:40 AM7/3/14
to edx-...@googlegroups.com
As mentioned Trinh, I've copied the template. Still I'm getting the same error.

Anas El Hadj Amor

unread,
Jul 3, 2014, 8:08:40 AM7/3/14
to edx-...@googlegroups.com
Hi Peter,

I tried three files : 19ko, 2,5Mo, 7ko.
They were .txt or .odt files.
None of them worked.

But you're right,  I do not get the same error for the 2,5Mo file and the others. 

This is the error for a small file (7ko) :


For a big one, I get the error that I posted (I just tried with a 7Mo file), it is totally normal.

Sorry I didn't post the right error the first time.

Best Regards,

Anas

Anas El Hadj Amor

unread,
Jul 3, 2014, 8:09:19 AM7/3/14
to edx-...@googlegroups.com
Hi Prathibha, to install it I suggest you to do this :

First uninstall edx-sga.
Then (if you're not on vagrant, if you are I think the two first commands are useless) do this :

  • sudo -H -u edxapp bash
  • source /edx/app/edxapp/edxapp_env
  • cd /edx/app/edxapp/edx-platform
  • git clone https://github.com/mitodl/edx-sga
  • cd edx-sga
  • python setup.py install 
  • cp -R templates/ /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/edx_sga-0.2.0-py2.7.egg/

This should work. I did the same thing and restarted the cms/lms just to be sure, but I do not know Python and it is probably overkill.

Best Regards,

Anas

Yarko Tymciurak

unread,
Jul 3, 2014, 4:02:05 PM7/3/14
to edx-...@googlegroups.com
On Thu, Jul 3, 2014 at 7:09 AM, Anas El Hadj Amor <anaselh...@gmail.com> wrote:
Hi Prathibha, to install it I suggest you to do this :

First uninstall edx-sga.
Then (if you're not on vagrant, if you are I think the two first commands are useless) do this :

  • sudo -H -u edxapp bash
  • source /edx/app/edxapp/edxapp_env
  • cd /edx/app/edxapp/edx-platform
  • git clone https://github.com/mitodl/edx-sga
  • cd edx-sga
  • python setup.py install 
  • cp -R templates/ /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/edx_sga-0.2.0-py2.7.egg/

This should work. I did the same thing and restarted the cms/lms just to be sure, but I do not know Python and it is probably overkill.

... something is wrong - if you ned to copy "templates" manually into installed python site-packages;

either there is some process step missing / not completed, or the setup for edx-sga is missing something;

... or...

You should, in general, not be messing manually with python package installation space.
(got the chills reading this, even more so when I started about others starting to muck around in that space).

Hope someone nails down the problem here.

Trinh Nguyen

unread,
Jul 3, 2014, 7:34:04 PM7/3/14
to edx-...@googlegroups.com
I believe the setup for edx-sga is missing the templates part.

John Swope

unread,
Jul 8, 2014, 3:24:40 PM7/8/14
to edx-...@googlegroups.com
I am getting the same error as Anas. Files upload to 100%, but aren't submitted for grading. Chrome Inspect shows a 500 error. I am testing with small plain text files. I am pasting my server log, if it helps. Many thanks in advance!

Jul  8 19:16:34 ip-172-31-19-193 [service_variant=lms][courseware.module_render][env:sandbox] ERROR [ip-172-31-19-193  27515] [module_render.py:634] - error executing xblock handler

Traceback (most recent call last):

  File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/module_render.py", line 615, in _invoke_xblock_handler

    resp = instance.handle(handler, req, suffix)

  File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/core.py", line 284, in handle

    return self.runtime.handle(self, handler_name, request, suffix)

  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 960, in handle

    return super(MetricsMixin, self).handle(block, handler_name, request, suffix=suffix)

  File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/runtime.py", line 643, in handle

    results = handler(request, suffix)

  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/edx_sga-0.2.0-py2.7.egg/edx_sga/sga.py", line 252, in upload_assignment

    self.location.to_deprecated_string(), self.uploaded_sha1, self.uploaded_filename)

AttributeError: 'Location' object has no attribute 'to_deprecated_string'

Jul  8 19:16:34 ip-172-31-19-193 [service_variant=lms][root][env:sandbox] ERROR [ip-172-31-19-193  27515] [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 111, in get_response

    response = callback(request, *callback_args, **callback_kwargs)

  File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/module_render.py", line 545, in handle_xblock_callback

    return _invoke_xblock_handler(request, course_id, usage_id, handler, suffix, request.user)

  File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/module_render.py", line 615, in _invoke_xblock_handler

    resp = instance.handle(handler, req, suffix)

  File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/core.py", line 284, in handle

    return self.runtime.handle(self, handler_name, request, suffix)

  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 960, in handle

    return super(MetricsMixin, self).handle(block, handler_name, request, suffix=suffix)

File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/runtime.py", line 643, in handle

    results = handler(request, suffix)

  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/edx_sga-0.2.0-py2.7.egg/edx_sga/sga.py", line 252, in upload_assignment

    self.location.to_deprecated_string(), self.uploaded_sha1, self.uploaded_filename)

AttributeError: 'Location' object has no attribute 'to_deprecated_string'

Jul  8 19:16:34 ip-172-31-19-193 [service_variant=lms][django.request][env:sandbox] ERROR [ip-172-31-19-193  27515] [base.py:215] - Internal Server Error: /courses/SGUx/OHOM1/2014/xblock/i4x:;_;_SGUx;_OHOM1;_edx_sga;_5475971dcec34ec29321963239a9901d/handler/upload_assignment

Traceback (most recent call last):

  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response

    response = callback(request, *callback_args, **callback_kwargs)

  File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/module_render.py", line 545, in handle_xblock_callback

    return _invoke_xblock_handler(request, course_id, usage_id, handler, suffix, request.user)

 File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/module_render.py", line 615, in _invoke_xblock_handler

    resp = instance.handle(handler, req, suffix)

  File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/core.py", line 284, in handle

    return self.runtime.handle(self, handler_name, request, suffix)

  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 960, in handle

    return super(MetricsMixin, self).handle(block, handler_name, request, suffix=suffix)

  File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/runtime.py", line 643, in handle

    results = handler(request, suffix)

  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/edx_sga-0.2.0-py2.7.egg/edx_sga/sga.py", line 252, in upload_assignment

self.location.to_deprecated_string(), self.uploaded_sha1, self.uploaded_filename)

AttributeError: 'Location' object has no attribute 'to_deprecated_string'

Jul  8 19:16:34 ip-172-31-19-193 [service_variant=lms][gunicorn.error][env:sandbox] ERROR [ip-172-31-19-193  27515] [glogging.py:219] - Error handling request

Traceback (most recent call last):

  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 126, in handle_request

    respiter = self.wsgi(environ, resp.start_response)

  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 241, in __call__

    response = self.get_response(request)

  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 179, in get_response

    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())

  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 228, in handle_uncaught_exception

    return callback(request, **param_dict)

  File "/edx/app/edxapp/edx-platform/lms/djangoapps/static_template_view/views.py", line 69, in render_500

return HttpResponseServerError(render_to_string('static_templates/server-error.html', {}))

  File "/edx/app/edxapp/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 104, in render_to_string

    return template.render_unicode(**context_dictionary)

  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/template.py", line 452, in render_unicode

    as_unicode=True)

  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/runtime.py", line 807, in _render

    **_kwargs_for_callable(callable_, data))

  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/runtime.py", line 839, in _render_context

    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)

  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/runtime.py", line 865, in _exec_template

    callable_(context, *args, **kwargs)

  File "/tmp/tmpZMOPZomako/main.html.py", line 253, in render_body

    __M_writer(filters.decode.utf8(self.body()))

  File "/tmp/tmpZMOPZomako/static_templates/server-error.html.py", line 40, in render_body

    platform_name=u"<em>{}</em>".format(platform_name=settings.PLATFORM_NAME)

IndexError: tuple index out of range

David Adams

unread,
Jul 9, 2014, 12:39:18 PM7/9/14
to edx-...@googlegroups.com
John,


"AttributeError: 'Location' object has no attribute 'to_deprecated_string'"

Looks like you are using the latest version of the xblock with a pre-opaque keys version of edx/edx-platform. Try using a post-opaque keys version of edx/platform.

Utkarsh J

unread,
Jul 10, 2014, 6:49:40 AM7/10/14
to edx-...@googlegroups.com

Guys,

I am trying to install SGA on edx Feb code. The Feb version XBlock has not all fields required for the sga to work ( DateTime field) . So I made changes in
/edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/xblock/fields.py

And changed it accordingly.

Now, I the Staff Grading Assignment is available.Inline image 1


However, there are problems with its overall appearance and functioning. as shown below
Inline image 1


Inline image 2

As shown in the image immediately above, Only "CANCEL" button works. The rest buttons are not functioning.

What exactly is happening  here? I am using February edX code. Can anybody please tell me how to solve this issue?


Thanks in advance!
--
Regards,
Utkarsh J.

Utkarsh J

unread,
Jul 10, 2014, 12:12:31 PM7/10/14
to edx-...@googlegroups.com
Also, the question is not visible correctly in LMS, as shown  below
Inline image 1
--
Regards,
Utkarsh J.

Nikhil Jain

unread,
Jul 11, 2014, 2:15:30 AM7/11/14
to edx-...@googlegroups.com
We have successfully implemented Xblock of Staff Graded Assignment from Jazkarta (https://github.com/jazkarta/edx-sga/tree/master/edx_sga) & students have started using it but when we as faculty are going for grading it, we are unable to see the complete list of all students, there is a problem of iframe i suppose. please anyone help us how can we see the all list of students (attached snapshot)


Thanks

Peter Pinch

unread,
Jul 11, 2014, 9:53:26 AM7/11/14
to edx-...@googlegroups.com
Hi Nikhil. 

The Jazkarta repo is out of date now, and unsupported. You should use the mitodl (MIT Office of Digital Learning) repo at https://github.com/mitodl/edx-sga (or get it directly from PyPi, https://pypi.python.org/pypi/edx-sga/0.3.1)

That said, this may be a bug everywhere. To confirm, are you unable to scroll the lightbox in the grading ui? What browser are you using?

We've turned on issue tracking on https://github.com/mitodl/edx-sga if you'd like to report a bug there. 

Thanks,
Peter



Peter Pinch |  Production Manager, Office of Digital Learning
Massachusetts Institute of Technology
11 Cambridge Center  |  Cambridge MA 02142
pdp...@mit.edu | T 617-253-6256C 617-652-0183



Peter Pinch

unread,
Jul 11, 2014, 9:57:50 AM7/11/14
to edx-...@googlegroups.com
Unfortunately, trying to use SGA in a February release of edX will produce unpredictable results, as the XBlock code was significantly different back then. 

Are you getting any errors in LMS that might help explain the display issue? 

- Peter



Peter Pinch |  Production Manager, Office of Digital Learning
Massachusetts Institute of Technology
11 Cambridge Center  |  Cambridge MA 02142
pdp...@mit.edu | T 617-253-6256C 617-652-0183



On Jul 10, 2014, at 12:12 PM, Utkarsh J <jadhav....@gmail.com> wrote:

Also, the question is not visible correctly in LMS, as shown  below
<Selection_005.png>


On Thu, Jul 10, 2014 at 4:19 PM, Utkarsh J <jadhav....@gmail.com> wrote:

Guys,

I am trying to install SGA on edx Feb code. The Feb version XBlock has not all fields required for the sga to work ( DateTime field) . So I made changes in
/edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/xblock/fields.py

And changed it accordingly.

Now, I the Staff Grading Assignment is available.<Selection_002.png>


However, there are problems with its overall appearance and functioning. as shown below
<Selection_003.png>


<Selection_004.png>

Thanks in advance!



--
Regards,
Utkarsh J.


Utkarsh J

unread,
Jul 13, 2014, 3:31:40 AM7/13/14
to edx-...@googlegroups.com

Hi Peter,


Error log in LMS-

Traceback (most recent call last):
4995   File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/module_render.py", line 159, in get_module
4996     descriptor = modulestore().get_instance(course_id, location, depth=depth)
4997   File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/modulestore/mixed.py", line 59, in get_instance
4998     return self._get_modulestore_for_courseid(course_id).get_instance(course_id, location, depth)
4999   File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/modulestore/mongo/base.py", line 600, in get_instance
5000     return self.get_item(location, depth=depth)
5001   File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/modulestore/mongo/base.py", line 586, in get_item
5002     item = self._find_one(location)
5003   File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/modulestore/mongo/base.py", line 556, in _find_one
5004     raise ItemNotFoundError(location)
5005 ItemNotFoundError: i4x://VESIT/CS100/course_info/handouts

--
Regards,
Utkarsh J.

Prabhanshu Pandit

unread,
Jul 15, 2014, 11:22:38 PM7/15/14
to edx-...@googlegroups.com
Hi Peter,

mitodl version of edx_sga was giving below error while uploading the files.


AttributeError: 'Location' object has no attribute 'to_deprecated_string'

We are using Edx April version.
Thanks
Prabhanshu

Prabhanshu Pandit

unread,
Jul 15, 2014, 11:47:30 PM7/15/14
to edx-...@googlegroups.com
Hi Peter,

There is a problem in lightbox ui, we (Me and Nikhil) are facing this issue, I have also looked the code base of mitodl and jazkarta, but didn't fine any change on UI side, so there might the same issue on mitodl repo also.
we are using firefox and chrome both.

We faced AttributeError: 'Location' object has no attribute 'to_deprecated_string', thats why we moved to jazkarta branch

Thanks
Prabhanshu

John Swope

unread,
Jul 16, 2014, 4:19:22 PM7/16/14
to edx-...@googlegroups.com
Made some progress here by updating my version of edx-platform. Now I've hit a 'Check your credentials' error. Does this xblock require s3 storage? If so, is there documentation available on how to set that up? If not, what might be the error here? Partial log output below: 

File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/boto/s3/connection.py", line 174, in __init__
    validate_certs=validate_certs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/boto/connection.py", line 557, in __init__
    host, config, self.provider, self._required_auth_capability())
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/boto/auth.py", line 728, in get_auth_handler
    'Check your credentials' % (len(names), str(names)))
NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV1Handler'] Check your credentials

Would love to get this running, hoping its just a few steps away!

John Swope

unread,
Jul 16, 2014, 7:02:58 PM7/16/14
to edx-...@googlegroups.com
Again a little further through trial and error. Now getting a 403 error in my server log when I try to do an upload. This despite the fact that I can upload and delete files in my s3 bucket using Cyberduck. 

Trinh Nguyen

unread,
Jul 16, 2014, 10:08:43 PM7/16/14
to edx-...@googlegroups.com
John,

It seems like we need to set up a storage. My question is how can I use a local storage instead of S3 for this XBlock?

Trinh

Nate Aune

unread,
Jul 20, 2014, 11:49:44 AM7/20/14
to edx-...@googlegroups.com
If you're using devstack, then the devstack.py has these lines:

# Don't use S3 in devstack, fall back to filesystem
del DEFAULT_FILE_STORAGE
MEDIA_ROOT = "/edx/var/edxapp/uploads"

I found the uploaded SGA assignments in this directory:

/edx/var/edxapp/uploads/edX/Open_DemoX/edx_sga/

Nate

Nate Aune

unread,
Jul 20, 2014, 12:56:54 PM7/20/14
to edx-...@googlegroups.com
There appears to be a cosmetic bug when you click the button to view the submissions, the 'Upload anno..." button is cut off. See this issue posted to the tracker:

Peter Pinch

unread,
Jul 20, 2014, 3:40:16 PM7/20/14
to edx-...@googlegroups.com
I see. The version of edX you are using is from before the Opaque Keys change. There's a branch in repo for this called pre-OK, https://github.com/mitodl/edx-sga/tree/pre-ok

Peter Pinch

unread,
Jul 20, 2014, 3:40:23 PM7/20/14
to edx-...@googlegroups.com
Thank you Prabhanshu and Nikhil. I put in an issue on the repo based on your findings:


We're doing some enhancements on SGA right now and I think we need to fix this. However, if you want to continue to use the pre-ok version of SGA, you may need to merge the changes yourself. If you go that route, please submit a PR. 

And if you find anything else, feel free to use the GitHub issue tracker. 

- Peter



Peter Pinch |  Production Manager, Office of Digital Learning
Massachusetts Institute of Technology
11 Cambridge Center  |  Cambridge MA 02142
pdp...@mit.edu | T 617-253-6256C 617-652-0183



Peter Pinch

unread,
Jul 20, 2014, 3:40:32 PM7/20/14
to edx-...@googlegroups.com
Thanks for catching it Nate, and thank you for posting it to the GitHub issue tracker. 

- Peter

daizhiy...@gmail.com

unread,
Jul 21, 2014, 3:54:12 AM7/21/14
to edx-...@googlegroups.com
在cms/envs/aws.py 和lms.envs/aws.py下DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' 修改成DEFAULT_FILE_STORAGE='django.core.files.storage.FileSystemStorage',然后在cms/envs/common.py和cms/envs/common.py加入
MEDIA_ROOT ='指定上传路径'

在 2014年7月20日星期日UTC+8下午11时49分44秒,Nate Aune写道:

Vladyslav Ushakov

unread,
Jul 21, 2014, 8:47:53 AM7/21/14
to edx-...@googlegroups.com
Hello guys.
I have tried this too, and successfully installed, but when I try to upload document, I get error: "There was an error uploading your file" (this text is red under button).
In browser:
"There was an error with file upload."
"event: " Object { type: "fileuploadfail", timeStamp: 1405946026981, jQuery172024313686240373766: true, target: <input.fileupload>, isTrigger: true, exclusive: undefined, namespace: "", namespace_re: null, result: undefined }
"data: " Object { disabled: false, create: null, dropZone: Object, pasteZone: Object, replaceFileInput: true, singleFileUploads: true, sequentialUploads: false, forceIframeTransport: false, multipart: true, recalculateProgress: true, errorThrown: "INTERNAL SERVER ERROR", 41 more… }


I only installed egg via pip, and add item to '/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/component.py'.
I read in readme about "Add edx_sga to INSTALLED_APPS in your Django settings", but, unfortunately, I don't how I can do it.
Anyone?

Carson Gee

unread,
Jul 21, 2014, 10:29:57 AM7/21/14
to edx-...@googlegroups.com
By default the platform is setup to use s3 as the Django storage engine (https://github.com/edx/edx-platform/blob/master/lms/envs/aws.py#L45).  This can be changed (as it was for devstack with this PR: https://github.com/edx/edx-platform/pull/3615) to use local storage, or you can configure AWS credentials with S3 access with the default setup by settings AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_STORAGE_BUCKET_NAME. Another notable area that this needs to be configured for in the platform is for image uploads in the discussion pages as that relies on the DEFAULT_FILE_STORAGE as well.

Vladyslav Ushakov

unread,
Jul 23, 2014, 8:21:05 AM7/23/14
to edx-...@googlegroups.com
I have a strange error. When I try to upload some data (I tried all sizes), I get error "There was an error uploading your file" and in the console I can see object "data" - json file with 42+ variables inside. Some of them are:
uploadedBytes:"Uploaded bytes exceed file size"
errorThrown:"INTERNAL SERVER ERROR"

Does anyone know what it means?

Sergey Aganezov

unread,
Jul 23, 2014, 8:39:58 PM7/23/14
to edx-...@googlegroups.com
Hi Trinh,

I ran accros your post with the issues of "Check your credentials" error and the need to set up local storage for XBlock on production stack. Did you have any luck with that? I ran a vagrant installed production stack on my virtual machine and able to upload course books, etc, but had no luck uploading submissions to this XBlcok due to "Check your credentials" error. Have you had any luck resolving it?

Sincerely, Sergey.


On Wednesday, July 16, 2014 10:08:43 PM UTC-4, Trinh Nguyen wrote:

Peter Pinch

unread,
Jul 23, 2014, 8:45:34 PM7/23/14
to edx-...@googlegroups.com
Sergey, have you tried the instructions from earlier in this thread?


We do plan to update the documentation on the repository, but haven't had a chance to yet. 

- Peter



Peter Pinch |  Production Manager, Office of Digital Learning
Massachusetts Institute of Technology
11 Cambridge Center  |  Cambridge MA 02142
pdp...@mit.edu | T 617-253-6256C 617-652-0183



Trinh Nguyen

unread,
Jul 23, 2014, 9:58:38 PM7/23/14
to edx-...@googlegroups.com
Sergey,

Let follow Peter's link instruction. It should work.

Trinh

Sergey Aganezov

unread,
Jul 23, 2014, 11:04:01 PM7/23/14
to edx-...@googlegroups.com
Peter,

yes, I've seen those instructions. The issue is that I'm using a production stack that comes with vagrant box, thus I believe devstack settings are not used when firing up django... At least that is what I think. And taking into consideration the fact that I was able to upload file for the course itself (in files & uploads section) I believe that there some setting in one of the environment files that I've missed. 

Questions answering which might help in my opinion:
  1. adding rows from pull request (del default_file_storage, etc) in common.py files (in both lms and cms envs folders raises errors). Is there another place (besides devstack.py, which already has those rows in it) that such addition might make a difference?
  2. where does files & uploads files are uploaded and saved to? (did check the /edx/var/edxapp/uploads and it is empty)

Sincerely, Sergey.

Vladyslav Ushakov

unread,
Aug 4, 2014, 2:14:40 PM8/4/14
to edx-...@googlegroups.com
Guys,
I still have the same problem as before. And I don't know how to fix it. Can anyone help me?

When I try to upload some data (I tried all sizes), I get error "There was an error uploading your file" and in the console I can see object "data" - json file with 42+ variables inside. Some of them are:
   uploadedBytes:"Uploaded bytes exceed file size"
   errorThrown:"INTERNAL SERVER ERROR"
 
Log file in /edx/var/log/lms/edx.log: https://gist.github.com/d0cc72bf7af51393fdd6

I think it's a problem with adding 'edx-sga' to INSTALLED_APPS.
Where did you add it? In which file?

Ovnicraft

unread,
Aug 4, 2014, 3:01:34 PM8/4/14
to edx-...@googlegroups.com
On Mon, Aug 4, 2014 at 1:14 PM, Vladyslav Ushakov <vladysla...@gmail.com> wrote:
Guys,
I still have the same problem as before. And I don't know how to fix it. Can anyone help me?

When I try to upload some data (I tried all sizes), I get error "There was an error uploading your file" and in the console I can see object "data" - json file with 42+ variables inside. Some of them are:
   uploadedBytes:"Uploaded bytes exceed file size"
   errorThrown:"INTERNAL SERVER ERROR"
 
Log file in /edx/var/log/lms/edx.log: https://gist.github.com/d0cc72bf7af51393fdd6

It appears its trying to store in S3, so your credentials are not correctly configured.

I read before something about local storage, it will help you.
 

I think it's a problem with adding 'edx-sga' to INSTALLED_APPS.
Where did you add it? In which file?


On Friday, June 20, 2014 5:17:39 PM UTC+3, Peter Pinch wrote:
MIT's Office of Digital learning has released an XBlock for a Staff Graded Assignment (SGA). When placed in a course, this XBlock allows students to upload documents which can be viewed and graded by course staff. While this approach does not scale well for MOOC-sized courses, we have found it useful for small courses where there time to review and grade every student submission. 


Installation instructions and (minimal) course author instructions are available in the readme. 


We are planning some enhancements to SGA this summer:
- refactoring to use the new submissions app
- roles support and workflow, so instructors can approve staff grades

Special thanks to Jazkarta and Chris Rossi who did the coding for MIT.  

If you have any questions or suggestions, please let us know on this list. 

- Peter Pinch

Peter Pinch |  Production Manager, Office of Digital Learning
Massachusetts Institute of Technology
11 Cambridge Center  |  Cambridge MA 02142
pdp...@mit.edu | T 617-253-6256 | C 617-652-0183



Prabhanshu Pandit

unread,
Aug 5, 2014, 4:59:06 AM8/5/14
to edx-...@googlegroups.com

I am not able to push the code,
getting error while pushing the code

remote: Permission to mitodl/edx-sga.git denied to prabhanshu.

Anyways there is a minor change we just need to replace below line
https://github.com/mitodl/edx-sga/blob/pre-ok/edx_sga/templates/staff_graded_assignment/show.html#L103
with this code
<div class="inner-wrapper" style="color: black;height: 350px;overflow: auto">

we just need to add height and overflow

Nate Aune

unread,
Aug 5, 2014, 5:02:42 AM8/5/14
to edx-...@googlegroups.com
You should fork the repo, push your changes and submit a pull request to the mitodl/edX-sga repo.
--

Prabhanshu Pandit

unread,
Aug 5, 2014, 5:18:17 AM8/5/14
to edx-...@googlegroups.com
Thanks Nate

Vladyslav Ushakov

unread,
Aug 5, 2014, 2:33:01 PM8/5/14
to edx-...@googlegroups.com
Cristian, Thanks a lot. It helped very much.
Message has been deleted

Vladyslav Ushakov

unread,
Aug 8, 2014, 10:42:38 AM8/8/14
to edx-...@googlegroups.com
Hello.
I just tried to upload files with non-english letters (russian letters) and after uploading process I can't download it and see 500 error.
Does it exist a way to solve it?

Logfile:
Aug  8 14:14:42 precise64 [service_variant=lms][instructor.views.api][env:sandbox] ERROR [precise64  1983] [api.py:1190] - Error requesting from analytics server at get?aname=ProblemGradeDistribution&course_id=xxx/yyy/zzz&apikey=

Traceback (most recent call last):
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/views/api.py", line 1188, in proxy_legacy_analytics
    res = requests.get(url)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/requests/api.py", line 55, in get
    return request('get', url, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/requests/api.py", line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/requests/sessions.py", line 422, in request
    prep = self.prepare_request(req)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/requests/sessions.py", line 360, in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/requests/models.py", line 294, in prepare
    self.prepare_url(url, params)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/requests/models.py", line 345, in prepare_url
    "Perhaps you meant http://{0}?".format(url))
MissingSchema: Invalid URL u'get?aname=ProblemGradeDistribution&course_id=xxx/yyy/zzz&apikey=': No schema supplied. Perhaps you meant http://get?aname=ProblemGradeDistribution&course_id=xxx/yyy/zzz&apikey=?

Aug  8 14:23:34 precise64 [service_variant=lms][courseware.module_render][env:sandbox] ERROR [precise64  1951] [module_render.py:746] - error executing xblock handler

Traceback (most recent call last):
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/module_render.py", line 727, in _invoke_xblock_handler

    resp = instance.handle(handler, req, suffix)
  File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/core.py", line 293, in handle

    return self.runtime.handle(self, handler_name, request, suffix)
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1049, in handle

    return super(MetricsMixin, self).handle(block, handler_name, request, suffix=suffix)
  File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/runtime.py", line 648, in handle
    results = handler(request, suffix)
  File "/edx/app/edxapp/venvs/edxapp/src/edx-sga/edx_sga/sga.py", line 335, in download_assignment
    self.uploaded_filename
  File "/edx/app/edxapp/venvs/edxapp/src/edx-sga/edx_sga/sga.py", line 390, in download
    content_disposition="attachment; filename=" + filename)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webob/response.py", line 156, in __init__
    setattr(self, name, value)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webob/descriptors.py", line 142, in fset
    value = value.encode('latin-1')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 21-27: ordinal not in range(256)

Aug  8 14:23:34 precise64 [service_variant=lms][root][env:sandbox] ERROR [precise64  1951] [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 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/module_render.py", line 649, in handle_xblock_callback

    return _invoke_xblock_handler(request, course_id, usage_id, handler, suffix,
 request.user)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/module_render.py", line 727, in _invoke_xblock_handler

    resp = instance.handle(handler, req, suffix)
  File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/core.py", line 293, in handle

    return self.runtime.handle(self, handler_name, request, suffix)
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1049, in handle

    return super(MetricsMixin, self).handle(block, handler_name, request, suffix=suffix)
  File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/runtime.py", line 648, in handle
    results = handler(request, suffix)
  File "/edx/app/edxapp/venvs/edxapp/src/edx-sga/edx_sga/sga.py", line 335, in download_assignment
    self.uploaded_filename
  File "/edx/app/edxapp/venvs/edxapp/src/edx-sga/edx_sga/sga.py", line 390, in download
    content_disposition="attachment; filename=" + filename)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webob/response.py", line 156, in __init__
    setattr(self, name, value)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webob/descriptors.py", line 142, in fset
    value = value.encode('latin-1')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 21-27: ordinal not in range(256)

Aug  8 14:23:34 precise64 [service_variant=lms][django.request][env:sandbox] ERROR [precise64  1951] [base.py:215] - Internal Server Error: /courses/xxx/yyy/zzz/xblock/i4x:;_;_xxx;_yyy;_edx_sga;_9f787635d4874ffcb5e7bd4d59f72891/handler/download_assignment

Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/module_render.py", line 649, in handle_xblock_callback

    return _invoke_xblock_handler(request, course_id, usage_id, handler, suffix, request.user)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/module_render.py", line 727, in _invoke_xblock_handler

    resp = instance.handle(handler, req, suffix)
  File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/core.py", line 293, in handle

    return self.runtime.handle(self, handler_name, request, suffix)
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1049, in handle

    return super(MetricsMixin, self).handle(block, handler_name, request, suffix=suffix)
  File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/runtime.py", line 648, in handle
    results = handler(request, suffix)
  File "/edx/app/edxapp/venvs/edxapp/src/edx-sga/edx_sga/sga.py", line 335, in download_assignment
    self.uploaded_filename
  File "/edx/app/edxapp/venvs/edxapp/src/edx-sga/edx_sga/sga.py", line 390, in download
    content_disposition="attachment; filename=" + filename)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webob/response.py", line 156, in __init__
    setattr(self, name, value)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webob/descriptors.py", line 142, in fset
    value = value.encode('latin-1')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 21-27: ordinal not in range(256)

Edwardo Hanna

unread,
Sep 8, 2014, 6:13:47 PM9/8/14
to edx-...@googlegroups.com
Hi,

I have installed the Staff Graded Assignment (SGA) XBlock on my Devstack and seen it work nicely.  I have also installed it on my production stack. However when I try uploading a file on the Production stack I see Uploading... 100% and after looking at the output for sudo tail -f /edx/var/log/{lms,cms,nginx}/*log I see that there is a 500 error.  I am using the release branch. I read in these posts about changing the storage to local storage. How do you change production stack to use local storage, if this is the solution to the problem. Thanks.

John Swope

unread,
Sep 8, 2014, 7:10:16 PM9/8/14
to edx-...@googlegroups.com
Edwardo,
It was a while since I did this, so I'm a bit vague on the details. But you can try something like this. And if you (or the thread) can advise a better way to do this without touching aws.py directly, that'd be useful too. 

Added these lines to lms/envs/aws.py after the DEFAULT_FILE_STORAGE line:
del DEFAULT_FILE_STORAGE
MEDIA_ROOT = "/edx/var/edxapp/uploads"

Looking for more changes that I did, but this seems to be the one that worked. Probably only good for smaller classes and files. 

Ovnicraft

unread,
Sep 8, 2014, 7:11:21 PM9/8/14
to edx-...@googlegroups.com

I have an issue, there is not button in editor. I attach an img.




On Mon, Sep 8, 2014 at 5:13 PM, Edwardo Hanna <hanna....@gmail.com> wrote:
Hi,

I have installed the Staff Graded Assignment (SGA) XBlock on my Devstack and seen it work nicely.  I have also installed it on my production stack. However when I try uploading a file on the Production stack I see Uploading... 100% and after looking at the output for sudo tail -f /edx/var/log/{lms,cms,nginx}/*log I see that there is a 500 error.  I am using the release branch. I read in these posts about changing the storage to local storage. How do you change production stack to use local storage, if this is the solution to the problem. Thanks.



Captura de pantalla de 2014-09-08 18:09:58.png

Edwardo Hanna

unread,
Sep 8, 2014, 8:21:29 PM9/8/14
to edx-...@googlegroups.com
John many thanks for that! I tried that and it is the solution. Have a good night!

Edwardo Hanna

unread,
Sep 8, 2014, 8:34:57 PM9/8/14
to edx-...@googlegroups.com
Hi Cristian,

At first my installation had invisibilities as well. What I did was uninstall edx-sga and reinstall edx sga. You can uninstall by:

sudo -H -u edxapp bash
source /edx/app/edxapp/edxapp_env
cd /edx/app/edxapp/venvs/edxapp/src
pip uninstall edx-sga

Next I reinstalled using the release branch pip install -e git+https://github.com/mitodl/edx-sga@release#egg=edx-sga

I did database migrations again and Restarted Services

LMS/CMS - sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp:
Workers - sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp_worker:

(I am using production stack for the above.) For developer stack you can do the same. You would uninstall edx-sga, reinstall edx-sga, do database migrations, and then:

sudo su edxapp
paver devstack studio

Ovnicraft

unread,
Sep 8, 2014, 8:41:13 PM9/8/14
to edx-...@googlegroups.com
On Mon, Sep 8, 2014 at 7:34 PM, Edwardo Hanna <hanna....@gmail.com> wrote:
Hi Cristian,

At first my installation had invisibilities as well. What I did was uninstall edx-sga and reinstall edx sga. You can uninstall by:

sudo -H -u edxapp bash
source /edx/app/edxapp/edxapp_env
cd /edx/app/edxapp/venvs/edxapp/src
pip uninstall edx-sga

Next I reinstalled using the release branch pip install -e git+https://github.com/mitodl/edx-sga@release#egg=edx-sga

I did database migrations again and Restarted Services

LMS/CMS - sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp:
Workers - sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp_worker:

(I am using production stack for the above.) For developer stack you can do the same. You would uninstall edx-sga, reinstall edx-sga, do database migrations, and then:

sudo su edxapp
paver devstack studio



Thanks Eduardo ! wil try 

 
On Monday, September 8, 2014 6:11:21 PM UTC-5, Cristian Salamea wrote:

I have an issue, there is not button in editor. I attach an img.




On Mon, Sep 8, 2014 at 5:13 PM, Edwardo Hanna <hanna....@gmail.com> wrote:
Hi,

I have installed the Staff Graded Assignment (SGA) XBlock on my Devstack and seen it work nicely.  I have also installed it on my production stack. However when I try uploading a file on the Production stack I see Uploading... 100% and after looking at the output for sudo tail -f /edx/var/log/{lms,cms,nginx}/*log I see that there is a 500 error.  I am using the release branch. I read in these posts about changing the storage to local storage. How do you change production stack to use local storage, if this is the solution to the problem. Thanks.



--
Reply all
Reply to author
Forward
0 new messages