Hack fix for course languages in resources (bug 2922)
This commit is contained in:
@@ -79,6 +79,7 @@ var $resource;
|
||||
function resource_base($cmid=0) {
|
||||
|
||||
global $CFG;
|
||||
global $course; // Ugly hack, needed for course language ugly hack
|
||||
|
||||
if ($cmid) {
|
||||
if (! $this->cm = get_record("course_modules", "id", $cmid)) {
|
||||
@@ -89,6 +90,8 @@ function resource_base($cmid=0) {
|
||||
error("Course is misconfigured");
|
||||
}
|
||||
|
||||
$course = $this->course; // Make it a global so we can see it later
|
||||
|
||||
require_course_login($this->course, true, $this->cm);
|
||||
|
||||
if (! $this->resource = get_record("resource", "id", $this->cm->instance)) {
|
||||
|
||||
Reference in New Issue
Block a user