Database - Table

Database - Table

by Andrea Zangrando -
Number of replies: 6

Hi Everyone,

I started Moodle the previous week, be patient please smile

I'm currently developping a Moodle (v2.8) for my Pediatric Hemato Oncology Lab, I would need some help in managing the database object.

As shown in the attachment, each table element added in my db (list) is separated from the others (3 inputs shown).

I just want a single table gathering all the inputs added by users.

Any suggestion please?

Thank You!

AZ

Attachment Database_Table.png
Average of ratings: -
In reply to Andrea Zangrando

Re: Database - Table

by Domenico Recchia -

Hi Andrea,

I send you a link for watching a tutorial on the subject: 

Pay attention: the cells must have a fixed size in pixels (say from 200 until 400 px) and the table have to exceed 600 px wide (but not too much!), Otherwise all you will be uncoordinated.

As shown in the tutorial you should first do this header and then .. with the copy and paste on the middle part (where you're going to replicate in vertical fields).

Build header with the text editor the first table and the cells with the help of the graphic support (in this case you should use the text editor TiniMCE rather than the ACT default html, has better management of the tables), then button activates the decoding key (<>) and change the html code in order to configure each cell of a static value.

However, there are plugins that can do this work, such as this: https://moodle.org/plugins/view/mod_dataform

Like any plugin, the problem lies mainly in the installation (you must be at times of important rights and good technical knowledge to properly install the plugin).

Best regard.

Domenico

In reply to Domenico Recchia

Re: Database - Table

by Andrea Zangrando -

Dear Domenico, Itamar,

thank you for your suggestions, I'm now trying to properly edit the HTML in header / repeated / footer section in Template List to customize my own table.

First tries gave good results, the major issue looks like the table border style which should gather all the elements.

database table


After disabling the editor:

#header

<table style="padding:5px; border-color:#9b0014; background-image: none; float: none; text-align: left; vertical-align: top;" border="1" frame="void" rules="none" width="100%">

<tr>

<td style="width:10%"><b>Type</b></td>

<td style="width:15%"><b>Subtype</b></td>

<td style="width:10%"><b>Phase</b></td>

<td style="width:10%"><b>Source</b></td>

<td style="width:5%"><b>Age</b></td>

<td style="width:15%"><b>Conclusion</b></td>

<td style="width:10%"><b>Notes</b></td>

<td style="width:15%"><b>File</b></td>

<td style="width:10%"><b>Date</b></td>

</tr>


# repeated

<tr>

<td style="width:10%">Type</td>

<td style="width:15%">Subtype</td>

<td style="width:10%">Phase</td>

<td style="width:10%">Source</td>

<td style="width:5%">Age</td>

<td style="width:15%">Conclusion</td>

<td style="width:10%">Notes</td>

<td style="width:15%">File</td>

<td style="width:10%">Date</td>


#footer

</tr>

</table>



I am going to install the Dataform mod as well, but it's better I wait for a more expert admin to perform the installation as Domenico suggested.

All the best

AZ

In reply to Andrea Zangrando

Re: Database - Table

by Andrea Zangrando -

Ok I made it, and it's perfectly responsive on different devices.

Also added actions and separation borders.

Thanks for your support!

AZ

Attachment db1.png
Average of ratings: Useful (1)
In reply to Andrea Zangrando

Re: Database - Table

by William Lu -

As Itamar said, you don't need td size.

Please try this:

#header


<table border="1", class="generaltable">
<tbody>
<tr>
<th>Type</th>
<th>Subtype</th>
<th>Phase</th>
<th>Source</th>
<th>Age</th>
<th>Conclusion</th>
<th>Notes</th>
<th>File</th>
<th>Date</th>
</tr>
# repeated
<tr>
<td>Type</td>
<td>Subtype</td>
<td>Phase</td>
<td>Source</td>
<td>Age</td>
<td>Conclusion</td>
<td>Notes</td>
<td>File</td>
<td>Date</td>
</tr>


#footer
</tbody>
</table>

Post a screenshot if this can make your table looks better.

Average of ratings: Useful (1)
In reply to William Lu

Re: Database - Table

by Andrea Zangrando -

I love simple scripts :P

I applied your suggestions, looks fine.

Sorry but I started programming with Oracle ApEx, HTML5, CSS3 since this year, I'm not so practice with all scripts!

Thank You,

AZ

Attachment DB_table_2.png