Quantcast
Channel: Installing and upgrading help
Viewing all 46788 articles
Browse latest View live

Re: Moosh course-restore

$
0
0
by Chris Nelson.  

Questions regarding moosh course-restore:

I am running the following moosh command:

php c:\moosh\moosh.php -n course-restore xfer\backup-moodle2-course-31-xxxxxxxxxx-20190210-0116.mbz 55

I get the following message:


C:\inetpub\wwwroot\moodle>php c:\moosh\moosh.php -n course-restore xfer\backup-moodle2-course-31-xxxxxxxxxx-20190210-0116.mbz 55 -Creating new course to restore backup - Restoring (new course id,shortname,destination category): 10,MIN 243 DAllen F201 7,55

Requested course 10 does not have idnumber, no sync performed. New course ID for 'MIN 243 DAllen F2017': 10 in category 55


The course is created under correct category however I am not sure if there will be an issue with the Course ID

Right now the courses I am restoring have no students or teachers in it.

Soon I will be bringing over courses with both student and teachers and my concern is these courses are still active ones and I am wanting to make sure there will be no issues with student being placed in the right courses with their present material such as forum responses, quiz results etc.

We use ldap authentication and ldap enrolment

Thoughts?


Re: [3.4 -> 3.5] Data too long for column 'capabilities' at row 1

$
0
0
by Nicolas Ndalpe.  

Hi Richard,

Thx for the tip.


In addition, I had to execute the following command in Mariadb/MySQL to make it work.

SET GLOBAL innodb_default_row_format = DYNAMIC;


My guess is that ROW_FORMAT=DYNAMIC is not explicitly specified in every CREATE TABLE statement of my mysqldump file.


My setup:

Server version: 10.1.37-MariaDB-0+deb9u1 Debian 9.6

Moodle 3.5.4+ (Build: 20190208)


Hope it helps

Jquery error message

$
0
0
by Thiago silva.  

Hi, I have updated moodle from version 3.2 to 3.6.2+, update was a success, but when adding a contact the message appears the following error:


Error: You are unable to create a contact request for this user
    at https://www.example.com.br/lib/requirejs.php/1549969861/core/first.js:130:6672
    at j (https://www.example.com.br/lib/javascript.php/1549969861/lib/jquery/jquery-3.2.1.min.js:1:29999)
    at k (https://www.example.com.br/lib/javascript.php/1549969861/lib/jquery/jquery-3.2.1.min.js:1:30313)
Can someone help me?

Re: Jquery error message

$
0
0
by Thiago silva.  

correction

  1. Log in as admin
  2. Go to Administration > Advanced features
  3. Set "Allow site-wide messaging" to no (uncheck it)

Old messages do not appear, because?

Re: Moosh course-restore

$
0
0
by Ken Task.  

Thoughts ... you asked for and thoughts are below.

Qualification for this response: NONE ... I don't run windows ... so consider this kinda a guess that might lead to a resolution on platform. smile

First, the author of moosh does say that it might not run all commands on Windows platform.

Moosh is a command line utility ... the command you show has 'php' in front.

If you were to be in same directory where you issued the moosh command, what do you get for just:

php -v

If your system is finding the php-cli the above command should show something like this:

PHP 7.0.33 (cli) (built: Jan  7 2019 20:13:36) ( NTS )

Note the (cli).

Where is your operating systems php-cli?

moosh.php file itself has a 'shebang' at the top of the file.

Might open that file and see what the 'shebang' is pointed to.

'spirit of sharing', Ken


Re: Fatal error. PHP version 7.3 is not supported in lastest 3.5 Moodle

$
0
0
by Pavel Krejčí.  

I am checking the support cycle on Moodle 3.5 which is supposed to end on: May 2021.

However according to docs Moodle 3.5 only supports PHP upto version 7.2 which is supported until Nov 2020.


Would it be too presumptuous to ask for PHP 7.3 support in Moodle 3.5 LTS to cover the full period?


Upgrade from 3.5.2 to 3.6.2 - can't read database

$
0
0
by Marco Lazzarotto.  

Hello, I'm simulating the upgrade process from Moodle 3.5.2 to 3.6.2.

My test setup is: Ubuntu 16.04, Apache 2.4.18, MariaDB 10.0.36 and PHP 7.0.32.

This is the steps I follow:

  1. copy of the production folders moodle (3.5.2) and moodledata
  2. import of the dump of the production db
  3. edit of the configuration.php file
  4. everything works as expected
  5. rename the moodle folder in moodle_3.5.2
  6. unzip the new moodle zip
  7. copy of the theme folder, the images folder and the configuration.php
  8. set the right ownership of the moodle and moodledata folders

Now if I browse moodle, the error page says that it can't talk to the database. Note that between the 3.5.2 and the 3.6.2 the db is not modified at all.

I attach the error.log of Apache


can't connect to db error

Re: Copy production site to DEV

$
0
0
by Ben Kahn.  

Ken, thanks so much for sharing your expertise. I do run CentOS Linux. As you may have surmised I have recently taken over Moodle admin at a school some months ago and and am still learning (every day). I inherited a pretty well set-up situation so it's a good place to learn and see how to build without starting from scratch.

The codebase is managed through a Git repo and all the "extra" plugins are submodules. So to deploy my codebase, in theory, I just clone the repo and pass -recurse--submodules with the command. In practice, I have struggled a bit with submodules and have had to do some finagling on individual submodules to get them initialized and pointing to the intended commit, but am getting more comfortable with them now.

In any case, I was able to get my new DEV instance up and running with no issues. I just use the administration->plugins->plugins overview screen to check for updates and new versions.


Moodle 3.4

$
0
0
by Harmony Hunt.  

Hello I recently updated to moodle 3.4 now I have this   Exception - Call to undefined method core\session\manager::get_login_token()  I have the instuctions to fix it but how do I when I cannot get on the site here are the insrtuctions I have 


https://docs.moodle.org/dev/Login_token#Themes


Login token

Jump to: navigation, search

Login token is a security related feature introduced in Moodle versions 3.1.15, 3.3.9, 3.4.6, 3.5.3 and 3.6.0. It helps to protect against a range of vulnerabilities, such as stealing other user's session, via the login form.

Starting from the said versions, all the login forms must include a new login token field and submit it together with the user's username and password. The value for the field must be obtained via the \core\session\manager::get_login_token() call. All attempts to log in without the login token provided will be rejected.

Required changes in custom login forms

Themes

If you use a custom theme, chances are that it uses its own customized template / renderer method to generate the login form. Such themes must be updated to support the new logintoken feature.

Most modern themes - such as those based on Boost or Clean - render the login form via a Mustache template from the given templatable \core_auth\output\login form instance. When the form is exported for the template, it returns the login token as a property of the rendering context and can be used directly in the theme. You just need to modify your theme's core/loginform template (Moodle 3.4 and later) or core/login (Moodle 3.3 and earlier) template and render the hidden field logintoken in the login form:

<input type="hidden" name="logintoken" value="{{logintoken}}">

Note: Your theme probably also provides the "Log in as a guest" button. You will have to add the token there, too.

Custom HTML login forms

If your plugin generates the HTML for the login form itself, you need to add the logintoken field to the form submitted back to Moodle.

<input type="hidden" name="logintoken" value="<?php echo s(\core\session\manager::get_login_token()); ?>" />

Sites with alternate login URL set

If the site has Alternate login URL ($CFG->alternateloginurl) set, the login token feature is implicitly disabled and no token validation happens. There is no general way to pass the expected token value to the external system that provides the login form.

Switching the login token protection off

The login token feature can be explicitly disabled by the administrator by setting a flag in the main config.php file.

This is strongly discouraged. Make sure you understand what your are doing and that you have a real reason to do that. The login token feature has been implemented for good reasons and there are known ways to exploit unprotected login forms.

// Do not do this unless you understand all the consequences.
$CFG->disablelogintoken = true;


Re: Moodle 3.4

$
0
0
by Howard Miller.  

3.4.what?

The login token stuff was only added in 3.4.7 (I think). Older versions won't have it. 

Also consider that 3.4 only has a couple of months of support left, so it isn't the best choice to upgrade to.

installation hanges moodle 3.6.2

$
0
0
by scott braithwaite.  

Hi I have been away from Moodle for over a year but back smile.  However I am trying to do a fresh install of moodle and it keeps hanging on http://localhost:8080/bpp/user/editadvanced.php.  


Bpp is the folder where the moodle code has been unzipped.


Could anyone advise.


Thanks in advance 


Scott

Re: installation hanges moodle 3.6.2

$
0
0
by Howard Miller.  

Define 'hang'? What *exactly* happens?

What's in your web server's error log?

Re: installation hanges moodle 3.6.2

$
0
0
by scott braithwaite.  

Hi Howard


sorry with regards to what I mean it gets to this page  .http://localhost:8080/bpp/user/editadvanced.php'  and then nothing it just stays as a blank page here once I have entered the user details and it loads this far, have tried multiple times today and left this open when I had my lunch and still the same 45 minutes later.


Thanks


Scott

Re: installation hanges moodle 3.6.2

$
0
0
by scott braithwaite.  

Hi Howard 

I have also checked the logs and the error is;

PHP Fatal error:  Uncaught Error: Call to undefined function current_language() in C:\wamp64\www\bpp\lib\setuplib.php:713

Stack trace:

#0 C:\wamp64\www\bpp\lib\setuplib.php(572): get_docs_url()

#1 C:\wamp64\www\bpp\lib\setuplib.php(363): get_exception_info(Object(LogicException))

#2 [internal function]: default_exception_handler(Object(LogicException))

#3 {main}

  thrown in C:\wamp64\www\bpp\lib\setuplib.php on line 713

Error reading Error reading environment data (16)


Re: Upgrade from 3.5.2 to 3.6.2 - can't read database

$
0
0
by Leon Stringer.  

The log file suggests that the Moodle 3.6.2 source code is trying to use the Moodle 3.5.2 database without first upgrading it.

When you change to the Moodle 3.6.2 source code folder it should detect the version from the database, see the older version and redirect to the upgrade page -- /admin/index.php -- which says "Upgrading Moodle database from version 3.5.2 (Build: 20180910) (2018051702.00) to 3.6.2 (Build: 20190114) (2018120302.00)". Did that not happen?

Check the version in the database, e.g. with SELECT name, value mdl FROM_config WHERE name = 'version'. If it's 3.5.2 it should be "2018051702", if it's 3.6.2 it would be "2018120302". But if it is 3.6.2 something went wrong because the database is missing some changes that should be performed by the upgrade.

You can perform the upgrade from the command line so it could be worth trying but you may get the same results.

If the database thinks it is 3.6.2 but you're still getting this error I would start the upgrade process from scratch and note any errors or unusual messages.

Re: Error reading Error reading environment data (16)

$
0
0
by Ken Task.  

Have been involved for a week or so now helping someone through one of those 'perfect storms' ... older moodle on shared hosting ... and in this case a Moodle 3.0.4.

Happened to see that very error.  Did the environment check, updated the component, then went back to environment check and set to check 3.1 ... or higher ... the 'red check' for that particular item went away.  I then upgraded the 3.0.4 site to a 3.1 and no issues ... with core.

So some questions for you ... what version of Moodle?  And what is your version of PHP?   How are you hosted? and where ... not all are alike!   Shared? or Dedicated?

If going forward, do take the time to do a full site backup ... code, DB, and data directory ... just in case you have other issues ... ie, not as lucky as I was! smile

'spirit of sharing', Ken



Re: Moosh course-restore

$
0
0
by Chris Nelson.  

php -v yields:

C:\inetpub\wwwroot\moodle>php -v

PHP 7.2.14 (cli) (built: Jan  9 2019 22:23:14) ( NTS MSVC15 (Visual C++ 2017) x6

4 )

Copyright (c) 1997-2018 The PHP Group

Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

    with Zend OPcache v7.2.14, Copyright (c) 1999-2018, by Zend Technologie


moosh.php "shebang" points to !# /usr/bin/env php

Maybe I am not understanding the result:  "Requested course 10 does not have idnumber, no sync performed. New course ID for 'MIN 243 DAllen F2017': 10 in category 55

Yet if I look at the course the course idnumber is part of the file name:  i.e. backup-moodle2-course-31......


Would idnumber come over as part of the back up? 

As I understand the above message: since the course being restored has no idnumber it has been assigned an idnumber =10.

The question then is how important is this idnumber when I import a course with faculty and students as users in the course?

Re: Moosh course-restore

$
0
0
by Ken Task.  

??? Dunno but how long would it take someone to go back into a course and add an ID number on existing server If that is the issue?

If all you have are the backups, might have to un-compress a copy of a course and see what it says in moodle_backup.xml for a course ID.   Guess there could be some character or combo of characters in there that could cause moosh confusion ... dunno ... just guessing now.

In doing the same thing on Linux servers I know for a fact that ID numbers were not in the course configs nor backups and had no such issue upon command line restore ... just had to have the categories in new site populated so I could use the category ID to restore.

'spirit of sharing', Ken


Re: Error reading Error reading environment data (16)

Viewing all 46788 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>