Skip to main content
Whoops! There was an error.
Whoops \ Exception \ ErrorException (E_WARNING)
getimagesize(/home/devl/moodledata/filedir/8f/6d/8f6d8c5cebba08181c89290b63cfb299716ddc65): Failed to open stream: No such file or directory Whoops\Exception\ErrorException thrown with message "getimagesize(/home/devl/moodledata/filedir/8f/6d/8f6d8c5cebba08181c89290b63cfb299716ddc65): Failed to open stream: No such file or directory" Stacktrace: #11 Whoops\Exception\ErrorException in /home/devl/public_html/lib/filestorage/file_system.php:410 #10 getimagesize in /home/devl/public_html/lib/filestorage/file_system.php:410 #9 file_system:get_imageinfo_from_path in /home/devl/public_html/lib/filestorage/file_system.php:369 #8 file_system:get_imageinfo in /home/devl/public_html/lib/filestorage/stored_file.php:597 #7 stored_file:get_imageinfo in /home/devl/public_html/lib/filestorage/stored_file.php:612 #6 stored_file:is_valid_image in /home/devl/public_html/theme/alphachild/classes/util/course.php:64 #5 theme_alphachild\util\course:get_summary_image in /home/devl/public_html/theme/alphachild/classes/output/core/course_renderer.php:337 #4 theme_alphachild\output\core\course_renderer:coursecat_coursebox_content in /home/devl/public_html/theme/alphachild/classes/output/core/course_renderer.php:387 #3 theme_alphachild\output\core\course_renderer:coursecat_coursebox in /home/devl/public_html/theme/alphachild/classes/output/core/course_renderer.php:166 #2 theme_alphachild\output\core\course_renderer:coursecat_courses in /home/devl/public_html/course/renderer.php:1433 #1 core_course_renderer:frontpage_available_courses in /home/devl/public_html/course/renderer.php:1712 #0 core_course_renderer:frontpage in /home/devl/public_html/index.php:137
Stack frames (12)
11
Whoops\Exception\ErrorException
/lib/filestorage/file_system.php410
10
getimagesize
/lib/filestorage/file_system.php410
9
file_system get_imageinfo_from_path
/lib/filestorage/file_system.php369
8
file_system get_imageinfo
/lib/filestorage/stored_file.php597
7
stored_file get_imageinfo
/lib/filestorage/stored_file.php612
6
stored_file is_valid_image
/theme/alphachild/classes/util/course.php64
5
theme_alphachild\util\course get_summary_image
/theme/alphachild/classes/output/core/course_renderer.php337
4
theme_alphachild\output\core\course_renderer coursecat_coursebox_content
/theme/alphachild/classes/output/core/course_renderer.php387
3
theme_alphachild\output\core\course_renderer coursecat_coursebox
/theme/alphachild/classes/output/core/course_renderer.php166
2
theme_alphachild\output\core\course_renderer coursecat_courses
/course/renderer.php1433
1
core_course_renderer frontpage_available_courses
/course/renderer.php1712
0
core_course_renderer frontpage
/index.php137
/home/devl/public_html/lib/filestorage/file_system.php
            // The mimetype does not include image.
            return false;
        }
 
        // If it looks like an image, and it smells like an image, perhaps it's an image!
        return true;
    }
 
    /**
     * Returns image information relating to the specified path or URL.
     *
     * @param string $path The full path of the image file.
     * @return array|bool array that containing width, height, and mimetype or false if cannot get the image info.
     */
    protected function get_imageinfo_from_path($path) {
        $imagemimetype = file_storage::mimetype_from_file($path);
        $issvgimage = file_is_svg_image_from_mimetype($imagemimetype);
 
        if (!$issvgimage) {
            $imageinfo = getimagesize($path);
            if (!is_array($imageinfo)) {
                return false; // Nothing to process, the file was not recognised as image by GD.
            }
            $image = [
                    'width' => $imageinfo[0],
                    'height' => $imageinfo[1],
                    'mimetype' => image_type_to_mime_type($imageinfo[2]),
            ];
        } else {
            // Since SVG file is actually an XML file, GD cannot handle.
            $svgcontent = @simplexml_load_file($path);
            if (!$svgcontent) {
                // Cannot parse the file.
                return false;
            }
            $svgattrs = $svgcontent->attributes();
 
            if (!empty($svgattrs->viewBox)) {
                // We have viewBox.
                $viewboxval = explode(' ', $svgattrs->viewBox);
/home/devl/public_html/lib/filestorage/file_system.php
            // The mimetype does not include image.
            return false;
        }
 
        // If it looks like an image, and it smells like an image, perhaps it's an image!
        return true;
    }
 
    /**
     * Returns image information relating to the specified path or URL.
     *
     * @param string $path The full path of the image file.
     * @return array|bool array that containing width, height, and mimetype or false if cannot get the image info.
     */
    protected function get_imageinfo_from_path($path) {
        $imagemimetype = file_storage::mimetype_from_file($path);
        $issvgimage = file_is_svg_image_from_mimetype($imagemimetype);
 
        if (!$issvgimage) {
            $imageinfo = getimagesize($path);
            if (!is_array($imageinfo)) {
                return false; // Nothing to process, the file was not recognised as image by GD.
            }
            $image = [
                    'width' => $imageinfo[0],
                    'height' => $imageinfo[1],
                    'mimetype' => image_type_to_mime_type($imageinfo[2]),
            ];
        } else {
            // Since SVG file is actually an XML file, GD cannot handle.
            $svgcontent = @simplexml_load_file($path);
            if (!$svgcontent) {
                // Cannot parse the file.
                return false;
            }
            $svgattrs = $svgcontent->attributes();
 
            if (!empty($svgattrs->viewBox)) {
                // We have viewBox.
                $viewboxval = explode(' ', $svgattrs->viewBox);
/home/devl/public_html/lib/filestorage/file_system.php
     * Information is determined from the file content
     *
     * @param stored_file $file The file to inspect
     * @return mixed array with width, height and mimetype; false if not an image
     */
    public function get_imageinfo(stored_file $file) {
        if (!$this->is_image_from_storedfile($file)) {
            return false;
        }
 
        $hash = $file->get_contenthash();
        $cache = cache::make('core', 'file_imageinfo');
        $info = $cache->get($hash);
        if ($info !== false) {
            return $info;
        }
 
        // Whilst get_imageinfo_from_path can use remote paths, it must download the entire file first.
        // It is more efficient to use a local file when possible.
        $info = $this->get_imageinfo_from_path($this->get_local_path_from_storedfile($file, true));
        $cache->set($hash, $info);
        return $info;
    }
 
    /**
     * Attempt to determine whether the specified file is likely to be an
     * image.
     * Since this relies upon the mimetype stored in the files table, there
     * may be times when this information is not 100% accurate.
     *
     * @param stored_file $file The file to check
     * @return bool
     */
    public function is_image_from_storedfile(stored_file $file) {
        if (!$file->get_filesize()) {
            // An empty file cannot be an image.
            return false;
        }
 
        $mimetype = $file->get_mimetype();
/home/devl/public_html/lib/filestorage/stored_file.php
                // This file is not stored locally - attempt to retrieve it from the repository.
                // This may happen if the repository deliberately does not fetch files, or if there is a failure with the sync.
                $fileinfo = $this->repository->get_file($this->get_reference());
                if (isset($fileinfo['path'])) {
                    return $filearch->add_file_from_pathname($archivepath, $fileinfo['path']);
                }
            }
        }
 
        return $this->filesystem->add_storedfile_to_archive($this, $filearch, $archivepath);
    }
 
    /**
     * Returns information about image,
     * information is determined from the file content
     *
     * @return mixed array with width, height and mimetype; false if not an image
     */
    public function get_imageinfo() {
        return $this->filesystem->get_imageinfo($this);
    }
 
    /**
     * Verifies the file is a valid web image - gif, png and jpeg only.
     *
     * It should be ok to serve this image from server without any other security workarounds.
     *
     * @return bool true if file ok
     */
    public function is_valid_image() {
        $mimetype = $this->get_mimetype();
        if (!file_mimetype_in_typegroup($mimetype, 'web_image')) {
            return false;
        }
        if (!$info = $this->get_imageinfo()) {
            return false;
        }
        if ($info['mimetype'] !== $mimetype) {
            return false;
        }
/home/devl/public_html/lib/filestorage/stored_file.php
     *
     * @return mixed array with width, height and mimetype; false if not an image
     */
    public function get_imageinfo() {
        return $this->filesystem->get_imageinfo($this);
    }
 
    /**
     * Verifies the file is a valid web image - gif, png and jpeg only.
     *
     * It should be ok to serve this image from server without any other security workarounds.
     *
     * @return bool true if file ok
     */
    public function is_valid_image() {
        $mimetype = $this->get_mimetype();
        if (!file_mimetype_in_typegroup($mimetype, 'web_image')) {
            return false;
        }
        if (!$info = $this->get_imageinfo()) {
            return false;
        }
        if ($info['mimetype'] !== $mimetype) {
            return false;
        }
        // ok, GD likes this image
        return true;
    }
 
    /**
     * Returns parent directory, creates missing parents if needed.
     *
     * @return stored_file
     */
    public function get_parent_directory() {
        if ($this->file_record->filepath === '/' and $this->file_record->filename === '.') {
            //root dir does not have parent
            return null;
        }
 
/home/devl/public_html/theme/alphachild/classes/util/course.php
    /**
     * Class constructor
     *
     * @param core_course_list_element $course
     *
     */
    public function __construct($course) {
        $this->course = $course;
    }
 
    /**
     * Returns the first course's summary image url
     *
     * @return string
     */
    public function get_summary_image($returngeneratedimageifnone = true) {
        global $CFG, $OUTPUT;
 
        foreach ($this->course->get_course_overviewfiles() as $file) {
            if ($file->is_valid_image()) {
                $url = moodle_url::make_file_url(
                    "$CFG->wwwroot/pluginfile.php",
                    '/' . $file->get_contextid() . '/' . $file->get_component() . '/' .
                        $file->get_filearea() . $file->get_filepath() . $file->get_filename(),
                    !$file->is_valid_image()
                );
                return $url->out();
            }
        }
 
        if (!$returngeneratedimageifnone) {
            return '';
        }
 
        return $OUTPUT->get_generated_image_for_id($this->course->id);
    }
 
    /**
     * Returns HTML to display course contacts.
     *
/home/devl/public_html/theme/alphachild/classes/output/core/course_renderer.php
        }
 
        if ($theme->settings->courselangbadge == 1) {
            $forcedlanguage = strval($course->lang);
        } else {
            $forcedlanguage = null;
        }
        if ($theme->settings->showcustomfields == 1) {
            $showcustomfields = true;
        } else {
            $showcustomfields = false;
        }
        
        $stringaccess = format_text(theme_alphachild_get_setting('stringaccess'), FORMAT_HTML, array('noclean' => true));
 
        $data = [
            'id' => $course->id,
            'fullname' => $chelper->get_course_formatted_name($course),
            'visible' => $course->visible,
            'image' => $courseutil->get_summary_image(),
            'summary' => $courseutil->get_summary($chelper),
            'category' => $courseutil->get_category(),
            'customfields' => $courseutil->get_custom_fields(),
            'showcustomfields' => $showcustomfields,
            'hasprogress' => $hasprogress,
            'progress' => (int) $courseprogress,
            'hasenrolmenticons' => $courseenrolmenticons != false,
            'enrolmenticons' => $courseenrolmenticons,
            'hascontacts' => !empty($coursecontacts),
            'contacts' => $coursecontacts,
            'stringaccess' => $stringaccess,
            'displayteachers' => $displayteachers,
            'cccsummary' => $cccsummary,
            'coursecarddesclimit' => $coursecarddesclimit,
            'forcedlanguage' => $forcedlanguage
        ];
 
        if ($theme->settings->courselistview == 1) {
            return $this->render_from_template('theme_alpha/custom_courselist', $data);
        } else {
/home/devl/public_html/theme/alphachild/classes/output/core/course_renderer.php
     * @param coursecat_helper $chelper various display options
     * @param core_course_list_element|stdClass $course
     * @param string $additionalclasses additional classes to add to the main <div> tag (usually
     *    depend on the course position in list - first/last/even/odd)
     * @return string
     */
    protected function coursecat_coursebox(coursecat_helper $chelper, $course, $additionalclasses = '') {
        if (!isset($this->strings->summary)) {
            $this->strings->summary = get_string('summary');
        }
 
        if ($chelper->get_show_courses() <= self::COURSECAT_SHOW_COURSES_COUNT) {
            return '';
        }
 
        if ($course instanceof stdClass) {
            $course = new core_course_list_element($course);
        }
 
        return $this->coursecat_coursebox_content($chelper, $course);
    }
 
    /**
     * Returns HTML to display a tree of subcategories and courses in the given category
     *
     * @param coursecat_helper $chelper various display options
     * @param core_course_category $coursecat top category (this category's name and description will NOT be added to the tree)
     * @return string
     */
    protected function coursecat_tree(coursecat_helper $chelper, $coursecat) {
        // Reset the category expanded flag for this course category tree first.
        $this->categoryexpandedonload = false;
        $categorycontent = $this->coursecat_category_content($chelper, $coursecat, 1);
        if (empty($categorycontent)) {
            return '';
        }
 
        // Start content generation.
        $content = '';
        $attributes = $chelper->get_and_erase_attributes('course_category_tree clearfix');
/home/devl/public_html/theme/alphachild/classes/output/core/course_renderer.php
        }
 
        // Display list of courses.
        $attributes = $chelper->get_and_erase_attributes('courses');
        $content = html_writer::start_tag('div', $attributes);
 
        if (!empty($pagingbar)) {
            $content .= $pagingbar;
        }
 
        $coursecount = 1;
 
        if ($theme->settings->courselistview == 1) {
            $content .= html_writer::start_tag('div', array('class' => 'rui-course--list mt-2'));
        } else {
            $content .= html_writer::start_tag('div', array('class' => 'rui-course-card-deck mt-2'));
        }
 
        foreach ($courses as $course) {
            $content .= $this->coursecat_coursebox($chelper, $course);
 
            $coursecount++;
        }
 
        $content .= html_writer::end_tag('div');
 
        if (!empty($pagingbar)) {
            $content .= $pagingbar;
        }
 
        if (!empty($morelink)) {
            $content .= $morelink;
        }
 
        $content .= html_writer::end_tag('div'); // End courses.
 
        return $content;
    }
 
    protected function coursecat_subcategories(coursecat_helper $chelper, $coursecat, $depth) {
/home/devl/public_html/course/renderer.php
     */
    public function frontpage_available_courses() {
        global $CFG;
 
        $chelper = new coursecat_helper();
        $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->
                set_courses_display_options(array(
                    'recursive' => true,
                    'limit' => $CFG->frontpagecourselimit,
                    'viewmoreurl' => new moodle_url('/course/index.php'),
                    'viewmoretext' => new lang_string('fulllistofcourses')));
 
        $chelper->set_attributes(array('class' => 'frontpage-course-list-all'));
        $courses = core_course_category::top()->get_courses($chelper->get_courses_display_options());
        $totalcount = core_course_category::top()->get_courses_count($chelper->get_courses_display_options());
        if (!$totalcount && !$this->page->user_is_editing() && has_capability('moodle/course:create', context_system::instance())) {
            // Print link to create a new course, for the 1st available category.
            return $this->add_new_course_button();
        }
        return $this->coursecat_courses($chelper, $courses, $totalcount);
    }
 
    /**
     * Returns HTML to the "add new course" button for the page
     *
     * @return string
     */
    public function add_new_course_button() {
        global $CFG;
        // Print link to create a new course, for the 1st available category.
        $output = $this->container_start('buttons');
        $url = new moodle_url('/course/edit.php', array('category' => $CFG->defaultrequestcategory, 'returnto' => 'topcat'));
        $output .= $this->single_button($url, get_string('addnewcourse'), 'get');
        $output .= $this->container_end('buttons');
        return $output;
    }
 
    /**
     * Returns HTML to print tree with course categories and courses for the frontpage
     *
/home/devl/public_html/course/renderer.php
                        require_once($CFG->dirroot .'/mod/forum/lib.php');
                        if (($newsforum = forum_get_course_forum($SITE->id, 'news')) &&
                                ($forumcontents = $this->frontpage_news($newsforum))) {
                            $newsforumcm = get_fast_modinfo($SITE)->instances['forum'][$newsforum->id];
                            $output .= $this->frontpage_part('skipsitenews', 'site-news-forum',
                                $newsforumcm->get_formatted_name(), $forumcontents);
                        }
                    }
                    break;
 
                case FRONTPAGEENROLLEDCOURSELIST:
                    $mycourseshtml = $this->frontpage_my_courses();
                    if (!empty($mycourseshtml)) {
                        $output .= $this->frontpage_part('skipmycourses', 'frontpage-course-list',
                            get_string('mycourses'), $mycourseshtml);
                    }
                    break;
 
                case FRONTPAGEALLCOURSELIST:
                    $availablecourseshtml = $this->frontpage_available_courses();
                    $output .= $this->frontpage_part('skipavailablecourses', 'frontpage-available-course-list',
                        get_string('availablecourses'), $availablecourseshtml);
                    break;
 
                case FRONTPAGECATEGORYNAMES:
                    $output .= $this->frontpage_part('skipcategories', 'frontpage-category-names',
                        get_string('categories'), $this->frontpage_categories_list());
                    break;
 
                case FRONTPAGECATEGORYCOMBO:
                    $output .= $this->frontpage_part('skipcourses', 'frontpage-category-combo',
                        get_string('courses'), $this->frontpage_combo_list());
                    break;
 
                case FRONTPAGECOURSESEARCH:
                    $output .= $this->box($this->course_search_form(''), 'd-flex justify-content-center');
                    break;
 
            }
            $output .= '<br />';
/home/devl/public_html/index.php
$siteformatoptions = course_get_format($SITE)->get_format_options();
$modinfo = get_fast_modinfo($SITE);
$modnamesused = $modinfo->get_used_module_names();
 
// Print Section or custom info.
if (!empty($CFG->customfrontpageinclude)) {
    // Pre-fill some variables that custom front page might use.
    $modnames = get_module_types_names();
    $modnamesplural = get_module_types_names(true);
    $mods = $modinfo->get_cms();
 
    include($CFG->customfrontpageinclude);
 
} else if ($siteformatoptions['numsections'] > 0) {
    echo $courserenderer->frontpage_section1();
}
// Include course AJAX.
include_course_ajax($SITE, $modnamesused);
 
echo $courserenderer->frontpage();
 
if ($editing && has_capability('moodle/course:create', context_system::instance())) {
    echo $courserenderer->add_new_course_button();
}
echo $OUTPUT->footer();
 

Environment & details:

empty
empty
empty
empty
Key Value
USER stdClass Object ( [id] => 0 [mnethostid] => 1 [sesskey] => P6zIzHLNPg [access] => Array ( [ra] => Array ( [/1] => Array ( [6] => 6 ) ) [time] => 1752254729 [rsw] => Array ( ) ) [enrol] => Array ( [enrolled] => Array ( ) [tempguest] => Array ( ) ) [preference] => Array ( ) )
SESSION stdClass Object ( [isnewsessioncookie] => 1 [lang] => en [cachestore_session] => Array ( [default_session-core/navigation_cache] => Array ( [__lastaccess__u0_5nvejeei3dm98uhjcqn378q9su] => Array ( [0] => 1752254729 [1] => 1752254729 ) ) [default_session-core/coursecat] => Array ( [__lastaccess__u0_5nvejeei3dm98uhjcqn378q9su] => Array ( [0] => 1752254729 [1] => 1752254729 ) [u0_5nvejeei3dm98uhjcqn378q9su_053ea30ccab85e0a0a75827132f6437bf9ea3b13] => Array ( [0] => 1752254729.6074-68714909944811.90199145 [1] => 1752254729 ) [u0_5nvejeei3dm98uhjcqn378q9su_12931bf36757ed1e50ffea928baaf4290a86340f] => Array ( [0] => Array ( ) [1] => 1752254729 ) [u0_5nvejeei3dm98uhjcqn378q9su_3fb451d65d5bf2fdcaa9da06a93dc223db311209] => Array ( [0] => Array ( [0] => 2 [1] => 1 ) [1] => 1752254729 ) [u0_5nvejeei3dm98uhjcqn378q9su_d93547987e9e5d2f9889a2217274f1bdddee5150] => Array ( [0] => Array ( [0] => 7 [1] => 6 [2] => 5 [3] => 4 [4] => 3 [5] => 2 ) [1] => 1752254729 ) [u0_5nvejeei3dm98uhjcqn378q9su_c534c3d75c707c22506368a980e84802cfdab2c0] => Array ( [0] => 6 [1] => 1752254729 ) ) ) )
Key Value
PATH /usr/local/bin:/bin:/usr/bin
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING br,gzip
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_HOST dev1.isoft-digital.net
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_X_HTTPS 1
DOCUMENT_ROOT /home/devl/public_html
REMOTE_ADDR 18.97.14.86
REMOTE_PORT 58140
SERVER_ADDR 65.181.111.238
SERVER_NAME dev1.isoft-digital.net
SERVER_ADMIN webmaster@dev1.isoft-digital.net
SERVER_PORT 443
REQUEST_SCHEME https
REQUEST_URI /
HTTPS on
X_SPDY HTTP2
SSL_PROTOCOL TLSv1.3
SSL_CIPHER TLS_AES_256_GCM_SHA384
SSL_CIPHER_USEKEYSIZE 256
SSL_CIPHER_ALGKEYSIZE 256
SCRIPT_FILENAME /home/devl/public_html/index.php
QUERY_STRING
SCRIPT_URI https://dev1.isoft-digital.net/
SCRIPT_URL /
SCRIPT_NAME /index.php
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE LiteSpeed
REQUEST_METHOD GET
X-LSCACHE on
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1752254729.0954
REQUEST_TIME 1752254729
empty
0. Whoops\Handler\PrettyPageHandler
1. Whoops\Handler\CallbackHandler