Code Monkey home page Code Monkey logo

Comments (6)

dasistwas avatar dasistwas commented on August 14, 2024

Text is now saved. Problem with field of type picture.

from moodle-mod_datalynx.

dasistwas avatar dasistwas commented on August 14, 2024

TODO: Do not save empty fields in contents table (example: empty string). Delete those rows in DB instead or do not consider those entries as "existing entries" or data.

from moodle-mod_datalynx.

dasistwas avatar dasistwas commented on August 14, 2024

The assumption things have been "visible to user" is not a valid assumption and is one of the origins of this bug. The concept to ignore certain submitted data is very dangerous. All submitted data has to be analysed.
https://github.com/dasistwas/moodle-mod_datalynx/blob/0fddcff6bbcb6cba7ccd94adf5066cf8daea1300/entries_class.php#L753

The iterator does not work either as the foreach is not in line with $i ($i differs from actual line number in the nested foreach loop).

from moodle-mod_datalynx.

dasistwas avatar dasistwas commented on August 14, 2024

Better approach could be: delete content from db when no data is submitted for the field.

from moodle-mod_datalynx.

dasistwas avatar dasistwas commented on August 14, 2024

What does not work: Removing the teammembers with the JavaScript "Delete" button does not work. They still appear when saving the form.

Next step: Strategy for displaying and saving data in a solid way. Open for discussion:

Approach 1

  1. Add integer field to datalynx_contents table named rowid or lineid
  2. Store the line of the fieldgroup there
  3. Make deletion of content therefore easier: delete datalanx_contents where fieldid, entryid, rowid

from moodle-mod_datalynx.

michaelpollak avatar michaelpollak commented on August 14, 2024

Rebuilt this as discussed.
We now process all data, collect where we do see empty fieldvalues and check if a line is completely empty.
If this is the case we remove all line contents from database.
I'm closing this to allow for more precise issue descriptions, filed issue is fixed.

from moodle-mod_datalynx.

Related Issues (20)

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.