Мнения, написани от Howard Miller

Снимка на Core developers Снимка на Documentation writers Снимка на Particularly helpful Moodlers Снимка на Peer reviewers Снимка на Plugin developers
Have you thought about using Moosh (https://moosh-online.com/) if you want to do this kind of thing.

I'm very reluctant to suggest manipulating the database directly. Firstly, because it is plain dangerous. Secondly, because so much stuff is cached in Moodle - you can change the DB and nothing happens because the related data is in the cache.
Снимка на Core developers Снимка на Documentation writers Снимка на Particularly helpful Moodlers Снимка на Peer reviewers Снимка на Plugin developers
Thanks усмивка I actually noticed set_mapping() in some other code 5 mins ago - that was what I was missing. I didn't know about it (or, I'd forgotten).

It's obvious once you know but it's (almost) completely undocumented. The relationship between set_mapping() and get_mappingid() - would be nice if it was explicitly stated. Rather than just complaining about it - I'll see if I can suggest an update for the docs when I get 5 minutes.
Снимка на Core developers Снимка на Documentation writers Снимка на Particularly helpful Moodlers Снимка на Peer reviewers Снимка на Plugin developers

I'll try to be succinct...  this all refers to a local plugin which has its own tables. The plugin is "attached" to a course, so I'm using the facility to attach the plugin data to course.xml, which broadly works. 

I'm backing up (let's say) Table A which belongs to my plugin. Backs up and restores just fine. 

Then I'm backing up Table B. This has references which link to Table A, so I need to re-map them. I've tried loads and I can't get it to work.  get_mappingid('tableA', $data->tableaid) just returns false. I've made sure that TableA is first in the XML backup - but is that sufficient? Should this mapping translation work at all for non-core tables? Documentaion is very vague. 

Снимка на Core developers Снимка на Documentation writers Снимка на Particularly helpful Moodlers Снимка на Peer reviewers Снимка на Plugin developers
If you're using Turnitin's assignment (which these logs are for) then you MUST have a Turnitin account. If you have a Turnitin account, then Turnitin provides support to its account holders.

I'm not trying to be difficult - Turnitin wrote the code, so they are in the best position to explain exactly what that log message means.
Снимка на Core developers Снимка на Documentation writers Снимка на Particularly helpful Moodlers Снимка на Peer reviewers Снимка на Plugin developers

On the last point - I've been doing a load of development using Vue.js that I have "bodged" to work with Moodle. I've found this way of working to be highly productive, so something I would support. Obviously, my vote would go for Vue but any well documented/supported "framework" would be a welcome advance. Try to use your crystal ball and pick one that won't be unsupported in 5 years, though изплезване
 
I think most devs (even very old ones like me) have caught up with the idea that running 'npm dev' or whatever isn't particularly onerous. 

What I would be unhappy to see is an "in house" solution. It won't be as good and it won't be properly documented from past experience - sorry.