Panopto / Moodle-2.0-plugin-for-Panopto

Panopto's integration with the Moodle LMS.
http://www.panopto.com
GNU General Public License v3.0
18 stars 38 forks source link

Panopto AJAX call not respecting course forced language. #162

Closed t6nis closed 3 years ago

t6nis commented 4 years ago

Noticed that when my dashboard language is DE and i force some course language to be EN then panopto block will still render the answer in DE.

So require_login() in panopto_content.php should have $course parameter passed with it. Instead:

try {
    require_login();
    require_sesskey();
    header('Content-Type: text/html; charset=utf-8');
    global $CFG, $USER;

    $courseid = required_param('courseid', PARAM_INT);

    $content = new stdClass;

IT should be something like this:

try {
    $courseid = required_param('courseid', PARAM_INT);
    $course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST);
    require_login($course);
    require_sesskey();
    header('Content-Type: text/html; charset=utf-8');
    global $CFG, $USER;

    $content = new stdClass;

I hope this helps!

jmalmsten-panopto commented 4 years ago

Hi,

Thank you for bringing this to our attention. We have made an internal work item for this issue and will look into it at a future release.

Thanks, Joe

jmalmsten-panopto commented 3 years ago

Hi,

This should be resolved with the latest release of the Panopto block.

Thanks, Joe