Plugin Directory

Changeset 1847895


Ignore:
Timestamp:
03/27/2018 05:58:12 PM (8 years ago)
Author:
junaidte14
Message:

added screenshots and banner image

Location:
time-tables/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • time-tables/trunk/README.txt

    r1847660 r1847895  
    4343== Screenshots ==
    4444
     451. Time tables edit screen part 1
     462. Time tables edit screen part 2
     473. Time tables edit screen part 3
     484. Front end display of time table
     495. Teacher time table edit screen
     506. Front end display of teacher time table
     517. Class time table edit screen
     528. Front end display of class time table
    4553
    4654== Changelog ==
    4755
     56= 1.0.2 =
     57* Added header image and screenshots
     58= 1.0.1 =
     59* Minor changes in description
    4860= 1.0.0 =
    4961* Default version of the plugin
  • time-tables/trunk/codotimetables.php

    r1847660 r1847895  
    1010 *
    1111 * @link              https://codoplex.com
    12  * @since             1.0.1
     12 * @since             1.0.2
    1313 * @package           codott
    1414 *
     
    1717 * Plugin URI:        https://codoplex.com
    1818 * Description:       A time table management plugin developed for universities, schools, colleges, academies or any other type of institutes.
    19  * Version:           1.0.1
     19 * Version:           1.0.2
    2020 * Author:            Junaid Hassan
    2121 * License:           GPL-2.0+
  • time-tables/trunk/plugin_pages/new_time_table.php

    r1847650 r1847895  
    353353            foreach ($day_slots as $key7 => $value7) {
    354354                foreach ($time_slots as $key8 => $value8) {
    355                     foreach ($all_class_slots[$class_title_semester] as $key => $value) {
    356                         $course_to_output = explode('-->', $value);
    357                         $check_day = $course_to_output[0];
    358                         $check_time = $course_to_output[1];
    359                         $check_room = $course_to_output[2];
    360                         if (array_key_exists(3, $course_to_output) && array_key_exists(4, $course_to_output) && array_key_exists(5, $course_to_output)){
    361                             $check_class = $course_to_output[3];
    362                             //$check_sem = $course_to_output[4];
    363                             $check_course_title = $course_to_output[4];
    364                             $course_teacher = $course_to_output[5];
    365                             if($check_day == $value7 && $check_time == $value8 && $check_class == $class_title_semester){
    366                                 $string200 = $check_day.$check_time.$course_teacher;
    367                                 if(in_array($string200, $teacher_slots)){
    368 
    369                                 }else{
    370                                     $teacher_slots[]=$string200;
     355                    if(array_key_exists($class_title_semester, $all_class_slots)){
     356                        foreach ($all_class_slots[$class_title_semester] as $key => $value) {
     357                            $course_to_output = explode('-->', $value);
     358                            $check_day = $course_to_output[0];
     359                            $check_time = $course_to_output[1];
     360                            $check_room = $course_to_output[2];
     361                            if (array_key_exists(3, $course_to_output) && array_key_exists(4, $course_to_output) && array_key_exists(5, $course_to_output)){
     362                                $check_class = $course_to_output[3];
     363                                //$check_sem = $course_to_output[4];
     364                                $check_course_title = $course_to_output[4];
     365                                $course_teacher = $course_to_output[5];
     366                                if($check_day == $value7 && $check_time == $value8 && $check_class == $class_title_semester){
     367                                    $string200 = $check_day.$check_time.$course_teacher;
     368                                    if(in_array($string200, $teacher_slots)){
     369
     370                                    }else{
     371                                        $teacher_slots[]=$string200;
     372                                    }
     373                                    $string10 = $course_teacher.$check_day.$check_time;
     374                                    if(in_array($string10, $check_repeating_teacher)){
     375                                        $duplicate_teachers += 1;
     376                                        $repeating_teacher_slots[] = $value;
     377                                        //echo 'repeating slot: '. $value . '</br>';
     378                                        foreach ($empty_slots as $key6 => $value6) {
     379                                            $empty_slot = explode('-->', $value6);
     380                                            $empty_day = $empty_slot[0];
     381                                            $empty_time = $empty_slot[1];
     382                                            $empty_room = $empty_slot[2];
     383                                            $string11 = $course_teacher.$empty_day.$empty_time;
     384                                            if(in_array($string11, $check_repeating_teacher)){
     385
     386                                            }else{
     387                                                $check_class_duplication = array();
     388                                                foreach ($all_class_slots[$class_title_semester] as $key5 => $value5) {
     389                                                    $class_slot = explode('-->', $value5);
     390                                                    $class_day = $class_slot[0];
     391                                                    $class_time = $class_slot[1];
     392                                                    $class_check_title = $class_slot[3];
     393                                                    //$class_check_sem = $class_slot[4];
     394                                                    if($empty_day != $class_day && $empty_time != $class_time){
     395                                                        $empty_slots[] = $check_day.'-->'.$check_time.'-->'.$check_room;
     396                                                        $all_class_slots[$class_title_semester][$key] = $value6.'-->'.$class_title_semester.'-->'.$check_course_title.'-->'.$course_teacher;   
     397                                                        //echo 'empty slot day time: '. $empty_day. $empty_time. '</br>existing slot day time: '. $new_day. $new_time;
     398                                                        if(array_key_exists($key6, $empty_slots)){
     399                                                            unset($empty_slots[$key6]);
     400                                                        }
     401                                                        break 2;
     402                                                    }
     403                                                }
     404                                                $check_repeating_teacher[] = $string11;
     405                                            }
     406                                        }
     407                                    }else{
     408                                        $check_repeating_teacher[] = $string10;
     409                                    }
     410
    371411                                }
    372                                 $string10 = $course_teacher.$check_day.$check_time;
    373                                 if(in_array($string10, $check_repeating_teacher)){
    374                                     $duplicate_teachers += 1;
    375                                     $repeating_teacher_slots[] = $value;
    376                                     //echo 'repeating slot: '. $value . '</br>';
    377                                     foreach ($empty_slots as $key6 => $value6) {
    378                                         $empty_slot = explode('-->', $value6);
    379                                         $empty_day = $empty_slot[0];
    380                                         $empty_time = $empty_slot[1];
    381                                         $empty_room = $empty_slot[2];
    382                                         $string11 = $course_teacher.$empty_day.$empty_time;
    383                                         if(in_array($string11, $check_repeating_teacher)){
    384 
    385                                         }else{
    386                                             $check_class_duplication = array();
    387                                             foreach ($all_class_slots[$class_title_semester] as $key5 => $value5) {
    388                                                 $class_slot = explode('-->', $value5);
    389                                                 $class_day = $class_slot[0];
    390                                                 $class_time = $class_slot[1];
    391                                                 $class_check_title = $class_slot[3];
    392                                                 //$class_check_sem = $class_slot[4];
    393                                                 if($empty_day != $class_day && $empty_time != $class_time){
    394                                                     $empty_slots[] = $check_day.'-->'.$check_time.'-->'.$check_room;
    395                                                     $all_class_slots[$class_title_semester][$key] = $value6.'-->'.$class_title_semester.'-->'.$check_course_title.'-->'.$course_teacher;   
    396                                                     //echo 'empty slot day time: '. $empty_day. $empty_time. '</br>existing slot day time: '. $new_day. $new_time;
    397                                                     if(array_key_exists($key6, $empty_slots)){
    398                                                         unset($empty_slots[$key6]);
    399                                                     }
    400                                                     break 2;
    401                                                 }
    402                                             }
    403                                             $check_repeating_teacher[] = $string11;
    404                                         }
    405                                     }
    406                                 }else{
    407                                     $check_repeating_teacher[] = $string10;
    408                                 }
    409 
    410412                            }
    411                         }
    412                        
     413                           
     414                        }
    413415                    }
    414416                    //echo 'total teacher duplications: '. $duplicate_teachers;
     
    472474            foreach ($day_slots as $key7 => $value7) {
    473475                foreach ($time_slots as $key8 => $value8) {
    474 
    475                     foreach ($all_class_slots[$class_title_semester] as $key => $value) {
    476                         $course_to_output = explode('-->', $value);
    477                         $check_day = $course_to_output[0];
    478                         $check_time = $course_to_output[1];
    479                         $check_room = $course_to_output[2];
    480                         if (array_key_exists(3, $course_to_output) && array_key_exists(4, $course_to_output) && array_key_exists(5, $course_to_output)){
    481                             $check_class = $course_to_output[3];
    482                             //$check_sem = $course_to_output[4];
    483                             $check_course_title = $course_to_output[4];
    484                             $course_teacher = $course_to_output[5];
    485                             if($check_day == $value7 && $check_time == $value8 && $check_class == $class_title_semester){
    486                                 //echo 'live';
    487                                 $string11 = $course_teacher.$check_day.$check_time;
    488                                 if(in_array($string11, $check_repeating_teacher)){
    489                                     $duplicate_teachers += 1;
    490                                 }else{
    491                                     $check_repeating_teacher[] = $string11;
    492                                 }
    493                                 if(array_key_exists($class_title_semester, $duplicate_classes_courses)){
    494                                     if(in_array($value, $duplicate_classes_courses[$class_title_semester])){
    495                                         //echo 'overlap found for: '. $value;
    496                                         foreach ($empty_slots as $key6 => $value6) {
    497                                             foreach ($all_class_slots[$class_title_semester] as $key4 => $value4) {
    498                                                 $emptying = explode('-->', $value6);
    499                                                 //echo 'testing empty slot: '. $value6;
    500                                                 $empty_day = $emptying[0];
    501                                                 $empty_time = $emptying[1];
    502                                                 $existing = explode('-->', $value4);
    503                                                 $new_day = $existing[0];
    504                                                 $new_time = $existing[1];
     476                    if(array_key_exists($class_title_semester, $all_class_slots)){
     477                        foreach ($all_class_slots[$class_title_semester] as $key => $value) {
     478                            $course_to_output = explode('-->', $value);
     479                            $check_day = $course_to_output[0];
     480                            $check_time = $course_to_output[1];
     481                            $check_room = $course_to_output[2];
     482                            if (array_key_exists(3, $course_to_output) && array_key_exists(4, $course_to_output) && array_key_exists(5, $course_to_output)){
     483                                $check_class = $course_to_output[3];
     484                                //$check_sem = $course_to_output[4];
     485                                $check_course_title = $course_to_output[4];
     486                                $course_teacher = $course_to_output[5];
     487                                if($check_day == $value7 && $check_time == $value8 && $check_class == $class_title_semester){
     488                                    //echo 'live';
     489                                    $string11 = $course_teacher.$check_day.$check_time;
     490                                    if(in_array($string11, $check_repeating_teacher)){
     491                                        $duplicate_teachers += 1;
     492                                    }else{
     493                                        $check_repeating_teacher[] = $string11;
     494                                    }
     495                                    if(array_key_exists($class_title_semester, $duplicate_classes_courses)){
     496                                        if(in_array($value, $duplicate_classes_courses[$class_title_semester])){
     497                                            //echo 'overlap found for: '. $value;
     498                                            foreach ($empty_slots as $key6 => $value6) {
     499                                                foreach ($all_class_slots[$class_title_semester] as $key4 => $value4) {
     500                                                    $emptying = explode('-->', $value6);
     501                                                    //echo 'testing empty slot: '. $value6;
     502                                                    $empty_day = $emptying[0];
     503                                                    $empty_time = $emptying[1];
     504                                                    $existing = explode('-->', $value4);
     505                                                    $new_day = $existing[0];
     506                                                    $new_time = $existing[1];
     507                                                   
     508                                                    if($empty_day == $new_day && $empty_time == $new_time){
     509                                                        $matched = 'true';
     510                                                        break;
     511                                                    }else{
     512                                                        $matched = 'false';     
     513                                                    }
     514
     515                                                }
     516                                                if($matched == 'false'){
     517                                                    $new_comp = $empty_day.$empty_time.$course_teacher;
     518                                                    if(in_array($new_comp, $teacher_slots)){
     519
     520                                                    }else{
     521                                                        $empty_slots[] = $check_day.'-->'.$check_time.'-->'.$check_room;
     522                                                        $all_class_slots[$class_title_semester][$key] = $value6.'-->'.$class_title_semester.'-->'.$check_course_title.'-->'.$course_teacher;   
     523                                                        //echo 'empty slot day time: '. $empty_day. $empty_time. '</br>existing slot day time: '. $new_day. $new_time;
     524                                                        if(array_key_exists($key6, $empty_slots)){
     525                                                            unset($empty_slots[$key6]);
     526                                                        }
     527                                                        break; 
     528                                                    }
     529                                                       
     530                                                }
    505531                                               
    506                                                 if($empty_day == $new_day && $empty_time == $new_time){
    507                                                     $matched = 'true';
    508                                                     break;
    509                                                 }else{
    510                                                     $matched = 'false';     
    511                                                 }
    512 
    513                                             }
    514                                             if($matched == 'false'){
    515                                                 $new_comp = $empty_day.$empty_time.$course_teacher;
    516                                                 if(in_array($new_comp, $teacher_slots)){
    517 
    518                                                 }else{
    519                                                     $empty_slots[] = $check_day.'-->'.$check_time.'-->'.$check_room;
    520                                                     $all_class_slots[$class_title_semester][$key] = $value6.'-->'.$class_title_semester.'-->'.$check_course_title.'-->'.$course_teacher;   
    521                                                     //echo 'empty slot day time: '. $empty_day. $empty_time. '</br>existing slot day time: '. $new_day. $new_time;
    522                                                     if(array_key_exists($key6, $empty_slots)){
    523                                                         unset($empty_slots[$key6]);
    524                                                     }
    525                                                     break; 
    526                                                 }
    527                                                    
    528532                                            }
    529533                                           
    530534                                        }
    531                                        
    532                                     }
     535                                    }
     536                                   
    533537                                }
    534                                
    535538                            }
    536                         }
    537                        
     539                           
     540                        }
    538541                    }
    539542                }
  • time-tables/trunk/plugin_pages/time_tables.php

    r1847650 r1847895  
    652652        //echo $size;
    653653        $i = 1;
    654         foreach ($time_table_classes1 as $key => $value) {
    655             if($i < $size){
    656                 $time_table_classes2 .= $value['codott_class'].',';
    657             }else{
    658                 $time_table_classes2 .= $value['codott_class'];
    659             }
    660             $i++;
     654        if($time_table_classes1){
     655            foreach ($time_table_classes1 as $key => $value) {
     656                if($i < $size){
     657                    $time_table_classes2 .= $value['codott_class'].',';
     658                }else{
     659                    $time_table_classes2 .= $value['codott_class'];
     660                }
     661                $i++;
     662            }
    661663        }
    662664
     
    665667        //echo $size;
    666668        $i = 1;
    667         foreach ($time_table_classes_courses1 as $key => $value) {
    668             if($i < $size){
    669                 $time_table_classes_courses2 .= $value['codott_courseslot_class'].'-->'.$value['codott_courseslot_course'].'-->'.$value['codott_courseslot_teacher'].',';
    670             }else{
    671                 $time_table_classes_courses2 .= $value['codott_courseslot_class'].'-->'.$value['codott_courseslot_course'].'-->'.$value['codott_courseslot_teacher'];
    672             }
    673             $i++;
     669        if($time_table_classes_courses1){
     670            foreach ($time_table_classes_courses1 as $key => $value) {
     671                if($i < $size){
     672                    $time_table_classes_courses2 .= $value['codott_courseslot_class'].'-->'.$value['codott_courseslot_course'].'-->'.$value['codott_courseslot_teacher'].',';
     673                }else{
     674                    $time_table_classes_courses2 .= $value['codott_courseslot_class'].'-->'.$value['codott_courseslot_course'].'-->'.$value['codott_courseslot_teacher'];
     675                }
     676                $i++;
     677            }
    674678        }
    675679
Note: See TracChangeset for help on using the changeset viewer.