Git Product home page Git Product logo

exaport's People

Contributors

abuzakaria avatar ariepl avatar cas2andra avatar dangerer avatar fjungwirth avatar mmurauer avatar prowebat avatar razawa avatar richardlatzin avatar richardwolfmayr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

exaport's Issues

Warning: touch(): Utime failed: Operation not permitted after installation

Hi

After installing the block, I get 2 errors of this kind:

Warning: touch(): Utime failed: Operation not permitted in /blocks/exaport/build/developermode.php on line 130

Warning: touch(): Utime failed: Operation not permitted in /blocks/exaport/build/developermode.php on line 144

What should I do?

Moodle4.2-Exaport 4.6.7 (2023020800)Add View is not available.

Moodle has been upgraded to 4.2.

The plugin is 4.1, so I provide this information.

My Views/Add View

Exception - Failed opening required '[dirroot]/lib/editor/tinymce/lib.php' (include_path='[dirroot]/lib/pear:. :/usr/share/pear:/usr/share/php:/usr/share/pear:/usr/share/php')

More information about this error

Debug info: Error code: generalexception
Error code: generalexceptionmessage
Dismiss this notification
Stack trace: line 691 of
line 691 of /blocks/exaport/views_mod.php: Error thrown

Please ensure consistency when naming/numbering releases + request for git tags

Hello!

Right now, there are at least two 4.6.5 versions on moodle.org (https://moodle.org/plugins/block_exaport/versions). This makes it hard to reference something in talks/chats.
Could you please think about something to distinguish these? If there are code changes, they shouldn't have the same version number IMHO. If these are releases for different minimum Moodle versions and can't be combined, you could call the releases 3.11-4.6.5 etc. or some such.

Also, it would be very helpful if there were git tags, at least those corresponding to the moodle.org releases. You can automate this process using github actions, Moodle provides a start for that (https://github.com/moodlehq/moodle-plugin-release/actions).

Version 4.6.7 return error Exception - Class 'core_user\fields' not found on Moodle 3.9

image

Moodle 4.0
function chat_format_message($message, $courseid, $currentuser, $chatlastrow=null) {
global $DB;

static $users; // Cache user lookups.

if (isset($users[$message->userid])) {
    $user = $users[$message->userid];
} else if ($user = $DB->get_record('user', ['id' => $message->userid], implode(',', \core_user\fields::get_picture_fields()))) {
    $users[$message->userid] = $user;
} else {
    return null;
}
return chat_format_message_manually($message, $courseid, $user, $currentuser, $chatlastrow);

}

Moodle 3.9
function chat_format_message($message, $courseid, $currentuser, $chatlastrow=null) {
global $DB;

static $users; // Cache user lookups.

if (isset($users[$message->userid])) {
    $user = $users[$message->userid];
} else if ($user = $DB->get_record('user', array('id' => $message->userid), user_picture::fields())) {
    $users[$message->userid] = $user;
} else {
    return null;
}
return chat_format_message_manually($message, $courseid, $user, $currentuser, $chatlastrow);

}

see \core_user\fields::get_picture_fields vs user_picture::fields()

and note on the github
https://github.com/gtn/exaport/blob/v4.6.7/lib/sharelib.php

// since user_picture::fields('u') uses a deprecated moodle function, this is the workaround:
$fields = core_user\fields::get_picture_fields();

that function is not defined in moodle 3.9 . we still need to use user_picture::fields()

Can't open documents in ePortfolio

Hello Andreas,

Thank you for all the energy you put into Exabis ePortfolio. We like to use this Moodle plug-in!
Since the last experimental update, the problem of sharing a folder with students has been resolved. The teacher can open the folder shared by the student.

What goes wrong are the following things.

Teacher opens the shared folder >> Teacher clicks on an existing PDF document >> Teacher wants to open that document >> ERROR 500

User wants to view a posted document. If the user clicks on the document, an ERROR 500 follows.
If the user clicks on 'edit' then the document appears to be present. The user can also download this document etc.

Do you have enough descriptions on both descriptions to solve this problem?

Sincerely,
Kees Koopman.

Error when downloading pdf for external access

CONTEXT
Moodle release version: 4.1.9 (Build: 20240212)

Plugin release version: 4.6.7 (Build: 2023091600)

PHP version: 8.1.27


Thanks a lot for maintaining and developing this plugin!!! 🙏
The following issue does not seem to match any other issues already reported here.


ISSUE

After creating a view and populating it with content, when I navigate to "My views" > "Share" tab I get 4x the following debug message:

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/lib/pear/HTML/QuickForm/checkbox.php on line 126

Screenshot from 2024-03-18 14-56-47

After enabling external access and saving I navigate to "My views".

I see the newly created view and a URL for "external access".

When I click it/open it, I am forwarded to the page:
.../blocks/exaport/shared_view.php?access=hash/3-cc12f384

  • with title external ePortfolio-Link {name_of_current_user}
    and
  • a hyperlink Download as Pdf

The browser-dev-tools-inspector console for this page also lists the following error:
Uncaught ReferenceError: JQuerryExaport is not defined
Screenshot from 2024-03-18 15-39-20

When clicking the mentioned hyperlink:

  • I get redirected to a page with following path:
    ...blocks/exaport/shared_view.php?courseid=1&access=hash%2F3-cc12f384&ispdf=1

  • I get the a 404 error in HTTP GET request (not found)

  • and the following error message:
    Screenshot from 2024-03-18 14-20-54


OTEHR OBSERVATIONS reg. block_exaport

When running local_codechecker
https://moodle.org/plugins/local_codechecker
against blocks/exaport I get in total:
2567 errors and 2402 warnings

Please have a look into Moodle's coding syle guide:
https://moodledev.io/general/development/policies/codingstyle

e.g. Code repository name
https://moodledev.io/general/community/plugincontribution/checklist#code-repository-name
should be
moodle-{plugintype}_{pluginname}


Many thanks and best regards

Peter

Plugin is not loaded editor portfolio

Hi! In the new version of the plugin is not loaded editor portfolio (My Porfolio ->
Content -> Design Porfolio -> Add (Personel info)) and does not work a gap
in the edit fields. Because of this "Personal information" is not added and not modified.
In the code of the plugin found M.utils.load_flowplayer(), which should not be in it...
after the call that removed editor earned and information was added,
but space in the title field and not working!

Views cannot be created in 4.6.5

I'm using Moodle 3.10.
E-Portfolio plug-in has been upgraded.
I was able to create a view in 4.6.4
Views cannot be created in 4.6.5 (Cannot be dragged and dropped)

HTTPS URL for media is saved as HTTP

When inserting HTTPS media, for instance a HTTPS url from YouTube, the URL is saved as HTTP. This then leads to a "mixed content" error with modern browsers, because loading HTTP content within a HTTPS context is blocked.

You can easily check this by creating and saving a HTTPS encrypted media object. When editing a youtube video you will see that the iframe is pointing to a HTTP url, like this:

...iframe width="360" height="240" src="http://www.youtube.com/embed/YE7VzlLtp-4" frameborder=0></iframe...

Instead of

...iframe width="360" height="240" src="httpS://www.youtube.com/embed/YE7VzlLtp-4" frameborder=0></iframe...

Moodle: 3.3.4 (Build: 20180118)
Exabis Portfolio: 4.6.2 (Build: 2017121101)

Steps to reproduce

  • activate the exabis portfolio block in a course
  • create a new personal/custom view
  • insert a HTTPS URL, for instance: https://www.youtube.com/watch?v=YE7VzlLtp-4
  • save the media object
  • edit the media object
  • confirm that the URL for the iframe has been rewritten to unencrypted HTTP

Add GDPR support

Hello,
it would be great if you could implement the new Privacy API. We are using the block and thus it is important for us that you implement it. Do you have already plans to add GDPR Support?
Thanks!

ü breakes language customization

Line 340 in exaport/lang/de/block_exaport.php breaks language customization with an dml error. Replacing ü with the corresponding escape code fixes it

diff --git a/lang/de/block_exaport.php b/lang/de/block_exaport.php
index c8b1ca6..b2c5db4 100644
--- a/lang/de/block_exaport.php
+++ b/lang/de/block_exaport.php
@@ -337,7 +337,7 @@ $string['version_5.2.0_needed'] = NULL;
 $string['competenceinteraction'] = 'Interaktion mit Block exabis competencies, falls dieser installiert ist, zulassen.';
 $string['opencomps'] = 'Kompetenzen ausw&auml;hlen';
 $string['selectcomps'] = 'W&auml;hle hier die Kompetenzen, die zu deinem Upload passen!';
-$string['competences_old_version'] = 'Auf diesem Moodle ist eine alte Version von Exabis Competences installiert. Diese wird von Exabis Eportfolio nicht mehr unterstützt.';
+$string['competences_old_version'] = 'Auf diesem Moodle ist eine alte Version von Exabis Competences installiert. Diese wird von Exabis Eportfolio nicht mehr unterst&uumltzt.';
 $string['expandcomps'] = 'Alle &ouml;ffnen';
 $string['contactcomps'] = 'Alle schlie&szlig;en';
 $string['studentcomps'] = 'Hier kannst du einsch&auml;tzen, ob folgende Kompetenzen durch Dein Artefakt erreicht wurden.';

TypeError: tinymce.get(...) is undefined

Hello,
when adding a text block to a view I get this JS-Error:

11:21:40.000 TypeError: tinymce.get(...) is undefined 1 views_mod.js:6:108
addText https://.../lib/javascript.php/1508743582/blocks/exaport/javascript/views_mod.js:6:108
onsubmit https://.../blocks/exaport/views_mod.php:1:1

and the text block is not added. Header block works fine.

Moodle 3.3.2 (Build: 20170922)
Exabis Plugin: 4.6.0

Regards

Editor problem

Hello,
When I want to insert or edit a text block, I get a window with no text editor and just the content in pure html.
Debug mode doesn't do anything, but if I open the browser's web inspector, I get the following:

Capture d’écran 2023-11-16 à 19 39 01 Capture dâ��écran 2023-11-16 à 11 25 41 Capture dâ��écran 2023-11-16 à 11 41 58

SyntaxError: Unexpected end of script
appendChild (views_mod.php:7:892)
m (jquery-3.7.1.min.js:2:892)
$e (jquery-3.7.1.min.js:2:46276)
attachToDOM (first.js:565:5988)
show (first.js:565:11237)
(anonymous function) (first.js:4901:19696)
c (jquery-3.7.1.min.js:2:25310)
fireWith (jquery-3.7.1.min.js:2:26055)
e (jquery-3.7.1.min.js:2:27301)
(anonymous function) (jquery-3.7.1.min.js:2:27332)_

Do you have a solution to this problem?
Cordially

Users accessing a shared view cannot access files attached to CV items

Using Moodle 4.0.8 and the latest block_exaport (a2bfb7d).

In “My CV” many categories of information (“Education history”, “Employment history”, “Certifications, accreditations and awards”, “Books and publications”, “Memberships”, “My goals”, “My skills”) can have files attached to items. In the view editor in “My views” the “CV information” block has the “With attachment files” checkbox; when that checkbox is checked, the attached file appears in the view. However, when the view is subsequently shared with some other users, those other users cannot access these attached files — a hyperlink to the file appears, but clicking the hyperlink produces a “file not found” error page.

Sharing files uploaded as artifacts apparently works; the problem happens only with files that are attached to CV items.

The hyperlink which is generated for a file attached to an item in “Certifications, accreditations and awards” looks like this:

https://{$HOSTNAME}/pluginfile.php/{$CONTEXTID}/block_exaport/resume_certif/${ID}/${FILENAME}

The same hyperlink is generated both when looking at the user's own view (in this case the hyperlink works to download the file), and when another user looks at the shared view (in this case the hyperlink does not work and shows a filenotfound error page).

Looking at the code in block_exaport_pluginfile(), apparently the handling of those hyperlinks ends up at this call to $fs->get_file, where the context ID from the hyperlink is replaced with context_user::instance($USER->id)->id, therefore it always refers to the currently logged in user, and accessing a file shared by another user is not possible when that kind of hyperlink is used. But hyperlinks for artifacts are handled by some completely different code (portfoliofile.php), which apparently performs some permission checks and allows access to files shared by other users if those files were actually shared in a view.

Could this problem be fixed somehow, so that files attached to CV items can be shared properly?

my views > content has nowhere to drag content unless content already exists

I'm not familiar with exactly how this should work, but it doesn't seem to be working as intended.

Items that should exist don't appear in the draggable area, the area where they should be draggable to doesn't seem to exist.

Screenshot 2023-09-26 at 13 12 33

the only way to get items to appear is to select "Automatically add all available artefacts to this view" when creating the view, at which point you can very awkwardly drag items down to the bottom, where the existing items sit. From discussion with users who have used this before, it seems like the content area should sit on the right hand side - it seems a bit broken at present

Screenshot 2023-09-26 at 13 15 54

Moodle build is 4.1.4
exabis release is 4.6.7 (2023091600)

DE: übersehenes Gendern in den Einstellungen und Typos

Die deutschen Einstellungen nach Installation sind zwar großteils gegendert, ein paar wenige Einstellungen wurden aber üebrsehen. Vorschläge mit -> gekennzeichnet (eigene(r) Benutzer/in Style)

Gendern:

  • Mit allen Benutzern teilen deaktivieren block_exaport_disable_shareall -> Mit allen Benutzer/innen teilen deaktivieren
  • Benutzer-Dateikontingent Exabis ePortfolio block_exaport_userquota -> Benutzer/innen-Dateikontingent Exabis ePortfolio
  • Trainer/in hat Zugriff auf alle Artefakte eigene Schüler/innen block_exaport_teachercanseeartifactsofstudents: ... erforderliches Profilfeld für vertrauenswürdigen Trainer erstellen -> erforderliches Profilfeld für vertrauenswürdige(n) Trainer/in erstellen

Typo:

  • Trainer/in hat Zugriff auf alle Artefakte eigene Schüler/innen block_exaport_teachercanseeartifactsofstudents -> Trainer/in hat Zugriff auf alle Artefakte eigener Schüler/innen block_exaport_teachercanseeartifactsofstudents
  • Mehrere Dateien in Datei-Artefakt hochladen block_exaport_multiple_files_in_item: limit: 10 Dateien -> Limit: 10: Dateien
  • (en) Enable "Copy to my portfolio" block_exaport_copy_category_to_my: User will be able copy artifacts from shared category into -> Enable "Copy to my portfolio" block_exaport_copy_category_to_my: User will be able to copy artifacts from shared category into own portfolio

Fehlende Übersetzung:
Enable "Copy to my portfolio" block_exaport_copy_category_to_my: User will be able copy artifacts from shared category into own portfolio -> "In eigenes Portfolio koppieren" aktiveren block_exaport_copy_category_to_my: Benutzer/innen können Artefakte einer gemeinsamen Kategorie in das eigene Portfolio kopieren.

Security concerns

Parts of the code seems to be dangerous - for example services.php is created dynamically:

// save to services.php
$content = "<?php\n\n";
$content .= '$functions = '.var_export($functions, true).";\n\n";
$content .= '$services = '.var_export($services, true).";\n\n";
file_put_contents($servicesFile, $content);

eval() function is used:

eval('
		function '.$namespace.'_'.$function.'() {
			return call_user_func_array(\'\\'.$namespace.'\\'.$function.'\', func_get_args());
		}
	');

extract run on $GLOBALS:

extract($GLOBALS);

Have a look at https://docs.moodle.org/dev/Security and URLs linked from there.

Warning: Methods with the same name as their class will not be constructors in a future version of PHP

Hi,
I installed 4.6.2 (2018030700)Moodle 3.2, 3.3, 3.4 version and found such a warning when clicked on the Import/Export tab:
"Methods with the same name as their class will not be constructors in a future version of PHP"
The mentioned warning was shown for the following classes:
MiniXMLDoc
MiniXML
MiniXMLElement
MiniXMLElementComment
MiniXMLElementCData
MiniXMLElementDocType
MiniXMLElementEntity
MiniXMLTreeComponent
MiniXMLNode

External function parameters: invalid OPTIONAL value specified.

line 729 of /lib/externallib.php: call to debugging()
line 165 of /blocks/exaport/externallib.php: call to external_function_parameters->__construct()
line 122 of /lib/externallib.php: call to block_exaport_external::get_item_parameters()
line 199 of /admin/webservice/forms.php: call to external_api::external_function_info()
line 214 of /lib/formslib.php: call to external_service_functions_form->definition()
line 63 of /admin/webservice/service_functions.php: call to moodleform->__construct()

This error may prevent an admin from configuring a webservice. /admin/webservice/service_functions.php

Replace line 165 of /eternallib.php
'owneruserid' => new external_value(PARAM_INT, 'id of owner of this file (needed for items in shared categories', VALUE_OPTIONAL),
with
'owneruserid' => new external_value(PARAM_INT, 'id of owner of this file (needed for items in shared categories', VALUE_DEFAULT),

See: https://moodledev.io/docs/apis/subsystems/external/writing-a-service#required-optional-or-default-value

No input file specified when trying to load options settings on view

the error "No input file specified" appears when trying to load options settings on view from the views, accessed from the exaport block on a course.

ourmoodle.com/blocks/exaport/views_list.php?courseid=3

within our nginx logs at the time, we see a simultaneous error

2023/09/18 17:10:09 [error] 341958#341958: *73706 FastCGI sent in stderr: "Unable to open primary script: /var/www/moodle/views_mod.php (No such file or directory)" while reading response header from upstream, client: 81.110.196.116, server: ltu-sandbox.moodle.tituslearning.com, request: "GET /views_mod.php?courseid=3&id=9&sesskey=jl8jJbRg0j&action=edit HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.0-fpm.sock:", host: "ourmoodle.com", referrer: "https://ourmoodle.com/"

It appears to be trying to open views_mod.php from the moodle root, instead of /var/www/moodle/blocks/exaport

Feature request: embed pdf viewer

When migrating portfolios (e.g. from Mahara) one important feature is missing: embedding of pdf files. Most Mahara views we produce are a mixture of text boxes, video boxes and embedded viewable pdfs.

Could/can this be done? As we probably will be forced to migrate all our Mahara portfolio views (about 300) this would be most useful.

  • A possible way (as inside some Moodle blocks) could be to support
    <embed src="files/Brochure.pdf" type="application/pdf" width="100%" height="600px" />
    which now is stripped from html input.
  • The easiest way to use would be a checkbox in artifact block.

PHP7 Compatibility for lib/classes

The classes within the files under lib/classes use the deprecated schema for class constructors.
Please replace these by __construct().
Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.