need a sample code for school timetable generator

Posted by Raajkumar under ASP.NET on 10/9/2013 | Points: 10 | Views : 4746 | Status : [Member] | Replies : 2
hi,
i have searched so many websites but i didn't get any clarity that how to allocate periods for a teacher so, please help with a sample code or any ideas.....

thank u




Responses

Posted by: Samirbhogayta on: 10/15/2013 [Member] Starter | Points: 25

Up
0
Down
hi.. it is very good sample for generating school time table

Displaying school subjects

<div class="left">
<table>
<tr>
<td><div class="item">English</div></td>
</tr>
<tr>
<td><div class="item">Science</div></td>
</tr>
<!-- other subjects -->
</table>
</div>

Displaying timetable

<div class="right">
<table>
<tr>
<td class="blank"></td>
<td class="title">Monday</td>
<td class="title">Tuesday</td>
<td class="title">Wednesday</td>
<td class="title">Thursday</td>
<td class="title">Friday</td>
</tr>
<tr>
<td class="time">08:00</td>
<td class="drop"></td>
<td class="drop"></td>
<td class="drop"></td>
<td class="drop"></td>
<td class="drop"></td>
</tr>
<!-- other cells -->
</table>
</div>

Drag the school subject on the left

$('.left .item').draggable({
revert:true,
proxy:'clone'
});

Drop the school subject on timetable cell

$('.right td.drop').droppable({
onDragEnter:function(){
$(this).addClass('over');
},
onDragLeave:function(){
$(this).removeClass('over');
},
onDrop:function(e,source){
$(this).removeClass('over');
if ($(source).hasClass('assigned')){
$(this).append(source);
} else {
var c = $(source).clone().addClass('assigned');
$(this).empty().append(c);
c.draggable({
revert:true
});
}
}
});

As you can see the code above, when users drag the school subject on the left and drop it to the timetable cell, the onDrop callback function will be called. We clone the source element dragged from left and append it on timetable cell. When dragging school subject from timetable cell to another cell, simply move it.

SAMIR
Sr. Software Engineer

Raajkumar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nismeh on: 10/16/2013 [Member] Starter | Points: 25

Up
0
Down
Hey buddy.

Its very vast topic. I've worked on this algo for 4 months. This includes very much effort to meet client requirements. You can find different documents pdf for this. People have done Phd on this topic. You better read those pdfs, will help you to generate mathematical equations to accomplish your goal.

IT KNOWLEDGE IS APPLIED KNOWLEDGE
So Just Do It

Raajkumar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response