Blocks: Windows Share access (AKA Network Drive Access, SMB Web Client)

block_smb_web_client
Maintained by Picture of Guy Thomas Guy Thomas
Access windows shares via a Moodle web interface.
164 sites
33 downloads
2 fans

Access windows shares via a Moodle web interface.

Configuring shares is done by adding them to a text area field (easier to edit, etc). This text area field is progressively enhanced in to a YUI3 table as per the following screen shot.

admin page for windows share access block

picture of windows share access block and share folders and files being displayed

Screenshots

Screenshot #0

Contributors

Picture of Guy Thomas
Guy Thomas (Lead maintainer): Main Developer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Florian D
    Wed, 2 Mar 2016, 10:25 PM
    Having an issue using the block on moodle 3.0.2+

    it has upgraded the database without any hiccups, smbclient is installed on utuntu 14.04 and connects fine but within the block settings nothing happens when we click on Add, next to shares. Reloading the page shows an input box for just a moment then it vanishes again.

    Probably something silly, maube someone has an idea?

    Cheers
  • Picture of Ian Williams
    Mon, 1 Aug 2016, 10:15 PM
    Hi Guy
    We have previously had this block working fine with Moodle 3.1 on Ubuntu 14.04. During the summer we have re-built the site on Ubuntu 16.04 with the latest version of Moodle 3.1.
    When I open the block and enter my windows credentials, all I can see is a blank folder. The moodle error file lists the following eveytime I open the block:
    [Mon Aug 01 15:05:14.389634 2016] [:error] [pid 3163] [client 10.25.9.7:6019] PHP Warning: uasort() expects parameter 1 to be array, null given in /var/www/html/vle.cove.hants.sch.uk/blocks/smb_web_client/class_smbwebclient.php on line 1296, referer: http://vle.cove.hants.sch.uk/blocks/smb_web_client/smbwebclient_moodle.php?sesskey=lcTf1D2k5X&share=2
    Have I gone wrong somewhere?
    Regards
    Ian Williams
  • Picture of Peter de Groot
    Thu, 20 Oct 2016, 2:50 PM

    Me too. Just upgraded our moodle site to Ubuntu 16.04 and moodle 3.1.2+ and getting exactly the same error.

    Warning: uasort() expects parameter 1 to be array, null given in /mnt/d2/moodle/blocks/smb_web_client/class_smbwebclient.php on line 1296

    A look at the code

    # fix a smbclient bug (i think)
    if (! isset($this->servers[$server]))
    $this->servers[$server] = array ('name'=>$server, 'type'=>'server', 'comment'=>'');
    # sort and select results
    $results = array (
    'network' => 'workgroups', 'workgroup' => 'servers',
    'server' => 'shares', 'share' => 'files', 'folder' => 'files',
    'printer' => 'printjobs'
    );
    if (isset($results[$this->type])) {
    $this->results = $this->$results[$this->type];
    # we need a global var for the compare function
    $GLOBALS['SMBWEBCLIENT_SORT_BY'] = ($this->order <> '') ? $this->order : 'NA';
    Here ? ========> uasort($this->results, array('samba', '_GreaterThan'));
    }
    return $this->status;

    Does this smbclient bug still exist ? smile

    TIA
    Peter

  • Picture of Peter de Groot
    Thu, 27 Oct 2016, 12:47 PM

    Bump... bump...... Please sad
  • Picture of Paul Clarke
    Thu, 27 Oct 2016, 3:13 PM
    We have actually disabled it now as it simply refuses to work in our environment. Such a shame.
  • Picture of Guy Thomas
    Thu, 27 Oct 2016, 5:54 PM
    @Peter / @Paul / @Ian - I am working on this at the moment with very limited time. Sorry I haven't been very communicative recently - I've had a lot on with work / other projects.
  • Picture of Guy Thomas
    Mon, 31 Oct 2016, 8:04 PM
    @Peter / @Ian

    Download the latest master branch via git as there is a *possible* fix included for your Ubuntu 16.04 (PHP7) issue:

    https://github.com/gthomas2/moodle-block_smb_web_client
  • Picture of Guy Thomas
    Mon, 7 Nov 2016, 10:23 PM
    @Peter / @Ian - has the github hosted version fixed your issues with Ubuntu 16.04 (PHP7) ?
  • Picture of Peter de Groot
    Mon, 21 Nov 2016, 3:51 PM

    Guy... Most sincere apologies. For some reason I was not subscribed this forum and did not get the posts emailed. I am sorry.

    Downloaded from Github. Deleted the old code and replaced with the updated stuff.

    Hit the home page and it updated the database. Seems to be working..

    Many many thanks.

    Without seeming to be ungrateful... Just a small usuability thing. When using FF the login screen seems to be at the top-left of the window.

    And I cannot seem to reproduce it .. but when I deleted the old code.. I had some 70 Gig of files in sub direcotories, that appear to be what had been downloaded. I will keep an eye on that and post if I notice it again...

    Once again .. Thank you.

    Peter
  • Picture of Guy Thomas
    Mon, 21 Nov 2016, 5:27 PM
    @Peter - thanks for the update - I'm glad it's usable for you again. I think the login screen is a system dialog so I'm not sure I can do anything about it.
  • Picture of Peter de Groot
    Fri, 8 Sep 2017, 3:51 PM
    Sadly ... a problem has seemed to come up with 3.3.1

    The fixed shares seem to come up fine... but when I try to access my Home directory (presumably dynamic) .. it comes up with this error

    Coding error detected, it must be fixed by a programmer: print_header() can not be used any more. Please use $PAGE methods instead.

    More information about this error
  • Picture of Colin Wheelhouse
    Tue, 19 Sep 2017, 10:24 PM
    Hi folks, I have uploaded the latest Master version from GitHub and it has now allowed access to the shares again, however the home directory is not accessible by students or staff even though as before the field is populated in AD. I should say that all was working fine before we upgraded to 3.3.1 on Ubuntu 16.04 at the beginning of the summer.

    When accessing the home directory this message appears.

    Sorry, you cannot view your homedirectory online

    Error Message: No home directory specified in ldap for this user

    Any ideas?

    Cheers

    Colin
  • Picture of Colin Wheelhouse
    Thu, 21 Sep 2017, 7:49 PM
    Update, with debugging turned on this error message appears,
    Notice: Undefined index: homeDirectory in /var/www/html/blocks/smb_web_client/class_smbwebclient_moodle.php on line 164

    Colin
  • Picture of Guy Thomas
    Wed, 27 Sep 2017, 4:22 PM
    Hi Colin / Peter. Thanks for reporting these recent bugs. I'm sorry I haven't been unable to replicate it or fix it as I haven't had the time to set up an LDAP server + shares. I'll do this as soon as I get some time.
  • Picture of Colin Wheelhouse
    Sun, 15 Oct 2017, 2:54 PM
    Hi Guy,
    Have you had any opportunity to take a look at this issue. I know you are extremely busy and appreciate that this is not your full time. job.

    I have staff and students really desperate to access their files from home.

    Hope you are well.

    Colin
1 2 3 4 5 6 7 8
Please login to post comments