am2021
June 21, 2023, 3:37am
1
Hi,
On registration_form.py, below is the code to define “I agree to the Terms of Service”
label = Text(_(
“I agree to the {platform_name} {terms_of_service_link_start}{terms_of_service}{terms_of_service_link_end}”
)).format(
platform_name=configuration_helpers.get_value(“PLATFORM_NAME”, settings.PLATFORM_NAME),
terms_of_service=terms_label,
terms_of_service_link_start=HTML(“”).format(
terms_link=terms_link
),
terms_of_service_link_end=HTML(“ ”),
)
How to reduce:
Tutor: 15.3.6
I would like to know where to define the variable {terms_link}.
Please advise, many thanks!
am2021
June 21, 2023, 3:38am
2
Is {terms_link} defined from django admin panel?
or via yml file?
sagar
(Sagar (ManpraX))
June 21, 2023, 6:57am
3
{terms_link} is a variable that is used locally in the code.
Can you check if ENABLE_MKTG_SITE
is set to true in your site configurations or settings.Features
?
Where you define that value depends on this setting.
If it’s true, you can set it in site configurations in the admin panel and yml file both. If not, it’s to be done in yml file. The variable name also changes according to the ENABLE_MKTG_SITE
setting
am2021
June 21, 2023, 9:15am
4
Many thanks for your reply!
May I know if `ENABLE_MKTG_SITE is defined in openedx’s ADMIN panel or or ecommerce’s ADMIN panel?
Thanks
am2021
June 21, 2023, 9:20am
5
FYI. I tried the following:
tutor config printvalue ENABLE_MKTG_SITE
Error: Missing configuration value: ENABLE_MKTG_SITE
(my site uses default)
sagar
(Sagar (ManpraX))
June 21, 2023, 9:33am
6
It can be found in site configurations or common.py and you might want to check config.yml as well.
Refer to this function to see how it works:
common/djangoapps/edxmako/shortcuts.py:35
"HONOR"
is the value passed to parameter name
to get the value you are looking for.
am2021
June 22, 2023, 3:09am
7
Thanks again for your reply.
May I have the sample command to set “HONOR”?
Would it be the following?
tutor config save --set HONOR=‘https://MY_SITE_NAME.com/’
am2021
June 22, 2023, 3:13am
8
On the registration page:
By creating an account, you agree to the Terms of Service and Honor Code in a new tab and you acknowledge that MY_SITE_NAME and each Member process your personal data in accordance with the Privacy Policy in a new tab .
Where [Terms of Service and Honor Code in a new tab]
points to incorrect page which does not exist on my site:
https://MY_SITE_NAME/authn/register?next=%2Fhonor#
(the correct URL should be: https://MY_SITE_NAME/tos)
Same, [Privacy Policy in a new tab]
points to incorrect page which also does not exist on my site:
https://apps.MY_SITE_NAME/authn/register?next=%2Fhonor#
(the correct URL should be: https://MY_SITE_NAME/privacy)
Please help!
sagar
(Sagar (ManpraX))
June 22, 2023, 8:05am
9
I don’t think this command will work. It needs to be in settings.MKTG_URL_LINK_MAP like this:
I haven’t tried changing this myself yet but here’s a post I found that may be relevant:
I have been advised that tutor config save --set… is a simple way to set django settings values rather than creating a whole tutor plugin to set a few config values in my local environment. I have used that command to update my tutor config.yml but i am not seeing any changes reflected in the ${TUTOR_ROOT}/env/apps/openedx/config/lms.env.json .
I do see updates made to the lms.env.json when i modify the standard settings such as PLATFORM_NAME . but not when i try to toggle features on/off or se…