تخطى إلى المحتوى الرئيسي
Paris
سجل الان




التقييم
Whoops! There was an error.
dml_missing_record_exception
تعذر العثور على السجل في جدول قاعدة البيانات course. dml_missing_record_exception thrown with message "تعذر العثور على السجل في جدول قاعدة البيانات course." Stacktrace: #3 dml_missing_record_exception in /var/www/html/newmoodle/ibsfiles/lib/dml/moodle_database.php:1662 #2 moodle_database:get_record_select in /var/www/html/newmoodle/ibsfiles/lib/dml/moodle_database.php:1638 #1 moodle_database:get_record in /var/www/html/newmoodle/ibsfiles/lib/classes/context/course.php:200 #0 core\context\course:instance in /var/www/html/newmoodle/ibsfiles/local/course/index.php:809
Stack frames (4)
3
dml_missing_record_exception
/lib/dml/moodle_database.php1662
2
moodle_database get_record_select
/lib/dml/moodle_database.php1638
1
moodle_database get_record
/lib/classes/context/course.php200
0
core\context\course instance
/local/course/index.php809
/var/www/html/newmoodle/ibsfiles/lib/dml/moodle_database.php
     *
     * @param string $table The database table to be checked against.
     * @param string $select A fragment of SQL to be used in a where clause in the SQL call.
     * @param array $params array of sql parameters
     * @param string $fields A comma separated list of fields to be returned from the chosen table.
     * @param int $strictness IGNORE_MISSING means compatible mode, false returned if record not found, debug message if more found;
     *                        IGNORE_MULTIPLE means return first, ignore multiple records found(not recommended);
     *                        MUST_EXIST means throw exception if no record or multiple records found
     * @return stdClass|false a fieldset object containing the first matching record, false or exception if error not found depending on mode
     * @throws dml_exception A DML specific exception is thrown for any errors.
     */
    public function get_record_select($table, $select, ?array $params=null, $fields='*', $strictness=IGNORE_MISSING) {
        if ($select) {
            $select = "WHERE $select";
        }
        try {
            return $this->get_record_sql("SELECT $fields FROM {" . $table . "} $select", $params, $strictness);
        } catch (dml_missing_record_exception $e) {
            // create new exception which will contain correct table name
            throw new dml_missing_record_exception($table, $e->sql, $e->params);
        }
    }
 
    /**
     * Get a single database record as an object using a SQL statement.
     *
     * The SQL statement should normally only return one record.
     * It is recommended to use get_records_sql() if more matches possible!
     *
     * @param string $sql The SQL string you wish to be executed, should normally only return one record.
     * @param array $params array of sql parameters
     * @param int $strictness IGNORE_MISSING means compatible mode, false returned if record not found, debug message if more found;
     *                        IGNORE_MULTIPLE means return first, ignore multiple records found(not recommended);
     *                        MUST_EXIST means throw exception if no record or multiple records found
     * @return mixed a fieldset object containing the first matching record, false or exception if error not found depending on mode
     * @throws dml_exception A DML specific exception is thrown for any errors.
     */
    public function get_record_sql($sql, ?array $params=null, $strictness=IGNORE_MISSING) {
        $strictness = (int)$strictness; // we support true/false for BC reasons too
        if ($strictness == IGNORE_MULTIPLE) {
/var/www/html/newmoodle/ibsfiles/lib/dml/moodle_database.php
        return $menu;
    }
 
    /**
     * Get a single database record as an object where all the given conditions met.
     *
     * @param string $table The table to select from.
     * @param array $conditions optional array $fieldname=>requestedvalue with AND in between
     * @param string $fields A comma separated list of fields to be returned from the chosen table.
     * @param int $strictness IGNORE_MISSING means compatible mode, false returned if record not found, debug message if more found;
     *                        IGNORE_MULTIPLE means return first, ignore multiple records found(not recommended);
     *                        MUST_EXIST means we will throw an exception if no record or multiple records found.
     *
     * @todo MDL-30407 MUST_EXIST option should not throw a dml_exception, it should throw a different exception as it's a requested check.
     * @return mixed a fieldset object containing the first matching record, false or exception if error not found depending on mode
     * @throws dml_exception A DML specific exception is thrown for any errors.
     */
    public function get_record($table, array $conditions, $fields='*', $strictness=IGNORE_MISSING) {
        list($select, $params) = $this->where_clause($table, $conditions);
        return $this->get_record_select($table, $select, $params, $fields, $strictness);
    }
 
    /**
     * Get a single database record as an object which match a particular WHERE clause.
     *
     * @param string $table The database table to be checked against.
     * @param string $select A fragment of SQL to be used in a where clause in the SQL call.
     * @param array $params array of sql parameters
     * @param string $fields A comma separated list of fields to be returned from the chosen table.
     * @param int $strictness IGNORE_MISSING means compatible mode, false returned if record not found, debug message if more found;
     *                        IGNORE_MULTIPLE means return first, ignore multiple records found(not recommended);
     *                        MUST_EXIST means throw exception if no record or multiple records found
     * @return stdClass|false a fieldset object containing the first matching record, false or exception if error not found depending on mode
     * @throws dml_exception A DML specific exception is thrown for any errors.
     */
    public function get_record_select($table, $select, ?array $params=null, $fields='*', $strictness=IGNORE_MISSING) {
        if ($select) {
            $select = "WHERE $select";
        }
        try {
/var/www/html/newmoodle/ibsfiles/lib/classes/context/course.php
    public function get_course_context($strict = true) {
        return $this;
    }
 
    /**
     * Returns course context instance.
     *
     * @param int $courseid id from {course} table
     * @param int $strictness
     * @return course|false context instance
     */
    public static function instance($courseid, $strictness = MUST_EXIST) {
        global $DB;
 
        if ($context = context::cache_get(self::LEVEL, $courseid)) {
            return $context;
        }
 
        if (!$record = $DB->get_record('context', array('contextlevel' => self::LEVEL, 'instanceid' => $courseid))) {
            if ($course = $DB->get_record('course', array('id' => $courseid), 'id,category', $strictness)) {
                if ($course->category) {
                    $parentcontext = coursecat::instance($course->category);
                    $record = context::insert_context_record(self::LEVEL, $course->id, $parentcontext->path);
                } else {
                    $record = context::insert_context_record(self::LEVEL, $course->id, '/'.SYSCONTEXTID, 0);
                }
            }
        }
 
        if ($record) {
            $context = new course($record);
            context::cache_add($context);
            return $context;
        }
 
        return false;
    }
 
    /**
     * Create missing context instances at course context level
/var/www/html/newmoodle/ibsfiles/local/course/index.php
                                    }
                                }
                                ?>
                            </div>
                        </div>
                    <?php } ?>
                    <div>
                        <?php
                        if (isset($data["trainers"]) && $data["trainers"]) { ?>
                            <div class="col-md-12">
                                <div class="col-md-6">
                                    <div class="h5"><?php echo format_text(get_string("trainer/s", "local_course")); ?> </div>
                                </div>
                                <div class="col-md-6">
                                    <?php echo format_text($data["trainers"]); ?>
                                </div>
                            </div>
                            <?php } else {
                            $role = $DB->get_record('role', array('shortname' => 'teacher'));
                            $context = context_course::instance($course->id);
                            if ($role):
                                $teachers = get_role_users($role->id, $context);
                                if (!$teachers) {
                                    $role = $DB->get_record('role', array('shortname' => 'editingteacher'));
                                    $teachers = get_role_users($role->id, $context);
                                }
                                $fullname = "";
                                if ($teachers) :
                            ?>
                                    <div class="col-md-12">
                                        <div class="col-md-6">
                                            <div class="h5"><?php echo format_text(get_string("trainer/s", "local_course")); ?> </div>
                                        </div>
                                        <div class="col-md-6">
                                            <?php
                                            if (isset($data["trainers"]) && $data["trainers"]) {
                                                echo format_text($data["trainers"]);
                                            } else {
                                                $role = $DB->get_record('role', array('shortname' => 'teacher'));
                                                $context = context_course::instance($course->id);

Environment & details:

Key Value
id 1043
lang ar
empty
empty
empty
Key Value
USER stdClass Object ( [id] => 0 [mnethostid] => 1 [sesskey] => fPuZrGXcDa [access] => Array ( [ra] => Array ( [/1] => Array ( [6] => 6 ) ) [time] => 1774861632 [rsw] => Array ( ) ) [enrol] => Array ( [enrolled] => Array ( ) [tempguest] => Array ( ) ) )
SESSION stdClass Object ( [isnewsessioncookie] => 1 [lang] => ar [cachestore_session] => Array ( [default_session-core/courseeditorstate] => Array ( ) [default_session-core/navigation_cache] => Array ( [__lastaccess__u0_2mkdbkbg63a415iap2810c6a4t] => Array ( [0] => 1774861632 [1] => 1774861632 ) ) [default_session-core/coursecat] => Array ( [__lastaccess__u0_2mkdbkbg63a415iap2810c6a4t] => Array ( [0] => 1774861632 [1] => 1774861632 ) [u0_2mkdbkbg63a415iap2810c6a4t_eb6544be623d27f9d5939806b40cfa6bf6fc020f] => Array ( [0] => 1774861632.7817-69ca3d40bed712.52764304 [1] => 1774861632 ) [u0_2mkdbkbg63a415iap2810c6a4t_9cde2e38d9f444e50660824e13407101c9b62b7b] => Array ( [0] => Array ( [0] => 53 [1] => 168 ) [1] => 1774861632 ) [u0_2mkdbkbg63a415iap2810c6a4t_e37a3a2da44a3b68a5eec440430b3d84e8914bdb] => Array ( [0] => Array ( [1] => 57 [2] => 54 [3] => 58 [4] => 59 [5] => 55 [6] => 63 [7] => 62 [8] => 61 [9] => 60 ) [1] => 1774861632 ) ) ) )
Key Value
HTTPS on
SSL_SERVER_S_DN_CN *.learnerslead.ibs.edu.jo
SSL_SERVER_I_DN_C US
SSL_SERVER_I_DN_O DigiCert Inc
SSL_SERVER_I_DN_OU www.digicert.com
SSL_SERVER_I_DN_CN RapidSSL ECC CA 2018
SSL_SERVER_SAN_DNS_0 *.learnerslead.ibs.edu.jo
SSL_SERVER_SAN_DNS_1 learnerslead.ibs.edu.jo
SSL_VERSION_INTERFACE mod_ssl/2.4.41
SSL_VERSION_LIBRARY OpenSSL/1.1.1f
SSL_PROTOCOL TLSv1.2
SSL_SECURE_RENEG true
SSL_COMPRESS_METHOD NULL
SSL_CIPHER ECDHE-ECDSA-AES128-GCM-SHA256
SSL_CIPHER_EXPORT false
SSL_CIPHER_USEKEYSIZE 128
SSL_CIPHER_ALGKEYSIZE 128
SSL_CLIENT_VERIFY NONE
SSL_SERVER_M_VERSION 3
SSL_SERVER_M_SERIAL 0A3E127F91B98FD6D4C3DB094D268553
SSL_SERVER_V_START Nov 8 00:00:00 2021 GMT
SSL_SERVER_V_END Nov 8 23:59:59 2022 GMT
SSL_SERVER_S_DN CN=*.learnerslead.ibs.edu.jo
SSL_SERVER_I_DN CN=RapidSSL ECC CA 2018,OU=www.digicert.com,O=DigiCert Inc,C=US
SSL_SERVER_A_KEY id-ecPublicKey
SSL_SERVER_A_SIG ecdsa-with-SHA256
SSL_SESSION_RESUMED Initial
HTTP_X_FORWARDED_FOR 216.73.216.101, 15.158.61.203
HTTP_X_FORWARDED_PROTO https
HTTP_X_FORWARDED_PORT 443
HTTP_HOST learnerslead.ibs.edu.jo
HTTP_X_AMZN_TRACE_ID Root=1-69ca3d40-7a4d3ecf06c2a4dc0a06ecfe
HTTP_CLOUDFRONT_VIEWER_COUNTRY_REGION OH
HTTP_CLOUDFRONT_VIEWER_TIME_ZONE America/New_York
HTTP_CLOUDFRONT_VIEWER_COUNTRY_REGION_NAME Ohio
HTTP_CLOUDFRONT_VIEWER_CITY Columbus
HTTP_CLOUDFRONT_VIEWER_ASN 16509
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_VIA 2.0 1e130cea96c42ad5e26aa46c0cf9ac1a.cloudfront.net (CloudFront)
HTTP_X_AMZ_CF_ID KEv0ox0l3ySQG2IYEDXu4lxAyQafKLGxQPIUSOjmCtDXLjPm-SXC1Q==
HTTP_CLOUDFRONT_VIEWER_METRO_CODE 535
HTTP_CLOUDFRONT_VIEWER_TLS TLSv1.3:TLS_AES_128_GCM_SHA256:fullHandshake
HTTP_ACCEPT */*
HTTP_ACCEPT_ENCODING gzip, br, zstd, deflate
HTTP_CLOUDFRONT_VIEWER_COUNTRY US
HTTP_CLOUDFRONT_FORWARDED_PROTO https
HTTP_CLOUDFRONT_VIEWER_ADDRESS 216.73.216.101:11670
HTTP_CLOUDFRONT_VIEWER_POSTAL_CODE 43215
HTTP_CLOUDFRONT_VIEWER_LATITUDE 39.96250
HTTP_CLOUDFRONT_VIEWER_COUNTRY_NAME United States
HTTP_CLOUDFRONT_VIEWER_LONGITUDE -83.00610
HTTP_CLOUDFRONT_IS_MOBILE_VIEWER false
HTTP_CLOUDFRONT_IS_TABLET_VIEWER false
HTTP_CLOUDFRONT_IS_SMARTTV_VIEWER false
HTTP_CLOUDFRONT_IS_DESKTOP_VIEWER true
HTTP_CLOUDFRONT_IS_IOS_VIEWER false
HTTP_CLOUDFRONT_IS_ANDROID_VIEWER false
HTTP_CLOUDFRONT_VIEWER_HTTP_VERSION 2.0
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
SERVER_SIGNATURE <address>Apache/2.4.41 (Ubuntu) Server at learnerslead.ibs.edu.jo Port 443</address>
SERVER_SOFTWARE Apache/2.4.41 (Ubuntu)
SERVER_NAME learnerslead.ibs.edu.jo
SERVER_ADDR 10.0.135.126
SERVER_PORT 443
REMOTE_ADDR 10.0.45.213
DOCUMENT_ROOT /var/www/html/newmoodle/ibsfiles
REQUEST_SCHEME https
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /var/www/html/newmoodle/ibsfiles
SERVER_ADMIN webmaster@localhost
SCRIPT_FILENAME /var/www/html/newmoodle/ibsfiles/local/course/index.php
REMOTE_PORT 56186
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING id=1043&lang=ar
REQUEST_URI /local/course/?id=1043&lang=ar
SCRIPT_NAME /local/course/index.php
PHP_SELF /local/course/index.php
REQUEST_TIME_FLOAT 1774861632.7661
REQUEST_TIME 1774861632
Key Value
APACHE_RUN_DIR /var/run/apache2
APACHE_PID_FILE /var/run/apache2/apache2.pid
JOURNAL_STREAM 8:623963
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
INVOCATION_ID e2b31971d1984b7d8c820c14b6970536
APACHE_LOCK_DIR /var/lock/apache2
LANG C
APACHE_RUN_USER www-data
APACHE_RUN_GROUP www-data
APACHE_LOG_DIR /var/log/apache2
PWD /
0. Whoops\Handler\PrettyPageHandler
1. Whoops\Handler\CallbackHandler