Open edX即将发布下一个大版本Cypress(柏树)

4IB1WVF}TAS3T8[)PP7{A1S

 

今天Open edX发布了 Cypress RC2。根据上一个版本Birch的规律,2月3日RC1/2月12日RC2/2月14日RC3/3月3日Birch,意味着最多一个月内正式版本即将发布。

从 https://openedx.atlassian.net/wiki/pages/viewpage.action?pageId=33358379  可以看到开发人员在做的一些事情。注意到有一项工作是Make a plan for Bitnami, & communicate it with Bitnami,可能Bitnami会同步推出最新版本的部署工具,也许以后部署不会再是个问题。

Release版本包含的服务

  • edx-platform
  • configuration
  • cs_comments_service
  • notifier
  • edx-certificates
  • xqueue
  • ORA2
  • XBlock

去除:

  • All ORA1 supervisor services

不包含:

  • Student notes (want to for Dogwood)
  • Badging (want to for Dogwood)
  • Insights (Need to figure out what it means to include, and how to support)
  • ecom stack (Need to figure out what it means to include, and how to support)

Dogwood计划从这里开始: Dogwood ,包含以上四个服务的页面。

 

edX语言包格式错误引起组件崩溃

最近在修正一些运行时错误中,发现了类似的错误模式,例如

打开SYSADMIN后,教师面板无法进入,检查lms/log发现

File "/tmp/mako_lms/instructor/instructor_dashboard_2/course_info.html.py", line 141, in render_body
    link_end='</a>'
KeyError: u' link_start '

用户注册后不能发送邮件,也不能跳转到注册成功页面,而邮件却已正确配置。检查lms/log发现

Jul 15 12:33:10 i-hjpuo2yh [service_variant=lms][django.request][env:sandbox] ERROR [i-hjpuo2yh  19843] [base.py:213] - Internal Server Error: /create_account
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/csrf.py", line 77, in wrapped_view
    return view_func(*args, **kwargs)
  File "/edx/app/edxapp/edx-platform/common/djangoapps/student/views.py", line 1615, in create_account
    create_account_with_params(request, post_override or request.POST)
  File "/edx/app/edxapp/edx-platform/common/djangoapps/student/views.py", line 1534, in create_account_with_params
    message = render_to_string('emails/activation_email.txt', context)
  File "/edx/app/edxapp/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 134, 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/mako_lms/emails/activation_email.txt.py", line 51, in render_body
    platform_name=settings.PLATFORM_NAME
KeyError: u' platform_name '

共同的错误提示KeyError。在和社区开发者进行探讨后,认为是模板的问题,于是@wwj718修改了模板文件使组件可运行并提交commit到github。而edX社区的开发者提示这是语言包问题。

This looks to me like a translator added spaces into the format placeholder, turning {link_start} into { link_start }. The fix is to remove the spaces in the translation. Removing the placeholder names as you have done will make it impossible to translate this string in the future.

Can you double-check your translation files to see if there are spaces in the translated string?

:-1: on merging this change.


PS, the command i18n_tool validate will find errors with all translation files you have, so you can correct them if you wish. On master, all translation files pass this check.

检查mako.po文件发现,的确是翻译者在变量中加入了错误的空格导致:

{link_start} -&gt; { link_start }
{platform_name} -&gt; { platform_name }

凡是错误加入空格的地方,涉及的组件都会出现KeyError错误。

一劳永逸的做法,我们已在transifex修正了目前发现的几十处类似语言包错误并确认审核。重新下载编译语言包即可修正此类错误。

`N9GM7DC@DJTH6HJ2_TK2]K D0D6E921-CCD7-4964-A919-8FA0329B13BF

配置Open edX的SYSADMIN特性

Open edX自带一个管理员面板,默认未打开。

编辑/edx/app/edxapp/lms.env.json,找到

"FEATURES": { ... }

加入配置项:

ENABLE_SYSADMIN_DASHBOARD: true,

注意格式正确,观察其他配置项的格式排版。如果在最后一行末尾不要加逗号。

重启edx,然后用staff登录,可以在顶部菜单看到“系统管理员”链接。

5FD06E3D-DDAF-4BDD-8DA5-094660DA76A1