Hi folks!
I’ve been using the markbook including the rather amazing weighting system. It’s working quite well so far.
What is the easiest way to import marks into the markbook?
Kind regards,
Roman
Hi folks!
I’ve been using the markbook including the rather amazing weighting system. It’s working quite well so far.
What is the easiest way to import marks into the markbook?
Kind regards,
Roman
Roman,
I would recommend @skuipers Data Admin module, which you can download from our Extend page.
Ross
Hi Ross,
Thanks for the tip!
I installed the dataAdmin module without any problem.
The new menu entry “Data Admin” appears under admin.
When I click on “Data Admin” the following error message is thrown out:
Fatal error: Can’t use method return value in write context in C:\wamp22\www\gibbon-12s-dataAdmin\modules\Data Admin\src\importType.class.php on line 526
Do I need a more recent php version to run this module? I’m still on php v5.4.3.
What else could cause this?
Kind regards,
Roman
Hi Ross and Sandra,
I had a closer look at the code and was able to track it down to a php issue. Sandra showed me some time ago how to fix this.
//if ( empty($this->getField($fieldName, ‘desc’)) ) {
if ( $this->getField($fieldName, ‘desc’) == false ) {
I also came across the import setting page of DataAdmin stating that php v5.5.0 is needed to run this module.
Well, as mentioned before, I’m still on an older version of php, which is v5.4.3. However, I didn’t encounter any problem again. Is it compulsory to have a higher version?
I wasn’t able to figure out how this module works. All menus show “There are no records to display”. The creation of Snapshots does not work throwing error “Your request failed because your inputs were invalid”.
Kind regards,
Roman
Roman,
The minimum version for Gibbon v12 is also 5.5, so you are best of at least this version. Things might work OK in 5.4, but some items will most likely return error messages.
PHP 7 would be the ideal: it should prove far more efficient.
The reason for the focus on 5.5 is that many object oriented functionality, which we are starting to use, is not available before 5.5
Thanks,
Ross
Hi Roman,
Certainly as Ross notes using PHP 5.5+ is the best first step.
If you’re seeing “no records to display” it’s possible the folder of import definitions doesn’t have read/execute permissions from PHP. Open the modules/Data Admin folder and look for an imports folder. Check the permissions as well as ownership of the folder, something like 755 might do the trick. The ownership should be the same as the rest of Gibbon (in many Apache installs its www-data).
The request failing for the Snapshots is possibly because your PHP install doesn’t have permissions to execute system commands using PHP’s exec()
There’s a note about this on the snapshot page but it may need to be more prominent. Sometimes this can be fixed by the same steps as above, this time check the ownership and permissions of the location the snapshots are stored (uploads/snapshot). Otherwise it may be trickier to troubleshoot, checking your error log would be the best place to start. Luckily snapshots aren’t required, and a tool like phpMyAdmin can do the same job.
Hope this helps! I’ll try to add some more checks to the settings page to help test for correct permissions.
Hi folks,
Thanks a lot for the support!
Based on your suggestions I switched to php v5.5.12.
The php error logfile shows the following:
[18-Jan-2017 09:12:27 Africa/Accra] PHP Notice: Undefined index: _ in C:\wamp22\www\gibbon-12s\modules\Data Admin\snapshot_manage_addProcess.php on line 73 [18-Jan-2017 09:12:27 Africa/Accra] PHP Stack trace: [18-Jan-2017 09:12:27 Africa/Accra] PHP 1. {main}() C:\wamp22\www\gibbon-12s\modules\Data Admin\snapshot_manage_addProcess.php:0
I had a closer look at the snapshot issue. I think there is a small problem in line 76 of file snapshot_manage_addProcess.php. Is it not …–password=$databasePassword … instead of --password=‘$databasePassword’?
Snapshots work well now but that’s about it. I checked on issues in regard to permissions, folders, and definitions. Things look good to me.
I’m still stuck. Maybe if I had a manual or a few screenshots to see how things should look like. Or could it be a wamp issue?
Kind regards,
Roman
Hi Roman,
Sounds like it could be wamp related, which I haven’t done any testing on yet. I’ll fire up wamp on bootcamp and see if I can figure out what the issue might be. The scripts are using some pretty basic PHP functions, but it is reading from the filesystem which could always have system-specific differences.
Are there any errors coming from the import_manage.php page that you can see? Otherwise I’ll just have to test it out on this end and see what I find.
Thanks!
Hi Sandra,
Thanks for the reply!
As mentioned above, I get these “There are no records to display.” messages for import_manage.php as well.
Wouldn’t filesystem issues result in log error messages? Couldn’t it be that everything is working fine but I just don’t know how to use this module? It may help me if I had a few screenshots to see how it should look like.
I have attached 4 screenshots. Maybe you can point me to where the output is abnormal. I can then help to track down the issue.
Kind regards
Roman
Hi Roman,
It’s certainly odd that it’s not reading the files and not giving an error, in many cases this would point to a permission or ownership issue but you’ve already checked that so the likely culprit is something windows-related I haven’t encountered yet.
Here’s a few screenshots for comparison, this is what the contents of the modules/Data Admin/imports folder looks like on my system, and this is what should show up on the Manage Imports page.
I haven’t had a chance to install wamp yet to test but I should be able to later today. Many thanks for the detailed replies & screenshots, I’m keen to help ensure the module works for everyone!
Hi Sandra,
Thanks a lot for the screenshots!
I think we’re having an issue with path names. Windows is using „\“ as folder separator instead of „/“.
I changed function getBaseDir in importType.class.php
//$baseDir = str_replace(array(‘modules/Data Admin’, ‘src’), ‘’, dirname(FILE));
$baseDir = str_replace(array(‘modules\Data Admin’, ‘src’), ‘’, dirname(FILE));
Things work better after this.
I think the code needs some changes to be able to run on windows as well.
Kind regards,
Roman
Ah thanks! In almost every case these days windows will accept forwardslashes as directory separators so I’ve got used to using them cross-platform, but I must have forgot that the incoming data from dirname(FILE) would include backslashes by default and need handled separately. I’ll update the script to be more windows-friendly
Good catch!
Hi Sandra,
Should I wait for the new version or should I do a dirty hack which runs for me on wamp? Can you give me a date?
Kind regards,
Roman