Database Formatting

Database Formatting

by Stephanie Ferguson -
Number of replies: 14

Hey there, I have set up databases before with great success; however, I'm getting super frustrated with the one I just created. It works fine as far as gathering the information but when I tested it and viewed my test entry, the formatting is super weird. (see below). It's really hard to ready right now. 🙄

Moodle version 3.7.2. Adaptable 2.1.1.


Average of ratings: -
In reply to Stephanie Ferguson

Re: Database Formatting

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Stephanie,

Am I right that this is your, View single, layout? Could you post a copy of your preset? Can you create a picture of how you would like the layout to look?

Average of ratings: Useful (2)
In reply to AL Rachels

Re: Database Formatting

by Stephanie Ferguson -
Hi Al! You are correct, that is the "view single" layout!

And ok....preset? Perhaps that is my problem? I don't recall needing a preset when I've created them before though. Hmmm.

I would just like the field names to not be all squished to the left. And the video not to be all the way to the right. I find the way it looks now (screenshot in the initial post) very jumbled.

So will a preset fix this for me? If so, I've never used one before so open to ALL the tips/suggestions you might have!

Thanks so much!
S
In reply to Stephanie Ferguson

Re: Database Formatting

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hi Stephanie,
When you open your database, you should see a row of tabs: View list, View single, etc., with the last one on the far right being, Presets. Click on it, and the first option is Export as zip. Click the, Export, button and Save the file. Attach that zip file to your reply here in the forum. That will enable us to install the preset on our computer, see what your View single template looks like, make changes, then send a copy of the preset back to you. You would then load our changed preset into the Import file area, which would then make the changes appear in you database.
Average of ratings: Useful (1)
In reply to AL Rachels

Re: Database Formatting

by Stephanie Ferguson -

OMG, you're a lifesaver!!! Thanks, Al! 

That was super easy. Here you go!

In reply to Stephanie Ferguson

Re: Database Formatting

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Stephanie,

Sorry to take so long to get something back to you. Had to deal with a family matter that took a while, and then I decided to do a little extra to this preset.

I changed the list view as it is not usually a good idea to have videos in that view. Can really slow down the page load time. I also formatted the List view, and if you should decide to edit it, you will need to disable the editor, or you might 'break' it.

I took the easy way out for fixing the 'jumbled' problem for the Single view, which is to make sure the field your using for video is outside the default table. Made the same change for the Add entry.

I added some CSS to the CSS template, that is used to format the list view and do the mouse over color changes.

I changed the name of all the fields. You were basically using descriptions for the field names and then not giving a description.

If you want to compare your database to this one, create a new database, then immediately go to the presets tab and import this preset. That way you have two database activities so you can compare and see the changes.

Average of ratings: Useful (1)
In reply to AL Rachels

Re: Database Formatting

by William Lu -
Picture of Particularly helpful Moodlers
OMG, you are giving the girl 5-star services.
Average of ratings: Useful (1)
In reply to William Lu

Re: Database Formatting

by Stephanie Ferguson -

🤣🤣🤣Well ultimately, I want to learn how to fix it myself, but I sure do appreciate Al's help! He definitely gets a 5-star rating! ⭐⭐⭐⭐⭐

In reply to AL Rachels

Re: Database Formatting

by Stephanie Ferguson -
Wow, Al! Thanks. I didn't expect this much help - let alone any expectations on a quick turnaround. Sorry to hear about your family matter. I certainly hope all is ok.

I finally got a chance to try this, and it works perfectly now. Thank you so much!

So what is your advice for when I create databases in the future? I don't want to have to run to you each time. LOL! What caused the issue exactly and how can I avoid it moving forward?

Thanks, so much again!!! smile
In reply to Stephanie Ferguson

Re: Database Formatting

by Stephanie Ferguson -
Hey again, Al! One more thing. I love how the "View single looks". 


I'm not crazy about the "View List" view though. 

Does it have to look like this? Can "View List" not just be a scrolling list of the "View single" view but showing multiple entries? If it has to stay like this, how would I change the colours or make the url to the video more noticeable because I didn't even realize that I had to click on my title "Test video" to access it, and I'm thinking my new Moodle users wouldn't notice that either. 

Sorry, you've already helped me so much, so I don't want to monopolize your time. I ultimately want to be able to figure this out and set these up properly on my own. I'm not sure why these are so clunky when I find the rest of Moodle activities pretty easy to set up. I want to use them in my courses because I think they can be great activities, but this is putting me off a bit. 😞


In reply to Stephanie Ferguson

Re: Database Formatting

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Does it have to look like this? - No, you can make it look like just about anything.

Can "View List" not just be a scrolling list of the "View single" view but showing multiple entries? - Typically, if you make a scrolling list containing videos, the page become very slow to load because of all the large video files. That's why I have a "More" link that let's you go directly to the single view to watch the video.

If it has to stay like this, how would I change the colours or make the url to the video more noticeable because I didn't even realize that I had to click on my title "Test video" to access it, and I'm thinking my new Moodle users wouldn't notice that either. - Click on the Templates tab, then click on CSS template. Scroll down to where you see .trnormal td{. The background color can be entered in hexidecimal (e.g. #ffbf00) or as a color name. (e.g., lightblue, green, gold, etc.)

I'm not sure why these are so clunky when I find the rest of Moodle activities pretty easy to set up. - The database activity winds up being a little "clunky" because you are using a database to make a database, plus you also have to "build" the user interface, via templates, that controls what and how the users see the data. Like you, I struggled, when I first tried to use this activity years ago. I wound up just taking a preset for something like, Class Notes, and make changes to it to see what happened.

Sorry, I did not have more time to explain about this version of your database before, as I was trying to make it, plus test a new release of MooTYper on 12 versions of Moodle.

I have an idea for another list view, that does show the videos, a small sized version in List view and much larger version in Single view, but it all depends on your video sources. Are they ALL going to be YouTube videos? If so, it will work. Otherwise it won't. Let me know if they are to be YouTube only.

Average of ratings: Useful (1)
In reply to AL Rachels

Re: Database Formatting

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Stephanie,

I have included another preset that does give you a much different look for the View list, View single, and Add entry. Feel free to change things, but be careful as the "good bits" regarding the video's can only be seen when the editor is disabled. Switching back and forth may make things break as the Atto editor sometimes "cleans" things when saving.

When making an entry, this version just needs the just last 11 characters of a YouTube URL.

If you want the video size on the View list page, to be larger, or smaller, there is a width and height setting, in the Repeated entry, section of the template. In the preset I have the size set to 160x90, but you can also use 320x180. With just five entries in my sample database, there is a noticeable lag in loading the page, before all the videos are ready. If you have many more files and just a few students, they can REALLY slow things down, especially if they start moving quickly from one page to another.

There is also a size for the View single, in it's template. In the preset it is 640x360, but you can go larger to 1280x720.

You can use other sizes, but if they are not optimal 4x3 ratios, you will get black bands, usually above and below the video picture.

Average of ratings: Useful (2)
In reply to AL Rachels

Re: Database Formatting

by Stephanie Ferguson -
Hi Al, So sorry for the delay in reply. I got overrun by work stuff and wasn't able to get back to this now. I really appreciate all of your help. Unfortunately, I'm still not able to get my database to work properly. I'm beyond frustrated and am just going to delete the activity completely because this is meant to be a demo course to highlight the variety of activities and right now this is NOT one that I would recommend due to user difficulty. It's really too bad because the idea behind them is great and could be an awesome collaborative activity in a course. I really can't thank you enough for your help and applaud you for your determination in figuring out how to format this activity type.