Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working in Moodle 3.9.3 #6

Open
neeesn opened this issue Jun 16, 2021 · 3 comments
Open

Not working in Moodle 3.9.3 #6

neeesn opened this issue Jun 16, 2021 · 3 comments

Comments

@neeesn
Copy link

neeesn commented Jun 16, 2021

We have installed the Atto and filter plugins, in the news versions from moodle.org.
The filter is activated and the "trusted contend" is turned on.

But only admins can insert objects as Book Creator. If teachers or other (with the trusted content capability) doest it i only shows an image. But if we add the user as siteadmin, and insert it again, its working, and we are able to go through the book.

In the Atto plugin it makes a check to see if you are siteadmin to get full access:

function atto_studietube_params_for_js($elementid, $options, $fpoptions)

    {     
        global $USER;
        $full = false;

        if(is_siteadmin()) {
                       $full = true;
        }

        return array('full' => $full);

    }

and again:

var html = '';
            if(this.get('full'))
  
  
            {
  
  
                html = '<div style="width:100%;height:0;position:relative;padding-bottom:56.25%;">';
  
  
                html += '<iframe src="//www.studietube.dk/e/'+ret[0]+'/0" ';
  
  
                html += 'style="width:100%;height:100%;position:absolute;top:0;left:0;" allowfullscreen webkitallowfullscreen ';
  
  
                html += 'mozAllowFullScreen frameborder="0" allow="encrypted-media"></iframe></div>';
  
  
            }
  
  
            else
  
  
            {
  
  
                html = '<div><img class="studietube" id="'+ret[0]+'" ';
  
  
                html += 'src="//www.studietube.dk/t/'+ret[0]+'"></div>';
  
  
            }
  
  
    

  
  
            this.get('host').insertContentAtFocusPoint(html);
  
  
            <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">markUpdated</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span><!--EndFragment-->
@damianxd
Copy link
Owner

Hello @neeesn,

Do you have the filter_studietube plugin installed too?

Kind regards

@damianxd
Copy link
Owner

damianxd commented Jul 5, 2021

@neeesn, we have tried the plugin with version 3.11+ (Build: 20210701) and everything seems to work as intended, including the posts from regular users as iframe without the need to turn on the "trusted content" setting. Please install the filter_studietube plugin along with atto_studietube since the filter is the one that will change the content for the iframe from Studietube and it's a requirement for the editor plugin. If you still have the same problem, please reply us here and we will check this again to find a solution for you.

Kind regards

@damianxd
Copy link
Owner

@neeesn Please try the latest version, it should fix the problem with the static picture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants