Giter VIP home page Giter VIP logo

appsembler / edx-platform Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openedx/edx-platform

12.0 10.0 15.0 1.6 GB

Appsembler Tahoe fork of Open edX. Branches: `main` for Juniper and `hawthorn/main` for Hawthorn.

Home Page: https://appsembler.com/products/tahoe/

License: GNU Affero General Public License v3.0

Python 54.37% JavaScript 27.69% CSS 0.38% HTML 14.43% Shell 0.10% ActionScript 0.01% Makefile 0.01% Dockerfile 0.01% SCSS 3.00% Mustache 0.01% Jinja 0.01%
open-edx

edx-platform's Introduction

This is the core repository of the Open edX software. It includes the LMS (student-facing, delivering courseware), and Studio (course authoring) components.

Installation

Installing and running an Open edX instance is not simple. We strongly recommend that you use a service provider to run the software for you. They have free trials that make it easy to get started: https://openedx.org/get-started/

If you will be modifying edx-platform code, the Open edX Developer Stack is a Docker-based development environment.

If you want to run your own Open edX server and have the technical skills to do so, Open edX Ubuntu 16.04 64-bit Installation has instructions to install it on an existing Ubuntu 16.04 server.

License

The code in this repository is licensed under version 3 of the AGPL unless otherwise noted. Please see the LICENSE file for details.

More about Open edX

See the Open edX site to learn more about the Open edX world. You can find information about hosting, extending, and contributing to Open edX software. In addition, the Open edX site provides product announcements, the Open edX blog, and other rich community resources.

Documentation

Documentation can be found at https://docs.edx.org.

Getting Help

If you're having trouble, we have discussion forums at https://discuss.openedx.org where you can connect with others in the community.

Our real-time conversations are on Slack. You can request a Slack invitation, then join our community Slack team.

For more information about these options, see the Getting Help page.

Issue Tracker

We use JIRA for our issue tracker, not GitHub issues. You can search previously reported issues. If you need to report a problem, please make a free account on our JIRA and create a new issue.

How to Contribute

Contributions are welcome! The first step is to submit a signed individual contributor agreement. See our CONTRIBUTING file for more information – it also contains guidelines for how to maintain high code quality, which will make your contribution more likely to be accepted.

Reporting Security Issues

Please do not report security issues in public. Please email [email protected].

edx-platform's People

Contributors

adampalay avatar andy-armstrong avatar auraz avatar awais786 avatar awaisdar001 avatar ayub-khan avatar bezidejni avatar brianhw avatar bridger avatar cpennington avatar dementrock avatar dianakhuang avatar feanil avatar ichuang avatar jmbowman avatar marcotuts avatar mattdrayer avatar matthewpiatetsky avatar mhoeber avatar muhammad-ammar avatar nasthagiri avatar nedbat avatar omarithawi avatar pmitros avatar polesye avatar robrap avatar sarina avatar singingwolfboy avatar talbs avatar waheedahmed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

edx-platform's Issues

Merging trinity branch

@bryanlandia is the trinity feature branch:
trinityedu/feature/customregistrationfields

ready to be merged into trinity/master and trinity/release?

Right now I'm setting the production branch to this feature branch, but I'd like to get that sorted out before the launch.

Tests and refactoring for: Enforce static file look up for ProductionS3Storage backend

  1. Add tests for the Juniper production s3 cache: #907

  2. Address Anders comment: #907 (review)

I'm in favor of getting this out quickly to unblock Juniper.

Longer term, we probably want to consider some things:

  • instead of adding our stuff directly to openedx.core.storage.ProductionS3Storage, we probably ought to make our own storage class that just subclasses it to override url() and add the explicit caching, then use AppsemblerProductionS3Storage in our config.
  • having honeycomb tracing on every call to url() is useful at the moment for debugging/verifying this fix, but is probably more verbose than we're going to want to dial it down later.
  • instead of commenting out the setting of the key prefix here and putting a random value in the config in appsembler/configuration#361 maybe we could instead set EDX_PLATFORM_REVISION to a git hash or cloud build revision id during the deploy (with something like an ansible --extra-vars=EDX_PLATFORM_REVISION=$REVISION_ID in the deploy script. That would achieve the same effect of making sure that the cache is cleared on each deploy.

Contribute: Remove `example.com` text from html emails

Contribute the fixes below:

A) #884 has a fix for the incorrect get_current_site logic. The fix is contributable.

The bug is resolved by replacing:

Site.objects.get_current() (Django) --> get_current_site() (edX's)

Because the Django get_current returns the default site (with settings.SITE_ID) always.

The edX function is more site aware and returns the current site by using the request.site value which is the desired behaviour and would prevent the HTML emails from showing example.com in the email body as described in RED-1886.

B) #925 fix activation email server error in celery

The error happened because of the incomplete example.com fix in #884

This commit fixes the issue by getting back the mandatory emulate_http_request but now with a better method to know the site using our appsembler.sites.utils helpers.

This should work on celery tasks while printing the correct site domain instead of example.com as it used to do before RED-1886 was fixed.

Tech Debt: Enable and fix all upstream tests in our Tahoe branch.

We're enabling tests a bit by bit starting from basic pep8 (#403) up to the user_api django app (#581).

In this process we're skipping tens of tests. Some of them are important and related to SAML for example.

Those tests are:

  • Sometimes marked as @unittest.skip,
  • Other times marked as @unittest.expectedFailure,
  • Otherwise they could be simply commented out with an inline comment starting usually with # Appsembler: failing test for reason such and such ...

The idea behind skipping those tests is to enable an easy way to run as much tests as reasonably possible within our engineering team capacity constraints. The biggest win from the enabled tests is detecting some regression tests when we make them. Indeed, it is theoretically impossible to detect all regression tests.

  • What's the plan for those tests? There's no plan as of writing this issue.
  • How to find an exhaustive list of all skipped tests? The only reasonable way is to run all the tests using $ pytest -v on both appsembler/tahoe/develop and on open-release/hawthorn.2 and find the missing tests from the vanilla Hawthorn. It's a cumbersome but reliable method.
  • I want to change this, and I want to improve our testing. What can I do? Great! Head out to:

Contribute: Fix problem with `xblock-utils:ProxyTransNode.merge_translation` method

Problem with xblock-utils:ProxyTransNode.merge_translation method

The merge_translation method isn't cleaning up after the merge and leaves stray translations in the following way:

  • Calling `i18n.helpers.translate('fr_CA', 'Thank you.') returns the untranslated 'Thank you.' ✔️
  • Calling `i18n.helpers.xblock_translate('fr_CA', 'Thank you.') returns 'Merci !' ✔️
  • Calling i18n.helpers.translate('fr_CA', 'Thank you.') again returns the the translated 'Merci !' ❌ which means that the merge_translation` didn't clean up after itself

Workaround: Call translate then xblock_translate in the tahoe_translate command.

Long term fix: Work with upstream to fix the cleanup process around translation.activate(...)

This was discovered while working on #948

CourseEnrollmentAllowed is not site aware

It's not clear to note which site the CourseEnrollmentAllowed came from, and therefore it's likely that collision might happen between sites.

I'm adding it here until moving it to Jira or somewhere else.

possible problem with prefixing for customer_specific assets

I might be missing something, but ...

https://github.com/appsembler/edx-platform/blob/appsembler/eucalyptus/master/openedx/core/djangoapps/theming/finders.py#L50

looks wrong to me. Shouldn't it append /customer_specific? My customer specific JS files are not being copied to staticfiles; instead, the base edx-platform ones are.

See https://github.com/appsembler/edx-theme-customers/blob/eucalyptus/trinity/lms/static/js/student_account/views/account_settings_fields.js

This is output from the collectstatic handler

(Pdb) path
u'js/student_account/views/account_settings_fields.js'
(Pdb) l
 94  	            handler = self.copy_file
 95  	
 96  	        found_files = OrderedDict()
 97  	        for finder in get_finders():
 98  	            import pdb;pdb.set_trace()
 99  ->	            for path, storage in finder.list(self.ignore_patterns):
100  	                # Prefix the relative path if the source storage contains it
101  	                if getattr(storage, 'prefix', None):
102  	                    prefixed_path = os.path.join(storage.prefix, path)
103  	                else:
104  	                    prefixed_path = path
(Pdb) n
> /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py(101)collect()
-> if getattr(storage, 'prefix', None):
(Pdb) 
> /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py(102)collect()
-> prefixed_path = os.path.join(storage.prefix, path)
(Pdb) 
> /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py(106)collect()
-> if prefixed_path not in found_files:
(Pdb) 
> /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py(107)collect()
-> found_files[prefixed_path] = (storage, path)
(Pdb) 
> /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py(108)collect()
-> handler(path, prefixed_path, storage)
(Pdb) s
--Call--
> /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py(298)copy_file()
-> def copy_file(self, path, prefixed_path, source_storage):
(Pdb) a
self = <django.contrib.staticfiles.management.commands.collectstatic.Command object at 0x7f3f580eea90>
path = js/student_account/views/account_settings_view.js
prefixed_path = eucalyptus-theme-codebase/js/student_account/views/account_settings_view.js
source_storage = <openedx.core.djangoapps.theming.storage.ThemeStorage object at 0x7f3f4b34c950>
(Pdb) 

I'm trying to collect static assets from the Trinity Euc. customer specific theme, and the prefixed path is missing customer_specific.

Old Intercom Integration

@natea @bezidejni @bryanlandia @annatpt @emrob (and anybody else I forgot to include) -
Does anybody know if we're still using our Intercom integration with Open edX?
https://github.com/appsembler/edx-platform/tree/appsembler/master/common/djangoapps/appsembler

There was a bit of refactoring on the edx-platform side of things that broke our Intercom functionality in Dogwood. I'm wondering how important that functionality is and whether or not we still use it. I know for a while our testdrives would use the chat widget to start a conversation with potential customers/leads. Is that still the case?

Remove our custom requirements

We can remove this line:

# Appsembler
-r appsembler.txt

and the associated appsembler.txt file from our fork of the edx-platform repo if we pull the contents from that file and add something to our server-vars.yml files like:

EDXAPP_EXTRA_REQUIREMENTS:
  - name: 'git+https://github.com/org/project@branch#egg=egg_name'

Contribute: YouTube video transcripts Import fix

Background

https://appsembler.atlassian.net/browse/BLACK-2163
By the end of 2021 YouTube Deprecated their Timedtext API. This caused problem for our customers to download automatically the transcripts for their YouTube video for their videos in Open edX. Open edX team is aware of this error https://openedx.atlassian.net/browse/TNL-9460, but there was no movement on solving this issue from open edx end.
We tried to solve this by replacing the API with a new YouTube API, but the new API requires OAuth authentication and only works with videos in the same channel and even with corresponding changes in the codebase the Transcripts didn't work.

Our solution

I developed a new API that responds with SRT version of transcripts for a given YouTube video ID for example https://us-central1-penn-state.cloudfunctions.net/youtube-transcript?video_id=AcZZlbWRyUM You can try this with different videos just replace what comes after video_id= with your YouTube video ID.
After receiving the Transcripts from our API we make a call to transcripts/upload to upload the transcript for a given unit component location, and we store the transcripts. To make it visible in Studio and LMS.
The functionality should work as the following video

Filmage.2022-02-28_204527.mp4

Refactor ENABLE_COURSE_DISCOVERY hack on devstack

#191 introduced a change to make the ENABLE_COURSE_DISCOVERY configurable from the lms.env.json file on devstack. However the solution used another feature.

The suggestion is to refactor it:

FEATURES['ENABLE_COURSE_DISCOVERY'] = ENV_TOKENS['FEATURES'].get('ENABLE_COURSE_DISCOVERY', FEATURES['ENABLE_COURSE_DISCOVERY'])

grades download reports from S3 getting bad links

Test Drive user reported not being able to download CSV grade reports from
http://lms.edxdemo.appsembler.com/courses/course-v1:TheSoftwareGuild+SG101+2016_Summer/instructor#view-data_download

and I can confirm. Links are like:

  • file:///tmp/edx-s3/grades/course-v1%253ATheSoftwareGuild%252BSG101%252B2016_Summer/TheSoftwareGuild_SG101_2016_Summer_problem_grade_report_2016-09-06-1816.csv
  • file:///tmp/edx-s3/grades/course-v1%253ATheSoftwareGuild%252BSG101%252B2016_Summer/TheSoftwareGuild_SG101_2016_Summer_grade_report_2016-09-06-1815.csv

On prod AMC in django shell, I did:

from django.conf import settings
settings.GRADES_DOWNLOAD
{u'STORAGE_TYPE': u'S3', u'ROOT_PATH': u'grades', u'BUCKET': u'edx-amcalpha-grade-bucket'}

Not sure why the method on the S3ReportStore for returning links is returning file:/// links but it is. Configuration looks correct.

https://github.com/appsembler/edx-platform/blob/appsembler/amc/testdrive/lms/djangoapps/instructor_task/models.py#L316

Tech Debt: USE_S3_FOR_CUSTOMER_THEMES is hardcoded and should be configurable

USE_S3_FOR_CUSTOMER_THEMES is somewhat a very bad method of choosing a storage class.

In devstack it is mixed with static files, while it should be a media file.

The proper solution for doing such operation is to use a configurable storage class:

# production
CUSTOMER_THEMES_STORAGE_CLASS = 'storages.backends.s3boto.S3BotoStorage'
CUSTOMER_THEMES_STORAGE_PARAMS = {
  'location': 'customer_themes',
}

# dev
CUSTOMER_THEMES_STORAGE_CLASS = 'django.core.files.storage.FileSystemStorage'
CUSTOMER_THEMES_STORAGE_PARAMS = {}

This way it's fully configurable and the code won't care where it's running.

Also, this needs a cash busting mechanism. So perhaps at save, the css file should be suffixed with some GUID:

appsembler-the-red.staging-tahoe-hawthorn.appsembler.com.e044f8e7-e4bd-44b2-9c46-6af817b1ebbd.css

Deleting all appsembler-the-red.staging-tahoe-hawthorn.appsembler.com.* files before that wouldn't be a bad idea.

Broken Tahoe test for certificates

In #257 we added few tests for certificates. test_visible_only_to_course_staff is now broken after the Hawthorn merge.

$ pytest lms/djangoapps/instructor/tests/test_certificates.py::CertificatesInstructorDashTest::test_visible_only_to_course_staff

Someday we should fix it 😅

Tech Debt: Fix Site Configuration and Organizations hacks

Both the Site Configuration Django app and the edx-organizations repository have substantial hacks to enable Tahoe multi-tenancy.

This is a technical debt that we should address by moving those hacks into a new app, let's call it tahoe-sites, or even to the existing appsembler/sites Django application.

We've had a lot of migration issues and RuntimeError: Model class organizations.models.Organization doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS. exceptions to keep it for the next release.

Contribute: fix bug in signal marking notpassing whitelisted certs

Contribute: #983 (RED-2361)

Problem description: Certificates have a Django signal, when a certificate object is created and has a passing status (downloadable or generating) but the course or the grading change, and it ends up in a non passing grade for the learner, the certificate change automatically to notpassing.
That's fine except when there is an Exception certificate created from the instructor dashboard, then it should never change to notpassing.

Contribute: Fix RecursionError for xblock translations

Contribute both #953 and #956

This exception below is raised because there's an attempt to make the ModuleI18nService fallback to itself due to the use of the magical ModuleI18nService.__getattr__ which returns django.utils.translation._fallback when asked for ModuleI18nService._fallback. RED-2263.

This creates a infinite recursion that needs to break.

File "xblockutils/templatetags/i18n.py", line 41, in merge_translation
    translation.merge(i18n_service)
...
File "python3.5/gettext.py", line 169, in add_fallback
    self._fallback.add_fallback(fallback)
RecursionError: maximum recursion depth exceeded"

Tests

I wasn't able to reproduce the issue via scripts or tests. The issue has extended beyond the regular bug timebox of 4 hours.

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.