logicampus-cvs Mailing List for Logicampus (Page 7)
Brought to you by:
trilexcom
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(30) |
Sep
(77) |
Oct
(33) |
Nov
(29) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(36) |
Feb
(33) |
Mar
(5) |
Apr
(2) |
May
(7) |
Jun
(3) |
Jul
|
Aug
(2) |
Sep
(8) |
Oct
(1) |
Nov
(136) |
Dec
(30) |
2007 |
Jan
(64) |
Feb
(103) |
Mar
(29) |
Apr
(106) |
May
(185) |
Jun
(75) |
Jul
(3) |
Aug
(16) |
Sep
(154) |
Oct
(164) |
Nov
(26) |
Dec
|
2008 |
Jan
(15) |
Feb
(17) |
Mar
(32) |
Apr
(3) |
May
|
Jun
(4) |
Jul
|
Aug
(4) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
(21) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2010 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Mark K <har...@us...> - 2007-10-27 17:23:01
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/lib/PBDO In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv15346/src/logicreate/lib/PBDO Modified Files: ClassLessonSequence.php Log Message: Updating class lesson sequence schema to include start, stop, and due times. Index: ClassLessonSequence.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/PBDO/ClassLessonSequence.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ClassLessonSequence.php 30 Sep 2007 17:02:40 -0000 1.6 --- ClassLessonSequence.php 27 Oct 2007 17:22:57 -0000 1.7 *************** *** 18,23 **** --- 18,26 ---- var $notBeforeSeqId; var $startOffset; + var $startTime; var $endOffset; + var $endTime; var $dueOffset; + var $dueTime; var $gracePeriodDays; var $rank; *************** *** 37,42 **** --- 40,48 ---- 'notBeforeSeqId'=>'int', 'startOffset'=>'int', + 'startTime'=>'mediumint', 'endOffset'=>'int', + 'endTime'=>'mediumint', 'dueOffset'=>'int', + 'dueTime'=>'mediumint', 'gracePeriodDays'=>'int', 'rank'=>'integer', *************** *** 47,52 **** --- 53,61 ---- 'notBeforeSeqId'=>'notBeforeSeqId', 'startOffset'=>'startOffset', + 'startTime'=>'startTime', 'endOffset'=>'endOffset', + 'endTime'=>'endTime', 'dueOffset'=>'dueOffset', + 'dueTime'=>'dueTime', 'gracePeriodDays'=>'gracePeriodDays'); *************** *** 150,155 **** --- 159,167 ---- $st->fields['not_before_seq_id'] = 'not_before_seq_id'; $st->fields['start_offset'] = 'start_offset'; + $st->fields['start_time'] = 'start_time'; $st->fields['end_offset'] = 'end_offset'; + $st->fields['end_time'] = 'end_time'; $st->fields['due_offset'] = 'due_offset'; + $st->fields['due_time'] = 'due_time'; $st->fields['grace_period_days'] = 'grace_period_days'; $st->fields['rank'] = 'rank'; *************** *** 181,186 **** --- 193,201 ---- $st->fields['not_before_seq_id'] = $this->notBeforeSeqId; $st->fields['start_offset'] = $this->startOffset; + $st->fields['start_time'] = $this->startTime; $st->fields['end_offset'] = $this->endOffset; + $st->fields['end_time'] = $this->endTime; $st->fields['due_offset'] = $this->dueOffset; + $st->fields['due_time'] = $this->dueTime; $st->fields['grace_period_days'] = $this->gracePeriodDays; $st->fields['rank'] = $this->rank; *************** *** 190,195 **** --- 205,213 ---- $st->nulls['not_before_seq_id'] = 'not_before_seq_id'; $st->nulls['start_offset'] = 'start_offset'; + $st->nulls['start_time'] = 'start_time'; $st->nulls['end_offset'] = 'end_offset'; + $st->nulls['end_time'] = 'end_time'; $st->nulls['due_offset'] = 'due_offset'; + $st->nulls['due_time'] = 'due_time'; $st->nulls['grace_period_days'] = 'grace_period_days'; *************** *** 219,224 **** --- 237,245 ---- $st->fields['not_before_seq_id'] = $obj->notBeforeSeqId; $st->fields['start_offset'] = $obj->startOffset; + $st->fields['start_time'] = $obj->startTime; $st->fields['end_offset'] = $obj->endOffset; + $st->fields['end_time'] = $obj->endTime; $st->fields['due_offset'] = $obj->dueOffset; + $st->fields['due_time'] = $obj->dueTime; $st->fields['grace_period_days'] = $obj->gracePeriodDays; $st->fields['rank'] = $obj->rank; *************** *** 228,233 **** --- 249,257 ---- $st->nulls['not_before_seq_id'] = 'not_before_seq_id'; $st->nulls['start_offset'] = 'start_offset'; + $st->nulls['start_time'] = 'start_time'; $st->nulls['end_offset'] = 'end_offset'; + $st->nulls['end_time'] = 'end_time'; $st->nulls['due_offset'] = 'due_offset'; + $st->nulls['due_time'] = 'due_time'; $st->nulls['grace_period_days'] = 'grace_period_days'; *************** *** 299,304 **** --- 323,331 ---- $x->notBeforeSeqId = $row['not_before_seq_id']; $x->startOffset = $row['start_offset']; + $x->startTime = $row['start_time']; $x->endOffset = $row['end_offset']; + $x->endTime = $row['end_time']; $x->dueOffset = $row['due_offset']; + $x->dueTime = $row['due_time']; $x->gracePeriodDays = $row['grace_period_days']; $x->rank = $row['rank']; |
From: Mark K <har...@us...> - 2007-10-25 18:32:01
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/services/classmgr In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv1567 Modified Files: lessonSequence.lcp Log Message: Final change to the lessonSequence re-rank logic. Index: lessonSequence.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/classmgr/lessonSequence.lcp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** lessonSequence.lcp 23 Oct 2007 19:56:55 -0000 1.11 --- lessonSequence.lcp 25 Oct 2007 18:31:56 -0000 1.12 *************** *** 58,61 **** --- 58,62 ---- WHERE rank = ".$curRank." AND class_id = ".$class_id." + ORDER BY rank DESC LIMIT 1"; *************** *** 123,128 **** //die('no sequences yet'); } - foreach ($sequences as $objIdx => $obj) { //change the "type" field into an image representing the mime. //no reason why i'm changing lobType instead of lobMime --- 124,129 ---- //die('no sequences yet'); } + foreach ($sequences as $objIdx => $obj) { //change the "type" field into an image representing the mime. //no reason why i'm changing lobType instead of lobMime |
From: Mark K <har...@us...> - 2007-10-23 19:57:02
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/services/classmgr In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv6465 Modified Files: lessonSequence.lcp Log Message: Slightly better up and down re-ranking SQL. Index: lessonSequence.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/classmgr/lessonSequence.lcp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** lessonSequence.lcp 8 Oct 2007 00:34:04 -0000 1.10 --- lessonSequence.lcp 23 Oct 2007 19:56:55 -0000 1.11 *************** *** 56,60 **** $sql1 = "UPDATE class_lesson_sequence SET rank=-1 ! WHERE rank = ".$curRank; --- 56,62 ---- $sql1 = "UPDATE class_lesson_sequence SET rank=-1 ! WHERE rank = ".$curRank." ! AND class_id = ".$class_id." ! LIMIT 1"; *************** *** 62,71 **** //move the above ranked item down $sql2 = "UPDATE class_lesson_sequence ! SET rank=rank+1 ! WHERE rank = ".$upRank; //move selected rank into new position $sql3 = "UPDATE class_lesson_sequence SET rank=".$upRank." ! WHERE rank =-1"; } --- 64,77 ---- //move the above ranked item down $sql2 = "UPDATE class_lesson_sequence ! SET rank=".$upRank."+1 ! WHERE rank <= ".$curRank." ! AND class_id = ".$class_id." ! ORDER BY rank DESC ! LIMIT 1"; //move selected rank into new position $sql3 = "UPDATE class_lesson_sequence SET rank=".$upRank." ! WHERE rank =-1 ! AND class_id = ".$class_id; } *************** *** 73,82 **** //move the below ranked item up $sql2 = "UPDATE class_lesson_sequence ! SET rank=rank-1 ! WHERE rank = ".$dnRank; //move selected rank into new position $sql3 = "UPDATE class_lesson_sequence SET rank=".$dnRank." ! WHERE rank =-1"; } --- 79,92 ---- //move the below ranked item up $sql2 = "UPDATE class_lesson_sequence ! SET rank=".$dnRank."-1 ! WHERE rank >= ".$curRank." ! AND class_id = ".$class_id." ! ORDER BY rank ASC ! LIMIT 1"; //move selected rank into new position $sql3 = "UPDATE class_lesson_sequence SET rank=".$dnRank." ! WHERE rank =-1 ! AND class_id = ".$class_id; } *************** *** 269,274 **** --- 279,286 ---- $save = true; } + //due offset is number of days *after* the start of this object. if( isset($lc->postvars['dueOffset'][$objIdx]) ) { $sequences[$objIdx]->dueOffset = ($lc->postvars['dueOffset'][$objIdx] * 60*60*24); + $sequences[$objIdx]->dueOffset += $sequences[$objIdx]->startOffset; $save = true; } |
From: Mark K <har...@us...> - 2007-10-22 01:54:43
|
Update of /cvsroot/logicampus/logicampus/data In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv14256 Added Files: lob_class_test.mysql.sql Log Message: Simple file addition to make dtabase whole.`:wq --- NEW FILE: lob_class_test.mysql.sql --- -- Dumping SQL for project logicampus -- entity version: 0.0 -- DB type: mysql -- generated on: 09.29.2007 DROP TABLE IF EXISTS `lob_class_test`; CREATE TABLE `lob_class_test` ( `lob_class_test_id` integer (11) NOT NULL auto_increment, `lob_class_repo_id` integer (11) NOT NULL, `num_retry` integer (11) NOT NULL, `is_practice` tinyint (2) NOT NULL, PRIMARY KEY (lob_class_test_id) ); CREATE INDEX lob_class_repo_idx ON lob_class_test (lob_class_repo_id); |
From: Mark K <har...@us...> - 2007-10-09 23:52:48
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/lib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv14007 Modified Files: lc_table_calendar.php Log Message: Adding in calendar support for activities based off of lesson start/stop times. Index: lc_table_calendar.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/lc_table_calendar.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** lc_table_calendar.php 28 Sep 2007 20:37:43 -0000 1.13 --- lc_table_calendar.php 9 Oct 2007 23:52:45 -0000 1.14 *************** *** 294,299 **** if ( $eventWindow == 'day' ) { ! $this->windowStartTS = mktime(0,0,0,$this->m,$this->d,$this->y); ! $this->windowEndTS = mktime(23,59,59,$this->m,$this->d,$this->y); } --- 294,299 ---- if ( $eventWindow == 'day' ) { ! $this->windowStartTS = mktime(0,0,0,$this->m,$this->d,$this->y)- 1000000; ! $this->windowEndTS = mktime(23,59,59,$this->m,$this->d,$this->y) + 1000; } *************** *** 303,306 **** --- 303,307 ---- $this->loadClassEvents($this->windowStartTS, $this->windowEndTS); + $this->loadLessonEvents($this->windowStartTS, $this->windowEndTS); } *************** *** 418,422 **** function getEventsAtHour($dateStamp) { $ret = array(); ! // echo "Hour is : ".date('G:i:s',$dateStamp); // echo "<br/><br/>"; foreach($this->events as $blank=>$evt) { --- 419,423 ---- function getEventsAtHour($dateStamp) { $ret = array(); ! // echo "Hour is : ".date('G:i:s',$evtStart); // echo "<br/><br/>"; foreach($this->events as $blank=>$evt) { *************** *** 461,465 **** $db->query($sql); while( $db->nextRecord() ) { ! $this->events[$db->record['pkey']] = $db->record; } } --- 462,509 ---- $db->query($sql); while( $db->nextRecord() ) { ! $this->events[] = $db->record; ! } ! } ! ! ! /** ! * Load up events relative to the student's enrollment in the class. ! * ! * Use enrollment dates or semester start/stop dates to calculate offets ! */ ! function loadLessonEvents($start,$end) { ! $classIds = implode($this->classIds, ' or id_classes='); ! ! $sql =' ! SELECT C.activeOn + start_offset as startdate ! , C.inactiveOn + due_offset as enddate ! , A.lob_title as title ! , A.start_offset ! , A.due_offset ! , A.lob_type as calendarType ! FROM class_lesson_sequence AS A ! LEFT JOIN classes AS B on A.class_id = B.id_classes ! ! LEFT JOIN class_lessons AS C on A.lesson_id = C.id_class_lessons ! ! ! WHERE ! (class_id = '.$classIds.') ! AND (lob_type = "activity" OR lob_type = "test") ! ! HAVING ! ( (startdate )>='.$start.' AND (startdate) <= '.$end.') ! OR ! ( ! ( (enddate) >= '.$start.' AND (enddate) <= '.$end.') ! AND (due_offset > 0 OR due_offset IS NULL) ! ) ! '; ! ! //debug($sql,1); ! $db = DB::getHandle(); ! $db->query($sql); ! while( $db->nextRecord() ) { ! $this->events[] = $db->record; } } *************** *** 805,808 **** --- 849,853 ---- */ function paintHeaders() { + $this->html .= '<thead>'; $this->html .= '<tr class="center_justify">'; *************** *** 877,884 **** $renderer->row = $x; $renderer->col = $y; if ($y==0 ) { $renderer->value = $x; } else { ! $renderer->value = $this->table->tableModel->getEventsAtHour( mktime($x+1, 0, 0, $this->table->tableModel->m, $this->table->tableModel->d, $this->table->tableModel->y ) ); } --- 922,930 ---- $renderer->row = $x; $renderer->col = $y; + if ($y==0 ) { $renderer->value = $x; } else { ! $renderer->value = $this->table->tableModel->getEventsAtHour( mktime($x, 0, 0, $this->table->tableModel->m, $this->table->tableModel->d, $this->table->tableModel->y ) ); } *************** *** 973,992 **** $evtType = strtolower($evt['calendarType']); switch( $evtType ) { ! case 'classroomassignments': ! $type = 'Assignment:'; if ($evtStart == $this->targetDate->timeStamp) { ! $type = 'Assignment (Assigned):'; } else if ($evtEnd == $this->targetDate->timeStamp) { ! $type = 'Assignment (Due):'; } break; ! case 'assessmentscheduling': ! $type = 'Assessment:'; if ($evtStart == $this->targetDate->timeStamp) { ! $type = 'Assessment (Assigned):'; } else if ($evtEnd == $this->targetDate->timeStamp) { ! $type = 'Assessment (Due):'; } break; default: $type = ''; --- 1019,1040 ---- $evtType = strtolower($evt['calendarType']); switch( $evtType ) { ! case 'activity': ! $type = 'Activity:'; if ($evtStart == $this->targetDate->timeStamp) { ! $type = 'Activity (Assigned):'; } else if ($evtEnd == $this->targetDate->timeStamp) { ! $type = 'Activity (Due):'; } break; ! case 'test': ! $type = 'Test:'; if ($evtStart == $this->targetDate->timeStamp) { ! $type = 'Test (Assigned):'; } else if ($evtEnd == $this->targetDate->timeStamp) { ! $type = 'Test (Due):'; } break; + + default: $type = ''; |
From: Mark K <har...@us...> - 2007-10-09 18:44:27
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/lib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv9403 Modified Files: lc_lob.php Log Message: Test for 2 more types of lobs. (helper functions.) Index: lc_lob.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/lc_lob.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** lc_lob.php 8 Oct 2007 14:33:19 -0000 1.30 --- lc_lob.php 9 Oct 2007 18:44:20 -0000 1.31 *************** *** 41,44 **** --- 41,58 ---- } + /** + * Acitivty/assignment style content. homework, upload a file, etc. + */ + function isActivity() { + return $this->repoObj->lobType == 'activity'; + } + + /** + * Test/exam style content. + */ + function isTest() { + return $this->repoObj->lobType == 'test'; + } + function isText() { return $this->repoObj->lobSubType == 'text'; *************** *** 481,484 **** --- 495,499 ---- $tests = $this->repoObj->getLobActivitysByLobRepoEntryId(); $this->lobSub = $tests[0]; + $this->lobMetaObj = LobMetadata::load(array('lob_repo_entry_id'=>$id)); } } |
From: Mark K <har...@us...> - 2007-10-08 22:18:57
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/services/lobrepo/templates In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12260/templates Modified Files: add_activity.html edit_main.html Log Message: Edit notes on any lob. Edit most of an activity. Index: add_activity.html =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/lobrepo/templates/add_activity.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** add_activity.html 5 Oct 2007 21:35:48 -0000 1.3 --- add_activity.html 8 Oct 2007 22:18:54 -0000 1.4 *************** *** 17,21 **** <tr> <td valign="top" class="row1">*Title</td> ! <td valign="top" class=""><input type="text" id="title" name="title" value="" size="40" maxlength="50"></td> </tr> --- 17,21 ---- <tr> <td valign="top" class="row1">*Title</td> ! <td valign="top" class=""><input type="text" id="title" name="title" value="<?= $t['lob']->repoObj->lobTitle;?>" size="40" maxlength="50"></td> </tr> *************** *** 23,27 **** <td valign="top" class="row1" valign="top">*Instructions for students</td> <td valign="top" class=""> ! <textarea name="instructions" cols="40" rows="5" id="instructions"></textarea> </td> </tr> --- 23,27 ---- <td valign="top" class="row1" valign="top">*Instructions for students</td> <td valign="top" class=""> ! <textarea name="instructions" cols="40" rows="5" id="instructions"><?= $t['lob']->repoObj->lobDescription;?></textarea> </td> </tr> *************** *** 30,34 **** <td valign="top" class="row1" valign="top">Notes (only for faculty)</td> <td valign="top" class=""> ! <textarea name="notes" cols="40" rows="5" id="notes"></textarea> </td> </tr> --- 30,34 ---- <td valign="top" class="row1" valign="top">Notes (only for faculty)</td> <td valign="top" class=""> ! <textarea name="notes" cols="40" rows="5" id="notes"><?= $t['lob']->repoObj->lobNotes;?></textarea> </td> </tr> Index: edit_main.html =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/lobrepo/templates/edit_main.html,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** edit_main.html 27 Sep 2007 20:37:49 -0000 1.11 --- edit_main.html 8 Oct 2007 22:18:54 -0000 1.12 *************** *** 99,101 **** Enter notes about this object for other faculty members to see. <br/> ! <textarea rows="15" cols="80"></textarea> --- 99,107 ---- Enter notes about this object for other faculty members to see. <br/> ! ! <form method="POST" action="<?=appurl('lobrepo/edit/event=notes/');?>"> ! <textarea rows="15" cols="80" id="lob_notes" name="lob_notes"><?=$lob->repoObj->lobNotes;?></textarea> ! <br/> ! <input type="hidden" name="id" value="<?=$lob->getRepoId();?>"/> ! <input type="submit" id="sbmt_button2" name="sbmt_button2" value="Change the notes."/> ! </form> |
From: Mark K <har...@us...> - 2007-10-08 22:18:57
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/services/lobrepo In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12260 Modified Files: edit.lcp import.lcp Log Message: Edit notes on any lob. Edit most of an activity. Index: import.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/lobrepo/import.lcp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** import.lcp 8 Oct 2007 19:41:24 -0000 1.10 --- import.lcp 8 Oct 2007 22:18:54 -0000 1.11 *************** *** 37,45 **** } ! debug($lc->uploads); $tempdir = $this->tempdir('/tmp', 'campus'); $this->tempdir = $tempdir; ! debug($tempdir); //$za = zip_open($lc->uploads['lobxml']['tmp_name']); --- 37,45 ---- } ! //debug($lc->uploads); $tempdir = $this->tempdir('/tmp', 'campus'); $this->tempdir = $tempdir; ! //debug($tempdir); //$za = zip_open($lc->uploads['lobxml']['tmp_name']); *************** *** 82,91 **** $lobSub = $this->makeContentNode($node); } ! if ($lobObj->lobType == 'interaction') { $lobSub = $this->makeActivityNode($node); } ! echo "saving ".$xidx." lob ... <br/>\n"; // debug($lobObj->lobTitle); $lobObj->save(); --- 82,91 ---- $lobSub = $this->makeContentNode($node); } ! if ($lobObj->lobType == 'activity') { $lobSub = $this->makeActivityNode($node); } ! // echo "saving ".$xidx." lob ... <br/>\n"; // debug($lobObj->lobTitle); $lobObj->save(); *************** *** 94,98 **** $lobSub->set('lobRepoEntryId',$lobObj->getPrimaryKey()); $lobSub->save(); ! echo $xidx." is a *CONTENT* lob ... <br/>\n"; // echo substr($lobSub->lobText,0,1000)."<br/>\n"; } --- 94,98 ---- $lobSub->set('lobRepoEntryId',$lobObj->getPrimaryKey()); $lobSub->save(); ! // echo $xidx." is a *CONTENT* lob ... <br/>\n"; // echo substr($lobSub->lobText,0,1000)."<br/>\n"; } *************** *** 116,122 **** unlink($tempdir.'/learningobjects.xml'); - rmdir($tempdir.'/interactions'); - rmdir($tempdir.'/tests'); rmdir($tempdir); } --- 116,123 ---- unlink($tempdir.'/learningobjects.xml'); rmdir($tempdir); + + $this->presentor = 'redirectPresentation'; + $t['url'] = appurl('lobrepo/myobj'); } *************** *** 202,211 **** $lob->set('lobType','content'); break; - case 'interaction': - $lob->set('lobType','interaction'); - break; case 'activity': $lob->set('lobType','activity'); break; } if ($lob->lobType == '') { return null; die ('unknown type '. $content); } --- 203,212 ---- $lob->set('lobType','content'); break; case 'activity': $lob->set('lobType','activity'); break; + case 'test': + $lob->set('lobType','test'); + break; } if ($lob->lobType == '') { return null; die ('unknown type '. $content); } Index: edit.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/lobrepo/edit.lcp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** edit.lcp 7 Oct 2007 00:10:59 -0000 1.20 --- edit.lcp 8 Oct 2007 22:18:54 -0000 1.21 *************** *** 38,42 **** --- 38,45 ---- $t['lob_description'] .= ' ...'; } + } else { + $t['lob_description'] = $t['lob']->repoObj->lobDescription; } + $t['lob_bytes'] = Lc_Lob_Util::formatBytes($t['lob']->repoObj->lobBytes); *************** *** 64,67 **** --- 67,74 ---- } else if ($lob->isImage()) { $lc->templateName = 'add_image'; + } else if ($lob->isActivity()) { + $lc->templateName = 'add_activity'; + } else if ($lob->isTest()) { + $lc->templateName = 'add_test'; } else { $lc->templateName = 'add_html'; *************** *** 148,151 **** --- 155,171 ---- + /** + * Update the notes field, do not increase the version number. + */ + function notesRun(&$db,&$u,&$lc,&$t) { + $lobId = intval($lc->postvars['id']); + $lobObj = LobRepoEntry::load($lobId); + $lobObj->lobNotes = $lc->postvars['lob_notes']; + $lobObj->save(); + + $this->presentor = 'redirectPresentation'; + $t['url'] = appurl('lobrepo/myobj/'); + } + function saveActRun(&$db,&$u,&$lc,&$t) { $id = intval($lc->postvars['lob_id']); |
From: Mark K <har...@us...> - 2007-10-08 19:41:33
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/services/lobrepo In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv4300/services/lobrepo Modified Files: import.lcp lob_table_renderer.php myobj.lcp Log Message: Make my LOB table paginate. Index: lob_table_renderer.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/lobrepo/lob_table_renderer.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** lob_table_renderer.php 28 Sep 2007 15:21:27 -0000 1.12 --- lob_table_renderer.php 8 Oct 2007 19:41:24 -0000 1.13 *************** *** 4,10 **** * Custom renderer for Learning Objects */ ! class Lob_Table_Renderer extends LC_TableRenderer { /** * Shows the table as HTML --- 4,13 ---- * Custom renderer for Learning Objects */ ! class Lob_Table_Renderer extends LC_TableRendererPaged { + var $style="clear:right; border:0px; background-color:white;"; + // var $cssClass = 'datatable'; + /** * Shows the table as HTML *************** *** 31,35 **** function startTable() { ! $this->html .='<table border="0" width="100%" class="datatable" style="background-color:white;border:0px">'; } --- 34,39 ---- function startTable() { ! parent::startTable(); ! // $this->html .='<table border="0" width="100%" class="datatable" style="background-color:white;border:0px">'; } Index: myobj.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/lobrepo/myobj.lcp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** myobj.lcp 4 Oct 2007 14:55:56 -0000 1.17 --- myobj.lcp 8 Oct 2007 19:41:24 -0000 1.18 *************** *** 33,39 **** --- 33,57 ---- //$lobs = LobContentPeer::doSelect(); + //get total count for paged tables. + $db->query('SELECT count(*) as totalcount + FROM lob_repo_entry as A + LEFT JOIN lob_metadata as B on A.lob_repo_entry_id = B.lob_repo_entry_id + LEFT JOIN lob_user_link as C on A.lob_repo_entry_id = C.lob_repo_entry_id + WHERE C.user_id = '.$u->userId.' + '); + + $db->nextRecord(); + $db->freeResult(); + $totalCount = $db->record['totalcount']; + + + $pageIdx = intval($lc->getvars['p']); + if ($pageIdx ==0 ) {$pageIdx =1;} + $lobItems = array(); $idx=0; + $limitCount = 30; + $limitStart = $limitCount * ($pageIdx-1); $db->query('SELECT A.*,B.author, B.license, B.copyright,B.subject, B.subdisc FROM lob_repo_entry as A *************** *** 41,47 **** LEFT JOIN lob_user_link as C on A.lob_repo_entry_id = C.lob_repo_entry_id WHERE C.user_id = '.$u->userId.' '); - while($db->nextRecord()) { //foreach ($lobs as $lobObj) { --- 59,65 ---- LEFT JOIN lob_user_link as C on A.lob_repo_entry_id = C.lob_repo_entry_id WHERE C.user_id = '.$u->userId.' + LIMIT '.$limitStart.','.$limitCount.' '); while($db->nextRecord()) { //foreach ($lobs as $lobObj) { *************** *** 63,67 **** $dm->ignoreColumn('subdisc'); $dm->ignoreColumn('lobRepoEntryId'); ! $table = new LC_Table($dm); $columnModel = &$table->getColumnModel(); $col = &$columnModel->getColumnAt(0); --- 81,90 ---- $dm->ignoreColumn('subdisc'); $dm->ignoreColumn('lobRepoEntryId'); ! ! $table = new LC_TablePaged($dm); ! $table->url = appurl('lobrepo').'/myobj/p=%d'; ! $table->maxRows = $totalCount; ! $table->rowsPerPage = $limitCount = 30; ! $table->currentPage = $pageIdx; $columnModel = &$table->getColumnModel(); $col = &$columnModel->getColumnAt(0); *************** *** 93,97 **** $linkIds[$linkObj->lobClassRepoId][] = $linkObj->classId; } ! $t['lobTable']->classLinkIds = $linkIds; // print_r($t['lobTable']); } --- 116,120 ---- $linkIds[$linkObj->lobClassRepoId][] = $linkObj->classId; } ! // $t['lobTable']->classLinkIds = $linkIds; // print_r($t['lobTable']); } Index: import.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/lobrepo/import.lcp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** import.lcp 8 Oct 2007 00:13:35 -0000 1.9 --- import.lcp 8 Oct 2007 19:41:24 -0000 1.10 *************** *** 82,85 **** --- 82,89 ---- $lobSub = $this->makeContentNode($node); } + if ($lobObj->lobType == 'interaction') { + $lobSub = $this->makeActivityNode($node); + } + echo "saving ".$xidx." lob ... <br/>\n"; *************** *** 128,131 **** --- 132,168 ---- } + /** + * return a lob activity sub-object + */ + function makeActivityNode($n) { + $result = $n->getElementsByTagname('response'); + $responseNode = $result->item(0); + $lobSub = new LobActivity(); + switch($resposneNode->nodeValue) { + case 'upload': + $lobSub->responseTypeId = 1; + break; + case 'text': + $lobSub->responseTypeId = 2; + break; + case 'uploadandtext': + $lobSub->responseTypeId = 3; + break; + case 'forum': + $lobSub->responseTypeId = 4; + break; + case 'none': + $lobSub->responseTypeId = 5; + break; + case 'audio': + $lobSub->responseTypeId = 6; + break; + + default: + $lobSub->responseTypeId = 5; + } + return $lobSub; + } + /** *************** *** 168,171 **** --- 205,211 ---- $lob->set('lobType','interaction'); break; + case 'activity': + $lob->set('lobType','activity'); + break; } if ($lob->lobType == '') { return null; die ('unknown type '. $content); } *************** *** 291,295 **** return $lob; - // debug($children); } --- 331,334 ---- |
From: Mark K <har...@us...> - 2007-10-08 19:41:28
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/lib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv4300/lib Modified Files: lc_table.php lc_table_renderer.php Log Message: Make my LOB table paginate. Index: lc_table.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/lc_table.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** lc_table.php 15 May 2007 22:16:42 -0000 1.12 --- lc_table.php 8 Oct 2007 19:41:17 -0000 1.13 *************** *** 137,140 **** --- 137,162 ---- $this->tableHeader->setColumnName($i,$n); } + + + /** + * add a column at the specifiec index + * @return int new index + */ + function addColumnAt($idx, $c) { + $newColumns = array(); + $newMap = array(); + + for($x = 0; $x < count($this->columnModel->tableColumns); $x++) { + if ($x === $idx) { + $newColumns[] = $c; + $newMap[] = $c->name; + } + $newColumns[] =& $this->columnModel->tableColumns[$x]; + $newMap[] = $this->tableModel->colMap[$x]; + } + $this->columnModel->tableColumns = $newColumns; + $this->tableModel->colMap = $newMap; + return $idx; + } } *************** *** 143,168 **** class LC_TablePaged extends LC_Table { ! var $rowsPerPage = 10; var $currentPage = 1; var $url; ! function getPrevUrl() { ! return '#'; } ! function getNextUrl() { ! return '#'; } ! function getPageUrl($i) { ! return '#'; } function getMaxRows() { ! return 1; } } --- 165,199 ---- class LC_TablePaged extends LC_Table { ! var $rowsPerPage = 30; var $currentPage = 1; var $url; + var $maxRows = 1; ! function getPrevUrl($pageIdx=1) { ! return $this->getPageUrl($pageIdx-1); } ! function getNextUrl($pageIdx=1) { ! $maxRows = $this->getMaxRows(); ! $pages = ceil($maxRows / $this->rowsPerPage); ! $nextPage = $this->currentPage +1; ! if ($nextPage > $pages) { ! return '#'; ! // $nextPage = $pages; ! } ! ! return $this->getPageUrl($pageIdx+1); } ! function getPageUrl($pageIdx=1) { ! return sprintf($this->url, $pageIdx); } function getMaxRows() { ! return $this->maxRows; } } *************** *** 571,574 **** --- 602,623 ---- } + /** + * add a column at the specifiec index + * @return int new index + */ + function addColumnAt($idx, $c) { + $newColumns = array(); + + for($x = 0; $x < count($this->tableColumns); $x++) { + if ($x === $idx) { + $newColumns[] = $c; + } + $newColumns[] =& $this->tableColumns[$x]; + } + $this->tableColumns = $newColumns; + + return $idx; + } + /** Index: lc_table_renderer.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/lc_table_renderer.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** lc_table_renderer.php 1 Oct 2007 19:17:10 -0000 1.15 --- lc_table_renderer.php 8 Oct 2007 19:41:21 -0000 1.16 *************** *** 10,13 **** --- 10,14 ---- var $table; //the table to render, must be of type LC_Table var $style = 'clear:right;'; + var $cssClass = 'datatable'; function LC_TableRenderer($t) { *************** *** 41,45 **** */ function startTable() { ! $this->html .= '<table cellpadding="0" cellspacing="1" class="datatable" width="100%" style="'.$this->style.'">'; $this->html .= "\n"; } --- 42,50 ---- */ function startTable() { ! $this->html .= '<table border="0" cellpadding="0" cellspacing="1" width="100%" style="'.$this->style.'"'; ! if ( strlen($this->cssClass) ) { ! $this->html .= ' class="'.$this->cssClass.'" '; ! } ! $this->html .= '>'; $this->html .= "\n"; } *************** *** 214,222 **** $pages = ceil($maxRows / $this->table->rowsPerPage); $this->html .= '<div class="datatable_nav" style="padding-top:7px;" align="right">'; ! $this->html .= '<a href="'.$this->table->getPrevUrl().'">«Prev</a> | '; for ($x=1; $x<=$pages; ++$x) { $this->html .= ' <a href="'.$this->table->getPageUrl($x).'">'.$x.'</a>'; } ! $this->html .= ' | <a href="'.$this->table->getNextUrl().'">Next»</a>'; $this->html .= ' Current Page: '.$this->table->currentPage; $this->html .= '</div>'; --- 219,227 ---- $pages = ceil($maxRows / $this->table->rowsPerPage); $this->html .= '<div class="datatable_nav" style="padding-top:7px;" align="right">'; ! $this->html .= '<a href="'.$this->table->getPrevUrl($this->table->currentPage).'">«Prev</a> | '; for ($x=1; $x<=$pages; ++$x) { $this->html .= ' <a href="'.$this->table->getPageUrl($x).'">'.$x.'</a>'; } ! $this->html .= ' | <a href="'.$this->table->getNextUrl($this->table->currentPage).'">Next»</a>'; $this->html .= ' Current Page: '.$this->table->currentPage; $this->html .= '</div>'; *************** *** 233,241 **** $pages = ceil($maxRows / $this->table->rowsPerPage); $this->html .= '<div class="datatable_nav" style="padding-bottom:7px;" align="right">'; ! $this->html .= '<a href="'.$this->table->getPrevUrl().'">«Prev</a> | '; for ($x=1; $x<=$pages; ++$x) { $this->html .= ' <a href="'.$this->table->getPageUrl($x).'">'.$x.'</a>'; } ! $this->html .= ' | <a href="'.$this->table->getNextUrl().'">Next»</a>'; $this->html .= ' Current Page: '.$this->table->currentPage; $this->html .= '</div>'; --- 238,246 ---- $pages = ceil($maxRows / $this->table->rowsPerPage); $this->html .= '<div class="datatable_nav" style="padding-bottom:7px;" align="right">'; ! $this->html .= '<a href="'.$this->table->getPrevUrl($this->table->currentPage).'">«Prev</a> | '; for ($x=1; $x<=$pages; ++$x) { $this->html .= ' <a href="'.$this->table->getPageUrl($x).'">'.$x.'</a>'; } ! $this->html .= ' | <a href="'.$this->table->getNextUrl($this->table->currentPage).'">Next»</a>'; $this->html .= ' Current Page: '.$this->table->currentPage; $this->html .= '</div>'; *************** *** 477,479 **** --- 482,505 ---- } } + + class LC_TableStaticRenderer extends LC_TableCellRenderer { + + var $values; + var $returnSpace = true; + + function getRenderedValue() { + if (!isset($this->values[$this->row])) { + if ($this->returnSpace === true) { + return ' '; + } else { + return ''; + } + } + return $this->values[$this->row]; + } + } + + + + ?> |
From: Mark K <har...@us...> - 2007-10-08 18:25:35
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/services/gradebook/templates In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv31357/templates Modified Files: entry_add.html Log Message: Allow for editing the linked LOB for a grade book entry. Index: entry_add.html =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/gradebook/templates/entry_add.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** entry_add.html 8 Oct 2007 17:02:14 -0000 1.2 --- entry_add.html 8 Oct 2007 18:25:32 -0000 1.3 *************** *** 33,41 **** <select name="seqId"> <option value="-1">Free grade book entry</option> ! <option value="6">complete intro: Operating Systems - Test</option> ! <option value="6">complete intro: Operating Systems - Test</option> ! <option value="6">complete intro: Operating Systems - Test</option> ! <option value="6">complete intro: Operating Systems - Test</option> ! <option value="6">complete intro: Operating Systems - Test</option> </select> </p> --- 33,39 ---- <select name="seqId"> <option value="-1">Free grade book entry</option> ! <?php ! echo makeOptions($t['optionList'], $t['selectedSeqId']); ! ?> </select> </p> |
From: Mark K <har...@us...> - 2007-10-08 18:25:35
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/services/gradebook In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv31357 Modified Files: entry.lcp Log Message: Allow for editing the linked LOB for a grade book entry. Index: entry.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/gradebook/entry.lcp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** entry.lcp 8 Oct 2007 18:12:58 -0000 1.13 --- entry.lcp 8 Oct 2007 18:25:32 -0000 1.14 *************** *** 6,12 **** include_once(LIB_PATH.'ClassGradebookCategories.php'); ! include(LIB_PATH.'lc_table.php'); ! include(LIB_PATH.'lc_table_renderer.php'); ! include(LIB_PATH.'lc_lob.php'); --- 6,14 ---- include_once(LIB_PATH.'ClassGradebookCategories.php'); ! include_once(LIB_PATH.'lc_table.php'); ! include_once(LIB_PATH.'lc_table_renderer.php'); ! include_once(LIB_PATH.'lc_lob.php'); ! ! include_once(LIB_PATH.'lc_lesson_sequence.php'); *************** *** 122,127 **** $this->inactivelinks[] = 'Add Entry'; $lc->templateName='entry_add'; ! $this->sectionTitle = 'Add Entry'; ! // Make sure there are categories --- 124,128 ---- $this->inactivelinks[] = 'Add Entry'; $lc->templateName='entry_add'; ! $this->sectionTitle = 'Gradebook Entries >> Add Entry'; // Make sure there are categories *************** *** 155,167 **** */ function editRun(&$db, &$u, &$lc, &$t) { ! $this->sectionTitle = 'Edit Entry'; $lc->templateName='entry_add'; ! $gbEntry = ClassGradebookEntries::load( array( 'id_class_gradebook_entries' => (int)$lc->getvars['id'], 'id_classes' => $u->activeClassTaught->id_classes ) ); - $t['gbeObj'] = $gbEntry; ! if(!$gbEntry->idClassGradebookEntries) { # we didn't get an object back --- 156,167 ---- */ function editRun(&$db, &$u, &$lc, &$t) { ! $this->sectionTitle = 'Gradebook Entries >> Edit Entry'; $lc->templateName='entry_add'; ! $t['gbeObj'] = ClassGradebookEntries::load( array( 'id_class_gradebook_entries' => (int)$lc->getvars['id'], 'id_classes' => $u->activeClassTaught->id_classes ) ); ! if(!$t['gbeObj']->idClassGradebookEntries) { # we didn't get an object back *************** *** 174,177 **** --- 174,196 ---- return; } + + + //load a list of lessons to use their titles as labels + $lessonList = ClassLessonsPeer::doSelect(' id_classes = '.$u->activeClassTaught->id_classes); + $newArray = array(); + foreach ($lessonList as $lesObj) { + $newArray[$lesObj->idClassLessons] = $lesObj->title; + } + $lessonList = $newArray; + + //load a selection of all activities and tests for linking + $sequenceList = ClassLessonSequencePeer::doSelect(' lob_type ="activity" or lob_type = "test"'); + + $t['optionList'] = array(); + foreach ($sequenceList as $seqObj) { + $t['optionList'][$seqObj->classLessonSequenceId] = $lessonList[$seqObj->lessonId] .': ' .$seqObj->lobTitle; + } + + $t['selectedSeqId'] = $t['gbeObj']->classLessonSequenceId; } |
From: Mark K <har...@us...> - 2007-10-08 18:13:02
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/services/gradebook/templates In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv25422/templates Modified Files: entry_error.html Log Message: Update error message display. Index: entry_error.html =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/gradebook/templates/entry_error.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** entry_error.html 21 Nov 2003 23:14:11 -0000 1.1.1.1 --- entry_error.html 8 Oct 2007 18:12:58 -0000 1.2 *************** *** 1 **** ! <?=$t['msg']?> --- 1,3 ---- ! <?php ! echo lcMessageBox($t['error'], 'e', $t['errorTitle']); ! ?> |
From: Mark K <har...@us...> - 2007-10-08 18:13:02
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/services/gradebook In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv25422 Modified Files: entry.lcp Log Message: Update error message display. Index: entry.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/gradebook/entry.lcp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** entry.lcp 8 Oct 2007 17:02:14 -0000 1.12 --- entry.lcp 8 Oct 2007 18:12:58 -0000 1.13 *************** *** 18,22 **** var $presentor='htmlPresentation'; ! var $permissionError = '<h3>Permission Error</h3> Either the entry you were trying to access is not a valid entry or you do not have access to edit that --- 18,23 ---- var $presentor='htmlPresentation'; ! var $permissionErrorTitle = '<h3>Permission Error</h3>'; ! var $permissionError = ' Either the entry you were trying to access is not a valid entry or you do not have access to edit that *************** *** 148,157 **** } ! function editRun(&$db, &$u, &$lc, &$t) ! { ! $this->sectionTitle = 'Edit Entry'; $lc->templateName='entry_add'; - //auto-comment $lc->templateStyle = 'private'; $gbEntry = ClassGradebookEntries::load( array( 'id_class_gradebook_entries' => (int)$lc->getvars['id'], --- 149,160 ---- } ! /** ! * Show a form for editing. ! * ! * Load all activities and tests from the chosen class. ! */ ! function editRun(&$db, &$u, &$lc, &$t) { $this->sectionTitle = 'Edit Entry'; $lc->templateName='entry_add'; $gbEntry = ClassGradebookEntries::load( array( 'id_class_gradebook_entries' => (int)$lc->getvars['id'], *************** *** 167,175 **** # let's load up the error page. $lc->templateName = 'entry_error'; ! $t['msg'] = $this->permissionError; return; } } function updateRun(&$db, &$u, &$lc, &$t) { --- 170,184 ---- # let's load up the error page. $lc->templateName = 'entry_error'; ! $t['error'] = $this->permissionError; ! $t['errorTitle'] = $this->permissionErrorTitle; return; } } + /** + * Save changes to the entry. + * + * Allow for redirects to various other parts of the system. + */ function updateRun(&$db, &$u, &$lc, &$t) { |
From: Mark K <har...@us...> - 2007-10-08 17:17:03
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/lib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv32460/lib Modified Files: ClassGradebook.php Log Message: Some gradebook fixes to use user primary key's instead of usernames everywhere. Index: ClassGradebook.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/ClassGradebook.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ClassGradebook.php 8 Oct 2007 14:35:27 -0000 1.14 --- ClassGradebook.php 8 Oct 2007 17:16:54 -0000 1.15 *************** *** 289,293 **** $db = DB::getHandle(); $db->RESULT_TYPE = MYSQL_ASSOC; ! $sql = 'select p.firstname,p.lastname,p.username,ss.active,ss.withdrew_on FROM class_enrollment as ss left join lcUsers as u on ss.student_id = u.pkey --- 289,293 ---- $db = DB::getHandle(); $db->RESULT_TYPE = MYSQL_ASSOC; ! $sql = 'select p.firstname,p.lastname,p.username,ss.active,ss.withdrew_on, u.pkey FROM class_enrollment as ss left join lcUsers as u on ss.student_id = u.pkey *************** *** 311,315 **** while ($db->nextRecord()) { $db->record['username'] = strtolower($db->record['username']); ! $this->students[$db->record['username']] = ClassGradeBookStudent::load($db->record); } } --- 311,315 ---- while ($db->nextRecord()) { $db->record['username'] = strtolower($db->record['username']); ! $this->students[$db->record['pkey']] = ClassGradebookStudent::load($db->record); } } *************** *** 321,325 **** $db->RESULT_TYPE = MYSQL_ASSOC; ! $sql = 'select p.firstname,p.lastname,p.username,ss.active,ss.withdrew_on FROM class_enrollment as ss left join lcUsers as u on ss.student_id = u.pkey --- 321,325 ---- $db->RESULT_TYPE = MYSQL_ASSOC; ! $sql = 'select p.firstname,p.lastname,p.username,ss.active,ss.withdrew_on, u.pkey FROM class_enrollment as ss left join lcUsers as u on ss.student_id = u.pkey *************** *** 332,336 **** $db->queryOne($sql); if ( $db->record['username'] == '' ) return false; ! $this->students[$db->record['username']] = ClassGradebookStudent::load($db->record); return true; } --- 332,336 ---- $db->queryOne($sql); if ( $db->record['username'] == '' ) return false; ! $this->students[$db->record['pkey']] = ClassGradebookStudent::load($db->record); return true; } *************** *** 509,514 **** $entry = $this->entries[$valObj->idClassGradebookEntries]; ! $j = strtolower($valObj->username); ! # $j = $valObj->username; $student = $this->students[$j]; if ( strtolower(get_class($student)) != 'classgradebookstudent' ){ --- 509,513 ---- $entry = $this->entries[$valObj->idClassGradebookEntries]; ! $j = $valObj->studentId; $student = $this->students[$j]; if ( strtolower(get_class($student)) != 'classgradebookstudent' ){ *************** *** 958,961 **** --- 957,961 ---- $x->username = $array['username']; $x->active = $array['active']; + $x->userId = $array['pkey']; $x->dateWithdrawn = $array['dateWithdrawn']; return $x; |
From: Mark K <har...@us...> - 2007-10-08 17:17:03
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/services/gradebook In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv32460/services/gradebook Modified Files: main.lcp Log Message: Some gradebook fixes to use user primary key's instead of usernames everywhere. Index: main.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/gradebook/main.lcp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** main.lcp 8 Oct 2007 14:28:07 -0000 1.10 --- main.lcp 8 Oct 2007 17:16:54 -0000 1.11 *************** *** 183,187 **** - $gradebook->calculateEntryWeights(); $gradebook->calculateWeightedAverages(); --- 183,186 ---- *************** *** 260,264 **** //use proper decimal places, none for whole integers, one place for fractions if ( isset($stud->vals[$entid]->score) ) { ! if ( intval($stud->vals[$entid]->score) == $stud->vals[$entid]->score ) { $stud->vals[$entid]->score = (int)$stud->vals[$entid]->score; } else { $stud->vals[$entid]->score = sprintf('%.1f',$stud->vals[$entid]->score); --- 259,264 ---- //use proper decimal places, none for whole integers, one place for fractions if ( isset($stud->vals[$entid]->score) ) { ! if ( intval($stud->vals[$entid]->score) == $stud->vals[$entid]->score ) { ! $stud->vals[$entid]->score = (int)$stud->vals[$entid]->score; } else { $stud->vals[$entid]->score = sprintf('%.1f',$stud->vals[$entid]->score); |
From: Mark K <har...@us...> - 2007-10-08 17:02:23
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/services/gradebook/templates In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv25621/services/gradebook/templates Modified Files: entry_add.html Log Message: Rework the gradebook to accept activity grades based on lesson sequence ID Index: entry_add.html =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/gradebook/templates/entry_add.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** entry_add.html 21 Nov 2003 23:14:11 -0000 1.1.1.1 --- entry_add.html 8 Oct 2007 17:02:14 -0000 1.2 *************** *** 16,23 **** } ?> - <p>Enter the data for your entry below. The <i>Gradebook Code</i> is simply the text that will be displayed at the top of the column in your gradebook.</p> <div style="color: maroon;"><?=$t['error'];?></div> - <br> ! <?=$t['form']; --- 16,78 ---- } ?> <div style="color: maroon;"><?=$t['error'];?></div> ! <form action="" method="POST" enctype="application/x-www-form-urlencoded"> ! <p style="margin-bottom:1em;"> ! If you select an activity or a test this entry will be linked to that item. ! </p> ! <ul style="margin-top:0px;"> ! <li> ! A <u>linked</u> entry will synchronize its value to the specific item to which it is linked. ! </li> ! <li> ! A <u>free</u> entry is not linked to any classroom content. You are free to record any type of grade in these entries. ! </li> ! </ul> ! <p> ! <select name="seqId"> ! <option value="-1">Free grade book entry</option> ! <option value="6">complete intro: Operating Systems - Test</option> ! <option value="6">complete intro: Operating Systems - Test</option> ! <option value="6">complete intro: Operating Systems - Test</option> ! <option value="6">complete intro: Operating Systems - Test</option> ! <option value="6">complete intro: Operating Systems - Test</option> ! </select> ! </p> ! ! <p>Enter the data for your entry below. The <i>Gradebook Code</i> is simply the text that will be displayed at the top of the column in your gradebook.</p> + <table width="95%" border="0" cellspacing="0" cellpadding="0"> + <tr> + <td valign="top" class="">*Entry Title</td> + <td valign="top" class=""><input type="text" id="title" name="title" value="<?=$t['gbeObj']->title;?>" size="15" maxlength="25"></td> + </tr> + <tr> + <td valign="top" class="">*Gradebook Code</td> + <td valign="top" class=""><input type="text" id="gradebookCode" name="gradebookCode" value="<?=$t['gbeObj']->gradebookCode;?>" size="10" maxlength="10"></td></tr> + <tr> + <td valign="top" class="">*Total Possible Points</td> + <td valign="top" class=""><input type="text" id="totalPoints" name="totalPoints" value="<?=$t['gbeObj']->totalPoints;?>" size="10" maxlength="10"><div style="font-size=80%;">(numbers only)</div></td></tr> + <tr> + <td valign="top" class="">*Category</td> + <td valign="top" class=""> + <select id="category" name="category" size="1"> + <option value="" >Select Category</option> + <option value="1" SELECTED >sadfsdaf</option> + </select> + </td> + </tr> + <tr> + <td valign="top" class="">Published?</td> + <td valign="top" class=""> + <input type="checkbox" id="publishFlag" name="publishFlag" > + </td> + </tr> + <tr> + <td valign="top" class=""></td> + <td valign="top" class=""><input type="submit" id="submit" name="submit" value="Modify Entry"></td> + </tr> + </table> + <input type="hidden" name="event" value="update"> + </form> + <div style="font-size: 85%">*denotes a required field</div> |
From: Mark K <har...@us...> - 2007-10-08 17:02:19
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/services/classmgr/templates In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv25621/services/classmgr/templates Modified Files: assignmentManage_viewSubmit.html Log Message: Rework the gradebook to accept activity grades based on lesson sequence ID Index: assignmentManage_viewSubmit.html =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/classmgr/templates/assignmentManage_viewSubmit.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** assignmentManage_viewSubmit.html 4 Oct 2007 17:13:29 -0000 1.1 --- assignmentManage_viewSubmit.html 8 Oct 2007 17:02:14 -0000 1.2 *************** *** 122,126 **** <fieldset style="padding: 5px;"> <legend><b>Teacher Grading<b></legend> ! <form method="POST" action="<?=appurl('classmgr/assignmentManage/event=gradeStudent/id_class_assignments='.$t['id_class_assignments'].'/student='.$t['student']);?>"> <p> --- 122,126 ---- <fieldset style="padding: 5px;"> <legend><b>Teacher Grading<b></legend> ! <form method="POST" action="<?=appurl('classmgr/assignmentManage/event=gradeStudent/student='.$t['student']);?>"> <p> *************** *** 138,141 **** --- 138,142 ---- <input type="submit" value="Update" name="submit"> </p> + <input type="hidden" name="seqId" value="<?=$t['sequenceId'];?>"/> </form> </fieldset> |
From: Mark K <har...@us...> - 2007-10-08 17:02:19
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/lib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv25621/lib Modified Files: ClassGradebookVal.php Log Message: Rework the gradebook to accept activity grades based on lesson sequence ID Index: ClassGradebookVal.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/ClassGradebookVal.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ClassGradebookVal.php 8 Oct 2007 14:35:27 -0000 1.6 --- ClassGradebookVal.php 8 Oct 2007 17:02:14 -0000 1.7 *************** *** 10,14 **** var $idClassGradebookEntries; var $idClasses; ! var $username; var $score; var $comments; --- 10,14 ---- var $idClassGradebookEntries; var $idClasses; ! var $studentId; var $score; var $comments; *************** *** 20,24 **** 'idClassGradebookEntries'=>'integer', 'idClasses'=>'integer', ! 'username'=>'varchar', 'score'=>'float', 'comments'=>'longvarchar', --- 20,24 ---- 'idClassGradebookEntries'=>'integer', 'idClasses'=>'integer', ! 'studentId'=>'varchar', 'score'=>'float', 'comments'=>'longvarchar', *************** *** 120,124 **** $st->fields['id_class_gradebook_entries'] = 'id_class_gradebook_entries'; $st->fields['id_classes'] = 'id_classes'; ! $st->fields['username'] = 'username'; $st->fields['score'] = 'score'; $st->fields['comments'] = 'comments'; --- 120,124 ---- $st->fields['id_class_gradebook_entries'] = 'id_class_gradebook_entries'; $st->fields['id_classes'] = 'id_classes'; ! $st->fields['student_id'] = 'student_id'; $st->fields['score'] = 'score'; $st->fields['comments'] = 'comments'; *************** *** 142,146 **** $st->fields['id_class_gradebook_entries'] = $this->idClassGradebookEntries; $st->fields['id_classes'] = $this->idClasses; ! $st->fields['username'] = $this->username; $st->fields['score'] = $this->score; $st->fields['comments'] = $this->comments; --- 142,146 ---- $st->fields['id_class_gradebook_entries'] = $this->idClassGradebookEntries; $st->fields['id_classes'] = $this->idClasses; ! $st->fields['student_id'] = $this->studentId; $st->fields['score'] = $this->score; $st->fields['comments'] = $this->comments; *************** *** 168,172 **** $st->fields['id_class_gradebook_entries'] = $obj->idClassGradebookEntries; $st->fields['id_classes'] = $obj->idClasses; ! $st->fields['username'] = $obj->username; $st->fields['score'] = $obj->score; $st->fields['comments'] = $obj->comments; --- 168,172 ---- $st->fields['id_class_gradebook_entries'] = $obj->idClassGradebookEntries; $st->fields['id_classes'] = $obj->idClasses; ! $st->fields['student_id'] = $obj->studentId; $st->fields['score'] = $obj->score; $st->fields['comments'] = $obj->comments; *************** *** 236,240 **** $x->idClassGradebookEntries = $row['id_class_gradebook_entries']; $x->idClasses = $row['id_classes']; ! $x->username = $row['username']; $x->score = $row['score']; $x->comments = $row['comments']; --- 236,240 ---- $x->idClassGradebookEntries = $row['id_class_gradebook_entries']; $x->idClasses = $row['id_classes']; ! $x->studentId = $row['student_id']; $x->score = $row['score']; $x->comments = $row['comments']; *************** *** 288,293 **** ! // given a student username, I will return an array of ClassGradebookVal objects ! function getValsByStudent($username) { global $lcUser; --- 288,293 ---- ! // given a student primary key, I will return an array of ClassGradebookVal objects ! function getValsByStudentId($userId) { global $lcUser; *************** *** 314,318 **** $db->query('select id_class_gradebook_val,id_class_gradebook_entries from class_gradebook_val where id_classes="'.$lcUser->activeClassTaught->id_classes.'" ! and username="'.$username.'"'); while ( $db->nextRecord() ) $vals[$db->record['id_class_gradebook_entries']] = $db->record['id_class_gradebook_val']; --- 314,318 ---- $db->query('select id_class_gradebook_val,id_class_gradebook_entries from class_gradebook_val where id_classes="'.$lcUser->activeClassTaught->id_classes.'" ! and student_id="'.$userId.'"'); while ( $db->nextRecord() ) $vals[$db->record['id_class_gradebook_entries']] = $db->record['id_class_gradebook_val']; *************** *** 336,340 **** } ! // given a student username, I will return an array of ClassGradebookVal objects function getValsByEntry($entryid) { global $lcUser; --- 336,340 ---- } ! // given a grade book entry ID, I will return an array of ClassGradebookVal objects function getValsByEntry($entryid) { global $lcUser; *************** *** 360,364 **** // Get all the students in the class ! $sql = 'SELECT p.firstname,p.lastname,p.username FROM class_enrollment AS ss left join lcUsers as U on ss.student_id=U.pkey --- 360,364 ---- // Get all the students in the class ! $sql = 'SELECT p.firstname,p.lastname,p.username, U.pkey as userId FROM class_enrollment AS ss left join lcUsers as U on ss.student_id=U.pkey *************** *** 369,373 **** $db->query($sql); while ($db->nextRecord()) { ! $students[$db->record['username']] = array( 'firstname' => $db->record['firstname'], 'lastname' => $db->record['lastname'], --- 369,373 ---- $db->query($sql); while ($db->nextRecord()) { ! $students[$db->record['userId']] = array( 'firstname' => $db->record['firstname'], 'lastname' => $db->record['lastname'], *************** *** 384,391 **** // build the array of objects to return. create new val objects if they're missing ! while ( list($user,$namearr) = @each($students) ) { $val = ClassGradebookVal::load( array( 'id_classes' => $lcUser->activeClassTaught->id_classes, ! 'username' => $user, 'id_class_gradebook_entries' => $entryid ) ); --- 384,391 ---- // build the array of objects to return. create new val objects if they're missing ! while ( list($userId,$namearr) = @each($students) ) { $val = ClassGradebookVal::load( array( 'id_classes' => $lcUser->activeClassTaught->id_classes, ! 'student_id' => $userId, 'id_class_gradebook_entries' => $entryid ) ); *************** *** 394,398 **** $val->title = $etitle; $val->set( 'idClassGradebookEntries', $entryid ); ! $val->set( 'username', $user ); } $val->title = $title; --- 394,398 ---- $val->title = $etitle; $val->set( 'idClassGradebookEntries', $entryid ); ! $val->set( 'studentId', $userId ); } $val->title = $title; |
From: Mark K <har...@us...> - 2007-10-08 17:02:19
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/services/classmgr In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv25621/services/classmgr Modified Files: assignmentManage.lcp lessonManager.lcp Log Message: Rework the gradebook to accept activity grades based on lesson sequence ID Index: assignmentManage.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/classmgr/assignmentManage.lcp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** assignmentManage.lcp 8 Oct 2007 14:21:07 -0000 1.25 --- assignmentManage.lcp 8 Oct 2007 17:02:14 -0000 1.26 *************** *** 511,524 **** $lc->getvars['student'] = trim($lc->getvars['student']); $lc->getvars['student'] = addslashes(stripslashes( $lc->getvars['student'])); ! $db->query('SELECT A.id_class_assignments ! FROM class_assignments A ! WHERE id_class_assignments = '.$lc->getvars['id_class_assignments'].' ! AND id_classes = '.$u->activeClassTaught->id_classes); if (! $db->nextRecord() ) { $this->presentor = 'errorMessage'; $t['message'] = "You don't have permission to alter grades for this assignment"; ! $t['details'] = $lc->getvars['id_class_assignments'] . " is not an assignment ID that is owned by you or your current class."; return; } --- 511,531 ---- $lc->getvars['student'] = trim($lc->getvars['student']); $lc->getvars['student'] = addslashes(stripslashes( $lc->getvars['student'])); + $username = addslashes(stripslashes( $lc->getvars['student'])); + $db->query('SELECT pkey from lcUsers where username="'.$lc->getvars['student'].'"'); + $db->nextRecord(); + $db->freeResult(); + $studentId = $db->record['pkey']; ! $activityId = intval($lc->postvars['seqId']); ! ! $db->query('SELECT A.class_lesson_sequence_id ! FROM class_lesson_sequence A ! WHERE A.class_lesson_sequence_id = '.$activityId.' ! AND A.class_id = '.$u->activeClassTaught->id_classes); if (! $db->nextRecord() ) { $this->presentor = 'errorMessage'; $t['message'] = "You don't have permission to alter grades for this assignment"; ! $t['details'] = $lc->getvars['seqId'] . " is not an assignment ID that is owned by you or your current class."; return; } *************** *** 534,539 **** SELECT id_class_assignments_grades, grade, comments FROM class_assignments_grades ! WHERE (id_class_assignments='.$lc->getvars['id_class_assignments'].' ! AND id_student=\''.$lc->getvars['student'].'\') '; --- 541,546 ---- SELECT id_class_assignments_grades, grade, comments FROM class_assignments_grades ! WHERE (id_class_assignments='.$activityId.' ! AND id_student=\''.$username.'\') '; *************** *** 547,552 **** if ( $db->getNumRows() > 1 ) { $db->query('DELETE FROM class_assignments_grades ! WHERE (id_class_assignments='.$lc->getvars['id_class_assignments'].' ! AND id_student=\''.$lc->getvars['student'].'\')'); $db->record['id_class_assignments_grades'] = 0; --- 554,559 ---- if ( $db->getNumRows() > 1 ) { $db->query('DELETE FROM class_assignments_grades ! WHERE (id_class_assignments='.$activityId.' ! AND id_student=\''.$username.'\')'); $db->record['id_class_assignments_grades'] = 0; *************** *** 569,573 **** comments=\''. str_replace("'", '\'\'', stripslashes($lc->postvars['teachercomments'])). '\', grade='. number_format($lc->postvars['grade'], 2). ', ! id_student=\''.$lc->getvars['student'].'\' '; $db->query($sql); --- 576,580 ---- comments=\''. str_replace("'", '\'\'', stripslashes($lc->postvars['teachercomments'])). '\', grade='. number_format($lc->postvars['grade'], 2). ', ! id_student=\''.$username.'\' '; $db->query($sql); *************** *** 577,591 **** //assignment_grades has been updated, let's find an associated GBE, if there is one we will push a new GBV $entryObj = ClassGradebookEntries::load( ! array('assignment_id'=>$lc->getvars['id_class_assignments'], 'id_classes'=>$u->activeClassTaught->id_classes) ); if ( is_object($entryObj) ) { $gbvObj = ClassGradebookVal::load( array('id_class_gradebook_entries'=>$entryObj->idClassGradebookEntries, ! 'username'=>$lc->getvars['student']) ); if (!is_object($gbvObj) ) { $gbvObj = new ClassGradebookVal(); $gbvObj->set('idClassGradebookEntries',$entryObj->idClassGradebookEntries); $gbvObj->set('idClasses',$u->activeClassTaught->id_classes); ! $gbvObj->set('username',$lc->getvars['student']); } $gbvObj->set('comments',$lc->postvars['teachercomments']); --- 584,598 ---- //assignment_grades has been updated, let's find an associated GBE, if there is one we will push a new GBV $entryObj = ClassGradebookEntries::load( ! array('class_lesson_sequence_id'=>$activityId, 'id_classes'=>$u->activeClassTaught->id_classes) ); if ( is_object($entryObj) ) { $gbvObj = ClassGradebookVal::load( array('id_class_gradebook_entries'=>$entryObj->idClassGradebookEntries, ! 'student_id'=>$studentId) ); if (!is_object($gbvObj) ) { $gbvObj = new ClassGradebookVal(); $gbvObj->set('idClassGradebookEntries',$entryObj->idClassGradebookEntries); $gbvObj->set('idClasses',$u->activeClassTaught->id_classes); ! $gbvObj->set('studentId',$studentId); } $gbvObj->set('comments',$lc->postvars['teachercomments']); *************** *** 596,600 **** $this->presentor = 'redirectPresentation'; ! $t['url'] = appurl('classmgr/assignmentManage/event=viewAssignment/id_class_assignments='.$lc->getvars['id_class_assignments']); return; } --- 603,607 ---- $this->presentor = 'redirectPresentation'; ! $t['url'] = appurl('classmgr/assignmentManage/event=viewAssignment/id='.$activityId); return; } Index: lessonManager.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/classmgr/lessonManager.lcp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** lessonManager.lcp 8 Oct 2007 14:21:07 -0000 1.41 --- lessonManager.lcp 8 Oct 2007 17:02:14 -0000 1.42 *************** *** 115,119 **** $colD->justify='left'; - $colB = &$columnModel->getColumnAt(2); $colB->maxWidth=64; --- 115,118 ---- *************** *** 879,883 **** $t['seqItems'][$objIdx]->startOffset = ($obj->startOffset / 60/60/24); $t['seqItems'][$objIdx]->dueOffset = ($obj->dueOffset / 60/60/24); - } --- 878,881 ---- *************** *** 916,927 **** $colD->justify='left'; ! $col = &$columnModel->getColumnAt(4); ! $col->maxWidth=64; ! $col->name = 'Rank'; ! $col->cellRenderer = new LC_Table_SequenceRenderer(); ! $col->cellRenderer->id = $lessonId; ! ! $colB = &$columnModel->getColumnAt(2); $colB->maxWidth=64; $colB->name = 'Start'; --- 914,926 ---- $colD->justify='left'; ! //create a gradebook entry column ! $column = new LC_TableColumn(); ! $column->setName( "Gradebook" ); ! $column->cellRenderer = new LC_TableStaticRenderer(); ! $column->cellRenderer->values = array(2=>'no entry'); ! $column->maxWidth=128; ! $table->addColumnAt(2,$column); ! $colB = &$columnModel->getColumnAt(3); $colB->maxWidth=64; $colB->name = 'Start'; *************** *** 934,938 **** } ! $colC = &$columnModel->getColumnAt(3); $colC->maxWidth=64; $colC->name = 'Due'; --- 933,937 ---- } ! $colC = &$columnModel->getColumnAt(4); $colC->maxWidth=64; $colC->name = 'Due'; *************** *** 945,948 **** --- 944,952 ---- } + $col = &$columnModel->getColumnAt(5); + $col->maxWidth=64; + $col->name = 'Rank'; + $col->cellRenderer = new LC_Table_SequenceRenderer(); + $col->cellRenderer->id = $lessonId; *************** *** 950,956 **** $t['id'] = $lesson_id; - - - } --- 954,957 ---- *************** *** 1204,1208 **** } - - ?> --- 1205,1207 ---- |
From: Mark K <har...@us...> - 2007-10-08 17:02:19
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/services/gradebook In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv25621/services/gradebook Modified Files: entry.lcp Log Message: Rework the gradebook to accept activity grades based on lesson sequence ID Index: entry.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/gradebook/entry.lcp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** entry.lcp 8 Oct 2007 14:28:07 -0000 1.11 --- entry.lcp 8 Oct 2007 17:02:14 -0000 1.12 *************** *** 52,55 **** --- 52,60 ---- $t['gbe'] = ClassGradebookEntriesPeer::doSelect('id_classes="'.$u->activeClassTaught->id_classes.'" order by id_class_gradebook_categories, title'); + //customize data for the table + foreach ($t['gbe'] as $idx => $gbe) { + $gbe->title = + '<a href="'.modurl('entry').'/event=edit/id='.$gbe->idClassGradebookEntries.'">'.$gbe->title.'</a>'; + } $dm = new LC_Table_ObjectModel($t['gbe']); *************** *** 96,104 **** $colE = &$columnModel->getColumnAt(4); $colE->justify='left'; ! $t['datagrid'] = new LC_TableRenderer($table); - // Get the categories $db->query("SELECT --- 101,108 ---- $colE = &$columnModel->getColumnAt(4); $colE->justify='left'; ! $colE->maxWidth='256'; $t['datagrid'] = new LC_TableRenderer($table); // Get the categories $db->query("SELECT *************** *** 154,157 **** --- 158,163 ---- 'id_classes' => $u->activeClassTaught->id_classes ) ); + $t['gbeObj'] = $gbEntry; + if(!$gbEntry->idClassGradebookEntries) { *************** *** 164,183 **** return; } - $f = new SiteForm(); - $gbEntry->set( 'category', $gbEntry->idClassGradebookCategories ); - if ( !$gbEntry->publishFlag ) unset($gbEntry->publishFlag); - $f->getForm('gbaddentry', $gbEntry); - if ($lc->getvars['id']) $f->modFormValue('submit', 'Modify Entry'); - - # handle assessments a little differently - if ($gbEntry->assessmentId) - { - $f->removeFormField('totalPoints'); - $f->addHidden('totalPoints', $gbEntry->totalPoints); - $t['assessment'] = TRUE; - $t['assessmentId'] = $gbEntry->assessmentId; - } - $t['form'] = $f->ToHTML(); - } --- 170,173 ---- *************** *** 188,196 **** # to the server has access to update this pkey # information to the server ! if ($lc->getvars['id']) { // it's an edit $gbEntry = ClassGradebookEntries::load( array( ! 'id_class_gradebook_entries' => (int)$lc->getvars['id'], 'id_classes' => $u->activeClassTaught->id_classes ) ); --- 178,187 ---- # to the server has access to update this pkey # information to the server ! if (isset($lc->getvars['id'])) { + $gbeId = intval($lc->getvars['id']); // it's an edit $gbEntry = ClassGradebookEntries::load( array( ! 'id_class_gradebook_entries' => $gbeId, 'id_classes' => $u->activeClassTaught->id_classes ) ); *************** *** 209,213 **** // it's an add $gbEntry = new ClassGradebookEntries(); ! $gbEntry->idClassGradebookCategories = $lc->postvars['category']; $gbEntry->idClasses = $u->activeClassTaught->id_classes; --- 200,204 ---- // it's an add $gbEntry = new ClassGradebookEntries(); ! $gbEntry->idClassGradebookCategories = intval($lc->postvars['category']); $gbEntry->idClasses = $u->activeClassTaught->id_classes; *************** *** 215,232 **** } - $f = new SiteForm(); - $t['error'] = $f->validateForm('gbaddentry', $lc->postvars); - if ($t['error']) - { - $this->data = $f->cleanedArray; - if ($lc->getvars['id']) { - $this->editRun($db, $u, $lc, $t); - return; - } else { - $this->addRun($db, $u, $lc, $t); - return; - } - } $gbEntry->set('title', inputCleanString($lc->postvars['title'])); $gbEntry->set('gradebookCode',inputCleanString($lc->postvars['gradebookCode'])); --- 206,211 ---- } + $gbEntry->set('classLessonSequenceId', intval($lc->postvars['seqId'])); $gbEntry->set('title', inputCleanString($lc->postvars['title'])); $gbEntry->set('gradebookCode',inputCleanString($lc->postvars['gradebookCode'])); *************** *** 241,245 **** $u->sessionvars['message'] = $t['message']; $this->presentor = 'redirectPresentation'; ! $t['url'] = MOD_URL; } else { $lc->templateName = 'entry_error'; --- 220,224 ---- $u->sessionvars['message'] = $t['message']; $this->presentor = 'redirectPresentation'; ! $t['url'] = appurl('gradebook').'/entry'; } else { $lc->templateName = 'entry_error'; *************** *** 258,262 **** .$t['user']->profile->values['lastname'].', '.$t['user']->profile->values['firstname']; ! $t['vals'] = ClassGradebookVal::getValsByStudent($lc->getvars['user']); $count = count($t['vals']); for($i=0; $i<$count; $i++) --- 237,241 ---- .$t['user']->profile->values['lastname'].', '.$t['user']->profile->values['firstname']; ! $t['vals'] = ClassGradebookVal::getValsByStudentId($t['user']->userId); $count = count($t['vals']); for($i=0; $i<$count; $i++) |
From: Mark K <har...@us...> - 2007-10-08 16:14:58
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/lib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv4932 Modified Files: LC_form.php Log Message: Move the hidden fields so they don't break the table HTML. Index: LC_form.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/LC_form.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** LC_form.php 8 Oct 2007 14:35:28 -0000 1.16 --- LC_form.php 8 Oct 2007 16:14:55 -0000 1.17 *************** *** 892,895 **** --- 892,896 ---- # not sure the best way to handle it + $hiddenFieldsHtml = ''; $HTML = '<form action="'.$this->action.'" method="'.$this->method.'" enctype="'.$this->enctype.'">'; $HTML .= "\n"; *************** *** 966,970 **** #} ! $HTML .= '<tr><td valign="'.$this->lvalign.'" class="'.$this->cssLeft.'">'.$title.'</td><td valign="'.$this->rvalign.'" class="'.$this->cssRight.'">'.$tmpForm.' '.$msg.'</td></tr>'; $HTML .= "\n"; unset($tmpForm); --- 967,971 ---- #} ! $HTML .= '<tr>'."\n\t\t".'<td valign="'.$this->lvalign.'" class="'.$this->cssLeft.'">'.$title.'</td><td valign="'.$this->rvalign.'" class="'.$this->cssRight.'">'.$tmpForm.' '.$msg.'</td>'."\n".'</tr>'."\n\t"; $HTML .= "\n"; unset($tmpForm); *************** *** 987,995 **** #echo $func; $func = $tmp.'ToHTML'; ! ! $HTML .= $this->$func($v); } ! $HTML .= '</table></form>'; if ($this->showRequiredMessage) --- 988,999 ---- #echo $func; $func = $tmp.'ToHTML'; ! if ($v['type'] == 'hidden') { ! $hiddenFieldsHtml .= $this->$func($v); ! } else { ! $HTML .= $this->$func($v)."\n\t"; ! } } ! $HTML .= '</table>'.$hiddenFieldsHtml.'</form>'; if ($this->showRequiredMessage) |
From: Mark K <har...@us...> - 2007-10-08 14:49:30
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/lib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv32089 Modified Files: LC_mysql.php Log Message: Fix for automatic function name changes. This file needs one function named the old way to support BC. Index: LC_mysql.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/LC_mysql.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** LC_mysql.php 8 Oct 2007 14:35:28 -0000 1.20 --- LC_mysql.php 8 Oct 2007 14:49:08 -0000 1.21 *************** *** 150,156 **** ! function nextRecord($resID=false) { $ret = $this->nextRecord($resID); ! $this->record =& $this->record; return $ret; } --- 150,156 ---- ! function next_record($resID=false) { $ret = $this->nextRecord($resID); ! $this->Record =& $this->record; return $ret; } |
Update of /cvsroot/logicampus/logicampus/src/logicreate/lib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv26290 Modified Files: Assessment.php AssessmentLog.php AssessmentQuestion.php ClassGradebook.php ClassGradebookVal.php ClassUtility.php ExamScheduleDates.php LC_CM.php LC_db.php LC_form.php LC_include.php LC_mysql.php LC_package.php LC_registry.php LC_sqlite.php LC_user.php SeminarClassesDates.php SiteForms.php TextbookClasses.php User.php _classAssignmentObj.php classAnnouncements.php classFaqs.php classLessonObj.php classLessonObjectiveObj.php classLinks.php classLinksCategories.php classObj.php courseObj.php datagrid.php doclibLibrary.php documentLibraryLib.php eventsObj.php gradeBookObj.php lc_categories.php presentationObj.php profileFacultyObj.php semesterObj.php Log Message: Change function "next_record" to "nextRecord". Index: documentLibraryLib.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/documentLibraryLib.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** documentLibraryLib.php 21 Apr 2007 21:02:29 -0000 1.9 --- documentLibraryLib.php 8 Oct 2007 14:35:30 -0000 1.10 *************** *** 52,57 **** $db->query('select count(class_id) from classdoclib_Trash where owner = \''.$obj->user->username.'\' and class_id = '.$obj->user->activeClassTaught->id_classes); ! $db->next_record(); ! $t['trashcount'] = sprintf('%d',$db->Record[0]); if ( in_array('manager',$obj->user->perms) ) { --- 52,57 ---- $db->query('select count(class_id) from classdoclib_Trash where owner = \''.$obj->user->username.'\' and class_id = '.$obj->user->activeClassTaught->id_classes); ! $db->nextRecord(); ! $t['trashcount'] = sprintf('%d',$db->record[0]); if ( in_array('manager',$obj->user->perms) ) { *************** *** 104,109 **** $db->RESULT_TYPE = MYSQL_ASSOC; $db->query($sql); ! while($db->next_record()) { ! $x = PersistantObject::createFromArray('LC_file',$db->Record); $ret[$x->pkey] = $x; } --- 104,109 ---- $db->RESULT_TYPE = MYSQL_ASSOC; $db->query($sql); ! while($db->nextRecord()) { ! $x = PersistantObject::createFromArray('LC_file',$db->record); $ret[$x->pkey] = $x; } *************** *** 121,126 **** $db->RESULT_TYPE = MYSQL_ASSOC; $db->query($sql); ! while($db->next_record()) { ! $x = PersistantObject::createFromArray('LC_file',$db->Record); $ret[$x->pkey] = $x; } --- 121,126 ---- $db->RESULT_TYPE = MYSQL_ASSOC; $db->query($sql); ! while($db->nextRecord()) { ! $x = PersistantObject::createFromArray('LC_file',$db->record); $ret[$x->pkey] = $x; } *************** *** 150,156 **** $db->RESULT_TYPE = MYSQL_ASSOC; $db->queryOne($sql); ! if (is_array($db->Record)) { ! unset($db->Record['total']); ! $x = PersistantObject::createFromArray('LC_file',$db->Record); return $x; } else { --- 150,156 ---- $db->RESULT_TYPE = MYSQL_ASSOC; $db->queryOne($sql); ! if (is_array($db->record)) { ! unset($db->record['total']); ! $x = PersistantObject::createFromArray('LC_file',$db->record); return $x; } else { *************** *** 196,200 **** $sql .= " and pkey=".$this->pkey; $db->queryOne($sql); ! $filename = $db->Record["filename"]; @unlink(FILES_PATH.$filename); $db->query("delete from classdoclib_Files where owner='".$this->owner."' and pkey=".$this->pkey); --- 196,200 ---- $sql .= " and pkey=".$this->pkey; $db->queryOne($sql); ! $filename = $db->record["filename"]; @unlink(FILES_PATH.$filename); $db->query("delete from classdoclib_Files where owner='".$this->owner."' and pkey=".$this->pkey); *************** *** 280,287 **** $db->query($sql); $db->RESULT_TYPE=MYSQL_ASSOC; ! if (!$db->next_record()) return null; ! $x = PersistantObject::createFromArray('LC_folder',$db->Record); unset($x->total); return $x; --- 280,287 ---- $db->query($sql); $db->RESULT_TYPE=MYSQL_ASSOC; ! if (!$db->nextRecord()) return null; ! $x = PersistantObject::createFromArray('LC_folder',$db->record); unset($x->total); return $x; *************** *** 312,319 **** $db->RESULT_TYPE=MYSQL_ASSOC; ! while($db->next_record()) { ! $temp = $db->Record['folderType']; if ($temp==0) { $temp=99; } ! $x[$temp][] = $db->Record; } ksort($x); --- 312,319 ---- $db->RESULT_TYPE=MYSQL_ASSOC; ! while($db->nextRecord()) { ! $temp = $db->record['folderType']; if ($temp==0) { $temp=99; } ! $x[$temp][] = $db->record; } ksort($x); *************** *** 387,392 **** $db->query("select * from classdoclib_Sharing where folderKey = ".$this->pkey); $sql = 'insert into classdoclib_Sharing (folderKey,action,exclude,gid) VALUES ('.$newFolderID.',%d,%d,\'%s\')'; ! while ( $db->next_record() ) { ! $db->query(sprintf($sql,$db->Record['action'],$db->Record['exclude'],$db->Record['gid']) ); } --- 387,392 ---- $db->query("select * from classdoclib_Sharing where folderKey = ".$this->pkey); $sql = 'insert into classdoclib_Sharing (folderKey,action,exclude,gid) VALUES ('.$newFolderID.',%d,%d,\'%s\')'; ! while ( $db->nextRecord() ) { ! $db->query(sprintf($sql,$db->record['action'],$db->record['exclude'],$db->record['gid']) ); } *************** *** 418,423 **** and action = 1'); ! while ($db->next_record() ){ ! $this->sharedGroups[$db->Record[1]] = $db->Record[0]; } --- 418,423 ---- and action = 1'); ! while ($db->nextRecord() ){ ! $this->sharedGroups[$db->record[1]] = $db->record[0]; } *************** *** 430,435 **** and action = 2'); ! while ($db->next_record() ){ ! $this->managerGroups[$db->Record[1]] = $db->Record[0]; } } --- 430,435 ---- and action = 2'); ! while ($db->nextRecord() ){ ! $this->managerGroups[$db->record[1]] = $db->record[0]; } } *************** *** 715,719 **** $db = db::getHandle(); $db->queryOne("select count(pkey) as filecount from classdoclib_Files where folder=".$this->tree->p_CurrentNode->contents['pkey']); ! $ret .= "<td>".$db->Record['filecount']."</td>"; --- 715,719 ---- $db = db::getHandle(); $db->queryOne("select count(pkey) as filecount from classdoclib_Files where folder=".$this->tree->p_CurrentNode->contents['pkey']); ! $ret .= "<td>".$db->record['filecount']."</td>"; Index: gradeBookObj.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/gradeBookObj.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gradeBookObj.php 21 Nov 2003 23:14:01 -0000 1.1.1.1 --- gradeBookObj.php 8 Oct 2007 14:35:30 -0000 1.2 *************** *** 37,41 **** $db->RESULT_TYPE = MYSQL_ASSOC; $db->queryOne($sql); ! while(list ($k, $v) = @each($db->Record)) { $this->$k = $v; --- 37,41 ---- $db->RESULT_TYPE = MYSQL_ASSOC; $db->queryOne($sql); ! while(list ($k, $v) = @each($db->record)) { $this->$k = $v; *************** *** 53,59 **** $db->RESULT_TYPE = MYSQL_ASSOC; $db->query($sql); ! while($db->next_record() ) { ! $cats[$db->Record['id']] = GBCategory::loadFromArray($db->Record); } return $cats; --- 53,59 ---- $db->RESULT_TYPE = MYSQL_ASSOC; $db->query($sql); ! while($db->nextRecord() ) { ! $cats[$db->record['id']] = GBCategory::loadFromArray($db->record); } return $cats; *************** *** 137,141 **** $db->queryOne($sql); ! $x = GBCategory::loadFromArray($db->Record); if ($x->id_classes == $id_classes) { --- 137,141 ---- $db->queryOne($sql); ! $x = GBCategory::loadFromArray($db->record); if ($x->id_classes == $id_classes) { *************** *** 188,192 **** id_class_gradebook_categories !='".$this->id."'"; $db->queryOne($sql); ! $sum = $db->Record[0]; if ( ($sum + $this->weight) > 100) { --- 188,192 ---- id_class_gradebook_categories !='".$this->id."'"; $db->queryOne($sql); ! $sum = $db->record[0]; if ( ($sum + $this->weight) > 100) { *************** *** 222,226 **** $db->queryOne($sql); $this->calculation_type = ! $db->Record['calculation_type']; } --- 222,226 ---- $db->queryOne($sql); $this->calculation_type = ! $db->record['calculation_type']; } *************** *** 237,244 **** $db = DB::getHandle(); $db->query($sql); ! while ($db->next_record() ) { ! $tmp[$db->Record['id_class_gradebook_categories']] = ! $db->Record['label']; } return $tmp; --- 237,244 ---- $db = DB::getHandle(); $db->query($sql); ! while ($db->nextRecord() ) { ! $tmp[$db->record['id_class_gradebook_categories']] = ! $db->record['label']; } return $tmp; *************** *** 272,284 **** $db->query($sql); ! while($db->next_record() ) { $x = new GBEntry(); ! $x->id = $db->Record['id_class_gradebook_entries']; ! $x->title = $db->Record['title']; ! $x->gradebook_code = $db->Record['gradebook_code']; ! $x->total_points = $db->Record['total_points']; ! $x->id_classes = $db->Record['id_classes']; ! $temp[$db->Record['id_class_gradebook_entries']] = $x; } --- 272,284 ---- $db->query($sql); ! while($db->nextRecord() ) { $x = new GBEntry(); ! $x->id = $db->record['id_class_gradebook_entries']; ! $x->title = $db->record['title']; ! $x->gradebook_code = $db->record['gradebook_code']; ! $x->total_points = $db->record['total_points']; ! $x->id_classes = $db->record['id_classes']; ! $temp[$db->record['id_class_gradebook_entries']] = $x; } *************** *** 353,357 **** $sql = "SELECT * FROM class_gradebook_entries where id_class_gradebook_entries='$id' AND id_classes='$id_classes'"; $db->queryOne($sql); ! $x = GBEntry::loadFromArray($db->Record); if ($x->id_classes == $id_classes) { --- 353,357 ---- $sql = "SELECT * FROM class_gradebook_entries where id_class_gradebook_entries='$id' AND id_classes='$id_classes'"; $db->queryOne($sql); ! $x = GBEntry::loadFromArray($db->record); if ($x->id_classes == $id_classes) { *************** *** 373,377 **** $db->queryOne($sql); ! if ($db->Record['count'] == 1) { return true; --- 373,377 ---- $db->queryOne($sql); ! if ($db->record['count'] == 1) { return true; *************** *** 429,438 **** echo $sql; $db->query($sql); ! while($db->next_record() ) { ! $gbVal[$db->Record['id_class_gradebook_val']] = GBVal::loadFromArray($db->Record); ! $gbVal[$db->Record['id_class_gradebook_val']]->entry = GBEntry::loadFromArray($db->Record); ! $gbVal[$db->Record['id_class_gradebook_val']]->category ! = GBCategory::loadFromArray($db->Record); } return $gbVal; --- 429,438 ---- echo $sql; $db->query($sql); ! while($db->nextRecord() ) { ! $gbVal[$db->record['id_class_gradebook_val']] = GBVal::loadFromArray($db->record); ! $gbVal[$db->record['id_class_gradebook_val']]->entry = GBEntry::loadFromArray($db->record); ! $gbVal[$db->record['id_class_gradebook_val']]->category ! = GBCategory::loadFromArray($db->record); } return $gbVal; Index: LC_user.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/LC_user.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** LC_user.php 5 Oct 2007 19:25:40 -0000 1.32 --- LC_user.php 8 Oct 2007 14:35:28 -0000 1.33 *************** *** 198,209 **** $or = join(" or pkey = ", $keys); $db->query("select * from lcUsers where pkey = $or",false); ! while ( $db->next_record() ) { unset($temp); $temp = new lcUser(); ! $temp->username = $db->Record[username]; ! $temp->password = $db->Record[password]; ! $temp->email = $db->Record[email]; ! $temp->groups = explode('|',substr($db->Record[groups],1,-1)); ! $temp->userId = $db->Record['pkey']; if (! in_array('public',$temp->groups) ) --- 198,209 ---- $or = join(" or pkey = ", $keys); $db->query("select * from lcUsers where pkey = $or",false); ! while ( $db->nextRecord() ) { unset($temp); $temp = new lcUser(); ! $temp->username = $db->record[username]; ! $temp->password = $db->record[password]; ! $temp->email = $db->record[email]; ! $temp->groups = explode('|',substr($db->record[groups],1,-1)); ! $temp->userId = $db->record['pkey']; if (! in_array('public',$temp->groups) ) *************** *** 332,336 **** $db->queryOne($sql,false); ! if ($db->Record['user_exists']) { return -1; } --- 332,336 ---- $db->queryOne($sql,false); ! if ($db->record['user_exists']) { return -1; } *************** *** 358,363 **** $sql = "select count(username) as username, count(email) as email from lcUsers where username = '".$this->username."' or email='".$this->email."'"; $db->queryOne($sql); ! $ucount = $db->Record['username']; ! $ecount = $db->Record['email']; if ( ($ucount != 0) and ($ecount != 0) ) { return false; --- 358,363 ---- $sql = "select count(username) as username, count(email) as email from lcUsers where username = '".$this->username."' or email='".$this->email."'"; $db->queryOne($sql); ! $ucount = $db->record['username']; ! $ecount = $db->record['email']; if ( ($ucount != 0) and ($ecount != 0) ) { return false; *************** *** 804,808 **** $db->queryOne("select * from profile where username='".$prof->username."'",false); ! while ( list($k,$v) = @each($db->Record) ) { $prof->values[$k] = $v; $prof->keys[] = $k; --- 804,808 ---- $db->queryOne("select * from profile where username='".$prof->username."'",false); ! while ( list($k,$v) = @each($db->record) ) { $prof->values[$k] = $v; $prof->keys[] = $k; *************** *** 811,815 **** if ($type > 1 && strlen($prof->tableName) > 1) { $db->queryOne("select * from ".$prof->tableName." where username='".$prof->username."'",false); ! while ( list($k,$v) = @each($db->Record) ) { $prof->values[$k] = $v; $prof->keys[] = $k; --- 811,815 ---- if ($type > 1 && strlen($prof->tableName) > 1) { $db->queryOne("select * from ".$prof->tableName." where username='".$prof->username."'",false); ! while ( list($k,$v) = @each($db->record) ) { $prof->values[$k] = $v; $prof->keys[] = $k; Index: classFaqs.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/classFaqs.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** classFaqs.php 13 Aug 2005 20:41:05 -0000 1.2 --- classFaqs.php 8 Oct 2007 14:35:29 -0000 1.3 *************** *** 19,33 **** if ($prop=='') { $prop=$this->_pkey; } $db->query("select id_class_faqs,id_classes,category,question,answer,clicks,groups from class_faqs where $prop='$pkey' $where $orderBy"); ! if($db->next_record()) { $temp = new classFaqs(); $temp->_dsn = $dsn; $temp->__loaded = true; ! $temp->id_class_faqs = $db->Record['id_class_faqs']; ! $temp->id_classes = $db->Record['id_classes']; ! $temp->category = $db->Record['category']; ! $temp->question = $db->Record['question']; ! $temp->answer = $db->Record['answer']; ! $temp->clicks = $db->Record['clicks']; ! $temp->groups = $db->Record['groups']; } --- 19,33 ---- if ($prop=='') { $prop=$this->_pkey; } $db->query("select id_class_faqs,id_classes,category,question,answer,clicks,groups from class_faqs where $prop='$pkey' $where $orderBy"); ! if($db->nextRecord()) { $temp = new classFaqs(); $temp->_dsn = $dsn; $temp->__loaded = true; ! $temp->id_class_faqs = $db->record['id_class_faqs']; ! $temp->id_classes = $db->record['id_classes']; ! $temp->category = $db->record['category']; ! $temp->question = $db->record['question']; ! $temp->answer = $db->record['answer']; ! $temp->clicks = $db->record['clicks']; ! $temp->groups = $db->record['groups']; } *************** *** 43,57 **** if ($where) { $where = " and $where"; } $db->query("select id_class_faqs,id_classes,category,question,answer,clicks,groups from class_faqs where $prop='$key' $where $orderBy"); ! while ($db->next_record()) { $temp = new classFaqs(); $temp->_dsn = $dsn; $temp->__loaded = true; ! $temp->id_class_faqs = $db->Record['id_class_faqs']; ! $temp->id_classes = $db->Record['id_classes']; ! $temp->category = $db->Record['category']; ! $temp->question = $db->Record['question']; ! $temp->answer = $db->Record['answer']; ! $temp->clicks = $db->Record['clicks']; ! $temp->groups = $db->Record['groups']; $objects[] = $temp; } --- 43,57 ---- if ($where) { $where = " and $where"; } $db->query("select id_class_faqs,id_classes,category,question,answer,clicks,groups from class_faqs where $prop='$key' $where $orderBy"); ! while ($db->nextRecord()) { $temp = new classFaqs(); $temp->_dsn = $dsn; $temp->__loaded = true; ! $temp->id_class_faqs = $db->record['id_class_faqs']; ! $temp->id_classes = $db->record['id_classes']; ! $temp->category = $db->record['category']; ! $temp->question = $db->record['question']; ! $temp->answer = $db->record['answer']; ! $temp->clicks = $db->record['clicks']; ! $temp->groups = $db->record['groups']; $objects[] = $temp; } Index: eventsObj.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/eventsObj.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** eventsObj.php 24 Sep 2005 02:29:59 -0000 1.10 --- eventsObj.php 8 Oct 2007 14:35:30 -0000 1.11 *************** *** 297,302 **** $db->RESULT_TYPE = MYSQL_ASSOC; ! while($db->next_record()) { ! extract($db->Record); $exclude = explode("|",$repeatExclude); $eventPkey =$pkey; --- 297,302 ---- $db->RESULT_TYPE = MYSQL_ASSOC; ! while($db->nextRecord()) { ! extract($db->record); $exclude = explode("|",$repeatExclude); $eventPkey =$pkey; *************** *** 331,337 **** case "0": $loopVar = strtotime(date("m/d/Y 00:00:00",$eventStart)); ! $edateObj->events[$loopVar][$eventPkey] = edate::_load($db->Record); $loopEnd = strtotime(date("m/d/Y 00:00:00",$eventEnd)); ! $edateObj->events[$loopEnd][$eventPkey] = edate::_load($db->Record); break; --- 331,337 ---- case "0": $loopVar = strtotime(date("m/d/Y 00:00:00",$eventStart)); ! $edateObj->events[$loopVar][$eventPkey] = edate::_load($db->record); $loopEnd = strtotime(date("m/d/Y 00:00:00",$eventEnd)); ! $edateObj->events[$loopEnd][$eventPkey] = edate::_load($db->record); break; *************** *** 357,361 **** if (is_array($exclude) == false || (is_array($exclude) && in_array(date("n/d/Y",$loopVar), $exclude) == false)) ! { $edateObj->events[$loopVar][$eventPkey] = edate::_load($db->Record); } --- 357,361 ---- if (is_array($exclude) == false || (is_array($exclude) && in_array(date("n/d/Y",$loopVar), $exclude) == false)) ! { $edateObj->events[$loopVar][$eventPkey] = edate::_load($db->record); } *************** *** 417,426 **** { if (is_array($exclude) == false) ! { $edateObj->events[$loopVar][$eventPkey] =edate::_load($db->Record); } else { reset($exclude); if (in_array(date("n/d/Y",$loopVar), $exclude) == false) ! { $edateObj->events[$loopVar][$eventPkey] =edate::_load($db->Record);; } --- 417,426 ---- { if (is_array($exclude) == false) ! { $edateObj->events[$loopVar][$eventPkey] =edate::_load($db->record); } else { reset($exclude); if (in_array(date("n/d/Y",$loopVar), $exclude) == false) ! { $edateObj->events[$loopVar][$eventPkey] =edate::_load($db->record);; } *************** *** 481,485 **** if ( ($nexttime>=$loopVar) && ($nexttime<=$loopEnd)) { if (!in_array(date("m/d/Y",$loopVar), $exclude)) { ! $edateObj->events[$loopVar][$eventPkey] = edate::_load($db->Record); } } --- 481,485 ---- if ( ($nexttime>=$loopVar) && ($nexttime<=$loopEnd)) { if (!in_array(date("m/d/Y",$loopVar), $exclude)) { ! $edateObj->events[$loopVar][$eventPkey] = edate::_load($db->record); } } *************** *** 515,519 **** if ( ($nexttime>=$loopVar) && ($nexttime<=$loopEnd)) { if (!in_array(date("m/d/Y",$loopVar), $exclude)) { ! $edateObj->events[$loopVar][$eventPkey] = edate::_load($db->Record); } } --- 515,519 ---- if ( ($nexttime>=$loopVar) && ($nexttime<=$loopEnd)) { if (!in_array(date("m/d/Y",$loopVar), $exclude)) { ! $edateObj->events[$loopVar][$eventPkey] = edate::_load($db->record); } } *************** *** 562,569 **** if ( $j & $day) { if (!is_array($exclude)) { ! $edateObj->events[$loopVar][$eventPkey] = edate::_load($db->Record); } if (!in_array(date("n/d/Y",$loopVar), $exclude)) { ! $edateObj->events[$loopVar][$eventPkey] = edate::_load($db->Record); } //print_r($this->events[$loopVar]); echo "<HR>"; --- 562,569 ---- if ( $j & $day) { if (!is_array($exclude)) { ! $edateObj->events[$loopVar][$eventPkey] = edate::_load($db->record); } if (!in_array(date("n/d/Y",$loopVar), $exclude)) { ! $edateObj->events[$loopVar][$eventPkey] = edate::_load($db->record); } //print_r($this->events[$loopVar]); echo "<HR>"; *************** *** 1308,1314 **** $db->queryOne($sql); ! if (is_array($db->Record)) { ! foreach($db->Record as $variable => $variable_value) { $this->{$variable} = $variable_value; $i++; --- 1308,1314 ---- $db->queryOne($sql); ! if (is_array($db->record)) { ! foreach($db->record as $variable => $variable_value) { $this->{$variable} = $variable_value; $i++; *************** *** 1552,1556 **** $db->queryOne($sql); ! $s = '('.$db->Record['semesterId'].') '.$db->Record['courseFamilyNumber'].' '.$s; } else { --- 1552,1556 ---- $db->queryOne($sql); ! $s = '('.$db->record['semesterId'].') '.$db->record['courseFamilyNumber'].' '.$s; } else { *************** *** 1915,1922 **** $db->queryOne($sql); ! //$s = '('.$db->Record['semesterId'].') '.$db->Record['courseFamilyNumber'].' '.$s; // I've decided to leave off the (avail./unavail) stuff when this block is hit // as this block currently is only hit when you're in the master calendar ! $s = '('.$db->Record['semesterId'].') '.$db->Record['courseFamilyNumber'].' '; } --- 1915,1922 ---- $db->queryOne($sql); ! //$s = '('.$db->record['semesterId'].') '.$db->record['courseFamilyNumber'].' '.$s; // I've decided to leave off the (avail./unavail) stuff when this block is hit // as this block currently is only hit when you're in the master calendar ! $s = '('.$db->record['semesterId'].') '.$db->record['courseFamilyNumber'].' '; } *************** *** 2005,2009 **** $db->queryOne($sql); ! return '- '. date('g:i A', $this->enddate).' <br><B>'.$db->Record['firstname']. ' '. $db->Record['lastname']. ' (DL Staff)</B>: '. $this->title. '<br><i>'.$this->description. '</i>'; } --- 2005,2009 ---- $db->queryOne($sql); ! return '- '. date('g:i A', $this->enddate).' <br><B>'.$db->record['firstname']. ' '. $db->record['lastname']. ' (DL Staff)</B>: '. $this->title. '<br><i>'.$this->description. '</i>'; } Index: LC_form.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/LC_form.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** LC_form.php 11 Sep 2007 03:00:25 -0000 1.15 --- LC_form.php 8 Oct 2007 14:35:28 -0000 1.16 *************** *** 1077,1081 **** $sql = "select pkey from lcFormInfo where formCode='$code'"; $db->queryOne($sql); ! $pkey = $db->Record['pkey']; $sql = "select * from lcForms where formId='$pkey'"; --- 1077,1081 ---- $sql = "select pkey from lcFormInfo where formCode='$code'"; $db->queryOne($sql); ! $pkey = $db->record['pkey']; $sql = "select * from lcForms where formId='$pkey'"; *************** *** 1083,1092 **** $db->RESULT_TYPE = MYSQL_ASSOC; $db->query($sql); ! while ($db->next_record()) { ! $tmp[$db->Record['fieldName']] = $db->Record; # take the groups and unserialize them # so we don't have to later on ! $tmp[$db->Record['fieldName']]['groups'] = unserialize($db->Record['groups']); } --- 1083,1092 ---- $db->RESULT_TYPE = MYSQL_ASSOC; $db->query($sql); ! while ($db->nextRecord()) { ! $tmp[$db->record['fieldName']] = $db->record; # take the groups and unserialize them # so we don't have to later on ! $tmp[$db->record['fieldName']]['groups'] = unserialize($db->record['groups']); } *************** *** 1425,1429 **** $db->RESULT_TYPE = MYSQL_ASSOC; $db->queryOne($sql); ! $formInfo = $db->Record; #debug($formInfo); #Fill in all of the form properties --- 1425,1429 ---- $db->RESULT_TYPE = MYSQL_ASSOC; $db->queryOne($sql); ! $formInfo = $db->record; #debug($formInfo); #Fill in all of the form properties *************** *** 1446,1450 **** $n = 0; ! while($db->next_record()) { ++$formRow; --- 1446,1450 ---- $n = 0; ! while($db->nextRecord()) { ++$formRow; *************** *** 1457,1470 **** # Fields such as event or submit should not be # overwritten. ! #debug($db->Record); if (is_array($vars) ) { ! #debug($db->Record['type']); ! if ( !( ($db->Record['type'] == 'hidden') || ($db->Record['type'] == 'submit') || ($db->Record['type'] == 'row') || ($db->Record['type'] == 'checkbox') || ($db->Record['type'] == 'radio'))) { ! #debug($db->Record); ! $db->Record['defaultValue'] = $vars[$db->Record['fieldName']]; } --- 1457,1470 ---- # Fields such as event or submit should not be # overwritten. ! #debug($db->record); if (is_array($vars) ) { ! #debug($db->record['type']); ! if ( !( ($db->record['type'] == 'hidden') || ($db->record['type'] == 'submit') || ($db->record['type'] == 'row') || ($db->record['type'] == 'checkbox') || ($db->record['type'] == 'radio'))) { ! #debug($db->record); ! $db->record['defaultValue'] = $vars[$db->record['fieldName']]; } *************** *** 1476,1489 **** # if it doesn't we know the person didn't check # the checkbox or unchecked it. ! if ($db->Record['type'] == 'checkbox') { ! $db->Record['checked'] = 'Y'; ! if ( !isset($vars[$db->Record['fieldName']]) ) { ! $db->Record['checked'] = 'N'; } else { ! if ( $vars[$db->Record['fieldName']] == false) { ! $db->Record['checked'] = 'N'; } } --- 1476,1489 ---- # if it doesn't we know the person didn't check # the checkbox or unchecked it. ! if ($db->record['type'] == 'checkbox') { ! $db->record['checked'] = 'Y'; ! if ( !isset($vars[$db->record['fieldName']]) ) { ! $db->record['checked'] = 'N'; } else { ! if ( $vars[$db->record['fieldName']] == false) { ! $db->record['checked'] = 'N'; } } *************** *** 1495,1504 **** # value. If we didn't do this, radio buttons # would not have anything selected by default. ! if ($db->Record['type'] == 'radio') { ! if ( $vars[$db->Record['fieldName']] != '' ) { ! $db->Record['defaultValue'] = ! $vars[$db->Record['fieldName']]; } } --- 1495,1504 ---- # value. If we didn't do this, radio buttons # would not have anything selected by default. ! if ($db->record['type'] == 'radio') { ! if ( $vars[$db->record['fieldName']] != '' ) { ! $db->record['defaultValue'] = ! $vars[$db->record['fieldName']]; } } *************** *** 1506,1517 **** ! # echo $db->Record['fieldName'] .'='.$db->Record['defaultValue'].'<br>'; # Build up the groups for each form field ! $db->Record['groups'] = unserialize($db->Record['groups']); # Figure out if the ! #$row = $db->Record['row']; ! #debug($db->Record); ! $this->data[$formRow][] = $db->Record; } --- 1506,1517 ---- ! # echo $db->record['fieldName'] .'='.$db->record['defaultValue'].'<br>'; # Build up the groups for each form field ! $db->record['groups'] = unserialize($db->record['groups']); # Figure out if the ! #$row = $db->record['row']; ! #debug($db->record); ! $this->data[$formRow][] = $db->record; } *************** *** 1530,1536 **** #$db = DB::getHandle(); #$db->query("select * from lcForms where formId='$formId'"); ! #while($db->next_record()) #{ ! # $tmp[$db->Record['fieldName']] = $db->Record; #} --- 1530,1536 ---- #$db = DB::getHandle(); #$db->query("select * from lcForms where formId='$formId'"); ! #while($db->nextRecord()) #{ ! # $tmp[$db->record['fieldName']] = $db->record; #} *************** *** 1545,1549 **** } #echo $ar[$k].'----->ar<br>'; ! #echo $db->Record['fieldName'].'------->Record<br>'; if (is_array($ar[$k])) { --- 1545,1549 ---- } #echo $ar[$k].'----->ar<br>'; ! #echo $db->record['fieldName'].'------->record<br>'; if (is_array($ar[$k])) { *************** *** 1581,1585 **** $db->RESULT_TYPE = MYSQL_ASSOC; $db->queryOne($sql); ! $formInfo = $db->Record; #Fill in all of the form properties --- 1581,1585 ---- $db->RESULT_TYPE = MYSQL_ASSOC; $db->queryOne($sql); ! $formInfo = $db->record; #Fill in all of the form properties *************** *** 1605,1626 **** $db->query($sql); $db->RESULT_TYPE = MYSQL_ASSOC; ! #print_r($db->Record); ! while($db->next_record()) { ! if ($req[$db->Record['fieldName']] != '') { ! $db->Record['defaultValue'] = $req[$db->Record['fieldName']]; } ! if ($opt[$db->Record['fieldName']] != '') { ! $db->Record['defaultValue'] = $opt[$db->Record['fieldName']]; } # Build up the groups for each form field ! $db->Record['groups'] = explode("|", $db->Record['groups']); ! $db->Record['notgroups'] = explode("|", $db->Record['notgroups']); ! $this->data[] = $db->Record; } --- 1605,1626 ---- $db->query($sql); $db->RESULT_TYPE = MYSQL_ASSOC; ! #print_r($db->record); ! while($db->nextRecord()) { ! if ($req[$db->record['fieldName']] != '') { ! $db->record['defaultValue'] = $req[$db->record['fieldName']]; } ! if ($opt[$db->record['fieldName']] != '') { ! $db->record['defaultValue'] = $opt[$db->record['fieldName']]; } # Build up the groups for each form field ! $db->record['groups'] = explode("|", $db->record['groups']); ! $db->record['notgroups'] = explode("|", $db->record['notgroups']); ! $this->data[] = $db->record; } *************** *** 1688,1692 **** $db->RESULT_TYPE = MYSQL_ASSOC; $db->queryOne($sql); ! return $db->Record; } --- 1688,1692 ---- $db->RESULT_TYPE = MYSQL_ASSOC; $db->queryOne($sql); ! return $db->record; } Index: presentationObj.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/presentationObj.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** presentationObj.php 13 Aug 2005 20:41:05 -0000 1.2 --- presentationObj.php 8 Oct 2007 14:35:30 -0000 1.3 *************** *** 18,33 **** if ($prop=='') { $prop=$this->_pkey; } $db->query("select id_presentations,id_classes,title,status,author,createdOn,approvedOn,content from class_presentations where $prop='$pkey' $where $orderBy"); ! while ($db->next_record()) { $temp = new presentationObj(); $temp->_dsn = $dsn; $temp->__loaded = true; ! $temp->id_presentations = $db->Record['id_presentations']; ! $temp->id_classes = $db->Record['id_classes']; ! $temp->title = $db->Record['title']; ! $temp->status = $db->Record['status']; ! $temp->author = $db->Record['author']; ! $temp->createdOn = $db->Record['createdOn']; ! $temp->approvedOn = $db->Record['approvedOn']; ! $temp->content = $db->Record['content']; $objects[] = $temp; } --- 18,33 ---- if ($prop=='') { $prop=$this->_pkey; } $db->query("select id_presentations,id_classes,title,status,author,createdOn,approvedOn,content from class_presentations where $prop='$pkey' $where $orderBy"); ! while ($db->nextRecord()) { $temp = new presentationObj(); $temp->_dsn = $dsn; $temp->__loaded = true; ! $temp->id_presentations = $db->record['id_presentations']; ! $temp->id_classes = $db->record['id_classes']; ! $temp->title = $db->record['title']; ! $temp->status = $db->record['status']; ! $temp->author = $db->record['author']; ! $temp->createdOn = $db->record['createdOn']; ! $temp->approvedOn = $db->record['approvedOn']; ! $temp->content = $db->record['content']; $objects[] = $temp; } *************** *** 43,58 **** if ($where) { $where = ' and $where'; } $db->query("select id_presentations,id_classes,title,status,author,createdOn,approvedOn,content from class_presentations $where $orderBy"); ! while ($db->next_record()) { $temp = new presentationObj(); $temp->_dsn = $dsn; $temp->__loaded = true; ! $temp->id_presentations = $db->Record['id_presentations']; ! $temp->id_classes = $db->Record['id_classes']; ! $temp->title = $db->Record['title']; ! $temp->status = $db->Record['status']; ! $temp->author = $db->Record['author']; ! $temp->createdOn = $db->Record['createdOn']; ! $temp->approvedOn = $db->Record['approvedOn']; ! $temp->content = $db->Record['content']; $objects[] = $temp; } --- 43,58 ---- if ($where) { $where = ' and $where'; } $db->query("select id_presentations,id_classes,title,status,author,createdOn,approvedOn,content from class_presentations $where $orderBy"); ! while ($db->nextRecord()) { $temp = new presentationObj(); $temp->_dsn = $dsn; $temp->__loaded = true; ! $temp->id_presentations = $db->record['id_presentations']; ! $temp->id_classes = $db->record['id_classes']; ! $temp->title = $db->record['title']; ! $temp->status = $db->record['status']; ! $temp->author = $db->record['author']; ! $temp->createdOn = $db->record['createdOn']; ! $temp->approvedOn = $db->record['approvedOn']; ! $temp->content = $db->record['content']; $objects[] = $temp; } Index: SeminarClassesDates.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/SeminarClassesDates.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SeminarClassesDates.php 8 Feb 2007 19:51:21 -0000 1.3 --- SeminarClassesDates.php 8 Oct 2007 14:35:29 -0000 1.4 *************** *** 350,356 **** '%|semmgr|%'"; $db->query($sql); ! while($db->next_record() ) { ! $emailTo .= $db->Record['email'].','; } --- 350,356 ---- '%|semmgr|%'"; $db->query($sql); ! while($db->nextRecord() ) { ! $emailTo .= $db->record['email'].','; } Index: SiteForms.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/SiteForms.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SiteForms.php 17 Nov 2006 16:39:21 -0000 1.6 --- SiteForms.php 8 Oct 2007 14:35:29 -0000 1.7 *************** *** 68,74 **** $sql = "select distinct({$this->courseFamily}) from {$this->courses_table}"; $this->db->query($sql); ! while($this->db->next_record() ) { ! $arr[$this->db->Record["{$this->courseFamily}"]] = $this->db->Record["{$this->courseFamily}"].'='.$this->db->Record["{$this->courseFamily}"]; } #debug($arr, 1); --- 68,74 ---- $sql = "select distinct({$this->courseFamily}) from {$this->courses_table}"; $this->db->query($sql); ! while($this->db->nextRecord() ) { ! $arr[$this->db->record["{$this->courseFamily}"]] = $this->db->record["{$this->courseFamily}"].'='.$this->db->record["{$this->courseFamily}"]; } #debug($arr, 1); *************** *** 86,92 **** $sql = "select distinct({$this->courseNumber}) from {$this->courses_table}"; $this->db->query($sql); ! while($this->db->next_record() ) { ! $arr[$this->db->Record["{$this->courseNumber}"]] = $this->db->Record["{$this->courseNumber}"].'='.$this->db->Record["{$this->courseNumber}"]; } --- 86,92 ---- $sql = "select distinct({$this->courseNumber}) from {$this->courses_table}"; $this->db->query($sql); ! while($this->db->nextRecord() ) { ! $arr[$this->db->record["{$this->courseNumber}"]] = $this->db->record["{$this->courseNumber}"].'='.$this->db->record["{$this->courseNumber}"]; } *************** *** 101,107 **** $sql = "select id_courses, {$this->courseNumber}, {$this->courseFamily} from {$this->courses_table}"; $this->db->query($sql); ! while($this->db->next_record() ) { ! $arr[$this->db->Record['id_courses']] = $this->db->Record['id_courses'].'='.$this->db->Record["{$this->courseFamily}"].$this->db->Record["{$this->courseNumber}"]; } --- 101,107 ---- $sql = "select id_courses, {$this->courseNumber}, {$this->courseFamily} from {$this->courses_table}"; $this->db->query($sql); ! while($this->db->nextRecord() ) { ! $arr[$this->db->record['id_courses']] = $this->db->record['id_courses'].'='.$this->db->record["{$this->courseFamily}"].$this->db->record["{$this->courseNumber}"]; } *************** *** 117,123 **** $sql = "select id_courses, courseName, courseDescription, {$this->courseNumber}, {$this->courseFamily} from {$this->courses_table} ORDER BY courseFamily ASC"; $this->db->query($sql); ! while($this->db->next_record() ) { ! $arr[$this->db->Record['id_courses']] = $this->db->Record['id_courses'].'='. $this->db->Record["{$this->courseFamily}"].$this->db->Record["{$this->courseNumber}"].' ('.$this->db->Record['courseName'].')'; } --- 117,123 ---- $sql = "select id_courses, courseName, courseDescription, {$this->courseNumber}, {$this->courseFamily} from {$this->courses_table} ORDER BY courseFamily ASC"; $this->db->query($sql); ! while($this->db->nextRecord() ) { ! $arr[$this->db->record['id_courses']] = $this->db->record['id_courses'].'='. $this->db->record["{$this->courseFamily}"].$this->db->record["{$this->courseNumber}"].' ('.$this->db->record['courseName'].')'; } *************** *** 133,139 **** $sql = "select id_courses, courseDescription, {$this->courseNumber}, {$this->courseFamily} from {$this->courses_table}"; $this->db->query($sql); ! while($this->db->next_record() ) { ! $arr[$this->db->Record['id_courses']] = $this->db->Record['id_courses'].'='.$this->db->Record['courseDescription'].' ('.$this->db->Record["{$this->courseFamily}"].$this->db->Record["{$this->courseNumber}"].')'; } --- 133,139 ---- $sql = "select id_courses, courseDescription, {$this->courseNumber}, {$this->courseFamily} from {$this->courses_table}"; $this->db->query($sql); ! while($this->db->nextRecord() ) { ! $arr[$this->db->record['id_courses']] = $this->db->record['id_courses'].'='.$this->db->record['courseDescription'].' ('.$this->db->record["{$this->courseFamily}"].$this->db->record["{$this->courseNumber}"].')'; } *************** *** 155,161 **** $this->db->RESULT_TYPE = MYSQL_ASSOC; $arr = array(); ! while($this->db->next_record() ) { ! $arr[] = $this->db->Record; } --- 155,161 ---- $this->db->RESULT_TYPE = MYSQL_ASSOC; $arr = array(); ! while($this->db->nextRecord() ) { ! $arr[] = $this->db->record; } *************** *** 202,208 **** $this->db->RESULT_TYPE = MYSQL_ASSOC; $arr = array(); ! while($this->db->next_record() ) { ! $arr[] = $this->db->Record; } --- 202,208 ---- $this->db->RESULT_TYPE = MYSQL_ASSOC; $arr = array(); ! while($this->db->nextRecord() ) { ! $arr[] = $this->db->record; } *************** *** 247,260 **** $sql = "select id_semesters, semesterTerm, semesterId, semesterYear from semesters order by semesterYear DESC"; $this->db->query($sql); ! while($this->db->next_record() ) { ! if ( in_array($this->db->Record['semesterTerm'],$a_semester) ) { ! $arr[$this->db->Record['id_semesters']] = ! $this->db->Record['id_semesters'].'='. ! $a_semester[$this->db->Record['semesterTerm']].' '. ! $this->db->Record['semesterYear']; } else { ! $arr[$this->db->Record['id_semesters']] = ! $this->db->Record['id_semesters'].'='. ! $this->db->Record['courseFamilyNumber']; } } --- 247,260 ---- $sql = "select id_semesters, semesterTerm, semesterId, semesterYear from semesters order by semesterYear DESC"; $this->db->query($sql); ! while($this->db->nextRecord() ) { ! if ( in_array($this->db->record['semesterTerm'],$a_semester) ) { ! $arr[$this->db->record['id_semesters']] = ! $this->db->record['id_semesters'].'='. ! $a_semester[$this->db->record['semesterTerm']].' '. ! $this->db->record['semesterYear']; } else { ! $arr[$this->db->record['id_semesters']] = ! $this->db->record['id_semesters'].'='. ! $this->db->record['courseFamilyNumber']; } } *************** *** 292,307 **** // @@@ Now i need to know if we are to show semesters that have been deactivated? $this->db->query($sql); ! while($this->db->next_record() ) { ! if ( in_array($this->db->Record['semesterTerm'],$a_semester) ) { ! $arr[$this->db->Record['id_semesters']] = ! $this->db->Record['id_semesters'].'='. ! '[ '. $this->db->Record['count_classes']. ' ] '. ! $a_semester[$this->db->Record['semesterTerm']].' '. ! $this->db->Record['semesterYear']; } else { ! $arr[$this->db->Record['id_semesters']] = ! $this->db->Record['id_semesters'].'='. ! '[ '. $this->db->Record['count_classes']. ' ] '. ! $this->db->Record['courseFamilyNumber']; } } --- 292,307 ---- // @@@ Now i need to know if we are to show semesters that have been deactivated? $this->db->query($sql); ! while($this->db->nextRecord() ) { ! if ( in_array($this->db->record['semesterTerm'],$a_semester) ) { ! $arr[$this->db->record['id_semesters']] = ! $this->db->record['id_semesters'].'='. ! '[ '. $this->db->record['count_classes']. ' ] '. ! $a_semester[$this->db->record['semesterTerm']].' '. ! $this->db->record['semesterYear']; } else { ! $arr[$this->db->record['id_semesters']] = ! $this->db->record['id_semesters'].'='. ! '[ '. $this->db->record['count_classes']. ' ] '. ! $this->db->record['courseFamilyNumber']; } } *************** *** 336,341 **** $this->db->query($sql); ! while ($this->db->next_record()) { ! $selected[] = $this->db->Record['id_class_objectives']; } --- 336,341 ---- $this->db->query($sql); ! while ($this->db->nextRecord()) { ! $selected[] = $this->db->record['id_class_objectives']; } *************** *** 354,359 **** $this->db->query($sql); $starred = array(); ! while ($this->db->next_record()) { ! $starred[] = $this->db->Record['id_class_objectives']; } --- 354,359 ---- $this->db->query($sql); $starred = array(); ! while ($this->db->nextRecord()) { ! $starred[] = $this->db->record['id_class_objectives']; } *************** *** 362,374 **** where id_classes='{$lcUser->activeClassTaught->id_classes}'"; $this->db->query($sql); ! while ($this->db->next_record()) { ! if (strlen($this->db->Record['objective']) > 75) { ! $this->db->Record['objective'] = htmlentities(substr($this->db->Record['objective'],0,75), ENT_QUOTES) . '...'; ! $this->db->Record[1] = htmlentities(substr($this->db->Record[1],0,75), ENT_QUOTES); } ! $arr[$this->db->Record['id_class_objectives']] = ! $this->db->Record['id_class_objectives'].'=' ! .(@in_array($this->db->Record['id_class_objectives'], $starred) ? '**' : '') ! .str_replace(',', ',', $this->db->Record['objective']); } --- 362,374 ---- where id_classes='{$lcUser->activeClassTaught->id_classes}'"; $this->db->query($sql); ! while ($this->db->nextRecord()) { ! if (strlen($this->db->record['objective']) > 75) { ! $this->db->record['objective'] = htmlentities(substr($this->db->record['objective'],0,75), ENT_QUOTES) . '...'; ! $this->db->record[1] = htmlentities(substr($this->db->record[1],0,75), ENT_QUOTES); } ! $arr[$this->db->record['id_class_objectives']] = ! $this->db->record['id_class_objectives'].'=' ! .(@in_array($this->db->record['id_class_objectives'], $starred) ? '**' : '') ! .str_replace(',', ',', $this->db->record['objective']); } *************** *** 393,398 **** and a.id_classes='{$lcUser->activeClassTaught->id_classes}'"; $this->db->query($sql); ! while ($this->db->next_record()) { ! $selected[] = $this->db->Record['id_class_assignments']; } --- 393,398 ---- and a.id_classes='{$lcUser->activeClassTaught->id_classes}'"; $this->db->query($sql); ! while ($this->db->nextRecord()) { ! $selected[] = $this->db->record['id_class_assignments']; } *************** *** 405,413 **** $this->db->query($sql); $arr[0] = '0=None'; ! while ($this->db->next_record()) { ! $arr[$this->db->Record['id_class_assignments']] = ! $this->db->Record['id_class_assignments'] ! .'='.$this->db->Record['title']; } --- 405,413 ---- $this->db->query($sql); $arr[0] = '0=None'; ! while ($this->db->nextRecord()) { ! $arr[$this->db->record['id_class_assignments']] = ! $this->db->record['id_class_assignments'] ! .'='.$this->db->record['title']; } *************** *** 429,435 **** and (id_class_lessons is null or id_class_lessons='".LESSON_ID."')"; $this->db->query($sql); ! while ($this->db->next_record()) { ! $arr[$this->db->Record['id_class_lesson_content']] = ! $this->db->Record['id_class_lesson_content'].'='.$this->db->Record['txTitle']; } $v['selectOptions'] = @implode($arr, ','); --- 429,435 ---- and (id_class_lessons is null or id_class_lessons='".LESSON_ID."')"; $this->db->query($sql); ! while ($this->db->nextRecord()) { ! $arr[$this->db->record['id_class_lesson_content']] = ! $this->db->record['id_class_lesson_content'].'='.$this->db->record['txTitle']; } $v['selectOptions'] = @implode($arr, ','); *************** *** 446,452 **** $this->db->query($sql); $arr = array(); ! while ($this->db->next_record()) { ! $arr[$this->db->Record['id_class_links']] ! = $this->db->Record['id_class_links'].'='.$this->db->Record['title']; } $v['selectOptions'] = @implode($arr, ','); --- 446,452 ---- $this->db->query($sql); $arr = array(); ! while ($this->db->nextRecord()) { ! $arr[$this->db->record['id_class_links']] ! = $this->db->record['id_class_links'].'='.$this->db->record['title']; } $v['selectOptions'] = @implode($arr, ','); *************** *** 465,469 **** $this->db->queryOne($sql); ! $CFAM = $this->db->Record['courseFamily']; if ($CFAM == '') --- 465,469 ---- $this->db->queryOne($sql); ! $CFAM = $this->db->record['courseFamily']; if ($CFAM == '') *************** *** 483,489 **** { $arr[0] = '0=No Teachers Available'; } ! while($this->db->next_record() ) { ! $arr[$this->db->Record['username']] = $this->db->Record['username']. '='.$this->db->Record['lastname']. ', '.$this->db->Record['firstname'] ; } --- 483,489 ---- { $arr[0] = '0=No Teachers Available'; } ! while($this->db->nextRecord() ) { ! $arr[$this->db->record['username']] = $this->db->record['username']. '='.$this->db->record['lastname']. ', '.$this->db->record['firstname'] ; } *************** *** 500,505 **** //groups $this->db->query("select * from lcGroups"); ! while ($this->db->next_record() ) { ! $arr .= $this->db->Record[gid].'='.$this->db->Record[groupName].','; } $v['selectOptions'] = substr($arr, 0, -1); --- 500,505 ---- //groups $this->db->query("select * from lcGroups"); ! while ($this->db->nextRecord() ) { ! $arr .= $this->db->record[gid].'='.$this->db->record[groupName].','; } $v['selectOptions'] = substr($arr, 0, -1); *************** *** 515,521 **** $this->db->query($sql); $arr = "General=General,"; ! while($this->db->next_record() ) { ! $arr .= $this->db->Record['category'].'='.$this->db->Record['category'].','; } $v['selectOptions'] = substr($arr, 0, -1); --- 515,521 ---- $this->db->query($sql); $arr = "General=General,"; ! while($this->db->nextRecord() ) { ! $arr .= $this->db->record['category'].'='.$this->db->record['category'].','; } $v['selectOptions'] = substr($arr, 0, -1); *************** *** 528,533 **** { $this->db->query("select * from helpdesk_categories ORDER BY helpdesk_category_label"); ! while($this->db->next_record()) { ! $arr .= $this->db->Record[0]."=".$this->db->Record['helpdesk_category_label'].','; } --- 528,533 ---- { $this->db->query("select * from helpdesk_categories ORDER BY helpdesk_category_label"); ! while($this->db->nextRecord()) { ! $arr .= $this->db->record[0]."=".$this->db->record['helpdesk_category_label'].','; } *************** *** 540,545 **** { $this->db->query("select * from hd_categories ORDER BY helpdesk_category_label"); ! while($this->db->next_record()) { ! $arr .= $this->db->Record[0]."=".$this->db->Record['helpdesk_category_label'].','; } --- 540,545 ---- { $this->db->query("select * from hd_categories ORDER BY helpdesk_category_label"); ! while($this->db->nextRecord()) { ! $arr .= $this->db->record[0]."=".$this->db->record['helpdesk_category_label'].','; } *************** *** 574,580 **** $this->db->query($sql); ! while($this->db->next_record() ) { ! $arr .= $this->db->Record['id_orientation_dates'].'='.date('F j Y', strtotime($this->db->Record['date'])).' ('.date('g:i A', strtotime('2003-02-03 '.$this->db->Record['time_start'])).' - '.date('g:i A', strtotime('2003-02-03 '.$this->db->Record['time_end'])).'),'; } --- 574,580 ---- $this->db->query($sql); ! while($this->db->nextRecord() ) { ! $arr .= $this->db->record['id_orientation_dates'].'='.date('F j Y', strtotime($this->db->record['date'])).' ('.date('g:i A', strtotime('2003-02-03 '.$this->db->record['time_start'])).' - '.date('g:i A', strtotime('2003-02-03 '.$this->db->record['time_end'])).'),'; } *************** *** 655,662 **** FROM textbook_estimates'; $this->db->query($sql); ! while ($this->db->next_record()) { ! $arr .= $this->db->Record['textbook_estimates_key'].'='. ! $this->db->Record['textbook_estimates_name'].','; } --- 655,662 ---- FROM textbook_estimates'; $this->db->query($sql); ! while ($this->db->nextRecord()) { ! $arr .= $this->db->record['textbook_estimates_key'].'='. ! $this->db->record['textbook_estimates_name'].','; } *************** *** 676,682 **** $this->db->query($sql); $arr = '=Select Category,'; ! while($this->db->next_record() ) { ! $arr .= $this->db->Record['id_class_gradebook_categories'].'='.$this->db->Record['label'].','; } $v['selectOptions'] = substr($arr, 0, -1); --- 676,682 ---- $this->db->query($sql); $arr = '=Select Category,'; ! while($this->db->nextRecord() ) { ! $arr .= $this->db->record['id_class_gradebook_categories'].'='.$this->db->record['label'].','; } $v['selectOptions'] = substr($arr, 0, -1); Index: doclibLibrary.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/doclibLibrary.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** doclibLibrary.php 16 Dec 2006 01:28:23 -0000 1.5 --- doclibLibrary.php 8 Oct 2007 14:35:30 -0000 1.6 *************** *** 96,101 **** $db->RESULT_TYPE = MYSQL_ASSOC; $db->query($sql); ! while($db->next_record()) { ! $x = PersistantObject::createFromArray('LC_file',$db->Record); $ret[$x->pkey] = $x; } --- 96,101 ---- $db->RESULT_TYPE = MYSQL_ASSOC; $db->query($sql); ! while($db->nextRecord()) { ! $x = PersistantObject::createFromArray('LC_file',$db->record); $ret[$x->pkey] = $x; } *************** *** 122,128 **** $db->RESULT_TYPE = MYSQL_ASSOC; $db->queryOne($sql); ! if (is_array($db->Record)) { ! unset($db->Record['total']); ! $x = PersistantObject::createFromArray('LC_file',$db->Record); return $x; } else { --- 122,128 ---- $db->RESULT_TYPE = MYSQL_ASSOC; $db->queryOne($sql); ! if (is_array($db->record)) { ! unset($db->record['total']); ! $x = PersistantObject::createFromArray('LC_file',$db->record); return $x; } else { *************** *** 168,172 **** $sql .= " and pkey=".$this->pkey; $db->queryOne($sql); ! $filename = $db->Record["filename"]; @unlink(FILES_PATH.$filename); $db->query("delete from ".$this->prefix."doclib_Files where owner='".$this->owner."' and pkey=".$this->pkey); --- 168,172 ---- $sql .= " and pkey=".$this->pkey; $db->queryOne($sql); ! $filename = $db->record["filename"]; @unlink(FILES_PATH.$filename); $db->query("delete from ".$this->prefix."doclib_Files where owner='".$this->owner."' and pkey=".$this->pkey); *************** *** 237,244 **** $db->query($sql); $db->RESULT_TYPE=MYSQL_ASSOC; ! if (!$db->next_record()) return null; ! $x = PersistantObject::createFromArray('LC_folder',$db->Record); unset($x->total); return $x; --- 237,244 ---- $db->query($sql); $db->RESULT_TYPE=MYSQL_ASSOC; ! if (!$db->nextRecord()) return null; ! $x = PersistantObject::createFromArray('LC_folder',$db->record); unset($x->total); return $x; *************** *** 265,272 **** $db->RESULT_TYPE=MYSQL_ASSOC; ! while($db->next_record()) { ! $temp = $db->Record['folderType']; if ($temp==0) { $temp=99; } ! $x[$temp][] = $db->Record; } ksort($x); --- 265,272 ---- $db->RESULT_TYPE=MYSQL_ASSOC; ! while($db->nextRecord()) { ! $temp = $db->record['folderType']; if ($temp==0) { $temp=99; } ! $x[$temp][] = $db->record; } ksort($x); *************** *** 340,345 **** $db->query("select * from ".$this->prefix."doclib_Sharing where folderKey = ".$this->pkey); $sql = 'insert into ".$this->prefix."doclib_Sharing (folderKey,action,exclude,gid) VALUES ('.$newFolderID.',%d,%d,\'%s\')'; ! while ( $db->next_record() ) { ! $db->query(sprintf($sql,$db->Record['action'],$db->Record['exclude'],$db->Record['gid']) ); } --- 340,345 ---- $db->query("select * from ".$this->prefix."doclib_Sharing where folderKey = ".$this->pkey); $sql = 'insert into ".$this->prefix."doclib_Sharing (folderKey,action,exclude,gid) VALUES ('.$newFolderID.',%d,%d,\'%s\')'; ! while ( $db->nextRecord() ) { ! $db->query(sprintf($sql,$db->record['action'],$db->record['exclude'],$db->record['gid']) ); } *************** *** 369,374 **** and action = 1'); ! while ($db->next_record() ){ ! $this->sharedGroups[$db->Record[1]] = $db->Record[0]; } --- 369,374 ---- and action = 1'); ! while ($db->nextRecord() ){ ! $this->sharedGroups[$db->record[1]] = $db->record[0]; } *************** *** 381,386 **** and action = 2'); ! while ($db->next_record() ){ ! $this->managerGroups[$db->Record[1]] = $db->Record[0]; } } --- 381,386 ---- and action = 2'); ! while ($db->nextRecord() ){ ! $this->managerGroups[$db->record[1]] = $db->record[0]; } } Index: classLessonObj.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/classLessonObj.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** classLessonObj.php 13 Aug 2005 20:41:05 -0000 1.2 --- classLessonObj.php 8 Oct 2007 14:35:29 -0000 1.3 *************** *** 17,29 **** if ($prop=='') { $prop=$this->_pkey; } $db->query("select checkList,id_class_lessons,createdOn,title,description from class_lessons where $prop='$pkey' $where $orderBy"); ! if($db->next_record()) { $temp = new classLessonObj(); $temp->_dsn = $dsn; $temp->__loaded = true; ! $temp->id_class_lessons = $db->Record['id_class_lessons']; ! $temp->checkList = $db->Record['checkList']; ! $temp->createdOn = $db->Record['createdOn']; ! $temp->title = $db->Record['title']; ! $temp->description = $db->Record['description']; } if ( !$temp ) { trigger_error('empty persistant object'); } --- 17,29 ---- if ($prop=='') { $prop=$this->_pkey; } $db->query("select checkList,id_class_lessons,createdOn,title,description from class_lessons where $prop='$pkey' $where $orderBy"); ! if($db->nextRecord()) { $temp = new classLessonObj(); $temp->_dsn = $dsn; $temp->__loaded = true; ! $temp->id_class_lessons = $db->record['id_class_lessons']; ! $temp->checkList = $db->record['checkList']; ! $temp->createdOn = $db->record['createdOn']; ! $temp->title = $db->record['title']; ! $temp->description = $db->record['description']; } if ( !$temp ) { trigger_error('empty persistant object'); } *************** *** 38,50 **** if ($where) { $where = " and $where"; } $db->query("select checkList,id_class_lessons,createdOn,title,description from class_lessons where $prop='$key' $where $orderBy"); ! while ($db->next_record()) { $temp = new classLessonObj(); $temp->_dsn = $dsn; $temp->__loaded = true; ! $temp->id_class_lessons = $db->Record['id_class_lessons']; ! $temp->createdOn = $db->Record['createdOn']; ! $temp->checkList = $db->Record['checkList']; ! $temp->title = $db->Record['title']; ! $temp->description = $db->Record['description']; $objects[] = $temp; } --- 38,50 ---- if ($where) { $where = " and $where"; } $db->query("select checkList,id_class_lessons,createdOn,title,description from class_lessons where $prop='$key' $where $orderBy"); ! while ($db->nextRecord()) { $temp = new cla... [truncated message content] |
From: Mark K <har...@us...> - 2007-10-08 14:33:22
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/lib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv25374 Modified Files: lc_lob.php Log Message: Lob type is really 'interaction', sub-type is 'activity'. Index: lc_lob.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/lc_lob.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** lc_lob.php 5 Oct 2007 22:37:38 -0000 1.29 --- lc_lob.php 8 Oct 2007 14:33:19 -0000 1.30 *************** *** 289,292 **** --- 289,293 ---- case 'activity': + case 'interaction': $results = $repo->getLobActivitysByLobRepoEntryId(); if (! count($results) ) { |