Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.3, 2.1.1, 2.2
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: Blocks
    • Labels:
    • Testing Instructions:
      Hide
      1. Log in as an admin
      2. In a course create an html block and give it a multilang block
      3. While editing the block go to the permissions screen for the block (Settings block > Block: blockname > Permissions)
      4. Remove the teachers ability to edit the block by removing teacher from the roles with permission list (moodle/block:edit)
      5. Log in as the teacher
      6. Browse to edit the block
      7. Make sure you see the translated strip and not the raw string.

      Multilang string example: <span class="multilang" lang="en">Some</span><span class="multilang" lang="nz">Sum</span>

      Show
      Log in as an admin In a course create an html block and give it a multilang block While editing the block go to the permissions screen for the block (Settings block > Block: blockname > Permissions) Remove the teachers ability to edit the block by removing teacher from the roles with permission list (moodle/block:edit) Log in as the teacher Browse to edit the block Make sure you see the translated strip and not the raw string. Multilang string example: <span class="multilang" lang="en">Some</span><span class="multilang" lang="nz">Sum</span>
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull Master Branch:
      wip-MDL-29006-master
    • Rank:
      18522

      Description

      We created sticky blocks on mymoodle of type block_html like described in MDL-26103.
      In the block title, we used multilang tags to support several languages.

      If the user views the block, multilang filter works as expexted. When the user clicks on "edit block", he is shown the preference page of the block. That's ok for this ticket. On this preference page, the block title field is read-only, which is also totally ok.

      The Problem is now: multilang filter is not applied on the block title field, so the multilang tags are visible to the user.

      See (german) screenshot attached for clarification.

        Activity

        Hide
        Michael de Raadt added a comment -

        Thanks for reporting that.

        Show
        Michael de Raadt added a comment - Thanks for reporting that.
        Hide
        Andrew Davis added a comment -

        re this comment

        // If a title has been set but the user cannot edit it show it to the
        // user as they would see it. e.g. format it nicely

        consider changing that to:

        //If a title has been set but the user cannot edit it format it nicely
        //Display it unformatted if the user is able to edit it.

        or something similar. Just trying to avoid the weird circular phrase "show it to the user as they would see it."

        In your testing instructions expand "While editing the block go to the permissions screen for the block and remove the teachers ability to edit the block" to include how to get to the block's permissions screen and how to take away editing ability. Altering block permissions is pretty arcane.

        Also, its probably worth providing an example multi-lang string with your instructions. Most people don't know what multi-lang is let alone how to construct a mult-lang string.

        Show
        Andrew Davis added a comment - re this comment // If a title has been set but the user cannot edit it show it to the // user as they would see it. e.g. format it nicely consider changing that to: //If a title has been set but the user cannot edit it format it nicely //Display it unformatted if the user is able to edit it. or something similar. Just trying to avoid the weird circular phrase "show it to the user as they would see it." In your testing instructions expand "While editing the block go to the permissions screen for the block and remove the teachers ability to edit the block" to include how to get to the block's permissions screen and how to take away editing ability. Altering block permissions is pretty arcane. Also, its probably worth providing an example multi-lang string with your instructions. Most people don't know what multi-lang is let alone how to construct a mult-lang string.
        Hide
        Sam Hemelryk added a comment -

        Thanks Andrew, I've simplified the comment and put up for integration.

        Cheers
        Sam

        Show
        Sam Hemelryk added a comment - Thanks Andrew, I've simplified the comment and put up for integration. Cheers Sam
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Nasty hack, btw. But if it works... is the only way to achieve that.

        Another thing that always causes sort of stress here... that block.. should be using the context where it has been created or the context of the page where it's being displayed. Imagine you add some smilies or friends and configure the block to be sticky in the whole site. If any course/module disables the smilies filter... should we stop viewing them?

        Not 100% sure really. Anyway I've integrated this but I guess the question above needs discussion (separate issue, perhaps).

        Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Nasty hack, btw. But if it works... is the only way to achieve that. Another thing that always causes sort of stress here... that block.. should be using the context where it has been created or the context of the page where it's being displayed. Imagine you add some smilies or friends and configure the block to be sticky in the whole site. If any course/module disables the smilies filter... should we stop viewing them? Not 100% sure really. Anyway I've integrated this but I guess the question above needs discussion (separate issue, perhaps). Ciao
        Hide
        Rossiani Wijaya added a comment -

        Thanks Sam for fixing this. It works great.

        Test passed.

        Show
        Rossiani Wijaya added a comment - Thanks Sam for fixing this. It works great. Test passed.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        git & cvs repositories updated with your gorgeous code. Many thanks!

        Closing and ciao

        Show
        Eloy Lafuente (stronk7) added a comment - git & cvs repositories updated with your gorgeous code. Many thanks! Closing and ciao

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: