2014-10-10 17:17:20 +00:00
|
|
|
from django import forms
|
2023-11-17 12:25:13 +00:00
|
|
|
from django.utils.translation import gettext_lazy as _
|
2014-10-10 17:17:20 +00:00
|
|
|
|
2015-09-30 13:22:17 +00:00
|
|
|
from orchestra.forms.widgets import SpanWidget
|
|
|
|
|
|
|
|
from .. import settings
|
2015-09-21 10:28:49 +00:00
|
|
|
from ..forms import SaaSPasswordForm
|
|
|
|
from .options import SoftwareService
|
2014-10-10 17:17:20 +00:00
|
|
|
|
|
|
|
|
2015-09-21 10:28:49 +00:00
|
|
|
class MoodleForm(SaaSPasswordForm):
|
2015-09-30 13:22:17 +00:00
|
|
|
admin_username = forms.CharField(label=_("Admin username"), required=False,
|
|
|
|
widget=SpanWidget(display='admin'))
|
2014-10-10 17:17:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MoodleService(SoftwareService):
|
2015-09-30 13:22:17 +00:00
|
|
|
name = 'moodle'
|
2014-10-10 17:17:20 +00:00
|
|
|
verbose_name = "Moodle"
|
|
|
|
form = MoodleForm
|
|
|
|
description_field = 'site_name'
|
2015-03-04 21:06:16 +00:00
|
|
|
icon = 'orchestra/icons/apps/Moodle.png'
|
2015-09-30 13:22:17 +00:00
|
|
|
site_domain = settings.SAAS_MOODLE_DOMAIN
|
2015-10-01 16:02:26 +00:00
|
|
|
allow_custom_url = settings.SAAS_MOODLE_ALLOW_CUSTOM_URL
|
2015-09-30 13:22:17 +00:00
|
|
|
db_name = settings.SAAS_MOODLE_DB_NAME
|
|
|
|
db_user = settings.SAAS_MOODLE_DB_USER
|