Вы находитесь на странице: 1из 393

Kuote: An Online E-learning Framework

Kyle Hall
ii

Table of Contents
TABLE OF FIGURES ..................................................................................................................................V

1 INTRODUCTION ...................................................................................................................................... 1

1.1 What Kuote Is .................................................................................................................................... 1


1.2 What Kuote Is Not ............................................................................................................................. 1
1.3 Leveraging Course Knowledge ......................................................................................................... 1
2 REVIEW OF EXISTING E-LEARNING SYSTEMS ............................................................................................ 1
2.1 Feature Comparison Matrix.............................................................................................................. 2
2.2 Moodle............................................................................................................................................... 3
2.3 Blackboard Academic Suite............................................................................................................... 3
2.4 Claroline............................................................................................................................................ 4
2.5 ATutor................................................................................................................................................ 5
2.5 Desire2Learn..................................................................................................................................... 5
2.6 Kuote ................................................................................................................................................. 6
3 SYSTEM REQUIREMENTS & DESIGN .......................................................................................................... 7
3.1 Purpose / Scope................................................................................................................................. 7
3.2 Gathering Requirements.................................................................................................................... 7
3.3 Functional Requirements................................................................................................................... 9
3.4 Database Design Requirements......................................................................................................... 9
3.5 Benefit / Value ................................................................................................................................. 10
3.6 Assumptions, Dependencies, and Constraints ................................................................................. 10
3.7 Security Risk Assessment................................................................................................................. 11
3.8 Server-Side Hardware Requirements .............................................................................................. 11
3.9 Server-Side Software Requirements ................................................................................................ 12
3.10 Client (User) Interface Requirements............................................................................................ 12
3.11 Data Communications Requirements ............................................................................................ 12
3.12 Availability / Reliability Requirements.......................................................................................... 12
3.13 Performance Requirements ........................................................................................................... 13
3.14 Security Requirements ................................................................................................................... 13
3.15 System Administration Requirements ............................................................................................ 13
3.16 User Requirements ........................................................................................................................ 13
4 BUILDING KUOTE .................................................................................................................................... 14
4.1 Building the Database Schema........................................................................................................ 14
4.2 System Architecture......................................................................................................................... 14
5 SOFTWARE TESTING ................................................................................................................................ 17
iii

5.1 Gray Box Testing............................................................................................................................. 17


5.2 Volume Testing ................................................................................................................................ 18
5.3 Acceptance Testing.......................................................................................................................... 18
5.4 Documentation ................................................................................................................................ 19
6 CONCLUSIONS ......................................................................................................................................... 20
6.1 Requirements and testing ................................................................................................................ 20
7 AUTHOR’S COMMENTS ............................................................................................................................ 20
7.1 Version Control ............................................................................................................................... 20
7.2 Object Oriented Programming........................................................................................................ 21
7.3 Patterns ........................................................................................................................................... 21
7.4 Templating....................................................................................................................................... 22
7.5 Don’t Be Clever............................................................................................................................... 22
7.6 Document, Document, Document.................................................................................................... 23
7.7 Write for Future Flexibility ............................................................................................................. 23
7.8 Don’t Reinvent the Wheel................................................................................................................ 24
7.9 Future Directions ............................................................................................................................ 25
7.10 Final Thoughts .............................................................................................................................. 25

WORKS CITED .......................................................................................................................................... 26

ANNOTATED BIBLIOGRAPHY ............................................................................................................. 28

APPENDIX A: KUOTE INSTALLATION .............................................................................................. 33

APPENDIX B: A KUOTE TUTORIAL.................................................................................................... 35

KUOTE FROM USER’S PERSPECTIVE ........................................................................................................... 35


MOVING THROUGH KUOTE: AN INSTRUCTOR’S POINT OF VIEW ................................................................ 35
Logging in to Kuote............................................................................................................................... 35
Creating A Course................................................................................................................................. 36
Creating a Learning .............................................................................................................................. 36
Adding Questions to a Learning............................................................................................................ 37
Taking a Test Drive ............................................................................................................................... 38
Offering a Course.................................................................................................................................. 39
Offering A Learning .............................................................................................................................. 39
SWITCHING GEARS: KUOTE FROM A STUDENT’S PERSPECTIVE ................................................................. 40
Enrolling in a Course Offering.............................................................................................................. 40
Taking a Learning ................................................................................................................................. 41
Checking Grades ................................................................................................................................... 43
THE INSTRUCTORS INTERFACE: REVISITED ................................................................................................ 43
iv

Viewing Grades ..................................................................................................................................... 43

APPENDIX C: DATA FLOW DIAGRAM............................................................................................... 45

APPENDIX D: ERD DATA FLOW .......................................................................................................... 52

APPENDIX E: DATA FLOW DIAGRAM - DATATYPES.................................................................. 107

APPENDIX F: KUOTE SOURCE CODE .............................................................................................. 183


v

Table of Figures
Figure 1 - Kuote ERD.................................................................................................................................................. 10
Figure 2 - Diagram of the Model-View-Controller Pattern ......................................................................................... 15
Figure 3 - Kuote Login Page ....................................................................................................................................... 36
Figure 4 - Create Course.............................................................................................................................................. 36
Figure 5 - Create Learning........................................................................................................................................... 37
Figure 6 - Create New Question .................................................................................................................................. 38
Figure 7 - Create New Question, 2nd Question........................................................................................................... 38
Figure 8 - Offering a Course for Enrollment ............................................................................................................... 39
Figure 9 - Creating a new Learning Offering, Selecting A Course ............................................................................. 40
Figure 10 - Creating a Learning Offering, Selecting a Learning to Offer ................................................................... 40
Figure 11 - Enrolling in a Course Offering.................................................................................................................. 41
Figure 12 - Choosing a Learning to take. .................................................................................................................... 41
Figure 13 - Taking a Learning, Tutorial & Quiz Links ............................................................................................... 42
Figure 14 - Taking a Learning's Quiz .......................................................................................................................... 42
Figure 15 - Taking a Quiz, End of Quiz Results.......................................................................................................... 43
Figure 16 - Viewing Grades ........................................................................................................................................ 43
Figure 17 - Viewing Grades ........................................................................................................................................ 44
Figure 18 - Viewing Grades, Continued ...................................................................................................................... 44
Figure 19 – Context Diagram ...................................................................................................................................... 45
Figure 20 - Diagram 0 ................................................................................................................................................. 45
Figure 21 - Diagram 1 ................................................................................................................................................. 46
Figure 22 - Diagram 2 ................................................................................................................................................. 46
Figure 23 - Diagram 2.1 .............................................................................................................................................. 46
Figure 24 - Diagram 2.2 .............................................................................................................................................. 47
Figure 25 - Diagram 2.3 .............................................................................................................................................. 47
Figure 26 - Diagram 3 ................................................................................................................................................. 48
Figure 27 - Diagram 3.1 .............................................................................................................................................. 48
Figure 28 - Diagram 3.2 .............................................................................................................................................. 49
Figure 29 - Diagram 3.3 .............................................................................................................................................. 49
Figure 30 - Diagram 3.4 .............................................................................................................................................. 50
Figure 31 - Diagram 3.5 .............................................................................................................................................. 50
Figure 32 - Diagram 4 ................................................................................................................................................. 51
Figure 33 - Diagram 6 ................................................................................................................................................. 51
1

1 Introduction

1.1 What Kuote Is


Kuote is intended to be a simple to use, online E-learning system. E-learning is considered to be the delivery
of educational programs by electronic means. E-learning involves the use of a computer or electronic device to provide
these materials. Kuote is an acronym for Kuote Universal Online Tutorial/Testing Environment.
This project is based upon the concept of designing and coding an online tutorial and testing system that
education professionals could use to create short tutorials with an online interactive test at the end of the tutorial. The
pre-quiz tutorial could also simply be taught in class and the quiz for it is made available online. The system is
primarily designed as a useful alternative to traditional homework that would provide detailed statistics to the class’s
instructor, allowing the instructor to improve the quality of the class through quick and detailed feedback via student
quiz scores.

1.2 What Kuote Is Not


Kuote is not meant to replace large scale E-learning systems such as Blackboard or e-College. Kuote is meant
to be a simple to use tool to perform a few specific actions. These actions are to allow instructors to upload or link to
tutorials and to allow instructors to create multiple-choice quizzes with two to five choices per question.

1.3 Leveraging Course Knowledge


This project will necessitate the use of a large volume of knowledge that I have acquired from IT classes,
including the use of Network Technology, Database Management, Project Management, Information System Analysis
& Design, Web Systems & Interface Design, Internet Technology, and Electronic Security.

2 Review of Existing E-learning Systems


There are many E-learning systems available for use in academic environments. This review will cover five of
them, including both commercial and Open Source solutions. The systems that will be covered are:
• Moodle
• Blackboard Learning System
• Claroline
• ATutor
• Desire2Learn
Each system will be compared based on a set of common E-learning system features including discussion
forums, real-time chat, group work and more.
All text under the Features subheadings for each E-Learning system is reproduced from EduTools and is
2

available under a Creative Commons license 1(EduTools: CMS: Product List).

2.1 Feature Comparison Matrix


Moodle Blackboard Claroline Atutor Desire2Learn
Discussion Forum Yes Yes Yes Yes Yes
File Exchange Yes Yes Yes Yes Yes
Internal Email Yes Yes No Yes Yes
Journal / Notes Yes No No No Yes
Real-time Chat Yes Yes Yes Yes Yes
Whiteboard Yes ( Plug-in ) Yes No Yes Yes
Bookmarks No Yes No No Yes
Calendar/Progress Yes Yes Yes No Yes
Review
RSS Feeds Yes No No No No
Work Offline No Yes No No Yes
Orientation / Help Yes Yes No Yes Yes
Community Chat Yes Yes No Yes Yes
Community Yes Yes No Yes Yes
Forum
Student Portfolios Yes Yes No No Yes
Automated Yes Yes Yes Yes Yes
Testing
Management
Group work Yes Yes No Yes Yes
Totals 14 Yes’s 13 Yes’s 4 Yes’s 10 Yes’s 15 Yes’s
Table 1 - Feature Comparison Matrix
As one can gather from the summary presented in Table 1, the E-learning systems reviewed are by and large
equivalent in features. Moodle supports fourteen of the sixteen feature areas examined. Blackboard has thirteen of the
features, Claroline has ten. Desire2Learn leads the number of features with fifteen of the possible sixteen features
examined. ATutor comes in last with only four out of the sixteen features examined.
If Kuote were to be examined, it would score with one feature out of sixteen possible features, the lone feature
being Automated Testing Management. This may seem a major flaw, but since the goal of Kuote is simplicity, this is
not necessarily the case.

1
http://creativecommons.org/licenses/by-nc/1.0/ 04 Dec. 2007
3

Kuote is simple; compared to the E-learning systems above, Kuote is very simple. While systems such as
Blackboard have many overarching features, such as discussion forums and online chat, Kuote has one: Automated
Testing Management. It would not be vary meaningful to compare Kuote to any of these E-Learning systems as a
whole, but one could certainly compare Kuote to the automated testing management portion of each system, as that is
the essential function of Kuote.

2.2 Moodle

Overview
Moodle is a free, Open Source course management system (CMS). The authors claim it is “based on sound
pedagogical principles, to help educators create effective online learning communities” (Moodle).
According to Thomas Robb “Moodle is the brainchild of Martin Dougiamas, who designed the program while
working on his Ph.D. at Curtin University of Technology, Perth, Australia, He developed it as a tool for his dissertation
which was on a Socio-constructivist approach to learning” (Robb). As such, Moodle was originally written with
features geared toward this educational approach (Robb).

Features
Testing Features
• The system can randomize the questions and answers.
• Instructors can set a time limit on a test.
• Instructors can permit multiple attempts.
• Instructors can specify whether correct results are shown as feedback

Question Types
• Multiple choice
• Multiple answer
• Matching
• Fill-in the blank
• Short answer
• Essay

2.3 Blackboard Academic Suite

Overview
The Blackboard Academic Suite is an E-learning suite used at many academic colleges.
4

Features
Testing Features
• The system can randomize the questions and answers.
• Instructors can set a time limit on a test.
• Instructors can permit multiple attempts.
• The students are allowed to review past attempts of a quiz.
• The system supports a MathML editor for the inclusion of mathematical formulas in both questions
and answers.
• Instructors can specify whether correct results are shown as feedback

Question Types
• Multiple choice
• Multiple answer
• Matching
• Ordering
• Jumbled sentence
• Calculated
• Fill-in the blank
• Short answer
• Survey questions
• Essay

2.4 Claroline

Overview
According to the application’s website, “Claroline is an Open Source E-learning and eWorking platform
allowing teachers to build online courses and to manage learning and collaborative activities on the web”
(Claroline.net). Started in 2001 by Thomas De Praetere at the Catholic University of Louvain in Belgium, Claroline
has been developed following teacher’s pedagogical experience and needs (Credits).

Features
Testing Features
• The system can randomize the questions and answers.
• Instructors can set a time limit on a test.
• Instructors can permit multiple attempts.
• The students are allowed to review past attempts of a quiz.
5

• Instructors can specify whether correct results are shown as feedback

Question Types
• Multiple choice
• Multiple answer
• Matching
• Fill-in the blank

2.5 ATutor

Overview
“ATutor is an Open Source Web-based Learning Content Management System (LCMS) designed with
accessibility and adaptability in mind” states atutor.ca, the official site for the system (ATutor).

Features
Testing Features
• The system can randomize the questions and answers.
• Instructors can permit multiple attempts.
• The students are allowed to review past attempts of a quiz.
• Instructors can specify whether correct results are shown as feedback

Question Types
• Multiple choice
• Multiple answer
• Matching
• Ordering
• Fill-in the blank
• Short answer
• Survey questions
• Essay

2.5 Desire2Learn

Overview
Desire2Learn is a complete web-based suite of teaching and learning tools for course development, delivery,
and management. Desire2Learn provides tools to help facilitate communication, collaboration and community
6

building. (eLearning Enterprise Suite)

Features
Testing Features
• The system can randomize the questions and answers.
• Instructors can set a time limit on a test.
• Instructors can permit multiple attempts.
• The students are allowed to review past attempts of a quiz.
• The system supports a MathML editor for the inclusion of mathematical formulas in both questions
and answers.
• Instructors can specify whether correct results are shown as feedback

Question Types
• Multiple choice
• Multiple answer
• Matching
• Ordering
• Calculated
• Fill-in the blank
• Short answer
• Survey questions
• Essay
• Custom question types can be defined.

2.6 Kuote

Features
Testing Features
• The system can randomize the questions.
• The system can randomize the questions within levels of difficulty.
• Instructors can set a time limit on a test.
• Instructors can permit multiple attempts.
• Instructors can specify whether correct results are shown as feedback

Question Types
• Multiple choice
7

As one can gather from the data above, Kuote compares fairly well against the automated testing system
features for other E-Learning systems. Kuote even supports a feature that no other E-Learning system reviewed offers,
the ability to display questions randomly within each level of difficulty.
As for question types, Kuote could be considered to have come in last. While all the reviewed systems support
multiple question types, Kuote supports only multiple choice questions.

3 System Requirements & Design

3.1 Purpose / Scope


The purpose of this project was to design and write an E-Learning system with the goals of simplicity and
usability. The system allows instructors to create online tutorials and quizzes, and to receive automated feedback in the
form of student quiz scores.
The primary goal of Kuote is usability. Every step involved from creating tutorials to viewing grades should
be as intuitive and obvious as possible. The first release candidate of Kuote includes the ability to create and upload
tutorials as HTML files, the ability to create courses, tutorials, and quizzes, and the ability to view grades of quizzes
taken.

3.2 Gathering Requirements


To gather requirements for this project, the author created a survey for the faculty of Edinboro University of
Pennsylvania to submit on a voluntary basis. The survey read as follows:

Hello,
I am a EUP graduate student nearing completion of my Masters in Information
Technology and would be very grateful if you would take my survey of 9 short questions.
For my master’s project, I would like to create a web-based program to use in the
creation and administration of online tutorials and quizzes. I have entitled this system the
Kuote Universal Online Testing Environment.
For example, instead of lecturing about proper safety procedures during each section of a
chemistry class each semester, an instructor could create a short tutorial on goggle safety
(perhaps in PowerPoint) and a set of multiple choice questions. He or she could then
upload the tutorial to Kuote, and add the questions to the post tutorial quiz. The instructor
could then simply require students to go online and complete the tutorial about handling
chemicals safely, and take the multiple-choice quiz afterward to ensure that they had
8

actually read and understood it. The instructor views the grades online of all his or her
students to ensure that everyone understood the content. If there were questions that a
large number of students answered incorrectly, that might be a good indicator of a topic
that should be reiterated in the classroom. This is only one example, I’m sure you can
imagine many other uses for such a system. I have created a basic mockup and
walkthrough that you can view here.
I hope by designing this program that I can improve the usage of “in-class” time for the
most important aspects of a class, and leave more of the work to the students, outside of
class time. These tutorials could even be a good alternative to standard homework or
supplement to standard homework, depending upon the type of class being taught.
I am looking for input from faculty across campus to make this a valuable and easy to use
service, so that anyone would have the ability to easily create these tutorials and quizzes.
Following the preamble was a list of questions. The questions were as follows:
If such a system were available, would you use it?
If you answered yes, in what classes would this be most useful?
If you answered no, why?
How would you use this system? (For example, as a classroom supplement, or a
homework supplement, etc.)
What kind of features would you like to see in this system?
Have you taken advantage of other online teaching aids that the University of another
Entity offers?
Have you ever used a tutorial/quiz E-learning system before?
If you have, would you provide any comments and/or feedback on the programs you have
used.
Would you like to see Kuote integrated with BlackBoard, if possible?
Would you be interested in taking a more active role in the development of this system (i.e.
trying out preliminary versions and giving feedback, etc.)?
Unfortunately, no responses were received as a result of the survey. As a result, the author defined the system
requirements. Though not an experienced instructor at a university, the author has had experience as both a student and
an instructor at a post-secondary level. Peter Honey suggests that people “stop behaving as if e-learning is ‘The
9

Answer’, a panacea.” and to “Work out the distinctive competence of the e-learning approach… and how best to
complement other forms of learning” (Honey). The design of Kuote was based on the idea of E-Learning as a
complement to other forms of learning, primarily the traditional classroom setting.

3.3 Functional Requirements


As stated previously Kuote is meant to be a simple and easy to use web-based E-learning system. Its primary
function is to allow instructors to create online tutorials and quizzes.
As such, instructors should be able to create courses, modules that are part of a course, questions that are part
of a module, and tutorials that are part of a module. Each of these items should also be updatable and revisable. An
instructor should be able to offer each course and module multiple times at different intervals, for different groups of
students.
Instructors should be able to view the results of quizzes taken by student, course offering, or module offering.
Instructors should be able to test the quiz for a given module, to verify that each question’s “correct” answer
is truly the correct answer.
Students should be able to enroll in an offered course. For each module of each course the student has
enrolled in, the student should be able to view the tutorial for the module if the instructor has provided one, and take the
quiz for the module, again, if the instructor has created one.

3.4 Database Design Requirements


No matter what system is used for storing data in Kuote, there are some minimal requirements that must be
met. There must be a list of system users. These users are further broken down into two types, instructors, and students.
Both types have some common elements such as login names and passwords, but they also may have data that is
specific to each. Instructors, for instance, have an office, described by a building name and a room number.
Each instructor creates a number of courses. Each course contains a set of modules, and each module has a
tutorial and a set of questions to accompany it.
Each course can have a number of course offerings, and each module can itself be offered under a given
course offering.
On the student’s side, each student has an enrollment in a course offering. The student then takes an offered
module, and answers the questions for the taken module.

3.4.1 Entity Relationship Diagram


An entity relationship diagram is a way to visually model a database design. Figure 1 is an ERD based on the
description given above.
10

Figure 1 - Kuote ERD

3.5 Benefit / Value


Kuote is meant to benefit instructors by providing an easy to use tool that can provide very quick feedback
from students. An instructor could provide a tutorial and quiz on a subject taught in class, or required reading from a
book. The students would then take the quiz and the instructor would be able to quickly ascertain what areas of the
subject are eluding the class as a whole, and add more focus to that area.
Students would benefit in the same way. A student could take a quiz, and see instantly what questions he or
she answered incorrectly (if allowed to do so by the instructor) and study those subjects more thoroughly.

3.6 Assumptions, Dependencies, and Constraints


The Kuote system is written in PHP, “a reflective programming language originally designed for producing
dynamic web pages.” (PHP: Introduction). The project will specifically use the version 5 series of PHP, to leverage its
object-oriented features which are lacking in previous versions.
As such, the system depends upon the availability of a web server with the PHP5 interpreter installed. Kuote
will also utilize a number of classes available through PEAR, the PHP Extension and Application Repository. All
PEAR code is Free Open Source Software, and freely available. A number of PEAR libraries will be required to run
Kuote. PEAR is now integrated with PHP and libraries can be downloaded and installed automatically using programs
that come with each PHP installation.
The backend data store for the Kuote system will target MySQL. MySQL is a multithreaded, multi-user SQL
database management system which has, according to MySQL AB, more than 11 million installations. (Why MySQL?)
11

MySQL is also Free Open Source Software.

3.7 Security Risk Assessment

3.7.1 Electronic Attacks


Usernames and passwords, as well as personal grades will be passed between the user and the system. The
database will also store all grades, and contain a list of usernames, and hashed passwords. All data will be transmitted
using HTTPS for encryption, ensuring data privacy.
It will also be recommended that Kuote and the database it accesses both be on the same system, and that the
database only allow local host access. By doing so, access to the database is further limited to only users with access to
the server itself. To attack the database, now one must first attack the host system, with the exception of SQL injection
attacks.
SQL (Structured Query Language), is a language designed to manage and retrieve the data in a relational
database management system. SQL injection attacks are a method of exploiting security vulnerabilities in a program’s
database layer. Such vulnerability is possible when a user’s input is improperly filtered or executed without warning.
Kuote will use the PEAR class DB_DataObject for all its database access. The class has built in functionality
for properly filtering user input, so the risks of SQL injection attacks against Kuote are low.

3.7.2 Social Engineering


The larger security risk of Kuote is that of social engineering. If a student has the opportunity to take a module
at any time he or she chooses, there is little to stop the student from using a book or sheet of answers while taking a quiz.
A student could even log in and then allow another student to take a quiz in his or her stead. These problems can be
mitigated by requiring the students to take all modules in a computer lab during class time, but such precautions cannot
be taken if Kuote is used as an out-of-class tool.
In the end, Kuote is not meant to be used for rigorous test taking, and more for learning and feedback. Viewed
in the context of modules as homework, it has the same risks of cheating as traditional homework, but without the
burden of hand-grading.

3.8 Server-Side Hardware Requirements


Development hardware will require a computer with an operating system capable of running the Apache web
server with PHP5 and the MySQL DBMS. An IDE (Integrated Development Environment) may be useful for
developing the application, but a simple text editor is all that is necessary.
Rollout hardware requirements will vary greatly depending upon the size of the organization planning to use
Kuote. Volume testing the system would be necessary before any major use, but the requirements should be no more
than for any large program written in PHP. System requirements will depend on the number of simultaneous users
expected for a given installation.
12

It should be noted that the system has been tested on a web server with a 300 megahertz Intel Pentium II
processor, and 64 megabytes of RAM. This server was running Ubuntu Linux Server Edition 6.10 as its operating
system. Testing the server’s response time revealed that common response times were between .524 and .639 seconds
for a single user (Test Tools).

3.9 Server-Side Software Requirements


Software requirements are a web server that supports HTTPS and PHP5. In addition to PHP5, access to the
PEAR PHP libraries will be requisite. In particular, the Database, XML and HTML classes and subclasses will be
needed. A DBMS is also required; MySQL will be the target DBMS, but many other DBMSs would be supportable
through a database abstraction layer. A text editor is the minimum requirement for software development, but a
PHP-aware IDE such as Eclipse, or Dreamweaver could speed up development significantly.

3.10 Client (User) Interface Requirements


The client-side software requirements necessitate a modern web browser capable of processing JavaScript
and Cascading Style sheets. A minimum monitor resolution of 800x600 is recommended.

3.11 Data Communications Requirements


All communication between the system and instructors and students will be through standard Hypertext
Transport Protocol using Secure Socket Layers (HTTPS). All communication from the system to the database will be
through the PEAR DB_DataObject class.

3.12 Availability / Reliability Requirements


The availability of Kuote will depend almost exclusively on the availability and power of the web server and
the database server. An acceptable load delay will be 10 seconds or fewer for all functions except taking quizzes (Load
Time Analyzer). Delays of 5 seconds or fewer will be the maximum acceptable with quiz taking, due to the quiz’s
highly interactive nature.
Server downtime should not be necessary for Kuote maintenance; however downtime may be necessary for
operating system maintenance, typically a system reboot after an update of certain system files. Data should be backed
up at a minimum of once nightly, including the database, and the Kuote learning’s directory containing all the
instructors’ uploaded modules. Duration of data storage should be the same duration as grades held by the school
utilizing the system. In reality, data retention length can be the same duration as the existence of the system,
considering the large size, and relative inexpensiveness of current storage. Geographical availability of the system will
be an administrative choice. The system could be limited to a single local area network, an intranet, of the entire
Internet. The latter option would allow students to complete modules from home or other disparate locations.
13

3.13 Performance Requirements


The system should support at a minimum, 300 simultaneous users at the availably levels referred to above.
This is an estimated 10 classes of 30 students using the system in class at a given time. The system should be able to
support an unlimited number of files, that is, real world limits should be imposed by the operating system, not Kuote.
The system should be able to support an unlimited amount of records; once again, the true limit should be
imposed by the database management system, not the Kuote program.

3.14 Security Requirements


The system will require a login and password for all instructors and students. There will be no option for using
the system without an account. A guest account may be set up at the administrators’ option.
Communications between the system and the end-user will be secured using Secure Socket Layers over
HTTP. Communications between the system and the database will be unsecured by default.
The DBMS will be password protected, and the password and login stored in a Kuote system file. This file
should be placed in an area of the file system that is not publicly accessible.
Logging of activity and failures will be done using the internal logging facilities of the DBMS and web server
chosen to run the system. All system failures will produce a request to contact the administrator, and display an error
message that will be unique for each error.

3.15 System Administration Requirements


System administration will require a person familiar with PHP5, the MySQL DBMS and the Apache web
server.

3.16 User Requirements

3.16.1 Instructor Requirements


Instructors will need to have proficiency in using a web browser. They will also need to be able to manage
files and upload them through a web interface.
To create tutorials, instructors will need to be able to create files and save them as HTML files. This can be
accomplished using Microsoft Word, OpenOffice.Org Writer, AbiWord, and nearly any other word processor
available.
Though it is not a requirement, instructors can use HTML when creating quizzes to emphasize words, add
images, create tables and other features available through HTML.

3.16.2 Student Requirements


Students will need to have proficiency in using a web browser to navigate the application, to view tutorials,
14

and to participate in quizzes.

4 Building Kuote

4.1 Building the Database Schema


Because the data store for Kuote had already been modeled as an ERD, the first step to building Kuote
involved setting up the database schema. MySQL was chosen as the database of choice. In addition to the fact that
MySQL is also Free Open Source Software, MySQL was chosen for its scalability, flexibility, reliability, and
performance (Choose MySQL). PhpMyAdmin was used extensively in the design of the Kuote database and for testing
purposes.

4.2 System Architecture

4.2.1 Model-View-Controller Architecture


Kuote was designed using the Model-View-Controller pattern, often shortened to the term MVC. MVC is a
programming pattern commonly used in software engineering. Programmers often separate the data (the model) from
the user interface (the view). Separation in this way allows changes in the user interface without affecting how the
system’s data is handled. The data can be altered and reorganized without changing the user interface, and the interface
can be altered without affecting the data. The model-view-controller solves the problem of decoupling data access and
program logic from presentation by introducing an intermediate component called the controller.
Figure 2 is a visual representation of the Model-View-Controller paradigm that depicts visually the flow of
information between the three entities.
15

Figure 2 - Diagram of the Model-View-Controller Pattern2

4.2.2 The Kuote Data Model


In Kuote, the model part of the MVC trinity is represented by a set of classes collectively known as
KuoteObjects. Each of these objects represents a row in a table that is part of the database, such as
KuoteObjects_Course, which represents a course that an instructor has created. Each of the classes is a wrapper around
a corresponding class created using the PHP PEAR class DB_DataObject. All database access within Kuote is through
these DataObjects. In this way, the KuoteObjects are loosely coupled with the database itself.
In addition to the KuoteObjects classes that represent individual rows of a table in the Kuote database, there

2
http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/images/app-archa2.gif
16

are a number of classes that represent groups of rows in a table. These classes have the same name as the singular
object they represent, but appended with the word set. For example, the KuoteObjects_QuestionSet class represents a
collection of questions in the database.

4.2.3 The Kuote View System


The abstract views of a web-based system can be concretely represented by a web template system. A web
template system consists of a template engine, template resources, and the template files written in conformance with
the template language, along with other necessary resources such as images, Cascading Style Sheets (CSS), and
JavaScript libraries. The template and content resources are processed and combined by the template engine to produce
complete HTML files.
A template engine is often written in the same language as the program that is to use it. However, the language
the templates themselves are written in is often of a different form, forcing the developer to learn two separate syntaxes.
The template engine used for Kuote is much simpler. Because Kuote is written in PHP, the templates themselves are
also written in PHP. Because PHP was originally designed for processing and creating web sites, it is well suited for
this job.
All PHP program code, whether for web page output or not, is surrounded by the tags ’<? ’ and ’? >’. The
beginning tag is commonly appended with ’php’, as in ’<?php’, but this is not always required. Because of this, PHP
code may be interspersed within HTML.
For example, a template to generate a page with a table containing a list of friends and their phone numbers
may look something like this:
<head>
<title><?=$pageTitle?></title>
</head>
<body>
<table>
<tr><th>Name</th></th>Phone #</th></tr>
<?php foreach ( $friendsList as $friend ): ? >
<tr><td><?=$friend[’name’]? ></td><td><?=$friend[’phoneNumber’]? ></td></tr>
<?php endforeach; ? >
</table>
</body>

Within Kuote, all template files are stored within the ’templates’ directory. Kuote supports the ability to
choose between different sets of templates by placing them within their own subdirectory within the templates
directory. Kuote reads an initialization file each time it is run, this initialization file contains a directive telling the
system which template set to use.
The Kuote template files can easily be customized for an institution. The process can be as simple as
replacing the Kuote logo with a school logo, and changing the color scheme or as complex as replacing the entire user
interface with a new one, and translating it into another language. This process meant to be performed by an
institution’s Information Technology staff, as modifying the templates requires knowledge of PHP, CSS, and HTML.
17

This is a system-wide choice. Individual instructors are not meant to have such control over the look and feel of the
system.
All text and link colors are controlled by a single Cascading Style Sheet, so altering text colors is trivial. Even
the images are multiple layer PNG files, so the background colors of the various tabs can be altered without creating
new images from scratch. In the current template set, each template includes at the top a universal header, and then a
sub-header for the instructor interface and the student interface, respectively.
Because all the display logic is separate from the processing logic, it is also quite simple to translate the
templates into another language, or to radically alter the user interface. Kuote is only interested in the specific name of
the template’s body, such as instructor.create.course.template.php. The template file is left to its on decisions as to
what to include within itself.

4.2.4 The Kuote Controller


The controller is the program code that binds together the data model and the view model. In the Kuote system,
the controller is represented by the Engine files. In a standard MVC architecture, all system control begins at a single
file known as the Front Controller. In Kuote, the front controller is kuote.php. From this file, control is passed to the
appropriate engine file within the ’engine’ directory. All engine files follow a standard naming convention. For
example, the engine file whose function is to handle the creation of new courses is
named ’engine.instructor.create.course.php’.
Each controller may use one or more views. To continue with the example of creating a course, the engine
file will first call the view to display a form to receive the information about the new course. Next, the engine will call
process the received data, then call a view to display the results of the course creation.

5 Software Testing

5.1 Gray Box Testing


Gray box testing is a form of testing that has become a standard practice only in the relatively recent history of
computer programming. The phrase ‘gray box testing’ has its roots in the more common terms ‘black box testing’, and
‘white box testing’, both of which have been in common use for a much longer time. When testing using the black box
model, the tester does not know what the program code does. The tester simply has a set of inputs with the correct
corresponding outputs. The tester feeds the program each of the given inputs, and expects the same prepared output. If
the output is not the same, it can be assumed that the code is incorrect. If the outputs are identical to the prepared
outputs, it does not necessarily mean the code is correct, but given very large amounts of correct input and output, one
can be reasonably assured that program code is most likely correct.
White box testing, on the other hand, has the tester checking the code for correctness at each step of the
solution. The tester follows the input as it moves through the code, checking for correctness at each action the program
takes.
18

Grey box testing is used almost exclusively for testing systems with a client-server relationship (Görlitz). It
can also be used to test the known internal workings of the software, that is, tests can be written with specific results in
mind. For example, testing Kuote would involve loading the database with information in order to verify the
correctness of the data within the data store.
Gray box testing has been used to verify that Kuote stores data in a correct manner. As a system with a client
server relationship (the client being a web browser, and the server being the Kuote system) gray box testing proven to
be more useful that black or white box testing.

5.2 Volume Testing


Volume testing is about realistically pushing an application in order to measure the application performance
provided to users at different levels of usage. Performing a volume test on Kuote would be very good idea, but is
closely tied to the hardware a production system runs on. A volume test could be as simple as gathering a room of
twenty or thirty people together so that they can all attempt to use the system simultaneously, or as complex as writing
a program to emulate a student using the system, and running any number of program instances to test the real-world
abilities of the hardware and software combination. Any organization electing to use Kuote in a production
environment would need to perform a volume test with the hardware on which they elected to run to Kuote system to
determine how many simultaneous users it could support.

5.3 Acceptance Testing


Acceptance testing, also know as usability, confidence, or validation testing, is conducted by the end-user to
decide if the product is acceptable or not (Mochal). To perform an acceptance test is by asking a group of users to sit
down and actually use the software without help. This is an excellent way to expose not only bugs in the program code,
but also flaws in the user interface design. This type of testing can confirm not only what parts of the system perform
poorly, but also what parts perform well.
One issue with this type of test is that a person’s personal taste, opinions, and experience will affect his or her
verdict on nearly every aspect of the system. One person may find the system perfectly acceptable, while another may
have many issues with it. The more people who participate, the better one can spot universal problems with the system,
and separate them from problems that occur for only a given subset of users. In this way, the system can be improved
for everyone, and problems for different subgroups can be addressed independently.
A volunteer was found to test Kuote for ease of use and features. Mary Lee is a professional librarian who
works at the Meadville Public Library in Meadville, Pennsylvania. Though familiar with computers and able to use
web browsers and word processors, she has had no specialized training using them. To test Kuote, Mary Lee was given
only a copy of the Kuote walkthrough tutorial (Appendix C) as well as student and instructor logins for the
demonstration server. After using the system, she provided the author with notes and spoke about her experience.
Mary Lee was very positive and stated that the system worked well and was generally quite easy to use. She
did, however, have a number of issues focused on the uploading of tutorials. First, Mary Lee attempted to copy and
paste HTML code from another site into the “Tutorial File” field in the Create Learning section of Kuote. When this
19

failed to create the tutorial she saved the example web page as an HTML file on her PC, and uploaded it correctly be
using the ‘Browse’ button to select her file to upload. Though this worked correctly, she did not realize that the images
in the web page are not embedded in the HTML and thus did not show up in her uploaded tutorial. In addition, Mary
Lee did not realize the “Closing Door” icon was used to log out of the system.
The comments Mary Lee provided suggest that Kuote would greatly benefit from a built-in WYSIWYG3
HTML editor. Also, it may be prudent to replace or supplement the logout icon with text as well.

5.4 Documentation

5.4.1 Developer Documentation


Developer documentation is very important, especially when developing Open Source applications. In the
Open Source community, documentation is often terse, poorly written, and sometimes incorrect. Developer
documentation is very important for an Open Source program, as many loosely associated programmers may end up
working on the system (Levesque). Documentation for Kuote is part of the source code itself. Kuote uses
phpDocumentor4. PhpDocumentor is the current de facto (and only) auto-documentation tool for the PHP language.
Similar in syntax to JavaDoc, phpDocumentor can be used to generate documentation from php source code.

5.4.2 End User Documentation


The other side to documentation is the end user side. There is little point to writing an application if nobody
understands how to use it. To address this, a walkthrough tutorial has been created to guide both instructors and
students through the process of using the Kuote system. This tutorial has been included as an appendix.
In addition, Kuote includes built-in help files to provide a quick rundown or the contents of each page.

3
What You See Is What You Get
4
http://www.phpdoc.org/
20

6 Conclusions

6.1 Requirements and testing


In the end, the success of a project is defined by the meeting of the project requirements and the passing of the
project’s tests. The Kuote system conforms to the requirements described in the section Functional Requirements. On
the data store side, a MySQL database for the system was created based on the Database Requirements section.
On the other side of this coin is testing. Though a series of tests were conceived, none were actually
implemented do to lack of willing participants. Success of these tests would be necessary before Kuote could be
implemented in any production environments.

7 Author’s Comments
I believe that creating Kuote has been the most important learning experience I have had as a programmer.
When I began writing Kuote, I knew how to program, but I did not know how to write programs. I had no idea that such
a simple concept would necessitate such a complex system composed of thousands of lines of code. As a programmer
who has never worked on a large program before, I was forced to learn as much by trial and error as I learned from
research and study. Here are a few words of advice I would pass on to other programmers working on their first large
project.

7.1 Version Control


"To go forward, you must backup." - Anonymous
I have found version control to be invaluable for even the simplest of programs. I began this project without
any system for versioning my source code except the process of duplicating the entire working directory and
appending a date to it; a process I would do infrequently at best.
As I created more and more code, I also created more and more bugs. I found myself working for hours
attempting to fix a bug, and in the process trying numerous fixes and alterations to my code. After hours of this, my
source code would be ugly, unstable, and no longer interoperate with other parts of the system. Often I would find
myself rewriting from scratch those files that I had been working on because I had not made frequent enough backups.
Using a version control system such as CVS (Content Versioning System) or Subversion, a successor in spirit
to CVS, is trivial, after the initial setup, and makes managing code much easier. If a project has multiple programmers
a good versioning system is practically a requirement. Version control systems will allow you to restore single files,
directories and an entire project from any specified time that you committed code or other files (practically any type of
file can be versioned). Many development environments, such as Eclipse, will integrate with CVS and Subversion.
This allows you to have files committed after each save, and at specific time intervals.
21

7.2 Object Oriented Programming


"I invented the term ’Object Oriented’, and I can tell you I did not have C++ in
mind." — Alan Kay, creator of Smalltalk.
This suggestion can and has been argued by many, but I have found programming a large project to be far
easier when using Object Oriented Programming techniques. I began this project using standard non-object oriented
PHP version 4. I found as the project progressed that my functions were becoming huge and unwieldy, with some
functions requiring upwards of sixteen arguments!
For this reason, I created PHP 4 objects and the relevant functions became methods for these new objects.
Later in the project the PHP 4 classes were updated to PHP version 5 classes to take advantage of the much improved
Object Oriented syntax that PHP 5 provided. I find it much easier to work on programs written primarily in an object
oriented fashion, as opposed to purely functional program code.

7.3 Patterns
“Each pattern describes a problem which occurs over and over again in our environment,
and then describes the core of the solution to that problem, in such a way that you can use
this solution a million times over, without ever doing it in the same way twice”. - C.
Alexander

7.3.1 Design Patterns


In computer science, a design pattern is a general purpose solution to a commonly occurring problem in
software. A design pattern is not a finished work that can be transformed directly into code; it is guide for how to solve
a common problem that can be used in many different situations.
A good example of a design pattern used in Kuote is the Proxy pattern. A proxy, in its most general form, is a
class functioning as an interface between two software APIs, the software being worked on, and some other software.
The other software could be anything: a network connection API, a file access API, or some other resource that should
be used, but does not need to be written or rewritten from scratch (Freeman 460).
In Kuote, all the KuoteObjects classes are proxies to the DataObjects classes, which are used for database
access. By writing the classes in this form, it makes changing the target database much easier. If the database is
supported by the DB_DataObject class, a single line of code must be altered (to change the database driver from
MySQL to the target database). If the target database is not supported, a replacement set for DB_DataObject may be
written supporting that database system, with little to no alterations of the Kuote program code needed.

7.3.2 Architectural Patterns


An architectural pattern is a software pattern that offers a common solution to an architectural problem in
software engineering. An architectural pattern describes the fundamental structural organization for a software system.
22

In comparison to design patterns, architectural patterns are more general and larger in scale (Bass 24).
The primary architectural pattern used in Kuote would be the Model-View-Controller pattern discussed
earlier.

7.3.3 Anti-Patterns
In computer science, anti-patterns comprise the study or specific repeated practices that appear initially to be
beneficial, but ultimately result in bad consequences that outweigh the hoped-for advantages (Leplante 4). Avoiding
anti-patterns requires diagnosing them as early as possible in the software life-cycle. The best way to avoid the pitfalls
exposed by anti-patterns is to understand them before beginning software development.
In retrospect, the anti-pattern the author fell into more than any other was that of “Accidental Complexity”
where the chosen solution to the given problem is not the simplest solution. In the beginning, Kuote used a PHP PEAR
library to generate html forms programmatically, rather than writing the HTML directly. Early on, this seemed like an
ideal and simple solution, but as more features were added, such as templating, the system became more and more
complex, with layers of functions to allow the form library to be used within the templating system. The solution in the
end was to remove all references to the form generating library, and to use the generated form HTML directly in the
template files.

7.4 Templating
“Computer interfaces and user interfaces are as different as night and 1.” - Anonymous
A large number of developers tend to write server-side program scripts that both process input and generate
output in a combined fashion. This style works fine for a simple home page or a very simple application, but fails to
scale well for large projects.
I discovered this after the fact when writing Kuote. I realized quickly that I wanted to give users the ability to
easily customize the visual style of Kuote, and also to allow for internationalization and translation. Most importantly,
using templates separates business logic from display logic.
This allows one to take a large, complex file and break it into two smaller, simpler files that are more easily
understood. Further more, this also allows one to modify the behavior of the business logic without affected the display
design and visa versa. In Kuote, the templating system is a very simple one where PHP code is used for the display
logic. I believe that the template system a programmer uses is not as important as the fact that one is being used.
Choosing a templating system is mostly a matter of taste, as most offer essentially the same functionality.

7.5 Don’t Be Clever


“The competent programmer is fully aware of the strictly limited size of his own skull;
therefore he approaches the programming task in full humility, and among other things
he avoids clever tricks like the plague.” - Edsger W. Dijkstra
23

This author programs primarily using a single axiomatic rule: Don’t Be Clever. Anytime I feel the urge to
write clever code, I sit on my hands until the impulse goes away. Writing clever code benefits no one, least of all the
original author.
I have found that any code I have not worked on in a month of more might as well have been written by
someone else. Writing ‘clever’ code will just make understanding that code in the future all the more harder. Above all,
write for understandability. You and everyone who works on your code will thank you.

7.6 Document, Document, Document


“Good code is its own best documentation. As you're about to add a comment, ask
yourself, 'How can I improve the code so that this comment isn't needed?' Improve the
code and then document it to make it even clearer.” - Steve McConnell from Code
Complete
This advice goes hand in hand with the rule ‘Don’t Be Clever’. You will have to revisit that old code someday,
and you will wish you had documented it better. There are many ways to document code.
My first and favorite is self-documenting code. Don’t name a variable ‘i’ if you can name in
‘tableRowCounter.’ Yes, it requires a few more keystrokes to create the latter variable name, but the effort is worth it
next time you go bug hunting and can’t remember what ‘i’ represents in that code, aside from being a counter. As a rule,
a piece of code should be understandable without any other documentation. If it is not, the code should be re-worked
until it is.
Of course, there is the old standby, inline documentation. Most programmers throw a comment or two into
their code just because they were forced to for class assignments. I use inline documentation often, but not unless the
comment adds something that was not there before. There is no point in putting the comment ‘This variable holds the
counter for the number of table rows’ after declaring the variable ‘tableRowCounter,’ as the variable name was already
self-explanatory.
The last type of documentation I use is a formal documentation language. By this I mean a system of
programming comments that can be read by another program to automatically generate external documentation.
Examples of this include JavaDoc for Java, and phpDocumentor for PHP. These systems force a syntax on the
programmer and keep the comments clean and tidy. The greatest benefit of these systems is that one can create a
reference document (as HTML, PDF, or another format) for other programmers with the click of a button. The
document will always be up to date as long as the code comments are up to date.

7.7 Write for Future Flexibility


“Being a social outcast helps you stay concentrated on the really important things, like
thinking and hacking”. - Eric Raymond
One of my goals for Kuote was for it to be simple to use and understand, as well as being flexible for
24

customization. There are many ways to add flexibility to an application. For example, in Kuote each ‘object’ such as a
User or a Question is represented by a class. The current classes use DB_Dataobject to interface with MySQL. Because
I chose to use this class, Kuote can be used with a dozen or more databases including PostgreSQL, and Oracle as well
as MySQL.
This design even allows for further flexibility. Suppose that a university would like to allow its faculty to use
Kuote. This university already has a database of student data available via LDAP. Instead of importing that data into
MySQL and keeping it constantly synchronized, one need only modify the KuoteObjects_User class to access the
relevant parts of the LDAP data store. One could even reference a website or a text file! Part of the data could be on the
LDAP server, part on the MySQL server. The customizability is endless.

7.8 Don’t Reinvent the Wheel


“If we wish to count lines of code, we should not regard them as lines produced but as
lines spent”. - Edsger Dijkstra
By this I mean, make good use of existing libraries. For practically any language one might work with, there
exist hundreds of free libraries out there for a programmer to utilize. This saves time developing and debugging. A
library with hundreds or thousands of users is less likely to have bugs than the one written by a lone programmer for his
own use.
For PHP, there is PEAR (PHP Extension and Application Repository) and PECL (PHP Extension
Community Library), among others. PEAR libraries are available under a number of Open Source licenses5. PECL
requires all submitted libraries to be under the PHP license.

7.8.1 Be Careful When Choosing Libraries


When evaluating whether to use a library in a project, one should ask “What are the benefits of using this
library?” and “What are disadvantages of using this library?” Shortly after I began my work on Kuote, I started using
the PEAR library HTML_Quickform to generate my HTML forms. The benefit of using this library was that it gave me

5
http://www.pear.php.net/manual/en/faq.devs.php
25

a very nice looking form that also had built in server and client side validation.
However, I came to discover that its detriments far outweighed its advantages. For each form I had to create
such a large amount of code I began to move each form into its own function. I had dozens of extremely similar
functions to make these forms. The code was messy and buggy. I had to resort to ugly hacks and kludges to keep the
library working. On top of that, the system did not work well with my templating system. In the end, I spent hours
removing the HTML_Quickform code from my code base. Instead, I took the html code that was generated and stored
it directly in the correct template files. This is a warning to future developers. Never use a library just because it has
some neat features, think long and hard about the benefits and consequences of any given library one might use.

7.9 Future Directions


In its current state, Kuote satisfies the user requirements that were laid out in the design phase of the project.
However, by no means does this mean Kuote could not be extended further with new features.
Useful features that have not yet been implemented include: A questions library so that a question may
entered into the system once and used within multiple quizzes. A What-You-See-Is-What-You-Get HTML editor built
into the system allowing an instructor to create module tutorials within the system itself. The ability to automatically
parse files such as Microsoft PowerPoint files and automatically generate HTML based on the file, bypassing the
requirement of a PowerPoint viewer installed on the client-side system using Kuote to view such files. Finally, support
for question types other than multiple choice (fill in the blank, multiple answer, matching, etc.) would be very useful.

7.10 Final Thoughts


I believe that Kuote is a viable E-Learning system written for a niche that goes unnoticed by most
programmers, that of the educator whose specialty is not technology. Even so, if not a single person ever uses Kuote in
practice, it has still been worth writing and has provided me with valuable experience and an opportunity to grow as a
programmer.
26

Works Cited

“ATutor Learning Content Management Systems: Information” ATutor.ca 2007 Adaptive

Technology Resource Centre <http://www.atutor.ca/> 29 Nov. 2007

Bass, Len and Paul Clements and Rick Kazman. Software Architecture in Practice

Addison-Wesley Professional, 2003

Carvin, Andy. “Blackboard, Lawsuits & Wikis, Oh My!” PBS.org 2006 PBS

<http://www.pbs.org/teachers/learning.now/2006/08/blackboard_lawsuits_wikis_oh_m.ht

ml> 29 Nov. 2007

“Choose MySQL” DigitalSolutions.ph 2007 Digital Solutions

<http://www.digitalsolutions.ph/node/20> 02 Dec. 2007

Claroline.net. Claroline.net. 2007 Consortium Claroline <http://www.claroline.net/> 29 Nov. 2007

“Credits” Claroline.net 2007 Consortium Claroline

<http://www.claroline.net/partnership/credits.html> 29 Nov. 2007

Danials, Dennis. “Moodle Review” 28 Dec. 2004 Dennis Danials

<http://www.dennisgdaniels.com/tiki-index.php?%20page=Moodle%20Review> 29 Nov.

2007

“EduTools: CMS: Product List” Edutools.edu 2007 Western Cooperative for Educational

Telecommunications <http://www.edutools.info/item_list.jsp? pj=4> 10 Aug. 2007

“eLearning Enterprise Suite – Desire2Learn Innovative Learning Technology” Desire2Learn.com

2007 Desire2Learn, Inc. <http://www.desire2learn.com/products/> 29 Nov. 2007

Freeman, Eric and Kathy Sierra. Head First Design Patterns O’Reilly, 2004.

Görlitz, Walter. “What Is Gray Box Testing” SQATester.com 2007 SQATester


27

<http://www.sqatester.com/methodology/WhatisGrayBoxTesting.htm> 02 Dec. 2007

Leplante, Phillip and Colin Neil. Antipatterns: Identification, Refactoring, and Management CRC

Press, 2006

Levesque, Michelle “Fundamental issues with open source software development”

FirstMonday.org 2004 First Monday/Michelle Levesque

<http://www.firstmonday.org/issues/issue9_4/levesque/index.html#l3> 02 Dec. 2007

“Load Time Analyzer” 1-Hit.com 2007 1-Hit Search Engine Optimization and Search Engine

Marketing <http://www.1-hit.com/all-in-one/tool.loading-time-checker.htm> 29 Nov.

2007

Mochal, Tom. “Acceptance Testing: The customer is the ultimate judge” TechRepublic.com 2001

CNET <http://articles.techrepublic.com.com/5100-22-1044625.html> 02 Dec. 2007

“Moodle – A Free, Open Source Course Management System for Online Learning.” Moodle.org

<http://www.moodle.org/> 10 Aug. 2007

“PHP: Introduction – Manual” PHP.net 25 Nov. 2007 The PHP Group

<http://us.php.net/manual/en/introduction.php> 29 Nov. 2007

Robb, Thomas. “Moodle – A Virtual Learning Environment for the Rest of Us” 2007 Robb

Thomas <http://www.cc.kyoto-su.ac.jp/information/tesl-ej/ej30/m2.html> 29 Nov. 2007

“Test Tools” WebSitePulse.com 2007 WebSitePulse

<http://www.websitepulse.com/help/tools.php> 02 Dec. 2007

“Why MySQL?” MySQL.com 2007 MySQL AB. <http://www.mysql.com/why-mysql/> 29 Nov.

2007
28

Annotated Bibliography
Guralnick, David A. ICEL 2006. The International Conference on E-Learning, 22 June 2006,

University of Quebec At Montreal, Canada. 27 Mar. 2008

<http://www.kaleidolearning.com/Effective%20E-learning.pdf>.

David Guralnick is the president of a company specializing in custom e-learning systems.

In this paper Mr. Guralnick states that he believes that when it comes to e-learning, “a trend

toward ensuring ‘usability’…has led to a ‘usability-first’ way of thinking...” He suggested

that the design of the user interface “should be a core, integrated component of the overall

design of an e-learning product.”

The author continues by listing a number of common opinions about interface design,

which he believes to be falsehood, such as “Interface design is about ‘navigation’” and

“Most of the work involved in interface design requires expertise in video and Flash”.

While the author makes some good points, most of his advice does not seem to apply well

to general purpose e-learning systems. The bulk of the paper is composed of a case-study

involving an e-learning system designed to train directory assistance operators and to

emulate the actual system. Such a feat would not be possible in any general purpose

e-learning system, and most of his advice is centered on this type of custom e-learning

system design.

However, the last section entitled “Conclusion and Future Directions” provides several

bullet points for successful e-learning endevors, the last of which is reccommends that

“…high-level goals of the project, and the characteristics of the audience, are considered

relevant all throughout the design process.”


29

Honey, Peter. "E-Learning: a Performance Appraisal and Some Suggestions for Improvement."

The Learning Organization 8.5 (2001): 200-202. EBSCO. Baron-Forness Library,

Edinboro, Pa. 3 Dec. 2007.

The author, Peter Honey, wrote in this article on E-learning in comparison to other forms of

learning, attempting to contrast the hype around E-learning with a more balanced

perspective. Given the eight assumptions of users of E-learning, Honey evaluated

E-learning from the learner’s perspective. He believes that the E-learning industry is

“overselling its merits”, and concludes with four suggestions for improvement. These

suggestions are focused on tailoring E-learning to the learner, as opposed to a one-size-fits

all approach, whereby learners are assumed to be a homogenous group. The author also

suggests that E-learning should be used as a tool to complement other forms of learning.

Ismail, J. "The design of an e-learning system: beyond the hype", The Internet and Higher

Education (2001): Vol. 4 No.3-4, pp.329-36.

Ismail wrote a critisism of E-learning, with emphasis on how institutions implement

E-learning systems that focus on management and measurment, while adding little or

nothing to the the actual process of learning. Furthermore, he states that most of the

commercial software available was little more than a platform to sell third-party content,

rather than developing content. The author goes on the provide an overview of different

e-learning system types, together with the system’s design. This article is another piece

attempting to provide perspective in a time when E-learning vendors are hyping E-learning
30

as “the learning solution”.

Mercer Management Consulting Study ( IBM MindSpan ) (1999) (2001). In: A. Sadler (Ed). “The

future of e-learning: an expanding vision” 27 March 2008

<http://www-3.ibm.com/software/mindspan/distlrng.nsf/wdocs/bdecca83a173667d08525

6a0e007771a2

“The Future of e-Learning: An Expanding Vision” is a white paper produced for IBM

which describes a future where the archetypical e-learning system of today is a relic of the

past. The authors envision a new type of e-learning system that goes beyond just “training

and learning to a new focus on ‘time to performance’.” They go on to describe such a

system as focusing on ‘informal’ training aspects that compose ‘70% of on the job training’,

as well as the current ‘formal’ training that e-learning systems are currently used for.

The paper provides an excellent overview of the current situation where e-Learning has

exploded onto the scene and is growing at a fantastic rate, with good reason. The majority

of jobs in the United States require skilled workers, and at the same time, there is a lack of

skilled workers available.

While the paper gives little insight into the specifics of designing e-learning infrastructure,

it does give an interesting, if broad, overview of e-learning systems; both those of today and

those of tomorrow.

Moore, David. "E-Learning and the Science of Instruction: Proven Guidelines for Consumers and

Designers of Multimedia Learning." Educational Technology Research & Development

54.2 (2006): 197-200. Academic Search Complete. EBSCO. Baron-Forness Library,

Edinboro, Pa. 29 November 2007.


31

<http://navigator-edinboro.passhe.edu/login?url=http://search.ebscohost.com/login.aspx?d

irect=true&db=a9h&AN=22658696&loginpage=login.asp&site=ehost-live>.

E-Learning and the Science of Instruction is a text focused on using “empirical evidence to

inform decicions about what works best in e-learning.” The book brings together data about

E-learning presentation from a number of research studies. The author intimates that

successful learning stems from using the correct methods of instruction, whether the

delivery is via E-learning, or other, more traditional, methods. Unfortunately, despite being

written in 2006, the text focuses primarily on CD-ROM based instruction, rather than

Internet-based E-learning.

Harrie Passier and Johan Jeuring. "Ontology based feedback generation in design-

oriented e-learning systems. In P. Isaias, P. Kommers, and Maggie McPherson,

editors, Proceedings of the IADIS International conference, e-Society, volume II,

pages 992–996, 2004.

Passier states that feedback is “one of the essential elements needed for effective learning.”

The author writes of the concept of develping algorithms to automate feedback for both

e-learning course developers and the learners themselves, with an imagined example

situation taking place in the year 2015, indicating a belief that it will be many years before

such a system is developed.

Despite the far reaching concepts written of in this work, there is valuable insight about the

general concepts of feedback in an e-learning system. The author defines feedback as “any

communication or procedure given to inform a learner of the accuracy of a response,


32

usually to an instructional question.” Furthermore, because teachers and students

constantly interact in a typical classroom setting the teacher most often knows if the

essential conepts being taught in a class are understood, and the class can be continuously

improved based on this classroom feedback.

Passier states that there is often a dearth of feedback in current e-learning environments.

The author proposes a system of automated feedback with three types of feedback: student,

author, and group feedback ( feedback from a group of learners to an author ). Creation of

the feedback would be through a feedback engine that uses 5 ontologies, which are “formal

descriptions of shared knowledge in a domain.” These ontologies may be switched out for

different ontologies, creating a generic system for generating specific feedback.

Young, Jianming. "Security Modelling for E-Learning." 27 Mar. 2008

<http://eprints.usq.edu.au/3614/1/Yong.pdf.pdf>.

This paper is a discussion of “the security attributes which are relevant to all e-larning

stakeholders, regulator, institution, developer, instructor, administration staff, instructor,

and learners.” The model used as a basis for this is know as RBAC, role-based access

control, and the author creates “Extended RBAC” to support it’s use in modeling e-learning

system security. The author creates a matrix of e-learning system roles ( Instructor, Learner,

Administration staff, Technician ) and security attributes, such as “confidentiality

assurance” and “availability assurance.” Disappointingly, the author does not discuss

implementation of such a security model.


33

Appendix A: Kuote Installation


Kuote is not very hard to install on a server. The basic steps are as follows:
1. Install MySQL, Apache, PHP5, PHP-PEAR, and Subversion.
2. Install PEAR libraries DB_DataObject and HTTP_Upload
3. Pull the Kuote code from Subversion, put into an Apache-accessible directory.
4. Create the Kuote database and import the database schema.
5. Edit the config files to reflect your MySQL username and password.

The following is a bash script that will automate the installation of Kuote on Ubuntu Linux Server 8.04. The
script should work on most Debian-based Linux distributions. The script should also work on other Linux distributions
by modifying the fifth line of the script to use whichever packaging system that distribution uses.

#!/bin/bash

## Install prerequisites
echo -e "INSTALL PACKAGES VIA APT-GET\n"
apt-get install apache2 php5 php5-mysql php-pear mysql-server subversion

## Install PHP/PEAR prequisites


echo -e "INSTALLING PHP-PEAR MODULES\n"
pear -q install DB_DataObject
pear -q install HTTP_Upload

## Get input data


echo -e "Where will Kuote be installed? [/var/www/kuote/] : "
read kuote_root
if [ "$kuote_root" == "" ]; then
kuote_root="/var/www/kuote/"
fi

echo -e "Where will learning files be stored? [/var/learnings/] : "


read learnings_root
if [ "$learnings_root" == "" ]; then
learnings_root="/var/learnings/"
fi

## Site root defaults to http://localhost/kuote/


echo -e "Where will the kuote site root be? [/kuote/] : "
read site_root
if [ "$site_root" == "" ]; then
site_root="/kuote/"
fi

echo -e "MySQL Username? [root] : "


read mysql_user
if [ "$mysql_user" == "" ]; then
mysql_user="root"
fi
34

echo -e "MySQL Password? : "


read mysql_password

echo -e "MySQL Database? [kuote] : "


read mysql_db
if [ "$mysql_db" == "" ]; then
mysql_db="kuote"
fi

## Grab Kuote from subversion repo


echo "DOWNLOADING KUOTE"
svn co https://kuote.svn.sourceforge.net/svnroot/kuote/trunk "$kuote_root"

## Create the learnings storage directory


echo "CREATING LEARNINGS DIRECTORY"
mkdir "$learnings_root"

## Import the database schema


echo "CREATING KUOTE DATABASE"
mysql -u"$mysql_user" -p"$mysql_password" -h localhost -e "CREATE DATABASE
"$mysql_db" "
echo "IMPORTING KUOTE DATABASE SCHEMA"
mysql -u"$mysql_user" -p"$mysql_password" -h localhost -D "$mysql_db"
<"$kuote_root"config/kuote.sql

## Create a default Kuote user

## Create the correct config files


echo "CREATING CONFIG FILES"
CONFIG=""$kuote_root"config/config.php"
rm "$CONFIG" 2>/dev/null

echo "
<?php
\$templates = 'simple';
\$debug = false;
define('SITEROOT', '$site_root');
define('LEARNINGS_ROOT', '$learnings_root' );
?>
" >> "$CONFIG"

PEAR=""$kuote_root"config/PEAR.ini"
rm "$PEAR" 2>/dev/null

echo "
[DB_DataObject]
database = mysql://"$mysql_user":"$mysql_password"@localhost"$site_root"
schema_location = "$kuote_root"classes/DataObjects
class_location = "$kuote_root"classes/DataObjects
require_prefix = DataObjects/
class_prefix = DataObjects_
" >> "$PEAR"

apache2ctl restart
35

Appendix B: A Kuote Tutorial

Kuote From User’s Perspective


In Kuote, there are only two types of users, students and instructors. I have used the general term instructor in
lieu of teacher or professor to promote the system as being usable at all levels of education. It’s design is intended to
complement the inner workings of a university or school system, but its flexibility allows it to be used in many other
circumstances.
Instructors have the ability to create new courses and learnings, as well as the ability to offer courses and
learnings. In reference to Kuote, a course is a collection of learnings. A learning is defined as the combination of a
tutorial, and a quiz of related questions. Within Kuote, each learning may have either a tutorial, a quiz, or both.
Each quiz must have one or more questions. A question consists of an actual question that has between two
and five multiple choice options. Every question also has a correct answer (of course), a difficulty rating, and an
optional time-limit for answering the question.
Each tutorial must be a single html file only. However, as the focus of Kuote is to be easy-to-use, one of the
primary future development goals is to allow direct importation of PowerPoint documents, PDF files, Flash movies,
and other formats commonly used for presentation purposes.
As mentioned earlier, each course and learning may be offered zero or more times. A course offering in Kuote
is analogous to a course offering at a university. It makes available for enrollment a particular course and its learnings
for a given timeframe. This design is meant to complement and mirror a school’s system of offering classes for
enrollment. If an instructor utilizes Kuote, they can enroll in the Kuote course offering after enrolling in the school’s
course offering.
The point of enrolling in a course offering is so that a student may take the learnings that have been made
available under that course offering. Instead of just laying out all the learnings that have been created under the offered
course, the instructor gets to choose when to make each learning available for the student to take. He or she can even
re-offer a learning if a reiteration of the material is necessary for the class.

Moving Through Kuote: An Instructor’s Point of View


Now that essential concepts of the Kuote system have been outlined, a walk through of the process of creating
a course, a learning, questions for a learning, and the offering of this course and learning is in order.

Logging in to Kuote
First , log into Kuote. The login page is designed so that it may be customized to give it the look of the
school’s web portal, if such customization is warranted.
36

Figure 3 - Kuote Login Page

Creating A Course
After logging in, the first screen that is seen is the “Create Course” screen. Here the instructor can create a
new course under which to add learnings. The course is given a title and a short, one-line description. Next the
instructor must decide if other instructors may offer this course, i.e. the course is open, and if the course may be taken
by anyone, i.e. the course is public. Once the Submit button is pressed, the instructor is presented a screen that confirms
the successful creation of his or her new course.

Figure 4 - Create Course

Creating a Learning
Now that the instructor has a course, he or she needs to make it useful by creating at least one learning to be
part of the course. Here the instructor can choose which course the learning is part of, give the learning a title, a short
description, and optionally upload an html file that contains the tutorial for this learning.
37

Figure 5 - Create Learning

Adding Questions to a Learning


The instructor has now created a new course, and a new learning that has a tutorial. Now he or she can add
questions to the learning so that the instructor may quiz his or her students on what they’ve learned in the tutorial.
If the instructor clicks the “Questions” side-tab under the “Create” tab, he or she can begin creating questions.
The instructor is first asked which course the questions go under, and then which learning they are part of.
As you can see in Figure IV, to create a question the instructor will enter the actual ‘question’ and then a
number of multiple-choice answers, from two to five choices. A true/false question be creating simply by making the
first two choices ‘true’ and ‘false’ respectively.
Next he or she will select which choice is the correct answer. Optionally, the instructor can rate its difficulty
and give it the quiz takers a limited amount of time in which to answer the question. Upon pressing “Add Question”, a
new “Add Question” screen is redisplayed, with the question number updated to reflect that there is already one
question that is part of the learning, as seen in Figure V. One may also notice that a person can use html tags in the
question’s body and options to add emphasis to the text. Later, the instructor can come back to this page and add as
many additional Questions to the Learning as the person may wish.
38

Figure 6 - Create New Question

Figure 7 - Create New Question, 2nd Question

Taking a Test Drive


Before the instructor offers this course and learning for students to take, he or she may first try it out
themselves to make sure they have not made any mistakes such as typos or incorrectly setting the option that is the
correct answer. To do this, one must click the “Test Drive” tab. From the “Test Drive” screen, one can select the
relevant course, and then the learning he or she wishes to test drive. Once those have been selected, a screen displaying
a link to the tutorial and an invitation to take the learning’s quiz will appear.
Clicking the link for the tutorial will pop up a new window with the contents of the html file uploaded
previously. Clicking the ‘Take Quiz’ button will step one through each multiple choice question. After all the questions
39

have been answered, a screen will appear displaying the final score for the quiz. This page also shows each question,
the answer selected, and whether the question was answered correctly or incorrectly. If the answer was wrong, the
correct answer will also be displayed.

Offering a Course
Now that the instructor has a course complete with a learning that has a tutorial and questions, he or she can
offer this course so that students may enroll in it.
To create a course offering, select the “Offer” tab from the set of tabs at the top of the page, this will take us
directly to the ‘Offer a Course’ screen.
Here one can select the Course to be offered, give it a title, start date, end date, and optionally a password.
The title will typically be the same as the name of the course, but with some significant postfix. Here a
‘Section 001’ was added to the end of the course title, as if this Kuote course is meant to be used as part of a college
course, and the given section of that course is 001.
Next the instructor must give dates of availability for the course offering. The start date is the first day that this
offering will be available for students to enroll in. The end date will be the last day that the course offering and the
learnings offered under it will be available to the enrolled students.
The optional password allows instructors to restrict enrollment in the offering to only those students that have
been given the password, which would be a common situation. Rarely would an instructor want to allow anybody the
ability to enroll in a class-related course offering.

Figure 8 - Offering a Course for Enrollment

Offering A Learning
So now the course has been offered. If a student were to enroll in the course offering at this moment, he or she
would find it very boring, as there is nothing else to do, no learnings to take. That is remedied by offering a learning as
part of this course offering. To offer a learning, one needs to click the “Learning” side-tab under the main tab “Offer”.
This brings up the first step for offering a learning. Here the instructor chooses the course offering that he or she wants
40

to work with. After the instructor has selected the course offering to add a Learning Offering to, he or she is taken to a
new page that is very similar to the “Offer Course” page that has been used previously.
Here one must choose which learning to offer, give the learning offering a title, and select a starting and
ending date. For learning offerings, using the same title as the learning itself is not a problem. If one would want to
offer it a second time in this course offering, something can be appended to the title to give the second learning offering
it’s own distinct name.
The start date for a learning offering is the first day it will be available for students to take, and the end date
will be the last day it will be available. After the ending date, the learning offering will simply disappear from the
student’s list of learnings available to take.
The instructor has now successfully offered up a course with a learning for students to enroll in and explore.
There are still other things one can do as an instructor, but first, it will be more enlightening to switch to the perspective
of a student.

Figure 9 - Creating a new Learning Offering, Selecting A Course

Figure 10 - Creating a Learning Offering, Selecting a Learning to Offer

Switching Gears: Kuote From A Student’s Perspective

Enrolling in a Course Offering


The first thing a student must do is, of course, log in. Next the student needs to enroll in a course offering. To
41

do that, he or she will click the “Enroll” tab.


This brings up the enrollment page, as depicted in Figure IX. Here all current course offerings will appear for
students to enroll in. As there has only been one course offering created, only one shows up for available enrollment.
Because the offering was password protected, the next screen presents a request to input the password. If a
password had not been added to this Offering, one would have been taken directly to the enrollment verification page,
where the attempt to enroll in the offering is confirmed as successful or not.

Figure 11 - Enrolling in a Course Offering

Taking a Learning
The student is now enrolled in a Course Offering. To see what learnings are available to take, the student must
select the “Learn” tab. Here the student will be presented with a list of learnings available to take, grouped by the
course offering which they are part of. This is shown in Figure X.
If the student clicks the ‘Learn’ button on the right, he or she will be taken to a screen that displays links to the
learning’s tutorial and its quiz. Clicking the tutorial link will create a new window that presents the learning’s tutorial.
The ‘Take Quiz’ button will begin the learning’s quiz.
After the student has completed the quiz. A summary will be displayed giving him or her the results of the
quiz. The results include each question, the chosen answer, and whether that question was answered correctly. If the
question was answered incorrectly, the correct answer will be displayed.

Figure 12 - Choosing a Learning to take.


42

Figure 13 - Taking a Learning, Tutorial & Quiz Links

Figure 14 - Taking a Learning's Quiz


43

Figure 15 - Taking a Quiz, End of Quiz Results

Checking Grades
Now that the student has completed the quiz, he or she can at anytime log in and check his or her grades. To
check the grades of quizzes previously taken, one must click on the “Grades” tab. On this page, the student is presented
a link to view the grades of each course offering he or she is enrolled in. By taking a link from here, the student is
presented with a page that shows he or she has taken a single learning quiz under this course offering. This concludes
our tour of the Student Interface.

Figure 16 - Viewing Grades

The Instructors Interface: Revisited

Viewing Grades
Now that a student has taken a learning’s quiz, the instructor may view the grades of all the students
who have taken that learning offering. To check grades, the instructor logs back into Kuote, and click the “Grades” tab
at the top of the page.
Here the instructor will be able to decide how to view grades. At the moment one can only view grades by
Learning Offering, but in the future this will be expanded to being able to view grades by Learning, Course, Course
Offering, and Student as well.
When one clicks the ‘Submit Query’ button, the instructor is asked to select the relevant course, course
offering, and finally the learning offering whose grades he or she wishes to view.
Once the instructor has selected the relevant learning offering, he or she is presented with a screen that gives
the class average grade at the top, and each individual student’s grade underneath. Since we only have one student who
has taken the learning once, the class average and the single student’s grade are the same.
44

Figure 17 - Viewing Grades

Figure 18 - Viewing Grades, Continued


45

Appendix C: Data Flow Diagram

Figure 19 – Context Diagram

Figure 20 - Diagram 0
46

Figure 21 - Diagram 1

Figure 22 - Diagram 2

Figure 23 - Diagram 2.1


47

Figure 24 - Diagram 2.2

Figure 25 - Diagram 2.3


48

Figure 26 - Diagram 3

Figure 27 - Diagram 3.1


49

Figure 28 - Diagram 3.2

Figure 29 - Diagram 3.3


50

Figure 30 - Diagram 3.4

Figure 31 - Diagram 3.5


51

Figure 32 - Diagram 4

Figure 33 - Diagram 6
52

Appendix D: ERD Data Flow


ANSWERED AS RELATIONSHIP

ATTACHED OBJECTS:

QUESTIONS

ANSWERED AS MIN: 0 MAX: MANY

QUESTIONSANSWERED

[ ANSWERED AS ] MIN: 1 MAX: 1

FOREIGN KEY(S):

QUESTIONS 'ANSWERED AS' QUESTIONSANSWERED

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

ARE OFFERED AS RELATIONSHIP

ATTACHED OBJECTS:

COURSES

ARE OFFERED AS MIN: 0 MAX: MANY

COURSEOFFERINGS
53

[ ARE OFFERED AS ] MIN: 1 MAX: 1

FOREIGN KEY(S):

COURSES 'ARE OFFERED AS' COURSEOFFERINGS

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

ARE OFFERED AS RELATIONSHIP

ATTACHED OBJECTS:

LEARNINGS

ARE OFFERED AS MIN: 0 MAX: MANY

LEARNINGOFFERINGS

[ ARE OFFERED AS ] MIN: 1 MAX: 1

FOREIGN KEY(S):

LEARNINGS 'ARE OFFERED AS' LEARNINGOFFERINGS

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:
54

KUOTE ERD

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

COMPLETED AS RELATIONSHIP

ATTACHED OBJECTS:

ENROLLMENT

COMPLETED AS MIN: 0 MAX: MANY

LEARNINGOFFERSTAKEN

[ COMPLETED AS ] MIN: 1 MAX: 1

FOREIGN KEY(S):

ENROLLMENT 'COMPLETED AS' LEARNINGOFFERSTAKEN

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

CONTAIN RELATIONSHIP

ATTACHED OBJECTS:

COURSES

CONTAIN MIN: 0 MAX: MANY


55

LEARNINGS

[ CONTAIN ] MIN: 1 MAX: 1

FOREIGN KEY(S):

COURSES 'CONTAIN' LEARNINGS

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

CONTAIN RELATIONSHIP

ATTACHED OBJECTS:

COURSEOFFERINGS

CONTAIN MIN: 0 MAX: MANY

LEARNINGOFFERINGS

[ CONTAIN ] MIN: 1 MAX: 1

FOREIGN KEY(S):

COURSEOFFERINGS 'CONTAIN' LEARNINGOFFERINGS

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT


56

LOCATION:

KUOTE ERD

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

CONTAIN RELATIONSHIP

ATTACHED OBJECTS:

LEARNINGS

CONTAIN MIN: 0 MAX: MANY

QUESTIONS

[ CONTAIN ] MIN: 1 MAX: 1

FOREIGN KEY(S):

LEARNINGS 'CONTAIN' QUESTIONS

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

COURSEOFFERINGS ENTITY

COMPOSITION:

CRSID : INTEGER 4
57

CRSOFFEREND : DATE

CRSOFFERID : INTEGER 4

CRSOFFERPASSWORD : VARCHAR

CRSOFFERSTART : DATE

CRSOFFERTITLE : VARCHAR

INSTRUCTORID : INTEGER 4

PRIMARY KEY:

INDEX NAME: GENERATED BY VAW

COLUMN(S): CRSOFFERID [ ASC ]

FOREIGN KEY(S):

INSTRUCTORS 'OFFER' COURSEOFFERINGS

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

COURSES 'ARE OFFERED AS' COURSEOFFERINGS

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

ATTACHED RELATIONSHIPS ON KUOTE ERD:

[ ARE OFFERED AS ] MIN: 1 MAX: 1


58

COURSES

[ OFFER ] MIN: 1 MAX: 1

INSTRUCTORS

IS A MIN: 0 MAX: MANY

ENROLLMENT

CONTAIN MIN: 0 MAX: MANY

LEARNINGOFFERINGS

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

COURSES ENTITY

COMPOSITION:

CRSID : INTEGER 4

CRSDESC : VARCHAR

CRSISOPEN : BIT

CRSISPUBLIC : BIT

CRSTITLE : VARCHAR

USERID : INTEGER 4

PRIMARY KEY:

INDEX NAME: GENERATED BY VAW

COLUMN(S): CRSID [ ASC ]

FOREIGN KEY(S):

INSTRUCTORS 'CREATES' COURSES


59

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

ATTACHED RELATIONSHIPS ON KUOTE ERD:

[ CREATES ] MIN: 1 MAX: 1

INSTRUCTORS

CONTAIN MIN: 0 MAX: MANY

LEARNINGS

ARE OFFERED AS MIN: 0 MAX: MANY

COURSEOFFERINGS

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

CREATES RELATIONSHIP

ATTACHED OBJECTS:

INSTRUCTORS

CREATES MIN: 0 MAX: MANY

COURSES

[ CREATES ] MIN: 1 MAX: 1

FOREIGN KEY(S):

INSTRUCTORS 'CREATES' COURSES


60

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

CRSDESC DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> COURSE

DATA STORE --> COURSES

ENTITY --> COURSES

CLASS --> COURSE

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

CRSID DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: INTEGER 4

NULL TYPE: NOTNULL


61

LOCATION:

DATA FLOW --> COURSE

DATA FLOW --> COURSE OFFERING

DATA FLOW --> LEARNING

DATA STORE --> COURSES

ENTITY --> COURSES

ENTITY --> COURSEOFFERINGS

CLASS --> LEARNING

CLASS --> COURSEOFFERING

CLASS --> COURSE

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

CRSISOPEN DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: BIT

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> COURSE

DATA STORE --> COURSES

ENTITY --> COURSES

CLASS --> COURSE

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005


62

--------------------------------------------------------------------------------------

CRSISPUBLIC DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: BIT

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> COURSE

DATA STORE --> COURSES

ENTITY --> COURSES

CLASS --> COURSE

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

CRSOFFEREND DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: DATE

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> COURSE OFFERING

ENTITY --> COURSEOFFERINGS

CLASS --> COURSEOFFERING

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------
63

CRSOFFERID DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: INTEGER 4

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> COURSE OFFERING

DATA FLOW --> LEARNING OFFERING

CLASS --> ENROLLMENT

ENTITY --> COURSEOFFERINGS

ENTITY --> LEARNINGOFFERINGS

CLASS --> COURSEOFFERING

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

CRSOFFERPASSWORD DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

NULL TYPE: NULL

LOCATION:

DATA FLOW --> COURSE OFFERING

ENTITY --> COURSEOFFERINGS

CLASS --> COURSEOFFERING

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005


64

--------------------------------------------------------------------------------------

CRSOFFERSTART DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: DATE

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> COURSE OFFERING

ENTITY --> COURSEOFFERINGS

CLASS --> COURSEOFFERING

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

CRSOFFERTITLE DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> COURSE OFFERING

ENTITY --> COURSEOFFERINGS

CLASS --> COURSEOFFERING

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

CRSTITLE DATA ELEMENT


65

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> COURSE

DATA STORE --> COURSES

ENTITY --> COURSES

CLASS --> COURSE

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

ENROLLID DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: INTEGER 4

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> LEARNING OFFER TAKEN

CLASS --> ENROLLMENT

ENTITY --> LEARNINGOFFERSTAKEN

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

ENROLLMENT CLASS [ ASSOCIATIVE ]

COMPOSITION:
66

ENROLLID : INTEGER 4

USERID : INTEGER 4

CRSOFFERID : INTEGER 4

CLASS INFORMATION

CONCURRENCY: SEQUENTIAL

PERSISTENT: Y

ABSTRACT: N

METHODS:

ADD()

FIND()

GET( ID[8]:INT )

UPDATE()

PRIMARY KEY:

INDEX NAME: GENERATED BY VAW

COLUMN(S): ENROLLID [ ASC ]

FOREIGN KEY(S):

COURSEOFFERINGS 'IS A' ENROLLMENT

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

STUDENTS 'ENROLLS IN' ENROLLMENT

ON DELETE RESTRICT
67

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

ATTACHED RELATIONSHIPS ON KUOTE ERD:

[ ENROLLS IN ] MIN: 1 MAX: 1

STUDENTS

[ IS A ] MIN: 1 MAX: 1

COURSEOFFERINGS

COMPLETED AS MIN: 0 MAX: MANY

LEARNINGOFFERSTAKEN

CLASSES

ATTACHED RELATIONSHIPS ON CLASSES:

[ IS A ] MIN: 1 MAX: 1

KUOTEOBJECT

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

ENROLLS IN RELATIONSHIP

ATTACHED OBJECTS:

STUDENTS

ENROLLS IN MIN: 0 MAX: MANY

ENROLLMENT
68

[ ENROLLS IN ] MIN: 1 MAX: 1

FOREIGN KEY(S):

STUDENTS 'ENROLLS IN' ENROLLMENT

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

I DATA ELEMENT [DOMAIN]

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: UNDEFINED

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

ID DATA ELEMENT

KUOTEOBJECT::ID

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: INTEGER 4

NULL TYPE: NOTNULL

LOCATION:

CLASS --> KUOTEOBJECT


69

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 11/7/2005

--------------------------------------------------------------------------------------

INSTRUCTORBUILDING DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

LENGTH: 255

NULL TYPE: NOTNULL

LOCATION:

ENTITY --> INSTRUCTORS

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

INSTRUCTORID DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: INTEGER 4

NULL TYPE: NOTNULL

LOCATION:

ENTITY --> INSTRUCTORS

ENTITY --> COURSEOFFERINGS

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

INSTRUCTORPHONE DATA ELEMENT

DATA ELEMENT ATTRIBUTES


70

STORAGE TYPE: INTEGER 4

LENGTH: 10

NULL TYPE: NOTNULL

LOCATION:

ENTITY --> INSTRUCTORS

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

INSTRUCTORROOM DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

LENGTH: 255

NULL TYPE: NOTNULL

LOCATION:

ENTITY --> INSTRUCTORS

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

INSTRUCTORS ENTITY

COMPOSITION:

INSTRUCTORID : INTEGER 4

INSTRUCTORPHONE : INTEGER 4

INSTRUCTORBUILDING : VARCHAR

INSTRUCTORROOM : VARCHAR
71

PRIMARY KEY:

INDEX NAME: GENERATED BY VAW

COLUMN(S): INSTRUCTORID [ ASC ]

FOREIGN KEY(S):

USERS 'IS AN' INSTRUCTORS

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

ATTACHED RELATIONSHIPS ON KUOTE ERD:

[ IS AN ] MIN: 1 MAX: 1

USERS

CREATES MIN: 0 MAX: MANY

COURSES

OFFER MIN: 0 MAX: MANY

COURSEOFFERINGS

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

IS A RELATIONSHIP

ATTACHED OBJECTS:

USERS
72

IS A MIN: 0 MAX: 1

STUDENTS

[ IS A ] MIN: 1 MAX: 1

FOREIGN KEY(S):

USERS 'IS A' STUDENTS

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

IS A RELATIONSHIP

ATTACHED OBJECTS:

COURSEOFFERINGS

IS A MIN: 0 MAX: MANY

ENROLLMENT

[ IS A ] MIN: 1 MAX: 1

FOREIGN KEY(S):

COURSEOFFERINGS 'IS A' ENROLLMENT

ON DELETE RESTRICT

ON UPDATE RESTRICT
73

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

IS A RELATIONSHIP

ATTACHED OBJECTS:

KUOTEOBJECT

IS A MIN: 0 MAX: 1

ENROLLMENT

[ IS A ] MIN: 1 MAX: 1

FOREIGN KEY(S):

LOCATION:

CLASSES

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 11/7/2005

--------------------------------------------------------------------------------------

IS AN RELATIONSHIP

ATTACHED OBJECTS:

USERS

IS AN MIN: 0 MAX: 1

INSTRUCTORS

[ IS AN ] MIN: 1 MAX: 1
74

FOREIGN KEY(S):

USERS 'IS AN' INSTRUCTORS

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

LEARNINGDESC DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> LEARNING

ENTITY --> LEARNINGS

CLASS --> LEARNING

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

LEARNINGID DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: INTEGER 4


75

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> LEARNING

DATA FLOW --> LEARNING OFFERING

DATA FLOW --> QUESTION

ENTITY --> LEARNINGS

ENTITY --> LEARNINGOFFERINGS

CLASS --> LEARNING

CLASS --> LEARNINGOFFERING

CLASS --> QUESTION

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

LEARNINGOFFEREND DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: DATE

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> LEARNING OFFERING

ENTITY --> LEARNINGOFFERINGS

CLASS --> LEARNINGOFFERING

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------
76

LEARNINGOFFERID DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: INTEGER 4

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> LEARNING OFFERING

DATA FLOW --> LEARNING OFFER TAKEN

ENTITY --> LEARNINGOFFERINGS

ENTITY --> LEARNINGOFFERSTAKEN

CLASS --> LEARNINGOFFERING

CLASS --> LEARNINGOFFERINGTAKEN

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

LEARNINGOFFERINGS ENTITY

COMPOSITION:

LEARNINGOFFERID : INTEGER 4

LEARNINGOFFEREND : DATE

LEARNINGOFFERQUESTIONSRANDOM : BIT

LEARNINGOFFERQUESTIONSRANDOMBYDIFFICULTY : BIT

LEARNINGOFFERSTART : DATE

LEARNINGOFFERTITLE : VARCHAR

CRSOFFERID : INTEGER 4
77

LEARNINGID : INTEGER 4

PRIMARY KEY:

INDEX NAME: GENERATED BY VAW

COLUMN(S): LEARNINGOFFERID [ ASC ]

FOREIGN KEY(S):

COURSEOFFERINGS 'CONTAIN' LEARNINGOFFERINGS

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LEARNINGS 'ARE OFFERED AS' LEARNINGOFFERINGS

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

ATTACHED RELATIONSHIPS ON KUOTE ERD:

[ ARE OFFERED AS ] MIN: 1 MAX: 1

LEARNINGS

[ CONTAIN ] MIN: 1 MAX: 1

COURSEOFFERINGS

TAKEN AS MIN: 0 MAX: MANY

LEARNINGOFFERSTAKEN
78

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

LEARNINGOFFERQUESTIONSRANDOM DATA ELEMENT

DESCRIPTION:

ALLOWS THE INSTRUCTOR TO OVERRIDE THE DEFAULT QUESTIONS


RANDOMIZATION OF A LEARNING.

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: BIT

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> LEARNING OFFERING

ENTITY --> LEARNINGOFFERINGS

CLASS --> LEARNINGOFFERING

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

LEARNINGOFFERQUESTIONSRANDOMBYDIFFICULTY DATA
ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: BIT

NULL TYPE: NULL

LOCATION:

DATA FLOW --> LEARNING OFFERING

ENTITY --> LEARNINGOFFERINGS

CLASS --> LEARNINGOFFERING


79

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

LEARNINGOFFERSTAKEN ENTITY

COMPOSITION:

LEARNINGOFFERTAKENID : INTEGER 4

LEARNINGOFFERTAKENTIME : TIME

ENROLLID : INTEGER 4

LEARNINGOFFERID : INTEGER 4

PRIMARY KEY:

INDEX NAME: GENERATED BY VAW

COLUMN(S): LEARNINGOFFERTAKENID [ ASC ]

FOREIGN KEY(S):

QUESTIONSANSWERED 'PART OF' LEARNINGOFFERSTAKEN

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

ENROLLMENT 'COMPLETED AS' LEARNINGOFFERSTAKEN

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LEARNINGOFFERINGS 'TAKEN AS' LEARNINGOFFERSTAKEN

ON DELETE RESTRICT
80

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

ATTACHED RELATIONSHIPS ON KUOTE ERD:

[ TAKEN AS ] MIN: 1 MAX: 1

LEARNINGOFFERINGS

[ COMPLETED AS ] MIN: 1 MAX: 1

ENROLLMENT

[ PART OF ] MIN: 1 MAX: 1

QUESTIONSANSWERED

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

LEARNINGOFFERSTART DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: DATE

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> LEARNING OFFERING

ENTITY --> LEARNINGOFFERINGS

CLASS --> LEARNINGOFFERING

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005


81

--------------------------------------------------------------------------------------

LEARNINGOFFERTAKENID DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: INTEGER 4

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> QUESTIONANSWERED

DATA FLOW --> LEARNING OFFER TAKEN

ENTITY --> LEARNINGOFFERSTAKEN

ENTITY --> QUESTIONSANSWERED

CLASS --> LEARNINGOFFERINGTAKEN

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

LEARNINGOFFERTAKENID DATA ELEMENT

RESULT::LEARNINGOFFERTAKENID

LOCATION:

CLASS --> RESULT

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 11/7/2005

--------------------------------------------------------------------------------------

LEARNINGOFFERTAKENTIME DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: TIME


82

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> LEARNING OFFER TAKEN

ENTITY --> LEARNINGOFFERSTAKEN

CLASS --> LEARNINGOFFERINGTAKEN

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

LEARNINGOFFERTITLE DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> LEARNING OFFERING

ENTITY --> LEARNINGOFFERINGS

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

LEARNINGQUESTIONSRANDOM DATA ELEMENT

LOCATION:

DATA FLOW --> LEARNING

ENTITY --> LEARNINGS

CLASS --> LEARNING

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005


83

--------------------------------------------------------------------------------------

LEARNINGQUESTIONSRANDOMBYDIFFICULTY DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: BIT

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> LEARNING

ENTITY --> LEARNINGS

CLASS --> LEARNING

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

LEARNINGS ENTITY

COMPOSITION:

LEARNINGDESC : VARCHAR

LEARNINGID : INTEGER 4

LEARNINGQUESTIONSRANDOM : UNDEFINED

LEARNINGQUESTIONSRANDOMBYDIFFICULTY : BIT

LEARNINGTITLE : VARCHAR

LEARNINGTUTORIALFILETYPE : VARCHAR

LEARNINGURL : VARCHAR

PRIMARY KEY:

INDEX NAME: GENERATED BY VAW


84

COLUMN(S): LEARNINGID [ ASC ]

FOREIGN KEY(S):

COURSES 'CONTAIN' LEARNINGS

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

ATTACHED RELATIONSHIPS ON KUOTE ERD:

[ CONTAIN ] MIN: 1 MAX: 1

COURSES

ARE OFFERED AS MIN: 0 MAX: MANY

LEARNINGOFFERINGS

CONTAIN MIN: 0 MAX: MANY

QUESTIONS

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

LEARNINGTITLE DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

NULL TYPE: NOTNULL

LOCATION:
85

DATA FLOW --> LEARNING

ENTITY --> LEARNINGS

CLASS --> LEARNING

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

LEARNINGTUTORIALFILETYPE DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

NULL TYPE: NULL

LOCATION:

DATA FLOW --> LEARNING

ENTITY --> LEARNINGS

CLASS --> LEARNING

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

LEARNINGURL DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

NULL TYPE: NULL

LOCATION:

DATA FLOW --> LEARNING

ENTITY --> LEARNINGS


86

CLASS --> LEARNING

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

OFFER RELATIONSHIP

ATTACHED OBJECTS:

INSTRUCTORS

OFFER MIN: 0 MAX: MANY

COURSEOFFERINGS

[ OFFER ] MIN: 1 MAX: 1

FOREIGN KEY(S):

INSTRUCTORS 'OFFER' COURSEOFFERINGS

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

PART OF RELATIONSHIP

ATTACHED OBJECTS:

QUESTIONSANSWERED

PART OF MIN: 0 MAX: MANY


87

LEARNINGOFFERSTAKEN

[ PART OF ] MIN: 1 MAX: 1

FOREIGN KEY(S):

QUESTIONSANSWERED 'PART OF' LEARNINGOFFERSTAKEN

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

QUESTIONANSWER DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: INTEGER 4

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> QUESTION

ENTITY --> QUESTIONS

CLASS --> QUESTION

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

QUESTIONANSWEREDCHOICE DATA ELEMENT


88

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: INTEGER 4

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> QUESTIONANSWERED

ENTITY --> QUESTIONSANSWERED

CLASS --> QUESTIONANSWERED

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

QUESTIONANSWEREDID DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: INTEGER 4

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> QUESTIONANSWERED

ENTITY --> QUESTIONSANSWERED

CLASS --> QUESTIONANSWERED

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

QUESTIONANSWEREDISCORRECT DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: BIT


89

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> QUESTIONANSWERED

ENTITY --> QUESTIONSANSWERED

CLASS --> QUESTIONANSWERED

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

QUESTIONBODY DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> QUESTION

ENTITY --> QUESTIONS

CLASS --> QUESTION

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

QUESTIONDIFFICULTY DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: INTEGER 4

NULL TYPE: NOTNULL

LOCATION:
90

DATA FLOW --> QUESTION

ENTITY --> QUESTIONS

CLASS --> QUESTION

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

QUESTIONID DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: INTEGER 4

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> QUESTION

DATA FLOW --> QUESTIONANSWERED

ENTITY --> QUESTIONS

ENTITY --> QUESTIONSANSWERED

CLASS --> QUESTIONANSWERED

CLASS --> QUESTION

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

QUESTIONNUMBER DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: INTEGER 4

NULL TYPE: NOTNULL


91

LOCATION:

DATA FLOW --> QUESTION

ENTITY --> QUESTIONS

CLASS --> QUESTION

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

QUESTIONOPTION1 DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> QUESTION

ENTITY --> QUESTIONS

CLASS --> QUESTION

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

QUESTIONOPTION2 DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> QUESTION


92

ENTITY --> QUESTIONS

CLASS --> QUESTION

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

QUESTIONOPTION3 DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

NULL TYPE: NULL

LOCATION:

DATA FLOW --> QUESTION

ENTITY --> QUESTIONS

CLASS --> QUESTION

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

QUESTIONOPTION4 DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

NULL TYPE: NULL

LOCATION:

DATA FLOW --> QUESTION

ENTITY --> QUESTIONS

CLASS --> QUESTION


93

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

QUESTIONOPTION5 DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

NULL TYPE: NULL

LOCATION:

DATA FLOW --> QUESTION

ENTITY --> QUESTIONS

CLASS --> QUESTION

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

QUESTIONS ENTITY

COMPOSITION:

QUESTIONANSWER : INTEGER 4

QUESTIONBODY : VARCHAR

QUESTIONDIFFICULTY : INTEGER 4

QUESTIONID : INTEGER 4

QUESTIONNUMBER : INTEGER 4

QUESTIONOPTION1 : VARCHAR

QUESTIONOPTION2 : VARCHAR

QUESTIONOPTION3 : VARCHAR
94

QUESTIONOPTION4 : VARCHAR

QUESTIONOPTION5 : VARCHAR

QUESTIONTIME : INTEGER 4

PRIMARY KEY:

INDEX NAME: GENERATED BY VAW

COLUMN(S): QUESTIONID [ ASC ]

FOREIGN KEY(S):

LEARNINGS 'CONTAIN' QUESTIONS

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

ATTACHED RELATIONSHIPS ON KUOTE ERD:

[ CONTAIN ] MIN: 1 MAX: 1

LEARNINGS

ANSWERED AS MIN: 0 MAX: MANY

QUESTIONSANSWERED

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

QUESTIONSANSWERED ENTITY

COMPOSITION:
95

QUESTIONANSWEREDID : INTEGER 4

QUESTIONANSWEREDCHOICE : INTEGER 4

QUESTIONANSWEREDISCORRECT : BIT

LEARNINGOFFERTAKENID : INTEGER 4

QUESTIONID : INTEGER 4

PRIMARY KEY:

INDEX NAME: GENERATED BY VAW

COLUMN(S): QUESTIONANSWEREDID [ ASC ]

FOREIGN KEY(S):

QUESTIONS 'ANSWERED AS' QUESTIONSANSWERED

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

ATTACHED RELATIONSHIPS ON KUOTE ERD:

[ ANSWERED AS ] MIN: 1 MAX: 1

QUESTIONS

PART OF MIN: 0 MAX: MANY

LEARNINGOFFERSTAKEN

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------
96

QUESTIONTIME DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: INTEGER 4

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> QUESTION

ENTITY --> QUESTIONS

CLASS --> QUESTION

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

RESULTDATETAKEN DATA ELEMENT

RESULT::RESULTDATETAKEN

LOCATION:

CLASS --> RESULT

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 11/7/2005

--------------------------------------------------------------------------------------

RESULTGRADE DATA ELEMENT

RESULT::RESULTGRADE

LOCATION:

CLASS --> RESULT

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 11/7/2005

--------------------------------------------------------------------------------------
97

RESULTID DATA ELEMENT

RESULT::RESULTID

LOCATION:

CLASS --> RESULT

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 11/7/2005

--------------------------------------------------------------------------------------

RESULTNUMCORRECT DATA ELEMENT

RESULT::RESULTNUMCORRECT

LOCATION:

CLASS --> RESULT

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 11/7/2005

--------------------------------------------------------------------------------------

RESULTNUMTOTAL DATA ELEMENT

RESULT::RESULTNUMTOTAL

LOCATION:

CLASS --> RESULT

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 11/7/2005

--------------------------------------------------------------------------------------

RESULTTIMETAKEN DATA ELEMENT

RESULT::RESULTTIMETAKEN

LOCATION:

CLASS --> RESULT


98

DATE LAST ALTERED: 11/7/2005 DATE CREATED: 11/7/2005

--------------------------------------------------------------------------------------

STUDENTID DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: INTEGER 4

NULL TYPE: NOTNULL

LOCATION:

ENTITY --> STUDENTS

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

STUDENTS ENTITY

COMPOSITION:

STUDENTTYPE : VARCHAR

STUDENTID : INTEGER 4

PRIMARY KEY:

INDEX NAME: GENERATED BY VAW

COLUMN(S): STUDENTID [ ASC ]

FOREIGN KEY(S):

USERS 'IS A' STUDENTS

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT


99

LOCATION:

KUOTE ERD

ATTACHED RELATIONSHIPS ON KUOTE ERD:

[ IS A ] MIN: 1 MAX: 1

USERS

ENROLLS IN MIN: 0 MAX: MANY

ENROLLMENT

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

STUDENTTYPE DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

LENGTH: 255

NULL TYPE: NOTNULL

LOCATION:

ENTITY --> STUDENTS

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

TAKEN AS RELATIONSHIP

ATTACHED OBJECTS:

LEARNINGOFFERINGS

TAKEN AS MIN: 0 MAX: MANY


100

LEARNINGOFFERSTAKEN

[ TAKEN AS ] MIN: 1 MAX: 1

FOREIGN KEY(S):

LEARNINGOFFERINGS 'TAKEN AS' LEARNINGOFFERSTAKEN

ON DELETE RESTRICT

ON UPDATE RESTRICT

ON INSERT OF CHILD ROW RESTRICT

LOCATION:

KUOTE ERD

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

USERAUTHENTICATED DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: BIT

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> AUTHENTICATION

DATE LAST ALTERED: 10/31/2005 DATE CREATED: 10/31/2005

--------------------------------------------------------------------------------------

USERID DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: INTEGER 4


101

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> COURSE

DATA FLOW --> COURSE OFFERING

DATA STORE --> USERS

DATA FLOW --> USER

DATA STORE --> COURSES

ENTITY --> COURSES

ENTITY --> USERS

CLASS --> ENROLLMENT

CLASS --> USER

CLASS --> COURSE

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

USERLOGIN DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

LENGTH: 255

NULL TYPE: NOTNULL

LOCATION:

DATA STORE --> USERS

DATA FLOW --> USER


102

ENTITY --> USERS

CLASS --> USER

DATA ELEMENT --> LOGIN::USERLOGIN

DATE LAST ALTERED: 10/31/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

USERLOGIN DATA ELEMENT

LOGIN::USERLOGIN

DATA ELEMENT ATTRIBUTES

DOMAIN: USERLOGIN

STORAGE TYPE: VARCHAR

LENGTH: 255

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> LOGIN

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

USERNAMEFIRST DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

LENGTH: 255

NULL TYPE: NOTNULL

LOCATION:
103

ENTITY --> USERS

CLASS --> USER

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

USERNAMELAST DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

LENGTH: 255

NULL TYPE: NOTNULL

LOCATION:

ENTITY --> USERS

CLASS --> USER

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

USERPASSWORD DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

NULL TYPE: NOTNULL

LOCATION:

DATA STORE --> USERS

DATA FLOW --> USER

ENTITY --> USERS


104

CLASS --> USER

DATA ELEMENT --> LOGIN::USRPASSWORD

DATE LAST ALTERED: 10/31/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------

USERS ENTITY

COMPOSITION:

USERID : INTEGER 4

USERLOGIN : VARCHAR

USERPASSWORD : VARCHAR

USERTYPE : VARCHAR

USERNAMEFIRST : VARCHAR

USERNAMELAST : VARCHAR

PRIMARY KEY:

INDEX NAME: GENERATED BY VAW

COLUMN(S): USERID [ ASC ]

LOCATION:

KUOTE ERD

ATTACHED RELATIONSHIPS ON KUOTE ERD:

IS AN MIN: 0 MAX: 1

INSTRUCTORS

IS A MIN: 0 MAX: 1

STUDENTS
105

DATE LAST ALTERED: 11/3/2005 DATE CREATED: 11/3/2005

--------------------------------------------------------------------------------------

USERTYPE DATA ELEMENT

DATA ELEMENT ATTRIBUTES

STORAGE TYPE: VARCHAR

LENGTH: 255

NULL TYPE: NOTNULL

LOCATION:

DATA STORE --> USERS

DATA FLOW --> USER

ENTITY --> USERS

CLASS --> USER

DATE LAST ALTERED: 10/31/2005 DATE CREATED: 10/31/2005

--------------------------------------------------------------------------------------

USRPASSWORD DATA ELEMENT

LOGIN::USRPASSWORD

DATA ELEMENT ATTRIBUTES

DOMAIN: USERPASSWORD

STORAGE TYPE: VARCHAR

NULL TYPE: NOTNULL

LOCATION:

DATA FLOW --> LOGIN


106

DATE LAST ALTERED: 10/28/2005 DATE CREATED: 10/28/2005

--------------------------------------------------------------------------------------
107

Appendix E: Data Flow Diagram - Datatypes


Authenticate User Process

Process #: 1

Location:

Kuote ( 0 )

Input Flows:

Login

Output Flows:

Authentication

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Authentication Data Flow

Composition:

userAuthenticated : Bit

Location:

Context Diagram ( CONTEXT )

Source: Kuote ( Process )

Dest: Student ( External Entity )

Source: Kuote ( Process )

Dest: Instructor ( External Entity )

Kuote ( 0 )

Source: Authenticate User ( Process )

Dest: *** Not on Diagram ***

Authenticate User ( 1 )
108

Source: Compare Data ( Process )

Dest: *** Not on Diagram ***

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Compare Data Process

Process #: 1.2

Location:

Authenticate User ( 1 )

Input Flows:

User

Login

Output Flows:

Authentication

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Course Data Flow

Composition:

crsId : Integer 4

crsTitle : VarChar

crsDesc : VarChar

userId : Integer 4

crsIsPublic : Bit

crsIsOpen : Bit

Location:

Context Diagram ( CONTEXT )


109

Source: Instructor ( External Entity )

Dest: Kuote ( Process )

Kuote ( 0 )

Source: *** Not on Diagram ***

Dest: Create ( Process )

Source: *** Not on Diagram ***

Dest: Update ( Process )

Source: Update ( Process )

Dest: *** Not on Diagram ***

Source: *** Not on Diagram ***

Dest: Get Results ( Process )

Source: Create ( Process )

Dest: *** Not on Diagram ***

Source: Get Results ( Process )

Dest: *** Not on Diagram ***

Context Diagram ( CONTEXT )

Source: Kuote ( Process )

Dest: Instructor ( External Entity )

Create ( 2 )

Source: *** Not on Diagram ***

Dest: Create Course ( Process )

Source: Create Learning ( Process )

Dest: *** Not on Diagram ***

Source: Create Course ( Process )

Dest: Courses ( Data Store )


110

Source: *** Not on Diagram ***

Dest: Create Learning ( Process )

Source: *** Not on Diagram ***

Dest: Create Question ( Process )

Source: Create Question ( Process )

Dest: *** Not on Diagram ***

Offer ( 6 )

Source: *** Not on Diagram ***

Dest: Create Course Offering ( Process )

Kuote ( 0 )

Source: *** Not on Diagram ***

Dest: Offer ( Process )

Create Learning ( 2.2 )

Source: *** Not on Diagram ***

Dest: Select Course ( Process )

Source: Select Course ( Process )

Dest: *** Not on Diagram ***

Source: Courses ( Data Store )

Dest: Select Course ( Process )

Source: Select Course ( Process )

Dest: Verify Learning ( Process )

Create Course ( 2.1 )

Source: *** Not on Diagram ***

Dest: Verify Course ( Process )

Source: Verify Course ( Process )


111

Dest: *** Not on Diagram ***

Create Question ( 2.3 )

Source: *** Not on Diagram ***

Dest: Select_Course ( Process )

Source: Select_Course ( Process )

Dest: *** Not on Diagram ***

Source: Courses ( Data Store )

Dest: Select_Course ( Process )

Source: Select_Course ( Process )

Dest: Select Learning ( Process )

Source: Select Learning ( Process )

Dest: Verify Question ( Process )

Update (3)

Source: *** Not on Diagram ***

Dest: Update Course ( Process )

Source: Update Course ( Process )

Dest: Courses ( Data Store )

Source: Update Course ( Process )

Dest: *** Not on Diagram ***

Source: Update Learning ( Process )

Dest: *** Not on Diagram ***

Source: *** Not on Diagram ***

Dest: Update Learning ( Process )

Source: Update Question ( Process )

Dest: *** Not on Diagram ***


112

Source: *** Not on Diagram ***

Dest: Update Question ( Process )

Update Course ( 3.1 )

Source: Get Updated Course ( Process )

Dest: *** Not on Diagram ***

Source: *** Not on Diagram ***

Dest: Get Updated Course ( Process )

Source: Verify Course_ ( Process )

Dest: *** Not on Diagram ***

Source: Courses ( Data Store )

Dest: Get Updated Course ( Process )

Source: Get Updated Course ( Process )

Dest: Verify Course_ ( Process )

Update Learning ( 3.2 )

Source: *** Not on Diagram ***

Dest: Get Course ( Process )

Source: Get Course ( Process )

Dest: *** Not on Diagram ***

Source: Courses ( Data Store )

Dest: Get Course ( Process )

Source: Get Course ( Process )

Dest: Get Updated Learning ( Process )

Update Question ( 3.3 )

Source: *** Not on Diagram ***

Dest: Get Course_ ( Process )


113

Source: Get Course_ ( Process )

Dest: *** Not on Diagram ***

Source: Courses ( Data Store )

Dest: Get Course_ ( Process )

Source: Get Course_ ( Process )

Dest: Get Learning ( Process )

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

Course Offering Data Flow

Composition:

crsOfferId : Integer 4

crsOfferTitle : VarChar

crsOfferStart : Date

crsOfferEnd : Date

crsOfferPassword : VarChar

userId : Integer 4

crsId : Integer 4

Location:

Context Diagram ( CONTEXT )

Source: Instructor ( External Entity )

Dest: Kuote ( Process )

Source: Student ( External Entity )

Dest: Kuote ( Process )

Source: Kuote ( Process )

Dest: Student ( External Entity )


114

Kuote ( 0 )

Source: *** Not on Diagram ***

Dest: Update ( Process )

Source: Update ( Process )

Dest: *** Not on Diagram ***

Source: *** Not on Diagram ***

Dest: Get Results ( Process )

Source: Get Results ( Process )

Dest: *** Not on Diagram ***

Offer ( 6 )

Source: *** Not on Diagram ***

Dest: Create Course Offering ( Process )

Source: Create Learning Offering ( Process )

Dest: *** Not on Diagram ***

Source: Create Course Offering ( Process )

Dest: Course Offerings ( Data Store )

Source: *** Not on Diagram ***

Dest: Create Learning Offering ( Process )

Kuote ( 0 )

Source: *** Not on Diagram ***

Dest: Offer ( Process )

Source: Offer ( Process )

Dest: *** Not on Diagram ***

Update (3)

Source: *** Not on Diagram ***


115

Dest: Update Course Offering ( Process )

Source: Update Course Offering ( Process )

Dest: *** Not on Diagram ***

Source: Update Course Offering ( Process )

Dest: Course Offerings ( Data Store )

Source: Update Learning Offering ( Process )

Dest: *** Not on Diagram ***

Source: *** Not on Diagram ***

Dest: Update Learning Offering ( Process )

Update Course Offering ( 3.4 )

Source: *** Not on Diagram ***

Dest: Get Updated Course Offering ( Process )

Source: Get Updated Course Offering ( Process )

Dest: *** Not on Diagram ***

Source: Verify Course Offering ( Process )

Dest: *** Not on Diagram ***

Source: Course Offerings ( Data Store )

Dest: Get Updated Course Offering ( Process )

Source: Get Updated Course Offering ( Process )

Dest: Verify Course Offering ( Process )

Update Learning Offering ( 3.5 )

Source: *** Not on Diagram ***

Dest: Get Course Offering ( Process )

Source: Get Course Offering ( Process )

Dest: *** Not on Diagram ***


116

Source: Course Offerings ( Data Store )

Dest: Get Course Offering ( Process )

Source: Get Course Offering ( Process )

Dest: Get Updated Learning Offering ( Process )

Data Store --> Course Offerings

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

Course Offerings Data Store

Data Store #: D5

Composition:

Course Offering :

Location:

Offer ( 6 )

Input Flows:

Course Offering

Update (3)

Input Flows:

Course Offering

Update Course Offering ( 3.4 )

Output Flows:

Course Offering

Update Learning Offering ( 3.5 )

Output Flows:

Course Offering

Date Last Altered: 10/31/2005 Date Created: 10/31/2005


117

----------------------------------------------------------------------------------

Courses Data Store

Data Store #: D2

Composition:

crsId : Integer 4

crsDesc : VarChar

crsIsOpen : Bit

crsIsPublic : Bit

crsTitle : VarChar

userId : Integer 4

Location:

Create ( 2 )

Input Flows:

Course

Create Learning ( 2.2 )

Output Flows:

Course

Create Question ( 2.3 )

Output Flows:

Course

Update (3)

Input Flows:

Course

Update Course ( 3.1 )

Output Flows:
118

Course

Update Learning ( 3.2 )

Output Flows:

Course

Update Question ( 3.3 )

Output Flows:

Course

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Create Process

Process #: 2

Location:

Kuote ( 0 )

Input Flows:

Course

Learning

Question

Output Flows:

Learning

Course

Question

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Create Course Process

Process #: 2.1
119

Location:

Create ( 2 )

Input Flows:

Course

Output Flows:

Course

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Create Course Offering Process

Process #: 6.1

Location:

Offer ( 6 )

Input Flows:

Course Offering

Course

Output Flows:

Course Offering

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Create Learning Process

Process #: 2.2

Location:

Create ( 2 )

Input Flows:

Course
120

Learning

Output Flows:

Course

Learning

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Create Learning Offering Process

Process #: 6.2

Location:

Offer ( 6 )

Input Flows:

Learning Offering

Course Offering

Learning

Output Flows:

Course Offering

Learning

Learning Offering

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Create Question Process

Process #: 2.3

Location:

Create ( 2 )

Input Flows:
121

Learning

Course

Question

Output Flows:

Learning

Course

Question

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

crsDesc Data Element

Data element attributes

Storage Type: VarChar

Null Type: NotNull

Location:

Data Flow --> Course

Data Store --> Courses

Entity --> Courses

Class --> Course

Date Last Altered: 11/7/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

crsId Data Element

Data element attributes

Storage Type: Integer 4

Null Type: NotNull

Location:
122

Data Flow --> Course

Data Flow --> Course Offering

Data Flow --> Learning

Data Store --> Courses

Entity --> Courses

Entity --> CourseOfferings

Class --> Learning

Class --> CourseOffering

Class --> Course

Date Last Altered: 11/7/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

crsIsOpen Data Element

Data element attributes

Storage Type: Bit

Null Type: NotNull

Location:

Data Flow --> Course

Data Store --> Courses

Entity --> Courses

Class --> Course

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

crsIsPublic Data Element

Data element attributes

Storage Type: Bit


123

Null Type: NotNull

Location:

Data Flow --> Course

Data Store --> Courses

Entity --> Courses

Class --> Course

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

crsOfferEnd Data Element

Data element attributes

Storage Type: Date

Null Type: NotNull

Location:

Data Flow --> Course Offering

Entity --> CourseOfferings

Class --> CourseOffering

Date Last Altered: 11/7/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

crsOfferId Data Element

Data element attributes

Storage Type: Integer 4

Null Type: NotNull

Location:

Data Flow --> Course Offering

Data Flow --> Learning Offering


124

Class --> Enrollment

Entity --> CourseOfferings

Entity --> LearningOfferings

Class --> CourseOffering

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

crsOfferPassword Data Element

Data element attributes

Storage Type: VarChar

Null Type: Null

Location:

Data Flow --> Course Offering

Entity --> CourseOfferings

Class --> CourseOffering

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

crsOfferStart Data Element

Data element attributes

Storage Type: Date

Null Type: NotNull

Location:

Data Flow --> Course Offering

Entity --> CourseOfferings

Class --> CourseOffering

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------
125

crsOfferTitle Data Element

Data element attributes

Storage Type: VarChar

Null Type: NotNull

Location:

Data Flow --> Course Offering

Entity --> CourseOfferings

Class --> CourseOffering

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

crsTitle Data Element

Data element attributes

Storage Type: VarChar

Null Type: NotNull

Location:

Data Flow --> Course

Data Store --> Courses

Entity --> Courses

Class --> Course

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

enrollId Data Element

Data element attributes

Storage Type: Integer 4

Null Type: NotNull


126

Location:

Data Flow --> Learning Offer Taken

Class --> Enrollment

Entity --> LearningOffersTaken

Date Last Altered: 11/3/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

Get Course Process

Process #: 3.2.1

Location:

Update Learning ( 3.2 )

Input Flows:

Course

Course

Output Flows:

Course

Course

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Get Course Offering Process

Process #: 3.5.1

Location:

Update Learning Offering ( 3.5 )

Input Flows:

Course Offering

Course Offering
127

Output Flows:

Course Offering

Course Offering

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Get Course_ Process

Process #: 3.3.1

Location:

Update Question ( 3.3 )

Input Flows:

Course

Course

Output Flows:

Course

Course

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Get Learning Process

Process #: 3.3.2

Location:

Update Question ( 3.3 )

Input Flows:

Learning

Course

Learning
128

Output Flows:

Learning

Learning

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Get Learning Offering Process

Process #: 4.1

Location:

Take Quiz (4)

Input Flows:

Learning Offering

Learning Offering

Output Flows:

Learning Offering

Learning Offering

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Get Results Process

Process #: 5

Location:

Kuote ( 0 )

Input Flows:

Course

Course Offering

Learning
129

Learning Offering

Learning Offer Taken

Output Flows:

Course Offering

Learning

Learning Offering

Learning Offer Taken

Question

questionAnswered

Course

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Get Updated Course Process

Process #: 3.1.1

Location:

Update Course ( 3.1 )

Input Flows:

Course

Course

Output Flows:

Course

Course

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Get Updated Course Offering Process


130

Process #: 3.4.1

Location:

Update Course Offering ( 3.4 )

Input Flows:

Course Offering

Course Offering

Output Flows:

Course Offering

Course Offering

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Get Updated Learning Process

Process #: 3.2.2

Location:

Update Learning ( 3.2 )

Input Flows:

Learning

Course

Learning

Output Flows:

Learning

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Get Updated Learning Offering Process

Process #: 3.5.2
131

Location:

Update Learning Offering ( 3.5 )

Input Flows:

Learning Offering

Course Offering

Learning Offering

Output Flows:

Learning Offering

Learning Offering

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Get Updated Question Process

Process #: 3.3.3

Location:

Update Question ( 3.3 )

Input Flows:

Question

Learning

Question

Output Flows:

Question

Question

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

I Data Element [Domain]


132

Data element attributes

Storage Type: Undefined

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

Id Data Element

KuoteObject::Id

Data element attributes

Storage Type: Integer 4

Null Type: NotNull

Location:

Class --> KuoteObject

Date Last Altered: 11/7/2005 Date Created: 11/7/2005

----------------------------------------------------------------------------------

Instructor External Entity

Location:

Context Diagram ( CONTEXT )

Input Flows:

questionAnswered

Learning Offer Taken

Authentication

Course

Learning

Output Flows:

Course

Login
133

Course Offering

Learning

Learning Offering

Question

Learning Offer Taken

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

instructorBuilding Data Element

Data element attributes

Storage Type: VarChar

Length: 255

Null Type: NotNull

Location:

Entity --> Instructors

Date Last Altered: 11/3/2005 Date Created: 11/3/2005

----------------------------------------------------------------------------------

instructorId Data Element

Data element attributes

Storage Type: Integer 4

Null Type: NotNull

Location:

Entity --> Instructors

Entity --> CourseOfferings

Date Last Altered: 11/3/2005 Date Created: 11/3/2005

----------------------------------------------------------------------------------
134

instructorPhone Data Element

Data element attributes

Storage Type: Integer 4

Length: 10

Null Type: NotNull

Location:

Entity --> Instructors

Date Last Altered: 11/3/2005 Date Created: 11/3/2005

----------------------------------------------------------------------------------

instructorRoom Data Element

Data element attributes

Storage Type: VarChar

Length: 255

Null Type: NotNull

Location:

Entity --> Instructors

Date Last Altered: 11/3/2005 Date Created: 11/3/2005

----------------------------------------------------------------------------------

Kuote Process

Process #: 0

Location:

Context Diagram ( CONTEXT )

Input Flows:

Login

Course
135

Login

Course Offering

Learning

Learning Offering

Question

questionAnswered

Course Offering

Learning Offering

Learning Offer Taken

Output Flows:

questionAnswered

Learning Offer Taken

Question

Course Offering

Learning Offering

questionAnswered

Authentication

Authentication

Course

Learning

Date Last Altered: 10/31/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

Learning Data Flow

Composition:

learningId : Integer 4
136

learningTitle : VarChar

learningDesc : VarChar

learningURL : VarChar

learningTutorialFileType : VarChar

learningQuestionsRandom : Undefined

learningQuestionsRandomByDifficulty : Bit

crsId : Integer 4

Location:

Context Diagram ( CONTEXT )

Source: Instructor ( External Entity )

Dest: Kuote ( Process )

Kuote ( 0 )

Source: *** Not on Diagram ***

Dest: Create ( Process )

Source: Create ( Process )

Dest: *** Not on Diagram ***

Source: *** Not on Diagram ***

Dest: Update ( Process )

Source: Update ( Process )

Dest: *** Not on Diagram ***

Source: *** Not on Diagram ***

Dest: Get Results ( Process )

Source: Get Results ( Process )

Dest: *** Not on Diagram ***

Context Diagram ( CONTEXT )


137

Source: Kuote ( Process )

Dest: Instructor ( External Entity )

Create ( 2 )

Source: *** Not on Diagram ***

Dest: Create Question ( Process )

Source: Create Learning ( Process )

Dest: Learnings ( Data Store )

Source: Create Question ( Process )

Dest: *** Not on Diagram ***

Source: *** Not on Diagram ***

Dest: Create Learning ( Process )

Offer ( 6 )

Source: Create Learning Offering ( Process )

Dest: *** Not on Diagram ***

Kuote ( 0 )

Source: *** Not on Diagram ***

Dest: Offer ( Process )

Source: Offer ( Process )

Dest: *** Not on Diagram ***

Offer ( 6 )

Source: *** Not on Diagram ***

Dest: Create Learning Offering ( Process )

Create Learning ( 2.2 )

Source: *** Not on Diagram ***

Dest: Verify Learning ( Process )


138

Source: Verify Learning ( Process )

Dest: *** Not on Diagram ***

Create Question ( 2.3 )

Source: *** Not on Diagram ***

Dest: Select Learning ( Process )

Source: Select Learning ( Process )

Dest: *** Not on Diagram ***

Source: Learnings ( Data Store )

Dest: Select Learning ( Process )

Source: Select Learning ( Process )

Dest: Verify Question ( Process )

Update (3)

Source: *** Not on Diagram ***

Dest: Update Learning ( Process )

Source: Update Learning ( Process )

Dest: Learnings ( Data Store )

Source: Update Learning ( Process )

Dest: *** Not on Diagram ***

Source: Update Question ( Process )

Dest: *** Not on Diagram ***

Source: *** Not on Diagram ***

Dest: Update Question ( Process )

Update Learning ( 3.2 )

Source: *** Not on Diagram ***

Dest: Get Updated Learning ( Process )


139

Source: Get Updated Learning ( Process )

Dest: Verify Learning_ ( Process )

Source: Learnings ( Data Store )

Dest: Get Updated Learning ( Process )

Source: Verify Learning_ ( Process )

Dest: *** Not on Diagram ***

Update Question ( 3.3 )

Source: Get Learning ( Process )

Dest: *** Not on Diagram ***

Source: *** Not on Diagram ***

Dest: Get Learning ( Process )

Source: Get Learning ( Process )

Dest: Get Updated Question ( Process )

Source: Learnings ( Data Store )

Dest: Get Learning ( Process )

Data Store --> Learnings

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

Learning Offer Taken Data Flow

Composition:

learningOfferTakenId : Integer 4

learningOfferTakenTime : Time

learningOfferId : Integer 4

enrollId : Integer 4

Location:
140

Context Diagram ( CONTEXT )

Source: Kuote ( Process )

Dest: Instructor ( External Entity )

Kuote ( 0 )

Source: Take Quiz ( Process )

Dest: *** Not on Diagram ***

Source: *** Not on Diagram ***

Dest: Get Results ( Process )

Source: Get Results ( Process )

Dest: *** Not on Diagram ***

Context Diagram ( CONTEXT )

Source: Instructor ( External Entity )

Dest: Kuote ( Process )

Take Quiz (4)

Source: Process Learning Offer Taken ( Process )

Dest: Learning Offers Taken ( Data Store )

Data Store --> Learning Offers Taken

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

Learning Offering Data Flow

Composition:

learningOfferId : Integer 4

learningOfferTitle : VarChar

learningOfferStart : Date

learningOfferEnd : Date
141

learningOfferQuestionsRandom : Bit

learningOfferQuestionsRandomByDifficulty : Bit

crsOfferId : Integer 4

learningId : Integer 4

Location:

Context Diagram ( CONTEXT )

Source: Instructor ( External Entity )

Dest: Kuote ( Process )

Source: Student ( External Entity )

Dest: Kuote ( Process )

Source: Kuote ( Process )

Dest: Student ( External Entity )

Kuote ( 0 )

Source: *** Not on Diagram ***

Dest: Update ( Process )

Source: Update ( Process )

Dest: *** Not on Diagram ***

Source: Take Quiz ( Process )

Dest: *** Not on Diagram ***

Source: *** Not on Diagram ***

Dest: Take Quiz ( Process )

Source: *** Not on Diagram ***

Dest: Get Results ( Process )

Source: Get Results ( Process )

Dest: *** Not on Diagram ***


142

Offer ( 6 )

Source: *** Not on Diagram ***

Dest: Create Learning Offering ( Process )

Source: Create Learning Offering ( Process )

Dest: Learning Offerings ( Data Store )

Update (3)

Source: *** Not on Diagram ***

Dest: Update Learning Offering ( Process )

Source: Update Learning Offering ( Process )

Dest: *** Not on Diagram ***

Source: Update Learning Offering ( Process )

Dest: Learning Offerings ( Data Store )

Update Learning Offering ( 3.5 )

Source: *** Not on Diagram ***

Dest: Get Updated Learning Offering ( Process )

Source: Learning Offerings ( Data Store )

Dest: Get Updated Learning Offering ( Process )

Source: Get Updated Learning Offering ( Process )

Dest: *** Not on Diagram ***

Source: Get Updated Learning Offering ( Process )

Dest: Verify Learning Offering ( Process )

Source: Verify Learning Offering ( Process )

Dest: *** Not on Diagram ***

Take Quiz (4)

Source: *** Not on Diagram ***


143

Dest: Get Learning Offering ( Process )

Source: Get Learning Offering ( Process )

Dest: *** Not on Diagram ***

Source: Learning Offerings ( Data Store )

Dest: Get Learning Offering ( Process )

Source: Get Learning Offering ( Process )

Dest: Process Question ( Process )

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

Learning Offerings Data Store

Data Store #: D6

Location:

Offer ( 6 )

Input Flows:

Learning Offering

Update (3)

Input Flows:

Learning Offering

Update Learning Offering ( 3.5 )

Output Flows:

Learning Offering

Take Quiz (4)

Output Flows:

Learning Offering

Date Last Altered: 10/31/2005 Date Created: 10/31/2005


144

----------------------------------------------------------------------------------

Learning Offers Taken Data Store

Data Store #: D8

Composition:

Learning Offer Taken :

Location:

Take Quiz (4)

Input Flows:

Learning Offer Taken

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

learningDesc Data Element

Data element attributes

Storage Type: VarChar

Null Type: NotNull

Location:

Data Flow --> Learning

Entity --> Learnings

Class --> Learning

Date Last Altered: 11/3/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

learningId Data Element

Data element attributes

Storage Type: Integer 4

Null Type: NotNull


145

Location:

Data Flow --> Learning

Data Flow --> Learning Offering

Data Flow --> Question

Entity --> Learnings

Entity --> LearningOfferings

Class --> Learning

Class --> LearningOffering

Class --> Question

Date Last Altered: 11/7/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

learningOfferEnd Data Element

Data element attributes

Storage Type: Date

Null Type: NotNull

Location:

Data Flow --> Learning Offering

Entity --> LearningOfferings

Class --> LearningOffering

Date Last Altered: 11/7/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

learningOfferId Data Element

Data element attributes

Storage Type: Integer 4

Null Type: NotNull


146

Location:

Data Flow --> Learning Offering

Data Flow --> Learning Offer Taken

Entity --> LearningOfferings

Entity --> LearningOffersTaken

Class --> LearningOffering

Class --> LearningOfferingTaken

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

learningOfferQuestionsRandom Data Element

Description:

Allows the instructor to override the default Questions Randomization of a learning.

Data element attributes

Storage Type: Bit

Null Type: NotNull

Location:

Data Flow --> Learning Offering

Entity --> LearningOfferings

Class --> LearningOffering

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

learningOfferQuestionsRandomByDifficulty Data Element

Data element attributes

Storage Type: Bit

Null Type: Null


147

Location:

Data Flow --> Learning Offering

Entity --> LearningOfferings

Class --> LearningOffering

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

learningOfferStart Data Element

Data element attributes

Storage Type: Date

Null Type: NotNull

Location:

Data Flow --> Learning Offering

Entity --> LearningOfferings

Class --> LearningOffering

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

learningOfferTakenId Data Element

Data element attributes

Storage Type: Integer 4

Null Type: NotNull

Location:

Data Flow --> questionAnswered

Data Flow --> Learning Offer Taken

Entity --> LearningOffersTaken

Entity --> questionsAnswered


148

Class --> LearningOfferingTaken

Date Last Altered: 11/7/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

learningOfferTakenId Data Element

Result::learningOfferTakenId

Location:

Class --> Result

Date Last Altered: 11/7/2005 Date Created: 11/7/2005

----------------------------------------------------------------------------------

learningOfferTakenTime Data Element

Data element attributes

Storage Type: Time

Null Type: NotNull

Location:

Data Flow --> Learning Offer Taken

Entity --> LearningOffersTaken

Class --> LearningOfferingTaken

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

learningOfferTitle Data Element

Data element attributes

Storage Type: VarChar

Null Type: NotNull

Location:

Data Flow --> Learning Offering


149

Entity --> LearningOfferings

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

learningQuestionsRandom Data Element

Location:

Data Flow --> Learning

Entity --> Learnings

Class --> Learning

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

learningQuestionsRandomByDifficulty Data Element

Data element attributes

Storage Type: Bit

Null Type: NotNull

Location:

Data Flow --> Learning

Entity --> Learnings

Class --> Learning

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

Learnings Data Store

Data Store #: D3

Composition:

Learning :

Location:
150

Create ( 2 )

Input Flows:

Learning

Create Question ( 2.3 )

Output Flows:

Learning

Update (3)

Input Flows:

Learning

Update Learning ( 3.2 )

Output Flows:

Learning

Update Question ( 3.3 )

Output Flows:

Learning

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

learningTitle Data Element

Data element attributes

Storage Type: VarChar

Null Type: NotNull

Location:

Data Flow --> Learning

Entity --> Learnings

Class --> Learning


151

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

learningTutorialFileType Data Element

Data element attributes

Storage Type: VarChar

Null Type: Null

Location:

Data Flow --> Learning

Entity --> Learnings

Class --> Learning

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

learningURL Data Element

Data element attributes

Storage Type: VarChar

Null Type: Null

Location:

Data Flow --> Learning

Entity --> Learnings

Class --> Learning

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

Login Data Flow

Composition:

userLogin : userLogin
152

usrPassword : userPassword

Location:

Context Diagram ( CONTEXT )

Source: Student ( External Entity )

Dest: Kuote ( Process )

Source: Instructor ( External Entity )

Dest: Kuote ( Process )

Kuote ( 0 )

Source: *** Not on Diagram ***

Dest: Authenticate User ( Process )

Authenticate User ( 1 )

Source: *** Not on Diagram ***

Dest: Lookup User ( Process )

Source: Lookup User ( Process )

Dest: Compare Data ( Process )

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

Lookup User Process

Process #: 1.1

Location:

Authenticate User ( 1 )

Input Flows:

Login

User

Output Flows:
153

User

Login

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Offer Process

Process #: 6

Location:

Kuote ( 0 )

Input Flows:

Course

Course Offering

Learning

Output Flows:

Course Offering

Learning

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Process Learning Offer Taken Process

Process #: 4.3

Location:

Take Quiz (4)

Input Flows:

questionAnswered

Output Flows:

Learning Offer Taken


154

questionAnswered

questionAnswered

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Process Question Process

Process #: 4.2

Location:

Take Quiz (4)

Input Flows:

questionAnswered

Learning Offering

Question

Output Flows:

Question

questionAnswered

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Question Data Flow

Composition:

questionId : Integer 4

questionBody : VarChar

questionTime : Integer 4

learningId : Integer 4

questionNumber : Integer 4

questionDifficulty : Integer 4
155

questionAnswer : Integer 4

questionOption1 : VarChar

questionOption2 : VarChar

questionOption3 : VarChar

questionOption4 : VarChar

questionOption5 : VarChar

Location:

Context Diagram ( CONTEXT )

Source: Instructor ( External Entity )

Dest: Kuote ( Process )

Source: Kuote ( Process )

Dest: Student ( External Entity )

Kuote ( 0 )

Source: *** Not on Diagram ***

Dest: Update ( Process )

Source: Update ( Process )

Dest: *** Not on Diagram ***

Source: Get Results ( Process )

Dest: *** Not on Diagram ***

Create ( 2 )

Source: *** Not on Diagram ***

Dest: Create Question ( Process )

Source: Create Question ( Process )

Dest: Questions ( Data Store )

Kuote ( 0 )
156

Source: *** Not on Diagram ***

Dest: Create ( Process )

Source: Create ( Process )

Dest: *** Not on Diagram ***

Create Question ( 2.3 )

Source: *** Not on Diagram ***

Dest: Verify Question ( Process )

Source: Verify Question ( Process )

Dest: *** Not on Diagram ***

Update (3)

Source: Update Question ( Process )

Dest: Questions ( Data Store )

Source: Update Question ( Process )

Dest: *** Not on Diagram ***

Source: *** Not on Diagram ***

Dest: Update Question ( Process )

Update Question ( 3.3 )

Source: *** Not on Diagram ***

Dest: Get Updated Question ( Process )

Source: Verify Question_ ( Process )

Dest: *** Not on Diagram ***

Source: Get Updated Question ( Process )

Dest: *** Not on Diagram ***

Source: Get Updated Question ( Process )

Dest: Verify Question_ ( Process )


157

Source: Questions ( Data Store )

Dest: Get Updated Question ( Process )

Take Quiz (4)

Source: Process Question ( Process )

Dest: *** Not on Diagram ***

Source: Questions ( Data Store )

Dest: Process Question ( Process )

Kuote ( 0 )

Source: Take Quiz ( Process )

Dest: *** Not on Diagram ***

Source: *** Not on Diagram ***

Dest: Take Quiz ( Process )

Data Store --> Questions

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

Question Answered Data Store

Data Store #: D7

Composition:

Question Answered :

Location:

Take Quiz (4)

Input Flows:

questionAnswered

Data Store --> Question Answered

Date Last Altered: 10/31/2005 Date Created: 10/31/2005


158

questionAnswer Data Element

Data element attributes

Storage Type: Integer 4

Null Type: NotNull

Location:

Data Flow --> Question

Entity --> Questions

Class --> Question

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

questionAnswered Data Flow

Composition:

questionAnsweredId : Integer 4

questionAnsweredChoice : Integer 4

questionAnsweredIsCorrect : Bit

questionId : Integer 4

learningOfferTakenId : Integer 4

Location:

Context Diagram ( CONTEXT )

Source: Kuote ( Process )

Dest: Instructor ( External Entity )

Source: Student ( External Entity )

Dest: Kuote ( Process )

Source: Kuote ( Process )

Dest: Student ( External Entity )


159

Kuote ( 0 )

Source: *** Not on Diagram ***

Dest: Take Quiz ( Process )

Source: Get Results ( Process )

Dest: *** Not on Diagram ***

Take Quiz (4)

Source: *** Not on Diagram ***

Dest: Process Question ( Process )

Source: Process Question ( Process )

Dest: Process Learning Offer Taken ( Process )

Source: Process Learning Offer Taken ( Process )

Dest: Question Answered ( Data Store )

Source: Process Learning Offer Taken ( Process )

Dest: *** Not on Diagram ***

Kuote ( 0 )

Source: Take Quiz ( Process )

Dest: *** Not on Diagram ***

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

questionAnsweredChoice Data Element

Data element attributes

Storage Type: Integer 4

Null Type: NotNull

Location:

Data Flow --> questionAnswered


160

Entity --> questionsAnswered

Class --> QuestionAnswered

Date Last Altered: 11/7/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

questionAnsweredId Data Element

Data element attributes

Storage Type: Integer 4

Null Type: NotNull

Location:

Data Flow --> questionAnswered

Entity --> questionsAnswered

Class --> QuestionAnswered

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

questionAnsweredIsCorrect Data Element

Data element attributes

Storage Type: Bit

Null Type: NotNull

Location:

Data Flow --> questionAnswered

Entity --> questionsAnswered

Class --> QuestionAnswered

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

questionBody Data Element


161

Data element attributes

Storage Type: VarChar

Null Type: NotNull

Location:

Data Flow --> Question

Entity --> Questions

Class --> Question

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

questionDifficulty Data Element

Data element attributes

Storage Type: Integer 4

Null Type: NotNull

Location:

Data Flow --> Question

Entity --> Questions

Class --> Question

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

questionId Data Element

Data element attributes

Storage Type: Integer 4

Null Type: NotNull

Location:

Data Flow --> Question


162

Data Flow --> questionAnswered

Entity --> Questions

Entity --> questionsAnswered

Class --> QuestionAnswered

Class --> Question

Date Last Altered: 11/7/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

questionNumber Data Element

Data element attributes

Storage Type: Integer 4

Null Type: NotNull

Location:

Data Flow --> Question

Entity --> Questions

Class --> Question

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

questionOption1 Data Element

Data element attributes

Storage Type: VarChar

Null Type: NotNull

Location:

Data Flow --> Question

Entity --> Questions

Class --> Question


163

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

questionOption2 Data Element

Data element attributes

Storage Type: VarChar

Null Type: NotNull

Location:

Data Flow --> Question

Entity --> Questions

Class --> Question

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

questionOption3 Data Element

Data element attributes

Storage Type: VarChar

Null Type: Null

Location:

Data Flow --> Question

Entity --> Questions

Class --> Question

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

questionOption4 Data Element

Data element attributes

Storage Type: VarChar


164

Null Type: Null

Location:

Data Flow --> Question

Entity --> Questions

Class --> Question

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

questionOption5 Data Element

Data element attributes

Storage Type: VarChar

Null Type: Null

Location:

Data Flow --> Question

Entity --> Questions

Class --> Question

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

Questions Data Store

Data Store #: D4

Composition:

Question :

Location:

Create ( 2 )

Input Flows:

Question
165

Update (3)

Input Flows:

Question

Update Question ( 3.3 )

Output Flows:

Question

Take Quiz (4)

Output Flows:

Question

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

questionTime Data Element

Data element attributes

Storage Type: Integer 4

Null Type: NotNull

Location:

Data Flow --> Question

Entity --> Questions

Class --> Question

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

resultDateTaken Data Element

Result::resultDateTaken

Location:

Class --> Result


166

Date Last Altered: 11/7/2005 Date Created: 11/7/2005

----------------------------------------------------------------------------------

resultGrade Data Element

Result::resultGrade

Location:

Class --> Result

Date Last Altered: 11/7/2005 Date Created: 11/7/2005

----------------------------------------------------------------------------------

resultId Data Element

Result::resultId

Location:

Class --> Result

Date Last Altered: 11/7/2005 Date Created: 11/7/2005

----------------------------------------------------------------------------------

resultNumCorrect Data Element

Result::resultNumCorrect

Location:

Class --> Result

Date Last Altered: 11/7/2005 Date Created: 11/7/2005

----------------------------------------------------------------------------------

resultNumTotal Data Element

Result::resultNumTotal

Location:

Class --> Result

Date Last Altered: 11/7/2005 Date Created: 11/7/2005


167

----------------------------------------------------------------------------------

resultTimeTaken Data Element

Result::resultTimeTaken

Location:

Class --> Result

Date Last Altered: 11/7/2005 Date Created: 11/7/2005

----------------------------------------------------------------------------------

Select Course Process

Process #: 2.2.1

Location:

Create Learning ( 2.2 )

Input Flows:

Course

Course

Output Flows:

Course

Course

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Select Learning Process

Process #: 2.3.2

Location:

Create Question ( 2.3 )

Input Flows:

Learning
168

Course

Learning

Output Flows:

Learning

Course

Learning

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Select_Course Process

Process #: 2.3.1

Location:

Create Question ( 2.3 )

Input Flows:

Course

Course

Output Flows:

Course

Course

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Student External Entity

Location:

Context Diagram ( CONTEXT )

Input Flows:

Question
169

Course Offering

Learning Offering

questionAnswered

Authentication

Output Flows:

Login

questionAnswered

Course Offering

Learning Offering

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

studentId Data Element

Data element attributes

Storage Type: Integer 4

Null Type: NotNull

Location:

Entity --> Students

Date Last Altered: 11/3/2005 Date Created: 11/3/2005

----------------------------------------------------------------------------------

studentType Data Element

Data element attributes

Storage Type: VarChar

Length: 255

Null Type: NotNull

Location:
170

Entity --> Students

Date Last Altered: 11/3/2005 Date Created: 11/3/2005

----------------------------------------------------------------------------------

Take Quiz Process

Process #: 4

Location:

Kuote ( 0 )

Input Flows:

Learning Offering

questionAnswered

Question

Output Flows:

Learning Offering

Learning Offer Taken

questionAnswered

Question

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Update Process

Process #: 3

Location:

Kuote ( 0 )

Input Flows:

Course

Course Offering
171

Learning

Learning Offering

Question

Output Flows:

Course

Course Offering

Learning

Learning Offering

Question

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Update Course Process

Process #: 3.1

Location:

Update (3)

Input Flows:

Course

Output Flows:

Course

Course

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Update Course Offering Process

Process #: 3.4

Location:
172

Update (3)

Input Flows:

Course Offering

Output Flows:

Course Offering

Course Offering

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Update Learning Process

Process #: 3.2

Location:

Update (3)

Input Flows:

Learning

Course

Output Flows:

Learning

Course

Learning

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Update Learning Offering Process

Process #: 3.5

Location:

Update (3)
173

Input Flows:

Learning Offering

Course Offering

Output Flows:

Learning Offering

Course Offering

Learning Offering

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Update Question Process

Process #: 3.3

Location:

Update (3)

Input Flows:

Course

Learning

Question

Output Flows:

Question

Course

Learning

Question

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

User Data Flow


174

Composition:

userId : Integer 4

userLogin : VarChar

userPassword : VarChar

userType : VarChar

Location:

Authenticate User ( 1 )

Source: Users ( Data Store )

Dest: Lookup User ( Process )

Source: Lookup User ( Process )

Dest: Compare Data ( Process )

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

userAuthenticated Data Element

Data element attributes

Storage Type: Bit

Null Type: NotNull

Location:

Data Flow --> Authentication

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

userId Data Element

Data element attributes

Storage Type: Integer 4

Null Type: NotNull


175

Location:

Data Flow --> Course

Data Flow --> Course Offering

Data Store --> Users

Data Flow --> User

Data Store --> Courses

Entity --> Courses

Entity --> Users

Class --> Enrollment

Class --> User

Class --> Course

Date Last Altered: 11/3/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

userLogin Data Element

Data element attributes

Storage Type: VarChar

Length: 255

Null Type: NotNull

Location:

Data Store --> Users

Data Flow --> User

Entity --> Users

Class --> User

Data Element --> Login::userLogin

Date Last Altered: 10/31/2005 Date Created: 10/28/2005


176

----------------------------------------------------------------------------------

userLogin Data Element

Login::userLogin

Data element attributes

Domain: userLogin

Storage Type: VarChar

Length: 255

Null Type: NotNull

Location:

Data Flow --> Login

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

userNameFirst Data Element

Data element attributes

Storage Type: VarChar

Length: 255

Null Type: NotNull

Location:

Entity --> Users

Class --> User

Date Last Altered: 11/3/2005 Date Created: 11/3/2005

----------------------------------------------------------------------------------

userNameLast Data Element

Data element attributes

Storage Type: VarChar


177

Length: 255

Null Type: NotNull

Location:

Entity --> Users

Class --> User

Date Last Altered: 11/3/2005 Date Created: 11/3/2005

----------------------------------------------------------------------------------

userPassword Data Element

Data element attributes

Storage Type: VarChar

Null Type: NotNull

Location:

Data Store --> Users

Data Flow --> User

Entity --> Users

Class --> User

Data Element --> Login::usrPassword

Date Last Altered: 10/31/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

Users Data Store

Data Store #: D1

Composition:

userId : Integer 4

userLogin : VarChar

userPassword : VarChar
178

userType : VarChar

Location:

Authenticate User ( 1 )

Output Flows:

User

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

userType Data Element

Data element attributes

Storage Type: VarChar

Length: 255

Null Type: NotNull

Location:

Data Store --> Users

Data Flow --> User

Entity --> Users

Class --> User

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

usrPassword Data Element

Login::usrPassword

Data element attributes

Domain: userPassword

Storage Type: VarChar

Null Type: NotNull


179

Location:

Data Flow --> Login

Date Last Altered: 10/28/2005 Date Created: 10/28/2005

----------------------------------------------------------------------------------

Verify Course Process

Process #: 2.1.1

Location:

Create Course ( 2.1 )

Input Flows:

Course

Output Flows:

Course

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Verify Course Offering Process

Process #: 3.4.2

Location:

Update Course Offering ( 3.4 )

Input Flows:

Course Offering

Output Flows:

Course Offering

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Verify Course_ Process


180

Process #: 3.1.2

Location:

Update Course ( 3.1 )

Input Flows:

Course

Output Flows:

Course

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Verify Learning Process

Process #: 2.2.2

Location:

Create Learning ( 2.2 )

Input Flows:

Learning

Course

Output Flows:

Learning

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Verify Learning Offering Process

Process #: 3.5.3

Location:

Update Learning Offering ( 3.5 )

Input Flows:
181

Learning Offering

Output Flows:

Learning Offering

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Verify Learning_ Process

Process #: 3.2.3

Location:

Update Learning ( 3.2 )

Input Flows:

Learning

Output Flows:

Learning

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Verify Question Process

Process #: 2.3.3

Location:

Create Question ( 2.3 )

Input Flows:

Question

Course

Learning

Output Flows:

Question
182

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------

Verify Question_ Process

Process #: 3.3.4

Location:

Update Question ( 3.3 )

Input Flows:

Question

Output Flows:

Question

Date Last Altered: 10/31/2005 Date Created: 10/31/2005

----------------------------------------------------------------------------------
183

Appendix F: Kuote Source Code


1 <?php
2 /**
3 * Object.php
4 * This file contains the Interface that all Kuote Object implementations are required to follow,
5 * in addition to each individual object's specific interface.
6 * @package Kuote
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 /**
11 * KuoteInterfaces_Object
12 * This intefaces defines the set of methods that all Kuote Object implementations need
13 * to function as part of the Kuote System, in addition to each individual
14 * object's specific interface.
15 * @package KuoteInterfaces
16 * @subpackage Object
17 * @author Kyle Hall
18 * @copyright 2006
19 */
20 interface KuoteInterfaces_Object {
21 public function get( $id ); // Loads the object from the data store by its unique id
22 public function insert(); // Creates a new Object in the data store containing the objects data with a
unique identifier
23 public function update(); // Updates the user's data in the data store
24 public function delete(); // Removes the user's data from the data store
25
26 public function getId(); // Returns the objects unique identifier within the data store
27 }
28 ?>
1 <?php
2 /**
3 * ObjectSet.php
4 * This file contains the Interface that all Kuote Object Set implementations are required to follow.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteInterfaces_ObjectSet
11 * This intefaces defines the set of methods that all Kuote Object Set implementations need
12 * to function as part of the Kuote System. All Kuote Objects that contain sets of other
13 * objects must implement this interface.
14 * @package KuoteInterfaces
15 * @subpackage ObjectSet
16 * @author Kyle Hall
17 * @copyright 2006
18 */
19 interface KuoteInterfaces_ObjectSet {
20 /**
21 * Returns a reference to the current object in the array and advances the iterator.
22 * If the iterator passes the end of the array, return null and reset the iterator.
23 * @access public
24 */
25 public function fetch();
26
27 /**
28 * Returns the number of objects the set contains.
29 * @access public
30 */
31 public function count();
32
33 /**
34 * Next call to fetch() will start from the beginning again.
35 * @access public
36 */
37 public function reset();
38 }
1 <?php
2 /**
3 * Course.php
4 * This file contains the Interface that all Course implementations are required to follow.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteInterfaces_Course
11 * This intefaces defines the set of methods that all Course implementations need
12 * to function as part of the Kuote System.
13 * @package KuoteInterfaces
14 * @subpackage Object
15 * @author Kyle Hall
16 * @copyright 2006
17 */
18 interface KuoteInterfaces_Course {
19 /**
20 * If true, the course may be used by other instructors.
21 * @access public
22 * @return boolean True if open, false if not.
23 */
24 public function isOpen();
25
26 /**
27 * If true, the course may be used by any student.
28 * @access public
29 * @return boolean True if open, false if not.
30 */
31 public function isPublic();
32
33 /**
34 * Returns the title of the course.
35 * @access public
36 * @return string Course title.
37 */
38 public function getTitle();
39
40 /**
41 * Sets the title of the course.
42 * @access public
43 * @param string $title Course Title
44 * @return boolean True on success, false otherwise.
45 */
46 public function setTitle( $title );
47
48 /**
49 * Returns the description of the course
50 * @access public
51 * @return string Course description.
52 */
53 public function getDescription();
54
55 /**
56 * Sets the description of the course
57 * @access public
58 * @param string $description Course Description
59 * @return boolean True on success, false otherwise.
60 */
61 public function setDescription( $description );
62
63 /**
64 * Returns the unique user id of the course's creator
65 * @access public
66 * @return int User Id.
67 */
68 public function getUserId();
69
70 /**
71 * Sets the unique user id of the course's creator.
72 * @access public
73 * @param integer $id User Id of the Course Creator.
74 * @return boolean True on success, false otherwise.
75 */
76 public function setUserId( $id );
77
78 /**
79 * Returns the state of public availability of the course.
80 *
81 * If the course Is Public, this means that any user can enroll is the course.
82 * Returns true if the course is public, false if it is not.
83 * @access public
84 * @return boolean Is Public.
85 */
86 public function getIsPublic();
87
88 /**
89 * Sets the state of public availability of the course.
90 *
91 * True means the course is public, false means it is not.
92 * @access public
93 * @param boolean $bool Is Public.
94 * @return boolean True on success, false otherwise.
95 */
96 public function setIsPublic( $bool );
97
98 /**
99 * Returns the state of openness of the course.
100 *
101 * If the course Is Open, this means that any instructor can offer the course.
102 * Returns true if the course is open, false if it is not.
103 * @access public
104 * @return boolean Is Open.
105 */
106 public function getIsOpen();
107
108 /**
109 * Sets the state of openness of the course.
110 *
111 * If the course Is Open, this means that any instructor can offer the course.
112 * @access public
113 * @param boolean $bool Is Open.
114 * @return boolean True on success, false otherwise.
115 */
116 public function setIsOpen( $bool );
117
118 /**
119 * Returns a hashed array of courses created by the given user.
120 *
121 * Returns a hashed array of the format <code>$courseId => $courseTitle</code>
122 * @access public
123 * @static
124 * @param KuoteObjects_User $user User for which to find created courses.
125 * @return array Hashed array of $courseId => $courseTitle
126 * OR boolean False if no courses are found.
127 */
128 public static function getCoursesHash( $user );
129 }
130
131 ?>
1 <?php
2 /**
3 * CourseOffering.php
4 * This file contains the Interface that all CourseOffering implementations are required to follow.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteInterfaces_CourseOffering
11 * This intefaces defines the set of methods that all CourseOffering implementations need
12 * to function as part of the Kuote System.
13 * @package KuoteInterfaces
14 * @subpackage Object
15 * @author Kyle Hall
16 * @copyright 2006
17 */
18 interface KuoteInterfaces_CourseOffering {
19 /**
20 * Returns true if the offering is password protected, false if not.
21 * @access public
22 * @return boolean True of password protected, false if not.
23 */
24 public function hasPassword();
25
26 /**
27 * Compares the password of the offering with the passed password.
28 * Returns true on a match, false otherwise.
29 * @access public
30 * @param string $password
31 * @return boolean True on match, false otherwise.
32 */
33 public function verifyPassword( $password );
34
35 /**
36 * Returns the title of the course offering.
37 *
38 * The title of the offering should differ from the course offering
39 * to distinguish multiple offerings from one another.
40 * @access public
41 * @return string Course title.
42 */
43 public function getTitle();
44
45 /**
46 * Sets the title of the course offering.
47 *
48 * The title of the offering should differ from the course offering
49 * to distinguish multiple offerings from one another.
50 * @access public
51 * @param string $title Course Title
52 * @return boolean True on success, false otherwise.
53 */
54 public function setTitle( $title );
55
56 /**
57 * Returns the start date of the offering in the form "YYYY-MM-DD".
58 * @access public
59 * @return string Date "YYYY-MM-DD".
60 */
61 public function getStart();
62
63 /**
64 * Sets the starting date of an offering.
65 *
66 * Date must be passed in the format "YYYY-MM-DD".
67 * @access public
68 * @param $dateString Date string in the format "YYYY-MM-DD"
69 * @return boolean True on success, false otherwise.
70 */
71 public function setStart( $dateString );
72
73 /**
74 * Returns the end date of the offering in the form "YYYY-MM-DD".
75 * @access public
76 * @return string Date "YYYY-MM-DD".
77 */
78 public function getEnd();
79
80 /**
81 * Sets the ending date of an offering.
82 *
83 * Date must be passed in the format "YYYY-MM-DD".
84 * @access public
85 * @param $dateString Date string in the format "YYYY-MM-DD"
86 * @return boolean True on success, false otherwise.
87 */
88 public function setEnd( $dateString );
89
90 /**
91 * Returns the hash of the course offering's password.
92 * @access public
93 * @return string Date "YYYY-MM-DD".
94 * OR boolean False if there is no password.
95 */
96 public function getPassword();
97
98 /**
99 * Sets the password of an offering.
100 *
101 * @access public
102 * @param $password The offering's password.
103 * @return boolean True on success, false otherwise.
104 * @internal The password should be passed in plaintext, the method will hash it.
105 */
106 public function setPassword( $password );
107
108 /**
109 * Returns the id of the course which this offering represents.
110 * @access public
111 * @return integer Course Id.
112 */
113 public function getCourseId();
114
115 /**
116 * Sets the id of the course which this offering represents.
117 *
118 * @access public
119 * @param $id The Course Id.
120 * @return boolean True on success, false otherwise.
121 */
122 public function setCourseId( $id );
123
124 /**
125 * Returns the id of the user which has created this offering.
126 * @access public
127 * @return integer User Id.
128 */
129 public function getUserId();
130
131 /**
132 * Sets the id of the user which has created this offering.
133 * @access public
134 * @param integer User Id.
135 * @return boolean True on success, false otherwise.
136 */
137 public function setUserId( $id );
138
139 /**
140 * Returns a hashed array of course offerings created by the given user.
141 *
142 * Returns a hashed array of the format <code>$courseOfferingId => $courseOfferingTitle</code>
143 * @access public
144 * @static
145 * @param KuoteObjects_User $user User for which to find created courses.
146 * @return array Hashed array of <code>$courseOfferingId => $courseOfferingTitle</code>.
147 */
148 public static function getCourseOfferingsHash( $user );
149
150 /**
151 * Returns a hashed array of the format <code>$courseOfferingId => $courseOfferingTitle</code>
152 * @access public
153 * @param KuoteObjects_User $user The user for which to get available course offerings.
154 * @return array Hashed array of $courseOfferingId => $courseOfferingTitle
155 * OR boolean False if no offerings are found.
156 */
157 public function getEnrolledCourseOfferingsHash( $user );
158 }
159 ?>
1 <?php
2 /**
3 * CourseOfferingSet.php
4 * This file contains the Interface that all CourseOfferingSet implementations are required to follow.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteInterfaces_CourseOfferingSet
11 * This intefaces defines the set of methods that all CourseOfferingSet implementations need
12 * to function as part of the Kuote System.
13 * @package KuoteInterfaces
14 * @subpackage ObjectSet
15 * @author Kyle Hall
16 * @copyright 2006
17 */
18 interface KuoteInterfaces_CourseOfferingSet {
19 /**
20 * Populates this CourseOfferingSet with courses that the given user may enroll in,
21 * but not offerings which the user is <i>already</i> enrolled in.
22 * @access public
23 * @param KuoteObjects_User $user The user for which to get available course offerings.
24 * @return integer Number of available offerings found.
25 */
26 public function getAvailableCourseOfferings( $user );
27 }
28
29 ?>
1 <?php
2 /**
3 * LearningOfferTaken.php
4 * This file contains the Interface that all LearningOffer implementations are required to follow.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteInterfaces_LearningOfferTaken
11 * This intefaces defines the set of methods that all LearningOfferTaken implementations need
12 * to function as part of the Kuote System.
13 * @package KuoteInterfaces
14 * @subpackage Object
15 * @author Kyle Hall
16 * @copyright 2006
17 */
18 interface KuoteInterfaces_LearningOfferTaken {
19 /**
20 * Creates a new LearningOfferTaken in the datastore based on the given Learning Offering Id
21 * and Enrollment Id.
22 * @access public
23 * @param KuoteObjects_LearningOffering $learningOffering The LearningOffering being taken.
24 * @param KuoteObjects_Enrollment $enrollmentId The Enrollment in this course offering.
25 * @return boolean True if created successfully, false otherwise.
26 */
27 public function initialize( $learningOffering, $enrollment );
28
29 /**
30 * Returns the timestamp of when this LearningOfferTaken was created.
31 * @access public
32 * @return integer The time of creation.
33 */
34 public function getTime();
35
36 /**
37 * Returns the Id of the Learning Offering of this Learning Offering Taken.
38 * @access public
39 * @return integer Learning Id.
40 */
41 public function getLearningOfferingId();
42
43 /**
44 * Sets the Id of the Learning Offering of this Learning Offering Taken.
45 * @access public
46 * @param integer $id The id of the Learning Offering of this Learning Offering Taken.
47 * @return boolean True on success, false otherwise.
48 */
49 public function setLearningOfferingId( $id );
50
51 /**
52 * Returns the Id of the Enrollment of this Learning Offering Taken.
53 * @access public
54 * @return integer Learning Id.
55 */
56 public function getEnrollmentId();
57
58 /**
59 * Sets the Id of the Enrollment of this Learning Offering Taken.
60 * @access public
61 * @param integer $id The id of the Enrollment of this Learning Offering Taken.
62 * @return boolean True on success, false otherwise.
63 */
64 public function setEnrollmentId( $id );
65 }
66
67 ?>
1 <?php
2 /**
3 * Enrollment.php
4 * This file contains the Interface that all Enrollment implementations are required to follow.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteInterfaces_Enrollment
11 * This intefaces defines the set of methods that all Enrollment implementations need
12 * to function as part of the Kuote System.
13 * @package KuoteInterfaces
14 * @subpackage Object
15 * @author Kyle Hall
16 * @copyright 2006
17 */
18 interface KuoteInterfaces_Enrollment {
19 /**
20 * In theory, every combination of User Id and Course Offering Id should be unique.
21 * This method loads into the object this first intance of a 'row' containing both
22 * values.
23 * @access public
24 * @param KuoteObjects_User $user This user to look up.
25 * @param KuoteObjects_CourseOffering $courseOffering The course offering to look up.
26 * @throws Exception 1 if no enrollment found.
27 * @returns boolean True on success.
28 */
29 public function getByUserAndCourseOffering( $user, $courseOffering );
30
31 /**
32 * Returns the current grade for this enrollment.
33 * @access public
34 * @return integer Grade as a percentage.
35 */
36 public function getGrade();
37
38 /**
39 * Sets the current grade for this enrollment.
40 * @access public
41 * @param integer $grade The grade as a percentage.
42 * @return boolean True on successful set, false otherwise.
43 */
44 public function setGrade( $grade );
45
46 /**
47 * Returns the id of the User for this enrollment.
48 * @access public
49 * @return integer User Id.
50 */
51 public function getUserId();
52
53 /**
54 * Sets the id of the User for this enrollment.
55 * @access public
56 * @param integer $id The User Id.
57 * @return boolean True on successful set, false otherwise.
58 */
59 public function setUserId( $id );
60
61 /**
62 * Returns the id of the Course Offering for this enrollment.
63 * @access public
64 * @return integer Course Offering Id.
65 */
66 public function getCourseOfferingId();
67
68 /**
69 * Sets the id of the Course Offering for this enrollment.
70 * @access public
71 * @param integer $id The Course Offering Id.
72 * @return boolean True on successful set, false otherwise.
73 */
74 public function setCourseOfferingId( $id );
75
76 /**
77 * Creates a new enrollment for the given User Id and Course Offering Id.
78 * @access public
79 * @static
80 * @param integer $userId The id of the User.
81 * @param integer $courseOfferingId The id of the Course Offering the user is to enroll in.
82 * @throws Exception 2 on failure.
83 * @throws Exception 3 if already enrolled.
84 * @return boolean True on successful set, false otherwise.
85 */
86 public static function enroll( $userId, $courseOfferingId );
87 }
88
89 ?>
1 <?php
2 /**
3 * Result.php
4 * This file contains the Interface that all Result implementations are required to follow.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteInterfaces_Result
11 * This intefaces defines the set of methods that all Result implementations need
12 * to function as part of the Kuote System.
13 * @package KuoteInterfaces
14 * @subpackage Object
15 * @author Kyle Hall
16 * @copyright 2006
17 */
18 interface KuoteInterfaces_Result {
19 /**
20 * Returns the number of questions answered correctly.
21 * @access public
22 * @return boolean True on successful increment, False otherwise.
23 */
24 public function incrementCorrectQuestionsCount();
25
26 /**
27 * Returns the number of questions answered correctly.
28 * @access public
29 * @return integer The number of questions answered correctly.
30 */
31 public function getCorrectQuestionsCount();
32
33 /**
34 * Sets the number of questions answered correctly.
35 * @access public
36 * @param integer $numberCorrect The number of correctly answered questions.
37 * @return boolean True if successful, false if not.
38 */
39 public function setCorrectQuestionsCount( $numberCorrect );
40
41 /**
42 * Returns the total number of questions.
43 * @access public
44 * @return integer The number of questions answered correctly.
45 */
46 public function getQuestionsCount();
47
48 /**
49 * Sets the total number of questions.
50 * @access public
51 * @param integer $count The number of correctly answered questions.
52 * @return boolean True if successful, false if not.
53 */
54 public function setQuestionsCount( $count );
55
56 /**
57 * Returns the timestamp of when the Result was created or last modified.
58 * @access public
59 * @return string Timestamp.
60 */
61 public function getTimestamp();
62
63 /**
64 * Returns the Id of the Result's Learning
65 * @access public
66 * @return integer Learning Id
67 */
68 public function getLearningId();
69
70 /**
71 * Sets the Id of the Result's Learning
72 * @access public
73 * @param integer $id Learning Id
74 * @return boolean True on success, false otherwise.
75 */
76 public function setLearningId( $id );
77
78 /**
79 * Returns the Id of the Result's Learning Offering
80 * @access public
81 * @return integer Learning Offering Id
82 */
83 public function getLearningOfferingId();
84
85 /**
86 * Sets the Id of the Result's Learning Offering
87 * @access public
88 * @param integer $id Learning Offering Id
89 * @return boolean True on success, false otherwise.
90 */
91 public function setLearningOfferingId( $id );
92
93 /**
94 * Returns the Id of the Result's Course
95 * @access public
96 * @return integer Course Id
97 */
98 public function getCourseId();
99
100 /**
101 * Sets the Id of the Result's Course
102 * @access public
103 * @param integer $id Course Id
104 * @return boolean True on success, false otherwise.
105 */
106 public function setCourseId( $id );
107
108 /**
109 * Returns the Id of the Result's Course Offering
110 * @access public
111 * @return integer Course Offering Id
112 */
113 public function getCourseOfferingId();
114
115 /**
116 * Sets the Id of the Result's Course Offering
117 * @access public
118 * @param integer $id Course Offering Id
119 * @return boolean True on success, false otherwise.
120 */
121 public function setCourseOfferingId( $id );
122
123 /**
124 * Returns the unique user id of the student who took the quiz.
125 * @access public
126 * @return int User Id.
127 */
128 public function getUserId();
129
130 /**
131 * Sets the unique user id of the student who took the quiz.
132 * @access public
133 * @param integer $id User Id of the Course Creator.
134 * @return boolean True on success, false otherwise.
135 */
136 public function setUserId( $id );
137
138 /**
139 * Returns the Id of the Learning Offer Taken for this result.
140 * @access public
141 * @return int User Id.
142 */
143 public function getLearningOfferingTakenId();
144
145 /**
146 * Sets the Id of the Learning Offer Taken for this result.
147 * @access public
148 * @param integer $id User Id of the Course Creator.
149 * @return boolean True on success, false otherwise.
150 */
151 public function setLearningOfferingTakenId( $id );
152 }
153
154 ?>
1 <?php
2 /**
3 * ResultSet.php
4 * This file contains the Interface that all ResultSet implementations are required to follow.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteInterfaces_ResultSet
11 * This intefaces defines the set of methods that all ResultSet implementations need
12 * to function as part of the Kuote System.
13 * @package KuoteInterfaces
14 * @subpackage ObjectSet
15 * @author Kyle Hall
16 * @copyright 2006
17 */
18 interface KuoteInterfaces_ResultSet {
19 /**
20 * Populates the ResultSet with all Results pertaining to the given learning quiz.
21 * @access public
22 * @param integer $id The Id of the Learning whose questions to find.
23 * @return integer Number of results found
24 */
25 public function getByLearningId( $id );
26
27 /**
28 * Populates the ResultSet with all Results pertaining to the given
29 * learning offering's quiz.
30 * @access public
31 * @param integer $id The Id of the Learning Offering whose results we are to find.
32 * @return integer Number of results found
33 */
34 public function getByLearningOfferingId( $id );
35
36 /**
37 * Populates the ResultSet with all Results pertaining to the given course.
38 * @access public
39 * @param integer $id The Id of the Course whose results we are to find.
40 * @return integer Number of questions found
41 */
42 public function getByCourseId( $id );
43
44 /**
45 * Populates the ResultSet with all Results pertaining to the given course offering.
46 * @access public
47 * @param integer $id The Id of the CourseOffering whose results we are to find.
48 * @return integer Number of questions found
49 */
50 public function getByCourseOfferingId( $id );
51
52 /**
53 * Populates the ResultSet with all Results pertaining to the given user and course offering.
54 * @access public
55 * @param integer $userId The Id of the User whose results we are to find.
56 * @param integer $courseOfferingId The Id of the Course Offering whose results we are to find.
57 * @return integer Number of questions found
58 */
59 public function getByUserIdAndCourseOfferingId( $userId, $courseOfferingId );
60
61 /**
62 * Returns the average grade of all results as a percent.
63 * @access public
64 * @return float Grade average.
65 */
66 public function getAverage();
67 }
68
69 ?>
1 <?php
2 /**
3 * Question.php
4 * This file contains the Interface that all Question implementations are required to follow.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteInterfaces_Question
11 * This intefaces defines the set of methods that all Question implementations need
12 * to function as part of the Kuote System.
13 * @package KuoteInterfaces
14 * @subpackage Object
15 * @author Kyle Hall
16 * @copyright 2006
17 */
18 interface KuoteInterfaces_Question {
19 /**
20 * Returns the "answer" for the given Option Number
21 * @access public
22 * @param integer $optionNumber The number of the option to return, 1 through 5 are valid.
23 * @return string The "answer" for the given Option Number.
24 * @throws Exception 1 if $optionNumber is out of bounds.
25 */
26 public function getOption( $optionNumber );
27
28 /**
29 * Sets the "answer" for the given option number to the given string.
30 * @access public
31 * @param integer $optionNumber The number of the option to set, 1 through 5 are valid.
32 * @param string $string The string which is to be the "answer".
33 * @return boolean True on success, false otherwise.
34 * @throws Exception 1 if optionNumber is out of bounds.
35 */
36 public function setOption( $optionNumber, $string );
37
38 /**
39 * Returns the "question" for this question.
40 * @access public
41 * @return string Question Body.
42 */
43 public function getBody();
44
45 /**
46 * Sets the "question" for this question.
47 * @access public
48 * @param string $body Question Body.
49 * @return boolean True on successful set, false otherwise.
50 */
51 public function setBody( $body );
52
53 /**
54 * Returns the amount of time given in seconds to answer this question. 0 is unlimited.
55 * @access public
56 * @return integer Time in seconds.
57 */
58 public function getTime();
59
60 /**
61 * Sets the amount of time given in seconds to answer this question. 0 is unlimited.
62 * @access public
63 * @param integer $time Time in seconds.
64 * @return boolean True on successful set, false otherwise.
65 */
66 public function setTime( $time );
67
68 /**
69 * Returns the option number of the correct question option.
70 * @access public
71 * @return integer Option number.
72 */
73 public function getAnswer();
74
75 /**
76 * Sets the option number of the correct question option.
77 * @access public
78 * @param integer $answer Correct Option Number
79 * @return boolean True on successful set, false otherwise.
80 */
81 public function setAnswer( $answer );
82
83 /**
84 * Returns the Id of the learning under which this question exists.
85 * @access public
86 * @return integer Learning Id
87 */
88 public function getLearningId();
89
90 /**
91 * Sets the Id of the learning under which this question exists.
92 * @access public
93 * @param integer $id Learning Id
94 * @return boolean True on successful set, false otherwise.
95 */
96 public function setLearningId( $id );
97
98 /**
99 * Returns the order number of the question. First question is 1, second question is 2, etc.
100 * @access public
101 * @return integer Question Number
102 */
103 public function getQuestionNumber();
104
105 /**
106 * Sets the order number of the question. First question is 1, second question is 2, etc.
107 * @access public
108 * @param integer $id Learning Id
109 * @return boolean True on successful set, false otherwise.
110 */
111 public function setQuestionNumber( $number );
112
113 /**
114 * Returns the difficulty of the question. 1 is easiest, 5 is hardest.
115 * @access public
116 * @return integer Question Difficulty
117 */
118 public function getDifficulty();
119
120 /**
121 * Sets the difficulty of the question. 1 is easiest, 5 is hardest.
122 * @access public
123 * @param integer $difficutly Question Difficutly
124 * @return boolean True on successful set, false otherwise.
125 */
126 public function setDifficulty( $difficulty );
127
128 /**
129 * Returns the text of the questions first option.
130 * @access public
131 * @return string Question Option
132 */
133 public function getOption1();
134
135 /**
136 * Sets the text of the questions first option.
137 * @access public
138 * @param string $string Question Option
139 * @return boolean True on successful set, false otherwise.
140 */
141 public function setOption1( $string );
142
143 /**
144 * Returns the text of the questions second option.
145 * @access public
146 * @return string Question Option
147 */
148 public function getOption2();
149
150 /**
151 * Sets the text of the questions second option.
152 * @access public
153 * @param string $string Question Option
154 * @return boolean True on successful set, false otherwise.
155 */
156 public function setOption2( $string );
157
158 /**
159 * Returns the text of the questions third option.
160 * @access public
161 * @return string Question Option
162 */
163 public function getOption3();
164
165 /**
166 * Sets the text of the questions third option.
167 * @access public
168 * @param string $string Question Option
169 * @return boolean True on successful set, false otherwise.
170 */
171 public function setOption3( $string );
172
173 /**
174 * Returns the text of the questions fourth option.
175 * @access public
176 * @return string Question Option
177 */
178 public function getOption4();
179
180 /**
181 * Sets the text of the questions forth option.
182 * @access public
183 * @param string $string Question Option
184 * @return boolean True on successful set, false otherwise.
185 */
186 public function setOption4( $string );
187
188 /**
189 * Returns the text of the questions fifth option.
190 * @access public
191 * @return string Question Option
192 */
193 public function getOption5();
194
195 /**
196 * Sets the text of the questions fifth option.
197 * @access public
198 * @param string $string Question Option
199 * @return boolean True on successful set, false otherwise.
200 */
201 public function setOption5( $string );
202
203 /**
204 * Returns the question number that should be used for a new question for the given learning.
205 * i.e. If there are five question, getNextQuestionNumber() will return an integer 6.
206 * @access public
207 * @param integer $learningId Learning Id
208 * @return integer Question Number
209 */
210 public static function getNextQuestionNumber( $learningId );
211 }
212 ?>
1 <?php
2 /**
3 * Learning.php
4 * This file contains the Interface that all Learning implementations are required to follow.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteInterfaces_Learning
11 * This intefaces defines the set of methods that all Learning implementations need
12 * to function as part of the Kuote System.
13 * @package KuoteInterfaces
14 * @subpackage Object
15 * @author Kyle Hall
16 * @copyright 2006
17 */
18 interface KuoteInterfaces_Learning {
19 /**
20 * Returns true if this learning has a tutorial, false otherwise.
21 * @access public
22 * @return boolean True if tutorial exists, false otherwise.
23 */
24 public function hasTutorial();
25
26 /**
27 * Returns the title of the Learning.
28 * @access public
29 * @return string Learning title.
30 */
31 public function getTitle();
32
33 /**
34 * Sets the title of the Learning
35 * @access public
36 * @param string $title The title of the Learning.
37 * @return boolean True on success, false otherwise.
38 */
39 public function setTitle( $title );
40
41 /**
42 * Returns the description of the Learning.
43 * @access public
44 * @return string Learning description.
45 */
46 public function getDescription();
47
48 /**
49 * Sets the description of the Learning
50 * @access public
51 * @param string $description The description of the Learning.
52 * @return boolean True on success, false otherwise.
53 */
54 public function setDescription( $description );
55
56 /**
57 * Returns the name of the tutorial file for this Learning.
58 *
59 * All tutorial all stored under LEARNINGS_ROOT/CourseId/LearningId/TutorialFileName
60 * If the tutorial consists of multiple files, the TutorialFileName will be the first page.
61 * @access public
62 * @return string Tutorial filename.
63 */
64 public function getTutorialFileName();
65
66 /**
67 * Sets the name of the tutorial file for this Learning.
68 * @access public
69 * @param string $name The name of the tutorial file for this Learning.
70 * @return boolean True on success, false otherwise.
71 */
72 public function setTutorialFileName( $name );
73
74 /**
75 * Declares if the questions for this Learning's quiz should be displayed randomly.
76 * @access public
77 * @return boolean True if questions should be random, false otherwise.
78 */
79 public function getQuestionsRandom();
80
81 /**
82 * Sets if the questions for this Learning's quiz should be displayed randomly.
83 * @access public
84 * @param boolean $bool True if they should be random, false otherwise.
85 * @return boolean True on success, false otherwise.
86 */
87 public function setQuestionsRandom( $bool );
88
89 /**
90 * Declares if the questions for this Learning's quiz should be displayed randomly,
91 * but only randomly within increasing difficuly.
92 *
93 * If true, first ask all difficutly 1 questions randomly, then difficutly 2
94 * questions randomly, and so on in that fashion.
95 * @access public
96 * @return boolean True if questions should be random by difficutly, false otherwise.
97 */
98 public function getQuestionsRandomByDifficulty();
99
100 /**
101 * Sets if the questions for this Learning's quiz should be displayed randomly by difficutly.
102 *
103 * If true, first ask all difficutly 1 questions randomly, then difficutly 2
104 * questions randomly, and so on in that fashion.
105 * @access public
106 * @param boolean $bool True if they should be random by difficulty, false otherwise.
107 * @return boolean True on success, false otherwise.
108 */
109 public function setQuestionsRandomByDifficulty( $bool );
110
111 /**
112 * Returns the Id of the Course this Learning is part of.
113 * @access public
114 * @return integer Course Id.
115 */
116 public function getCourseId();
117
118 /**
119 * Sets the Id of the Course this Learning is part of.
120 * @access public
121 * @param integer $id The id of the Course this Learning is part of.
122 * @return boolean True on success, false otherwise.
123 */
124 public function setCourseId( $id );
125
126 /**
127 * Returns a hashed array of learnings that are part of the given course.
128 *
129 * Returns a hashed array of the format <code>$learningId => $learningTitle</code>
130 * @access public
131 * @static
132 * @param integer $courseId Id of the course for which to find created learnings.
133 * @return array Hashed array of <code>$learningId => $learningTitle</code>.
134 * OR boolean False if no learnings are found of the given Course Id.
135 */
136 public static function getLearningsHash( $courseId );
137 }
138
139 ?>
1 <?php
2 /**
3 * LearningOfferingSet.php
4 * This file contains the Interface that all LearningOfferingSet
5 * implementations are required to follow.
6 * @package Kuote
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 /**
11 * KuoteInterfaces_LearningOfferingSet
12 * This intefaces defines the set of methods that all LearningOfferingSet implementations need
13 * to function as part of the Kuote System.
14 * @package KuoteInterfaces
15 * @subpackage ObjectSet
16 * @author Kyle Hall
17 * @copyright 2006
18 */
19 interface KuoteInterfaces_LearningOfferingSet {
20 /**
21 * Populates this LearningOfferingSet with all the <i>currently offered</i> LearningOfferings
22 * for the given Course Offering.
23 * @access public
24 * @param integer KuoteObjects_CourseOffering $courseOffering The CourseOffering whose
25 * LearningOfferings to get.
26 * @return integer Number of Enrollments found.
27 */
28 public function getCurrentByCourseOffering( $courseOffering );
29 }
30
31 ?>
1 <?php
2 /**
3 * EnrollmentSet.php
4 * This file contains the Interface that all EnrollmentSet implementations are required to follow.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteInterfaces_EnrollmentSet
11 * This intefaces defines the set of methods that all EnrollmentSet implementations need
12 * to function as part of the Kuote System.
13 * @package KuoteInterfaces
14 * @subpackage ObjectSet
15 * @author Kyle Hall
16 * @copyright 2006
17 */
18 interface KuoteInterfaces_EnrollmentSet {
19 /**
20 * Populates this EnrollmentSet with all the enrollments for the given user.
21 * @access public
22 * @param KuoteObjects_User $user The user whose Enrollments to get.
23 * @return integer Number of Enrollments found.
24 */
25 public function getByUser( $user );
26 }
27
28 ?>
1 <?php
2 /**
3 * QuestionSet.php
4 * This file contains the Interface that all QuestionSet implementations are required to follow.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteInterfaces_QuestionSet
11 * This intefaces defines the set of methods that all QuestionSet implementations need
12 * to function as part of the Kuote System.
13 * @package KuoteInterfaces
14 * @subpackage ObjectSet
15 * @author Kyle Hall
16 * @copyright 2006
17 */
18 interface KuoteInterfaces_QuestionSet {
19 /**
20 * Populates the question set with questions that are part of the given Learning's quiz.
21 * @access public
22 * @param integer $learningId The Id of the Learning whose questions to find.
23 * @return integer Number of questions found
24 */
25 public function getByLearningId( $learningId );
26 }
27
28 ?>
1 <?php
2 /**
3 * LearningOffering.php
4 * This file contains the Interface that all LearningOffering implementations are required to follow.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteInterfaces_LearningOffering
11 * This intefaces defines the set of methods that all LearningOffering implementations need
12 * to function as part of the Kuote System.
13 * @package KuoteInterfaces
14 * @subpackage Object
15 * @author Kyle Hall
16 * @copyright 2006
17 */
18 interface KuoteInterfaces_LearningOffering {
19 /**
20 * Returns the title of the Learning Offering.
21 * @access public
22 * @return string Learning Offering title.
23 */
24 public function getTitle();
25
26 /**
27 * Sets the title of the Learning Offering
28 * @access public
29 * @param string $title The title of the Learning Offering.
30 * @return boolean True on success, false otherwise.
31 */
32 public function setTitle( $title );
33
34 /**
35 * Returns the start date of the offering in the form "YYYY-MM-DD".
36 * @access public
37 * @return string Date "YYYY-MM-DD".
38 */
39 public function getStart();
40
41 /**
42 * Sets the starting date of an offering.
43 *
44 * Date must be passed in the format "YYYY-MM-DD".
45 * @access public
46 * @param $dateString Date string in the format "YYYY-MM-DD"
47 * @return boolean True on success, false otherwise.
48 */
49 public function setStart( $dateString );
50
51 /**
52 * Returns the end date of the offering in the form "YYYY-MM-DD".
53 * @access public
54 * @return string Date "YYYY-MM-DD".
55 */
56 public function getEnd();
57
58 /**
59 * Sets the ending date of an offering.
60 *
61 * Date must be passed in the format "YYYY-MM-DD".
62 * @access public
63 * @param $dateString Date string in the format "YYYY-MM-DD"
64 * @return boolean True on success, false otherwise.
65 */
66 public function setEnd( $dateString );
67
68 /**
69 * Declares if the questions for this Learning Offering's quiz should be displayed randomly.
70 *
71 * This setting takes precedence over the Learning's same property.
72 * @access public
73 * @return boolean True if questions should be random, false otherwise.
74 */
75 public function getQuestionsRandom();
76
77 /**
78 * Sets if the questions for this Learning Offering's quiz should be displayed randomly.
79 *
80 * This setting takes precedence over the Learning's same property.
81 * @access public
82 * @param boolean $bool True if they should be random, false otherwise.
83 * @return boolean True on success, false otherwise.
84 */
85 public function setQuestionsRandom( $bool );
86
87 /**
88 * Declares if the questions for this Learning Offering's quiz should be displayed randomly,
89 * but only randomly within increasing difficuly.
90 *
91 * If true, first ask all difficutly 1 questions randomly, then difficutly 2
92 * questions randomly, and so on in that fashion.
93 * This setting takes precedence over the Learning's same property.
94 * @access public
95 * @return boolean True if questions should be random by difficutly, false otherwise.
96 */
97 public function getQuestionsRandomByDifficulty();
98
99 /**
100 * Sets if the questions for this Learning Offering's quiz
101 * should be displayed randomly by difficutly.
102 *
103 * If true, first ask all difficutly 1 questions randomly, then difficutly 2
104 * questions randomly, and so on in that fashion.
105 * This setting takes precedence over the Learning's same property.
106 * @access public
107 * @param boolean $bool True if they should be random by difficulty, false otherwise.
108 * @return boolean True on success, false otherwise.
109 */
110 public function setQuestionsRandomByDifficulty( $bool );
111
112 /**
113 * Returns the Id of the Course Offering this Learning Offering is part of.
114 * @access public
115 * @return integer Course Offering Id.
116 */
117 public function getCourseOfferingId();
118
119 /**
120 * Sets the Id of the Course Offering this Learning Offering is part of.
121 * @access public
122 * @param integer $id The id of the Course Offering this Learning is part of.
123 * @return boolean True on success, false otherwise.
124 */
125 public function setCourseOfferingId( $id );
126
127 /**
128 * Returns the Id of the Learning this Learning Offering is offering.
129 * @access public
130 * @return integer Learning Id.
131 */
132 public function getLearningId();
133
134 /**
135 * Sets the Id of the Learning this Learning Offering is offering.
136 * @access public
137 * @param integer $id The id of the Learning this Learning Offering is offering.
138 * @return boolean True on success, false otherwise.
139 */
140 public function setLearningId( $id );
141
142 /**
143 * Returns a hashed array of learnings offerings for the given Learning Id.
144 *
145 * Returns a hashed array of the format <code>$id => $title</code>
146 * @access public
147 * @static
148 * @param integer $learningId Learning for which to find offerings.
149 * @return array Hashed array of $id => $title
150 * OR boolean False if no offerings are found.
151 */
152 public static function getLearningOfferingsHash( $learningId );
153 }
154 ?>
1 <?php
2 /**
3 * QuestionAnswered.php
4 * This file contains the Interface that all QuestionAnswered implementations are required to follow.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteInterfaces_QuestionAnswered
11 * This intefaces defines the set of methods that all QuestionAnswered implementations need
12 * to function as part of the Kuote System.
13 * @package KuoteInterfaces
14 * @subpackage Object
15 * @author Kyle Hall
16 * @copyright 2006
17 */
18 interface KuoteInterfaces_QuestionAnswered {
19 /**
20 * Creates a new QuestionAnswered in the datastore based on the given Question Id
21 * and LearningOfferTaken Id.
22 * @access public
23 * @param KuoteObjects_Question $question The Question being answered.
24 * @param KuoteObjects_LearningOfferTaken $learningOfferTaken The LearningOfferTaken for this quiz.
25 * @return boolean True if created successfully, false otherwise.
26 */
27 public function initialize( $question, $learningOfferTaken );
28
29 /**
30 * Returns the selected choice of the questions answer options
31 * @access public
32 * @return integer Question Option.
33 */
34 public function getChoice();
35
36 /**
37 * Sets the selected choice of the questions answer options
38 * @access public
39 * @param integer $choice Question Option.
40 * @return boolean True on successful set, false otherwise.
41 */
42 public function setChoice( $choice );
43
44 /**
45 * Returns true if the selected answer is correct.
46 * @access public
47 * @return boolean True if selected answer is correct, false otherwise.
48 */
49 public function getIsCorrect();
50
51 /**
52 * Sets whether the selected answer is correct or not.
53 * @access public
54 * @param boolean $bool True if correct, otherwise False
55 * @return boolean True on successful set, false otherwise.
56 */
57 public function setIsCorrect( $bool );
58
59 /**
60 * Returns the Id of the Question this QuestionAnswered is answering.
61 * @access public
62 * @return integer Question Id
63 */
64 public function getQuestionId();
65
66 /**
67 * Sets the Id of the Question this QuestionAnswered is answering.
68 * @access public
69 * @param integer $id Question Id
70 * @return boolean True on successful set, false otherwise.
71 */
72 public function setQuestionId( $id );
73
74 /**
75 * Returns the Id of the LearningOfferTaken for the quiz of the question
76 * this QuestionAnswered is answering.
77 * @access public
78 * @return integer LearningOfferTaken Id
79 */
80 public function getLearningOfferTakenId();
81
82 /**
83 * Sets the Id of the LearningOfferTaken for the quiz of the question
84 * @access public
85 * @param integer $id LearningOfferTaken Id
86 * @return boolean True on successful set, false otherwise.
87 */
88 public function setLearningOfferTakenId( $id );
89 }
90
91 ?>
1 <?php
2 /**
3 * Quiz.php
4 * This file contains the Interface that all Quiz implementations are required to follow.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteInterfaces_Quiz
11 * This intefaces defines the set of methods that all Quiz implementations need
12 * to function as part of the Kuote System.
13 * @package KuoteInterfaces
14 * @subpackage Object
15 * @author Kyle Hall
16 * @copyright 2006
17 */
18 interface KuoteInterfaces_Quiz {
19 /**
20 * Grabs the next question for asking.
21 * @return $bool True if successful
22 * @throws Exception 3 if there are no more questions.
23 * @throws Exception 1 if the current quesiton has not been answered yet.
24 */
25 public function getQuestion();
26
27 /**
28 * Returns the body of the current question.
29 * @return string Question Body
30 * @throws Exception 2 if there is no current question.
31 */
32 public function getCurrentQuestionBody();
33
34 /**
35 * Returns the text of the given question option number
36 * @param integer $optionNumber Option Number
37 * @return string Option Text
38 * @throws Exception 2 if there is no current question.
39 */
40 public function getCurrentQuestionOption( $optionNumber );
41
42 /**
43 * Returns true if there is text for the given option number
44 * @return boolean True if option is set, false otherwise.
45 * @throws Exception 2 if there is no current question.
46 */
47 public function isCurrentQuestionOption( $optionNumber );
48
49 /**
50 * Takes the given option number an 'answers' the question with it.
51 * The QuestionAnswered for the question is updated in the datastore.
52 * @param integer $selectedAnswer Selected Question Option.
53 * @return boolean True on successful answering, false otherwise.
54 * @throws Exception 2 if there is no current question.
55 */
56 public function answerQuestion( $selectedAnswer );
57
58 /**
59 * Randomizes the order in which the quiz questions are asked.
60 * @return boolean True on success, false otherwise.
61 */
62 public function randomize();
63
64 /**
65 * Randomizes the order in which the quiz questions are asked, but only within sets of difficutly.
66 * @return boolean True on success, false otherwise.
67 */
68 public function sortByDifficulty();
69
70 /**
71 * Returns the number of the current question.
72 * That is, if 2 questions have been asked and answered, getCurrentQuestion() will return 3.
73 * @return integer Question Number.
74 */
75 public function getCurrentQuestionNumber();
76
77 /**
78 * Returns the total number of questions for this quiz.
79 * @return integer Questions Count
80 */
81 public function getQuestionsCount();
82
83 /**
84 * Returns the number of correctly answered questions for this quiz.
85 * @return integer Correct Questions Count
86 */
87 public function getQuestionsCorrectCount();
88
89 /**
90 * Returns the number of incorrectly answered questions for this quiz.
91 * @return integer Incorrect Questions Count
92 */
93 public function getQuestionsIncorrectCount();
94
95 /**
96 * Returns the title of the learning this quiz is part of.
97 * @return string Learning Title
98 */
99 public function getTitle();
100
101 /**
102 * Returns an array where each element of the array is another hashed array of the format:
103 * <code> array { "question" => KuoteObjects_Question Object,
104 * "questionAnswered" => KuoteObjects_QuestionAnswered } </code>
105 * @return integer Correct Questions Count
106 */
107 public function fetchResult();
108 }
1 <?php
2 /**
3 * User.php
4 * This file contains the Interface that all User implementations are required to follow.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteInterfaces_User
11 * This intefaces defines the set of methods that all User implementations need
12 * to function as part of the Kuote System.
13 * @package KuoteInterfaces
14 * @subpackage Object
15 * @author Kyle Hall
16 * @copyright 2006
17 */
18 interface KuoteInterfaces_User {
19 /**
20 * Tests whether the given userlogin and password match those in the datastore.
21 *
22 * If a match is found, the user for the given username is loaded into the User object.
23 * @param string $userLogin The user's login name
24 * @param string $userPassword The password submitted for authentication.
25 */
26 public function verify( $userLogin, $userPassword );
27
28 /**
29 * Returns a string of the format "Lastname, Firstname".
30 * @return string String of format "Lastname, Firstname".
31 */
32 public function getNameLastFirst();
33
34 /**
35 * Returns the first name of the user.
36 * @return string First Name
37 */
38 public function getNameFirst();
39
40 /**
41 * Sets the first name of the user.
42 * @param string $firstname First Name
43 * @return boolean True on successful set, False otherwise.
44 */
45 public function setNameFirst( $firstname );
46
47 /**
48 * Returns the last name of the user.
49 * @return string Last Name
50 */
51 public function getNameLast();
52
53 /**
54 * Sets the last name of the user.
55 * @param string $lastname Last Name
56 * @return boolean True on successful set, False otherwise.
57 */
58 public function setNameLast( $lastname );
59
60 /**
61 * Returns the email of the user.
62 * @return string Email
63 */
64 public function getEmail();
65
66 /**
67 * Sets the email of the user.
68 * @param string $email Email
69 * @return boolean True on successful set, False otherwise.
70 */
71 public function setEmail( $email );
72
73 /**
74 * Returns the hashed password of the user.
75 * @return string Password Hash
76 */
77 public function getPassword();
78
79 /**
80 * Sets the password of the user.
81 * Pass the password in plaintext, the method will hash it.
82 * @param string $password Plaintext Password
83 * @return boolean True on successful set, False otherwise.
84 */
85 public function setPassword( $password );
86
87 /**
88 * Returns the login name of the user.
89 * @return string Password Hash
90 */
91 public function getLogin();
92
93 /**
94 * Sets the login name of the user.
95 * @param string $login User Login
96 * @return boolean True on successful set, False otherwise.
97 */
98 public function setLogin( $login );
99
100 /**
101 * Returns the type of the user.
102 * Type may be either 'student' or 'instructor'
103 * @return string User Type
104 */
105 public function getType();
106
107 /**
108 * Sets the type of the user.
109 * Type must be either 'student' or 'instructor'
110 * @param string $type User Type
111 * @return boolean True on successful set, False otherwise.
112 */
113 public function setType( $type );
114 }
115 ?>
1 <?php
2 /**
3 * Course.php
4 * This file contains the code for the class KuoteObjects_Course.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteObjects Course
11 *
12 * The KuoteObjects Course represents a 'course' in the Kuote system. It must implement the
13 * interfaces KuoteInterfaces_Object, and KuoteInterfaces_Course
14 * @package KuoteObjects
15 * @subpackage Course
16 */
17 class KuoteObjects_Course implements KuoteInterfaces_Object, KuoteInterfaces_Course {
18 /**
19 * Private variable to contain a DB_DataObjects object derived from MySQL or another DB.
20 * @access private
21 */
22 private $course; // A DataObjects_Course Object
23
24 /**
25 * Constructor instantiates {@link $course} as a DataObjects_Course object.
26 * @link http://pear.php.net/package/DB_DataObject/
27 */
28 public function __construct() {
29 return $this->course = new DataObjects_Course;
30 }
31
32 /**
33 * Loads the object from the data store by its unique identifier.
34 * @access public
35 * @param integer $id Unique identifier of a course in the data store.
36 * @return boolean True on success, false otherwise.
37 */
38 public function get( $id ) {
39 return $this->course->get( $id );
40 }
41
42 /**
43 * Takes the currently set properties of the course and inserts them into the data store
44 * as a new course with its own unique id.
45 * @access public
46 * @return boolean True on success, false otherwise.
47 */
48 public function insert() {
49 return $this->course->insert();
50 }
51
52 /**
53 * Updates the datastore to reflect the currently set properties of the object.
54 * Updates by the current Id.
55 * @access public
56 * @return boolean True on success, false otherwise.
57 */
58 public function update() {
59 return $this->course->update();
60 }
61
62 /**
63 * Removes the course from the datastore based on the course Id
64 * @access public
65 * @return boolean True on success, false otherwise.
66 */
67 public function delete() {
68 return $this->course->delete();
69 }
70
71 /**
72 * Returns the unique id of the course
73 * @access public
74 * @return integer The course's unique id
75 */
76 public function getId() {
77 return $this->course->crsId;
78 }
79
80 /**
81 * If true, the course may be used by other instructors.
82 * @access public
83 * @return boolean True if open, false if not.
84 */
85 public function isOpen() {
86 return $this->getIsOpen();
87 }
88
89 /**
90 * If true, the course may be used by any student.
91 * @access public
92 * @return boolean True if open, false if not.
93 */
94 public function isPublic() {
95 return $this->getIsPublic();
96 }
97
98 /**
99 * Returns the title of the course.
100 * @access public
101 * @return string Course title.
102 */
103 public function getTitle() {
104 return $this->course->crsTitle;
105 }
106
107 /**
108 * Sets the title of the course.
109 * @access public
110 * @param string $title Course Title
111 * @return boolean True on success, false otherwise.
112 */
113 public function setTitle( $title ) {
114 return $this->course->crsTitle = $title;
115 }
116
117 /**
118 * Returns the description of the course
119 * @access public
120 * @return string Course description.
121 */
122 public function getDescription() {
123 return $this->course->crsDesc;
124 }
125
126 /**
127 * Sets the description of the course
128 * @access public
129 * @param string $description Course Description
130 * @return boolean True on success, false otherwise.
131 */
132 public function setDescription( $description ) {
133 return $this->course->crsDesc = $description;
134 }
135
136 /**
137 * Returns the unique user id of the course's creator
138 * @access public
139 * @return int User Id.
140 */
141 public function getUserId() {
142 return $this->course->userId;
143 }
144
145 /**
146 * Sets the unique user id of the course's creator.
147 * @access public
148 * @param integer $id User Id of the Course Creator.
149 * @return boolean True on success, false otherwise.
150 */
151 public function setUserId( $id ) {
152 return $this->course->userId = $id;
153 }
154
155 /**
156 * Returns the state of public availability of the course.
157 *
158 * If the course Is Public, this means that any user can enroll is the course.
159 * Returns true if the course is public, false if it is not.
160 * @access public
161 * @return boolean Is Public.
162 */
163 public function getIsPublic() {
164 return $this->course->crsIsPublic;
165 }
166
167 /**
168 * Sets the state of public availability of the course.
169 *
170 * True means the course is public, false means it is not.
171 * @access public
172 * @param boolean $bool Is Public.
173 * @return boolean True on success, false otherwise.
174 */
175 public function setIsPublic( $bool ) {
176 return $this->course->crsIsPublic = $bool;
177 }
178
179 /**
180 * Returns the state of openness of the course.
181 *
182 * If the course Is Open, this means that any instructor can offer the course.
183 * Returns true if the course is open, false if it is not.
184 * @access public
185 * @return boolean Is Open.
186 */
187 public function getIsOpen() {
188 return $this->course->crsIsOpen;
189 }
190
191 /**
192 * Sets the state of openness of the course.
193 *
194 * If the course Is Open, this means that any instructor can offer the course.
195 * @access public
196 * @param boolean $bool Is Open.
197 * @return boolean True on success, false otherwise.
198 */
199 public function setIsOpen( $bool ) {
200 return $this->course->crsIsOpen = $bool;
201 }
202
203 /**
204 * Returns a hashed array of courses created by the given user.
205 *
206 * Returns a hashed array of the format <code>$courseId => $courseTitle</code>
207 * @access public
208 * @static
209 * @param KuoteObjects_User $user User for which to find created courses.
210 * @return array Hashed array of $courseId => $courseTitle
211 * OR boolean False if no courses are found.
212 */
213 public static function getCoursesHash( $user ) {
214 //Lookup all the courses created by this user.
215 $thisCourse = DB_DataObject::factory('Course');
216 $thisCourse->userId = $user->getId();
217
218 $numberOfRows = $thisCourse->find();
219
220 if( $numberOfRows ) {
221 $courseArray = array();
222 // store the course titles and ids in an array
223 while ($thisCourse->fetch()) {
224 $courseArray[$thisCourse->crsId] = $thisCourse->crsTitle;
225 }
226 return $courseArray;
227 } else {
228 //This user has not created any courses. Return FALSE.
229 return false;
230 }
231 }
232 }
233
234 ?>
1 <?php
2 /**
3 * CourseOffering.php
4 * This file contains the code for the class KuoteObjects_CourseOffering.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteObjects CourseOffering
11 *
12 * The KuoteObjects CourseOffering represents an offering (to make a course available to take)
13 * of a course in the Kuote system. It must implement the
14 * interfaces KuoteInterfaces_Object, and KuoteInterfaces_CourseOffering.
15 *
16 * Anytime an instructor wants to make a course available for students to take, they must 'offer'
17 * the course, choosing a time period for it to be available, and to whom.
18 * The CourseOffering represents this offering in the datastore.
19 * @package KuoteObjects
20 * @subpackage CourseOffering
21 * @author Kyle Hall
22 * @copyright 2006
23 */
24 class KuoteObjects_CourseOffering
25 implements KuoteInterfaces_Object, KuoteInterfaces_CourseOffering {
26 /**
27 * Private variable to contain a DB_DataObjects object derived from MySQL or another DB.
28 * @access private
29 */
30 protected $courseOffering;
31
32 /**
33 * Constructor instantiates {@link $courseOffering} as a DataObjects_CourseOffering object.
34 * @link http://pear.php.net/package/DB_DataObject/
35 * @return boolean True on success, false otherwise.
36 */
37 public function __construct() {
38 return $this->courseOffering = new DataObjects_CourseOffering;
39 }
40
41 /**
42 * Loads the object from the data store by its unique identifier.
43 * @access public
44 * @param integer $id Unique identifier of a course offering in the data store.
45 * @return boolean True on success, false otherwise.
46 */
47 public function get( $id ) {
48 return $this->courseOffering->get( $id );
49 }
50
51 /**
52 * Takes the currently set properties of the offering and inserts them into the data store
53 * as a new offering with its own unique id.
54 * @access public
55 * @return boolean True on success, false otherwise.
56 */
57 public function insert() {
58 return $this->courseOffering->insert();
59 }
60
61 /**
62 * Updates the datastore to reflect the currently set properties of the object.
63 * Updates by the current Id.
64 * @access public
65 * @return boolean True on success, false otherwise.
66 */
67 public function update() {
68 return $this->courseOffering->update();
69 }
70
71 /**
72 * Removes the course offering from the datastore based on the Id.
73 * @access public
74 * @return boolean True on success, false otherwise.
75 */
76 public function delete() {
77 return $this->courseOffering->delete();
78 }
79
80 /**
81 * Returns the unique id of the course offering.
82 * @access public
83 * @return integer The course offering's unique id
84 */
85 public function getId() {
86 return $this->courseOffering->crsOfferId;
87 }
88
89 /**
90 * Returns true if the offering is password protected, false if not.
91 * @access public
92 * @return boolean True of password protected, false if not.
93 */
94 public function hasPassword() {
95 return ! empty( $this->courseOffering->crsOfferPassword );
96 }
97
98 /**
99 * Compares the password of the offering with the passed password.
100 * Returns true on a match, false otherwise.
101 * @access public
102 * @param string $password
103 * @return boolean True on match, false otherwise.
104 */
105 public function verifyPassword( $password ) {
106 return $password == $this->courseOffering->crsOfferPassword;
107 }
108
109 /**
110 * Returns the title of the course offering.
111 *
112 * The title of the offering should differ from the course offering
113 * to distinguish multiple offerings from one another.
114 * @access public
115 * @return string Course title.
116 */
117 public function getTitle() {
118 return $this->courseOffering->crsOfferTitle;
119 }
120
121 /**
122 * Sets the title of the course offering.
123 *
124 * The title of the offering should differ from the course offering
125 * to distinguish multiple offerings from one another.
126 * @access public
127 * @param string $title Course Title
128 * @return boolean True on success, false otherwise.
129 */
130 public function setTitle( $title ) {
131 return $this->courseOffering->crsOfferTitle = $title;
132 }
133
134 /**
135 * Returns the start date of the offering in the form "YYYY-MM-DD".
136 * @access public
137 * @return string Date "YYYY-MM-DD".
138 */
139 public function getStart() {
140 return $this->courseOffering->crsOfferStart;
141 }
142
143 /**
144 * Sets the starting date of an offering.
145 *
146 * Date must be passed in the format "YYYY-MM-DD".
147 * @access public
148 * @param $dateString Date string in the format "YYYY-MM-DD"
149 * @return boolean True on success, false otherwise.
150 */
151 public function setStart( $dateString ) {
152 return $this->courseOffering->crsOfferStart = $dateString;
153 }
154
155 /**
156 * Returns the end date of the offering in the form "YYYY-MM-DD".
157 * @access public
158 * @return string Date "YYYY-MM-DD".
159 */
160 public function getEnd() {
161 return $this->courseOffering->crsOfferEnd;
162 }
163
164 /**
165 * Sets the ending date of an offering.
166 *
167 * Date must be passed in the format "YYYY-MM-DD".
168 * @access public
169 * @param $dateString Date string in the format "YYYY-MM-DD"
170 * @return boolean True on success, false otherwise.
171 */
172 public function setEnd( $dateString ) {
173 return $this->courseOffering->crsOfferEnd = $dateString;
174 }
175
176 /**
177 * Returns the hash of the course offering's password.
178 * @access public
179 * @return string Date "YYYY-MM-DD".
180 * OR boolean False if there is no password.
181 */
182 public function getPassword() {
183 return $this->courseOffering->crsOfferPassword;
184 }
185
186 /**
187 * Sets the password of an offering.
188 *
189 * @access public
190 * @param $password The offering's password.
191 * @return boolean True on success, false otherwise.
192 * @internal The password should be passed in plaintext, the method will hash it.
193 */
194 public function setPassword( $password ) {
195 return $this->courseOffering->crsOfferPassword = $password;
196 }
197
198 /**
199 * Returns the id of the course which this offering represents.
200 * @access public
201 * @return integer Course Id.
202 */
203 public function getCourseId() {
204 return $this->courseOffering->crsId;
205 }
206
207 /**
208 * Sets the id of the course which this offering represents.
209 *
210 * @access public
211 * @param $id The Course Id.
212 * @return boolean True on success, false otherwise.
213 */
214 public function setCourseId( $id ) {
215 return $this->courseOffering->crsId = $id;
216 }
217
218 /**
219 * Returns the id of the user which has created this offering.
220 * @access public
221 * @return integer User Id.
222 */
223 public function getUserId() {
224 return $this->courseOffering->userId;
225 }
226
227 /**
228 * Sets the id of the user which has created this offering.
229 * @access public
230 * @param integer User Id.
231 * @return boolean True on success, false otherwise.
232 */
233 public function setUserId( $id ) {
234 return $this->courseOffering->userId = $id;
235 }
236
237 /**
238 * Returns a hashed array of course offerings created by the given user.
239 *
240 * Returns a hashed array of the format <code>$courseOfferingId => $courseOfferingTitle</code>
241 * @access public
242 * @static
243 * @param KuoteObjects_User $user User for which to find created courses.
244 * @return array Hashed array of <code>$courseOfferingId => $courseOfferingTitle</code>.
245 */
246 public static function getCourseOfferingsHash( $user ) {
247 //Lookup all the course offerings created by this user.
248 $courseOffering = new DataObjects_Courseoffering;
249 $courseOffering->userId = $user->getId();
250
251 $numberOfRows = $courseOffering->find();
252
253 if( $numberOfRows ) {
254 $offeringsArray = array();
255 // store the offering titles and ids in an array
256 while ( $courseOffering->fetch() ) {
257 $offeringsArray[$courseOffering->crsOfferId] = $courseOffering->crsOfferTitle;
258 }
259 return $offeringsArray;
260 } else {
261 //This user has not created any course offerings. Return FALSE.
262 return false;
263 }
264
265 }
266
267 /**
268 * Returns a hashed array of the format <code>$courseOfferingId => $courseOfferingTitle</code>
269 * @access public
270 * @param KuoteObjects_User $user The user for which to get available course offerings.
271 * @return array Hashed array of $courseOfferingId => $courseOfferingTitle
272 * OR boolean False if no offerings are found.
273 */
274 public function getEnrolledCourseOfferingsHash( $user ) {
275 $enrollmentSet = new KuoteObjects_EnrollmentSet();
276 $enrollmentSet->getByUser( $user );
277
278 $hash = array();
279 while( $enrollment = $enrollmentSet->fetch() ) {
280 $courseOffering = new KuoteObjects_CourseOffering();
281 $courseOffering->get( $enrollment->getCourseOfferingId() );
282 $hash[ $courseOffering->getId() ] = $courseOffering->getTitle();
283 }
284
285 return $hash;
286 }
287
288 /**
289 * Loads the given DataObjects_CourseOffering object into the private var for such.
290 *
291 * Should not be used, violates the independtness of the classes.
292 * @deprecated
293 * @param DataObjects_CourseOffering $DataObjects_CourseOffering
294 * @return boolean True on success, false otherwise.
295 */
296 public function load( DataObjects_CourseOffering $DataObjects_CourseOffering ) {
297 $this->courseOffering = $DataObjects_CourseOffering;
298 }
299
300 /**
301 * Returns an HTML_QuickForm object to request a password for to access a course offering
302 *
303 * Should not be used, HTML_Quickform tends to be messy. Makes templating complex.
304 * All instances of it should be removed and replaced with static html forms.
305 * @deprecated
306 * @param sting $function The Kuote Function this form is used for.
307 * @return HTML_QuickForm An HTML_QuickForm Object.
308 */
309 function returnCourseOfferingEnrollmentPasswordForm( $function ) {
310 // Instantiate the HTML_QuickForm object
311 $courseOfferingEnrollmentPasswordForm = new HTML_QuickForm( 'courseOfferingEnrollmentPasswordForm' );
312 // Add some elements to the form
313 $courseOfferingEnrollmentPasswordForm->addElement( 'header', null, 'Notice: This Course Offering is
password protected.' );
314 $courseOfferingEnrollmentPasswordForm->addElement( 'header', null, 'Enter Course Offering Password' );
315 $courseOfferingEnrollmentPasswordForm->addElement( 'password', 'crsOfferPassword', 'Enter Password:',
array( 'size' => 50, 'maxlength' => 255 ) );
316 $courseOfferingEnrollmentPasswordForm->addElement( 'submit', null, 'Send' );
317
318 $courseOfferingEnrollmentPasswordForm->addElement( 'hidden', 'courseOfferingObject', base64_encode(
serialize( $this ) ) );
319 $courseOfferingEnrollmentPasswordForm->addElement( 'hidden', 'function', $function );
320 $courseOfferingEnrollmentPasswordForm->addElement( 'hidden', 'action', 'processSelectedCourseOffering'
);
321 // Define filters and validation rules
322 $courseOfferingEnrollmentPasswordForm->addRule( 'crsOfferPassword', 'Please enter the password', '
required', null, 'client' );
323
324 return( $courseOfferingEnrollmentPasswordForm );
325 }
326 }
327
328 ?>
1 <?php
2 /**
3 * CourseOfferingSet.php
4 * This file contains the code for the class KuoteObjects_CourseOfferingSet.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteObjects CourseOfferingSet
11 *
12 * The KuoteObjects CourseOfferingSet represents a collection of Course Offerings in the Kuote system.
13 * It must implement the interfaces KuoteInterfaces_ObjectSet, and KuoteInterfaces_CourseOfferingSet.
14 * @package KuoteObjects
15 * @subpackage CourseOfferingSet
16 * @author Kyle Hall
17 * @copyright 2006
18 */
19 class KuoteObjects_CourseOfferingSet
20 implements KuoteInterfaces_ObjectSet, KuoteInterfaces_CourseOfferingSet {
21 /**
22 * Array to hold course offering objects
23 * @access private
24 */
25 protected $courseOfferings = array(); //Array of KuoteObjects_CourseOffering Objects
26
27 /**
28 * Returns the first course offering in the set on the first call.
29 * The next offering in the set on each successive call.
30 *
31 * @access public
32 * @return KuoteObjects_CourseOffing A Course Offering object.
33 * OR boolean False if there are no more offerings in the set.
34 */
35 public function fetch() {
36 if ( ! isset( $this->index ) ) {
37 $this->index = 0;
38 }
39
40 if ( $this->index < count( $this->courseOfferings ) ) {
41 return $this->courseOfferings[$this->index++];
42 } else {
43 $this->index = 0;
44 return false;
45 }
46 }
47
48 /**
49 * After calling reset(), fetch() will begin from the beginning of the set again.
50 * @access public
51 * @return boolean True on successful reset, false otherwise.
52 */
53 public function reset() {
54 return $this->index = 0;
55 }
56
57 /**
58 * Returns the number of offerings in this set.
59 * @access public
60 * @return integer Number of offerings currently in this set.
61 */
62 public function count() {
63 return count( $this->courseOfferings );
64 }
65
66 /**
67 * Populates this CourseOfferingSet with courses that the given user may enroll in,
68 * but not offerings which the user is <i>already</i> enrolled in.
69 * @access public
70 * @param KuoteObjects_User $user The user for which to get available course offerings.
71 * @return integer Number of available offerings found.
72 */
73 public function getAvailableCourseOfferings( $user ) {
74 //Get all available offerings user is not enrolled in.
75 $previousEnrollments = new KuoteObjects_EnrollmentSet();
76 $previousEnrollments->getByUser( $user );
77
78 $enrolledCourseOfferings = array();
79 while ( $enrollment = $previousEnrollments->fetch() ) {
80 array_push( $enrolledCourseOfferings, $enrollment->getCourseOfferingId() );
81 }
82 unset( $previousEnrollments );
83
84 $courseOffering = DB_DataObject::factory( 'CourseOffering' );
85 $courseOffering->whereAdd( 'crsOfferStart < NOW()' );
86 $courseOffering->whereAdd( 'crsOfferEnd > NOW()' );
87
88 foreach ( $enrolledCourseOfferings as $courseOfferId ) {
89 $courseOffering->whereAdd( 'crsOfferId NOT LIKE ' . $courseOfferId );
90 }
91
92 $courseOffering->find();
93
94 while ( $courseOffering->fetch() ) {
95 // Encapsulate the DB_DataObject:CourseOffering
96 // in a KuoteObjects_CourseOffering
97 // and store it in the offerings array
98 $thisCourseOffering = new KuoteObjects_CourseOffering();
99 $thisCourseOffering->load( clone( $courseOffering ) );
100 $this->courseOfferings[] = $thisCourseOffering;
101 }
102
103 return count( $this->courseOfferings );
104 }
105 }
106
107 ?>
1 <?php
2 /**
3 * Enrollment.php
4 * This file contains the code for the class KuoteObjects_Enrollment.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteObjects Enrollment
11 *
12 * The KuoteObjects Enrollment represents a student having enrolled in a course offering
13 * in the Kuote system.
14 * It must implement the interfaces KuoteInterfaces_Object, and KuoteInterfaces_Enrollment
15 * @package KuoteObjects
16 * @subpackage Enrollment
17 * @author Kyle Hall
18 * @copyright 2006
19 */
20 class KuoteObjects_Enrollment
21 implements KuoteInterfaces_Object, KuoteInterfaces_Enrollment {
22 /**
23 * Private variable to contain a DB_DataObjects object derived from MySQL or another DB.
24 * @access private
25 */
26 protected $enrollment;
27
28 /**
29 * Constructor instantiates {@link $enrollment} as a DataObjects_Enrollment object.
30 * @link http://pear.php.net/package/DB_DataObject/
31 */
32 public function __construct() {
33 $this->enrollment = new DataObjects_Enrollment();
34 }
35
36 /**
37 * Loads the object from the data store by its unique identifier.
38 * @access public
39 * @param integer $id Unique identifier of a course in the data store.
40 * @return boolean True on success, false otherwise.
41 */
42 public function get( $id ) {
43 return $this->enrollment->get( $id );
44 }
45
46 /**
47 * Takes the currently set properties of the object and inserts them into the data store
48 * as a new instance with its own unique id.
49 * @access public
50 * @return boolean True on success, false otherwise.
51 */
52 public function insert() {
53 return $this->enrollment->insert();
54 }
55
56 /**
57 * Updates the datastore to reflect the currently set properties of the object.
58 * Updates by the current Id.
59 * @access public
60 * @return boolean True on success, false otherwise.
61 */
62 public function update() {
63 return $this->enrollment->update();
64 }
65
66 /**
67 * Removes the object from the datastore based on it's Id
68 * @access public
69 * @return boolean True on success, false otherwise.
70 */
71 public function delete() {
72 return $this->enrollment->delete();
73 }
74
75 /**
76 * Returns the unique id of the object
77 * @access public
78 * @return integer The objects's unique id
79 */
80 public function getId() {
81 return $this->enrollment->enrollId;
82 }
83
84 /**
85 * In theory, every combination of User Id and Course Offering Id should be unique.
86 * This method loads into the object this first intance of a 'row' containing both
87 * values.
88 * @access public
89 * @param KuoteObjects_User $user This user to look up.
90 * @param KuoteObjects_CourseOffering $courseOffering The course offering to look up.
91 * @throws Exception 1 if no enrollment found.
92 * @returns boolean True on success.
93 */
94 public function getByUserAndCourseOffering( $user, $courseOffering ) {
95 $this->enrollment->userId = $user->getId();
96 $this->enrollment->crsOfferId = $courseOffering->getId();
97
98 $this->enrollment->limit( 0, 1 );
99 $this->enrollment->find();
100
101 $success = $this->enrollment->fetch();
102
103 //Error checking
104 if ( !$success ) {
105 throw new Exception(
106 'No Enrollment found for UserId: ' . $userId . ', CrsOfferId: ' . $crsOfferId, 1
107 );
108 } else {
109 return $success;
110 }
111 }
112
113 /**
114 * Returns the current grade for this enrollment.
115 * @access public
116 * @return integer Grade as a percentage.
117 */
118 public function getGrade() {
119 return $this->enrollment->enrollGrade;
120 }
121
122 /**
123 * Sets the current grade for this enrollment.
124 * @access public
125 * @param integer $grade The grade as a percentage.
126 * @return boolean True on successful set, false otherwise.
127 */
128 public function setGrade( $grade ) {
129 return $this->enrollment->enrollGrade = $grade;
130 }
131
132 /**
133 * Returns the id of the User for this enrollment.
134 * @access public
135 * @return integer User Id.
136 */
137 public function getUserId() {
138 return $this->enrollment->userId;
139 }
140
141 /**
142 * Sets the id of the User for this enrollment.
143 * @access public
144 * @param integer $id The User Id.
145 * @return boolean True on successful set, false otherwise.
146 */
147 public function setUserId( $id ) {
148 return $this->enrollment->userId = $id;
149 }
150
151 /**
152 * Returns the id of the Course Offering for this enrollment.
153 * @access public
154 * @return integer Course Offering Id.
155 */
156 public function getCourseOfferingId() {
157 return $this->enrollment->crsOfferId;
158 }
159
160 /**
161 * Sets the id of the Course Offering for this enrollment.
162 * @access public
163 * @param integer $id The Course Offering Id.
164 * @return boolean True on successful set, false otherwise.
165 */
166 public function setCourseOfferingId( $id ) {
167 return $this->enrollment->crsOfferId = $id;
168 }
169
170 /**
171 * Creates a new enrollment for the given User Id and Course Offering Id.
172 * @access public
173 * @static
174 * @param integer $userId The id of the User.
175 * @param integer $courseOfferingId The id of the Course Offering the user is to enroll in.
176 * @throws Exception 2 on failure.
177 * @throws Exception 3 if already enrolled.
178 * @return boolean True on successful set, false otherwise.
179 */
180 public static function enroll( $userId, $courseOfferingId ) {
181 $enrollment = new DataObjects_Enrollment;
182 $enrollment->userId = $userId;
183 $enrollment->crsOfferId = $courseOfferingId;
184
185 $alreadyExists = $enrollment->find();
186 if ( $alreadyExists ) {
187 throw new Exception( 'User is already enrolled in this Course Offering', 3 );
188 } else {
189 $enrollId = $enrollment->insert();
190
191 if ( !$enrollId ) {
192 throw new Exception( 'Enrollment of User Id: ' . $userId . ' in CrsOfferId: ' . $crsOfferId . '
Failed.', 2 );
193 } else {
194 return true;
195 }
196 }
197 }
198 }
199
200 ?>
1 <?php
2 /**
3 * EnrollmentSet.php
4 * This file contains the code for the class KuoteObjects_EnrollmentSet.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteObjects EnrollmentSet
11 *
12 * The KuoteObjects EnrollmentSet represents a collection of Enrollments in the Kuote system.
13 * It must implement the interfaces KuoteInterfaces_ObjectSet, and KuoteInterfaces_EnrollmentSet.
14 * @package KuoteObjects
15 * @subpackage EnrollmentSet
16 * @author Kyle Hall
17 * @copyright 2006
18 */
19 class KuoteObjects_EnrollmentSet
20 implements KuoteInterfaces_ObjectSet, KuoteInterfaces_EnrollmentSet {
21 /**
22 * Array to hold enrollment objects
23 * @access private
24 */
25 protected $enrollments = array();
26
27 /**
28 * Returns the first Enrollment in the set on the first call.
29 * The next Enrollment in the set on each successive call.
30 *
31 * @access public
32 * @return KuoteObjects_Enrollment An Enrollment object.
33 * OR boolean False if there are no more Enrollments in the set.
34 */
35 public function fetch() {
36 if ( ! isset( $this->index ) ) {
37 $this->index = 0;
38 }
39
40 if ( $this->index < count( $this->enrollments ) ) {
41 return $this->enrollments[$this->index++];
42 } else {
43 $this->index = 0;
44 return false;
45 }
46 }
47
48 /**
49 * After calling reset(), fetch() will begin from the beginning of the set again.
50 * @access public
51 * @return boolean True on successful reset, false otherwise.
52 */
53 public function reset() {
54 return $this->index = 0;
55 }
56
57 /**
58 * Returns the number of Enrollments in this set.
59 * @access public
60 * @return integer Number of Enrollments currently in this set.
61 */
62 public function count() {
63 return count( $this->enrollments );
64 }
65
66 /**
67 * Populates this EnrollmentSet with all the enrollments for the given user.
68 * @access public
69 * @param KuoteObjects_User $user The user whose Enrollments to get.
70 * @return integer Number of Enrollments found.
71 */
72 public function getByUser( $user ) {
73 $enrollment = DB_DataObject::factory( 'Enrollment' );
74 $enrollment->userId = $user->getId();
75
76 $enrollmentsCount = $enrollment->find();
77
78 while ( $enrollment->fetch() ) {
79 $kEnrollment = new KuoteObjects_Enrollment();
80 $kEnrollment->get( $enrollment->enrollId );
81 array_push( $this->enrollments, $kEnrollment );
82 }
83
84 return $enrollmentsCount;
85 }
86 }
87
88 ?>
1 <?php
2 /**
3 * Learning.php
4 * This file contains the code for the class KuoteObjects_Learning.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteObjects Learning
11 *
12 * The KuoteObjects Learning represents the combination of a tutorial and a quiz in the system.
13 * It must implement the interfaces KuoteInterfaces_Object, and KuoteInterfaces_Learning
14 * @package KuoteObjects
15 * @subpackage Learning
16 * @author Kyle Hall
17 * @copyright 2006
18 */
19 class KuoteObjects_Learning implements KuoteInterfaces_Object, KuoteInterfaces_Learning {
20 /**
21 * Private variable to contain a DB_DataObjects object derived from MySQL or another DB.
22 * @access private
23 */
24 protected $learning;
25
26 /**
27 * Constructor instantiates {@link $enrollment} as a DataObjects_Enrollment object.
28 * @link http://pear.php.net/package/DB_DataObject/
29 */
30 public function __construct() {
31 return $this->learning = new DataObjects_Learning();
32 }
33
34 /**
35 * Loads the object from the data store by its unique identifier.
36 * @access public
37 * @param integer $id Unique identifier of a course in the data store.
38 * @return boolean True on success, false otherwise.
39 */
40 public function get ( $id ) {
41 return $this->learning->get( $id );
42 }
43
44 /**
45 * Takes the currently set properties of the object and inserts them into the data store
46 * as a new instance with its own unique id.
47 * @access public
48 * @return boolean True on success, false otherwise.
49 */
50 public function insert() {
51 return $this->learning->insert();
52 }
53
54 /**
55 * Updates the datastore to reflect the currently set properties of the object.
56 * Updates by the current Id.
57 * @access public
58 * @return boolean True on success, false otherwise.
59 */
60 public function update() {
61 return $this->learning->update();
62 }
63
64 /**
65 * Removes the object from the datastore based on it's Id
66 * @access public
67 * @return boolean True on success, false otherwise.
68 */
69 public function delete() {
70 return $this->learning->delete();
71 }
72
73 /**
74 * Returns the unique id of the object
75 * @access public
76 * @return integer The objects's unique id
77 */
78 public function getId() {
79 return $this->learning->learningId;
80 }
81
82 /**
83 * Loads the given DataObjects_Learning object into the private var for such.
84 *
85 * Should not be used, violates the independtness of the classes.
86 * @deprecated
87 * @param DataObjects_Learning $DataObjects_Learning
88 * @return boolean True on success, false otherwise.
89 */
90 public function load( $DataObjects_Learning ) {
91 return $this->learning = $DataObjects_Learning;
92 }
93
94 /**
95 * Returns true if this learning has a tutorial, false otherwise.
96 * @access public
97 * @return boolean True if tutorial exists, false otherwise.
98 */
99 public function hasTutorial() {
100 return empty( $this->learning->learningTutorialFileType );
101 }
102
103 /**
104 * Returns the title of the Learning.
105 * @access public
106 * @return string Learning title.
107 */
108 public function getTitle() {
109 return $this->learning->learningTitle;
110 }
111
112 /**
113 * Sets the title of the Learning
114 * @access public
115 * @param string $title The title of the Learning.
116 * @return boolean True on success, false otherwise.
117 */
118 public function setTitle( $title ) {
119 return $this->learning->learningTitle = $title;
120 }
121
122 /**
123 * Returns the description of the Learning.
124 * @access public
125 * @return string Learning description.
126 */
127 public function getDescription() {
128 return $this->learning->learningDesc;
129 }
130
131 /**
132 * Sets the description of the Learning
133 * @access public
134 * @param string $description The description of the Learning.
135 * @return boolean True on success, false otherwise.
136 */
137 public function setDescription( $description ) {
138 return $this->learning->learningDesc = $description;
139 }
140
141 /**
142 * Returns the name of the tutorial file for this Learning.
143 *
144 * All tutorial all stored under LEARNINGS_ROOT/CourseId/LearningId/TutorialFileName
145 * If the tutorial consists of multiple files, the TutorialFileName will be the first page.
146 * @access public
147 * @return string Tutorial filename.
148 */
149 public function getTutorialFileName() {
150 return $this->learning->learningTutorialFileName;
151 }
152
153 /**
154 * Sets the name of the tutorial file for this Learning.
155 * @access public
156 * @param string $name The name of the tutorial file for this Learning.
157 * @return boolean True on success, false otherwise.
158 */
159 public function setTutorialFileName( $name ) {
160 return $this->learning->learningTutorialFileName = $name;
161 }
162
163 /**
164 * Declares if the questions for this Learning's quiz should be displayed randomly.
165 * @access public
166 * @return boolean True if questions should be random, false otherwise.
167 */
168 public function getQuestionsRandom() {
169 return $this->learning->learningQuestionsRandom;
170 }
171
172 /**
173 * Sets if the questions for this Learning's quiz should be displayed randomly.
174 * @access public
175 * @param boolean $bool True if they should be random, false otherwise.
176 * @return boolean True on success, false otherwise.
177 */
178 public function setQuestionsRandom( $bool ) {
179 return $this->learning->learningQuestionsRandom = $bool;
180 }
181
182 /**
183 * Declares if the questions for this Learning's quiz should be displayed randomly,
184 * but only randomly within increasing difficuly.
185 *
186 * If true, first ask all difficutly 1 questions randomly, then difficutly 2
187 * questions randomly, and so on in that fashion.
188 * @access public
189 * @return boolean True if questions should be random by difficutly, false otherwise.
190 */
191 public function getQuestionsRandomByDifficulty() {
192 return $this->learning->learningQuestionsRandomByDifficulty;
193 }
194
195 /**
196 * Sets if the questions for this Learning's quiz should be displayed randomly by difficutly.
197 *
198 * If true, first ask all difficutly 1 questions randomly, then difficutly 2
199 * questions randomly, and so on in that fashion.
200 * @access public
201 * @param boolean $bool True if they should be random by difficulty, false otherwise.
202 * @return boolean True on success, false otherwise.
203 */
204 public function setQuestionsRandomByDifficulty( $bool ) {
205 return $this->learning->learningQuestionsRandomByDifficulty = $bool;
206 }
207
208 /**
209 * Returns the Id of the Course this Learning is part of.
210 * @access public
211 * @return integer Course Id.
212 */
213 public function getCourseId() {
214 return $this->learning->crsId;
215 }
216
217 /**
218 * Sets the Id of the Course this Learning is part of.
219 * @access public
220 * @param integer $id The id of the Course this Learning is part of.
221 * @return boolean True on success, false otherwise.
222 */
223 public function setCourseId( $id ) {
224 return $this->learning->crsId = $id;
225 }
226
227 /**
228 * Returns a hashed array of learnings that are part of the given course.
229 *
230 * Returns a hashed array of the format <code>$learningId => $learningTitle</code>
231 * @access public
232 * @static
233 * @param integer $courseId Id of the course for which to find created learnings.
234 * @return array Hashed array of <code>$learningId => $learningTitle</code>.
235 * OR boolean False if no learnings are found of the given Course Id.
236 */
237 public static function getLearningsHash( $courseId ) {
238 //Lookup all the courses created by this user.
239 $learning = new DataObjects_Learning();
240 $learning->crsId = $courseId;
241
242 $numberOfRows = $learning->find();
243
244 if( $numberOfRows ) {
245 $learningsArray = array();
246 // store the course titles and ids in an array
247 while ($learning->fetch()) {
248 $learningsArray[$learning->learningId] = $learning->learningTitle;
249 }
250 return $learningsArray;
251 } else {
252 //This user has not created any learnings. Return FALSE.
253 return false;
254 }
255 }
256 }
257
258 ?>
1 <?php
2 /**
3 * LearningOffering.php
4 * This file contains the code for the class KuoteObjects_LearningOffering.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteObjects LearningOffering
11 *
12 * The KuoteObjects LearningOffering represents an offering (to make a course available to take)
13 * of a learning under a Course Offering in the Kuote system. It must implement the
14 * interfaces KuoteInterfaces_Object, and KuoteInterfaces_LearningOffering.
15 *
16 * Anytime an instructor wants to make a course available for students to take, they must 'offer'
17 * the course, choosing a time period for it to be available, and to whom.
18 * The CourseOffering represents this offering in the datastore.
19 * @package KuoteObjects
20 * @subpackage LearningOffering
21 * @author Kyle Hall
22 * @copyright 2006
23 */
24 class KuoteObjects_LearningOffering
25 implements KuoteInterfaces_Object, KuoteInterfaces_LearningOffering {
26 /**
27 * Private variable to contain a DB_DataObjects object derived from MySQL or another DB.
28 * @access private
29 */
30 protected $learningOffering; //A DataObjects_LearningOffering Object
31
32 /**
33 * Constructor instantiates {@link $enrollment} as a DataObjects_Enrollment object.
34 * @link http://pear.php.net/package/DB_DataObject/
35 */
36 public function __construct() {
37 return $this->learningOffering = new DataObjects_LearningOffering();
38 }
39
40 /**
41 * Loads the object from the data store by its unique identifier.
42 * @access public
43 * @param integer $id Unique identifier of a course in the data store.
44 * @return boolean True on success, false otherwise.
45 */
46 public function get( $id ) {
47 return $this->learningOffering->get( $id );
48 }
49
50 /**
51 * Takes the currently set properties of the object and inserts them into the data store
52 * as a new instance with its own unique id.
53 * @access public
54 * @return boolean True on success, false otherwise.
55 */
56 public function insert() {
57 return $this->learningOffering->insert();
58 }
59
60 /**
61 * Updates the datastore to reflect the currently set properties of the object.
62 * Updates by the current Id.
63 * @access public
64 * @return boolean True on success, false otherwise.
65 */
66 public function update() {
67 return $this->learningOffering->update();
68 }
69
70 /**
71 * Removes the object from the datastore based on it's Id
72 * @access public
73 * @return boolean True on success, false otherwise.
74 */
75 public function delete() {
76 return $this->learningOffering->delete();
77 }
78
79 /**
80 * Returns the unique id of the object
81 * @access public
82 * @return integer The objects's unique id
83 */
84 public function getId() {
85 return $this->learningOffering->learningOfferId;
86 }
87
88 /**
89 * Returns the title of the Learning Offering.
90 * @access public
91 * @return string Learning Offering title.
92 */
93 public function getTitle() {
94 return $this->learningOffering->learningOfferTitle;
95 }
96
97 /**
98 * Sets the title of the Learning Offering
99 * @access public
100 * @param string $title The title of the Learning Offering.
101 * @return boolean True on success, false otherwise.
102 */
103 public function setTitle( $title ) {
104 return $this->learningOffering->learningOfferTitle = $title;
105 }
106
107 /**
108 * Returns the start date of the offering in the form "YYYY-MM-DD".
109 * @access public
110 * @return string Date "YYYY-MM-DD".
111 */
112 public function getStart() {
113 return $this->learningOffering->learningOfferStart;
114 }
115
116 /**
117 * Sets the starting date of an offering.
118 *
119 * Date must be passed in the format "YYYY-MM-DD".
120 * @access public
121 * @param $dateString Date string in the format "YYYY-MM-DD"
122 * @return boolean True on success, false otherwise.
123 */
124 public function setStart( $dateString ) {
125 return $this->learningOffering->learningOfferStart = $dateString;
126 }
127
128 /**
129 * Returns the end date of the offering in the form "YYYY-MM-DD".
130 * @access public
131 * @return string Date "YYYY-MM-DD".
132 */
133 public function getEnd() {
134 return $this->learningOffering->learningOfferEnd;
135 }
136
137 /**
138 * Sets the ending date of an offering.
139 *
140 * Date must be passed in the format "YYYY-MM-DD".
141 * @access public
142 * @param $dateString Date string in the format "YYYY-MM-DD"
143 * @return boolean True on success, false otherwise.
144 */
145 public function setEnd( $dateString ) {
146 return $this->learningOffering->learningOfferEnd = $dateString;
147 }
148
149 /**
150 * Declares if the questions for this Learning Offering's quiz should be displayed randomly.
151 *
152 * This setting takes precedence over the Learning's same property.
153 * @access public
154 * @return boolean True if questions should be random, false otherwise.
155 */
156 public function getQuestionsRandom() {
157 return $this->learningOffering->learningOfferQuestionsRandom;
158 }
159
160 /**
161 * Sets if the questions for this Learning Offering's quiz should be displayed randomly.
162 *
163 * This setting takes precedence over the Learning's same property.
164 * @access public
165 * @param boolean $bool True if they should be random, false otherwise.
166 * @return boolean True on success, false otherwise.
167 */
168 public function setQuestionsRandom( $bool ) {
169 return $this->learningOffering->learningOfferQuestionsRandom = $bool;
170 }
171
172 /**
173 * Declares if the questions for this Learning Offering's quiz should be displayed randomly,
174 * but only randomly within increasing difficuly.
175 *
176 * If true, first ask all difficutly 1 questions randomly, then difficutly 2
177 * questions randomly, and so on in that fashion.
178 * This setting takes precedence over the Learning's same property.
179 * @access public
180 * @return boolean True if questions should be random by difficutly, false otherwise.
181 */
182 public function getQuestionsRandomByDifficulty() {
183 return $this->learningOffering->learningOfferQuestionsRandomByDifficulty;
184 }
185
186 /**
187 * Sets if the questions for this Learning Offering's quiz
188 * should be displayed randomly by difficutly.
189 *
190 * If true, first ask all difficutly 1 questions randomly, then difficutly 2
191 * questions randomly, and so on in that fashion.
192 * This setting takes precedence over the Learning's same property.
193 * @access public
194 * @param boolean $bool True if they should be random by difficulty, false otherwise.
195 * @return boolean True on success, false otherwise.
196 */
197 public function setQuestionsRandomByDifficulty( $bool ) {
198 return $this->learningOffering->learningOfferQuestionsRandomByDifficulty = $bool;
199 }
200
201 /**
202 * Returns the Id of the Course Offering this Learning Offering is part of.
203 * @access public
204 * @return integer Course Offering Id.
205 */
206 public function getCourseOfferingId() {
207 return $this->learningOffering->crsOfferId;
208 }
209
210 /**
211 * Sets the Id of the Course Offering this Learning Offering is part of.
212 * @access public
213 * @param integer $id The id of the Course Offering this Learning is part of.
214 * @return boolean True on success, false otherwise.
215 */
216 public function setCourseOfferingId( $id ) {
217 return $this->learningOffering->crsOfferId = $id;
218 }
219
220 /**
221 * Returns the Id of the Learning this Learning Offering is offering.
222 * @access public
223 * @return integer Learning Id.
224 */
225 public function getLearningId() {
226 return $this->learningOffering->learningId;
227 }
228
229 /**
230 * Sets the Id of the Learning this Learning Offering is offering.
231 * @access public
232 * @param integer $id The id of the Learning this Learning Offering is offering.
233 * @return boolean True on success, false otherwise.
234 */
235 public function setLearningId( $id ) {
236 return $this->learningOffering->learningId = $id;
237 }
238
239 /**
240 * Returns a hashed array of learnings offerings for the given Learning Id.
241 *
242 * Returns a hashed array of the format <code>$id => $title</code>
243 * @access public
244 * @static
245 * @param integer $learningId Learning for which to find offerings.
246 * @return array Hashed array of $id => $title
247 * OR boolean False if no offerings are found.
248 */
249 public static function getLearningOfferingsHash( $learningId ) {
250 //Lookup all the courses created by this user.
251 $learningOffering = DB_DataObject::factory('LearningOffering');
252 $learningOffering->learningId = $learningId;
253
254 $numberOfRows = $learningOffering->find();
255
256 if( $numberOfRows ) {
257 $learningOfferingsHash = array();
258 // store the course titles and ids in an array
259 while ($learningOffering->fetch()) {
260 $learningOfferingsHash[$learningOffering->learningOfferId] = $learningOffering->
learningOfferTitle;
261 }
262 return $learningOfferingsHash;
263 } else {
264 return false;
265 }
266 }
267
268 /**
269 * Loads the given DataObjects_LearningOffering object into the private var for such.
270 *
271 * Should not be used, violates the independtness of the classes.
272 * @deprecated
273 * @param DataObjects_LearningOffering $DataObjects_LearningOffering
274 * @return boolean True on success, false otherwise.
275 */
276 public function load( DataObjects_LearningOffering $dataObjects_LearningOffering ) {
277 return $this->learningOffering = $dataObjects_LearningOffering;
278 }
279 }
280
281 ?>
1 <?php
2 /**
3 * LearningOfferingSet.php
4 * This file contains the code for the class KuoteObjects_LearningOfferingSet.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteObjects LearningOfferingSet
11 *
12 * The KuoteObjects LearningOfferingSet represents a collection of LearningOfferings
13 * in the Kuote system. It must implement the interfaces
14 * KuoteInterfaces_ObjectSet, and KuoteInterfaces_LearningOfferingSet.
15 * @package KuoteObjects
16 * @subpackage LearningOfferingSet
17 * @author Kyle Hall
18 * @copyright 2006
19 */
20 class KuoteObjects_LearningOfferingSet
21 implements KuoteInterfaces_ObjectSet, KuoteInterfaces_LearningOfferingSet {
22 /**
23 * Array to hold LearningOffering objects
24 * @access private
25 */
26 protected $learningOfferings = array(); //Array of KuoteObjects_LearningOffering Objects
27
28 /**
29 * Returns the first LearningOffering in the set on the first call.
30 * The next LearningOffering in the set on each successive call.
31 *
32 * @access public
33 * @return KuoteObjects_LearningOffering A LearningOffering object.
34 * OR boolean False if there are no more LearningOfferings in the set.
35 */
36 public function fetch() {
37 if ( ! isset( $this->index ) ) {
38 $this->index = 0;
39 }
40
41 if ( $this->index < count( $this->learningOfferings ) ) {
42 return $this->learningOfferings[$this->index++];
43 } else {
44 $this->index = 0;
45 return false;
46 }
47 }
48
49 /**
50 * After calling reset(), fetch() will begin from the beginning of the set again.
51 * @access public
52 * @return boolean True on successful reset, false otherwise.
53 */
54 public function reset() {
55 return $this->index = 0;
56 }
57
58 /**
59 * Returns the number of Enrollments in this set.
60 * @access public
61 * @return integer Number of Enrollments currently in this set.
62 */
63 public function count() {
64 return count( $this->learningOfferings );
65 }
66
67 /**
68 * Populates this LearningOfferingSet with all the <i>currently offered</i> LearningOfferings
69 * for the given Course Offering.
70 * @access public
71 * @param integer KuoteObjects_CourseOffering $courseOffering The CourseOffering whose
72 * LearningOfferings to get.
73 * @return integer Number of Enrollments found.
74 */
75 public function getCurrentByCourseOffering( $courseOffering ) {
76 $dataObject_LearningOffer = DB_DataObject::factory( 'LearningOffering' );
77 $dataObject_LearningOffer->whereAdd( 'learningOfferStart < NOW()' );
78 $dataObject_LearningOffer->whereAdd( 'learningOfferEnd > NOW()' );
79
80 // If passed a Course Offering, get current learnings for that Course Offering,
81 // otherwise get all current learnings
82 if ( isset( $courseOffering ) ) {
83 $dataObject_LearningOffer->whereAdd( 'crsOfferId = ' . $courseOffering->getId() );
84 }
85
86 $this->learningsCount = $dataObject_LearningOffer->find();
87
88 while ( $dataObject_LearningOffer->fetch() ) {
89 // Encapsulate the DB_DataObject:CourseOffering in a KuoteObject:LearningOffering
90 // And store it in the offerings array
91 $kuoteObjects_LearningOffering = new KuoteObjects_LearningOffering();
92 $kuoteObjects_LearningOffering->load( clone( $dataObject_LearningOffer ) );
93 $this->learningOfferings[] = $kuoteObjects_LearningOffering;
94 }
95 }
96
97 /**
98 * Returns an HTML_QuickForm object to disply a list of learning offerings to take.
99 * @deprecated
100 * @access public
101 * @param string $function The Kuote function using the form.
102 * @return HTML_Quickform QuickForm object of the learning offerings selection form.
103 */
104 public function displayLearningOfferingSelectionForms( $function ) {
105 if ( $this->learningsCount > 0 ) {
106 foreach( $this->learningOfferings as $learningOffering ) {
107 $learningOffering->displayLearningOfferingSelectionForm( $function );
108 }
109 } else {
110 echo( "<b>There are no learning currently available for this Course</b><br />" );
111 }
112 }
113 }
114
115 ?>
1 <?php
2 /**
3 * LearningOfferTaken.php
4 * This file contains the code for the class KuoteObjects_LearningOfferTaken.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteObjects LearningOfferTaken
11 *
12 * The KuoteObjects LearningOfferTaken represents a learning offering that a student has taken.
13 * It must implement the interfaces KuoteInterfaces_Object, and KuoteInterfaces_LearningOffering.
14 *
15 * @package KuoteObjects
16 * @subpackage LearningOfferTaken
17 * @author Kyle Hall
18 * @copyright 2006
19 */
20 class KuoteObjects_LearningOfferTaken
21 implements KuoteInterfaces_Object, KuoteInterfaces_LearningOfferTaken {
22 /**
23 * Private variable to contain a DB_DataObjects object derived from MySQL or another DB.
24 * @access private
25 */
26 private $learningOfferTaken; // A DataObjects_Learningoffertaken Object
27
28 /**
29 * Constructor instantiates {@link $enrollment} as a DataObjects_LearningOfferTaken object.
30 * @link http://pear.php.net/package/DB_DataObject/
31 */
32 public function __construct() {
33 return $this->learningOfferTaken = new DataObjects_Learningoffertaken;
34 }
35
36 /**
37 * Loads the object from the data store by its unique identifier.
38 * @access public
39 * @param integer $id Unique identifier of a course in the data store.
40 * @return boolean True on success, false otherwise.
41 */
42 public function get( $id ) {
43 return $this->learningOfferTaken->get( $id );
44 }
45
46 /**
47 * Takes the currently set properties of the object and inserts them into the data store
48 * as a new instance with its own unique id.
49 * @access public
50 * @return boolean True on success, false otherwise.
51 */
52 public function insert() {
53 return $this->learningOfferTaken->insert();
54 }
55
56 /**
57 * Updates the datastore to reflect the currently set properties of the object.
58 * Updates by the current Id.
59 * @access public
60 * @return boolean True on success, false otherwise.
61 */
62 public function update() {
63 return $this->learningOfferTaken->insert();
64 }
65
66 /**
67 * Removes the object from the datastore based on it's Id
68 * @access public
69 * @return boolean True on success, false otherwise.
70 */
71 public function delete() {
72 return $this->learningOfferTaken->delete();
73 }
74
75 /**
76 * Returns the unique id of the object
77 * @access public
78 * @return integer The objects's unique id
79 */
80 public function getId() {
81 return $this->learningOfferTaken->learningOfferTakenId;
82 }
83
84 /**
85 * Creates a new LearningOfferTaken in the datastore based on the given Learning Offering Id
86 * and Enrollment Id.
87 * @access public
88 * @param KuoteObjects_LearningOffering $learningOffering The LearningOffering being taken.
89 * @param KuoteObjects_Enrollment $enrollmentId The Enrollment in this course offering.
90 * @return boolean True if created successfully, false otherwise.
91 */
92 public function initialize( $learningOffering, $enrollment ) {
93 $this->learningOfferTaken->learningOfferId = $learningOffering->getId();
94 $this->learningOfferTaken->enrollId = $enrollment->getId();
95
96 return $this->learningOfferTaken->insert();
97 }
98
99 /**
100 * Returns the timestamp of when this LearningOfferTaken was created.
101 * @access public
102 * @return integer The time of creation.
103 */
104 public function getTime() {
105 return $this->learningOfferTaken->learningOfferTakenTime;
106 }
107
108 /**
109 * Returns the Id of the Learning Offering of this Learning Offering Taken.
110 * @access public
111 * @return integer Learning Id.
112 */
113 public function getLearningOfferingId() {
114 return $this->learningOfferTaken->learningOfferId;
115 }
116
117 /**
118 * Sets the Id of the Learning Offering of this Learning Offering Taken.
119 * @access public
120 * @param integer $id The id of the Learning Offering of this Learning Offering Taken.
121 * @return boolean True on success, false otherwise.
122 */
123 public function setLearningOfferingId( $id ) {
124 return $this->learningOfferTaken->learningOfferId = $id;
125 }
126
127 /**
128 * Returns the Id of the Enrollment of this Learning Offering Taken.
129 * @access public
130 * @return integer Learning Id.
131 */
132 public function getEnrollmentId() {
133 return $this->learningOfferTaken->enrollId;
134 }
135
136 /**
137 * Sets the Id of the Enrollment of this Learning Offering Taken.
138 * @access public
139 * @param integer $id The id of the Enrollment of this Learning Offering Taken.
140 * @return boolean True on success, false otherwise.
141 */
142 public function setEnrollmentId( $id ) {
143 return $this->learningOfferTaken->enrollId = $id;
144 }
145 }
146
147 ?>
1 <?php
2 /**
3 * Question.php
4 * This file contains the code for the class KuoteObjects_Question.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteObjects Question
11 *
12 * The KuoteObjects Question represents a single question that is part of a Learning's quiz
13 * in the Kuote system.
14 * It must implement the interfaces KuoteInterfaces_Object, and KuoteInterfaces_Question
15 * @package KuoteObjects
16 * @subpackage Question
17 * @author Kyle Hall
18 * @copyright 2006
19 */
20 class KuoteObjects_Question implements KuoteInterfaces_Object, KuoteInterfaces_Question {
21 /**
22 * Private variable to contain a DB_DataObjects object derived from MySQL or another DB.
23 * @access private
24 */
25 protected $question; //A DataObjects_Question Object
26
27 /**
28 * Constructor instantiates {@link $enrollment} as a DataObjects_Enrollment object.
29 * @link http://pear.php.net/package/DB_DataObject/
30 */
31 public function __construct() {
32 return $this->question = new DataObjects_Question();
33 }
34
35 /**
36 * Loads the object from the data store by its unique identifier.
37 * @access public
38 * @param integer $id Unique identifier of a course in the data store.
39 * @return boolean True on success, false otherwise.
40 */
41 public function get( $id ) {
42 return $this->question->get( $id );
43 }
44
45 /**
46 * Takes the currently set properties of the object and inserts them into the data store
47 * as a new instance with its own unique id.
48 * @access public
49 * @return boolean True on success, false otherwise.
50 */
51 public function insert() {
52 return $this->question->insert();
53 }
54
55 /**
56 * Updates the datastore to reflect the currently set properties of the object.
57 * Updates by the current Id.
58 * @access public
59 * @return boolean True on success, false otherwise.
60 */
61 public function update() {
62 return $this->question->update();
63 }
64
65 /**
66 * Removes the object from the datastore based on it's Id
67 * @access public
68 * @return boolean True on success, false otherwise.
69 */
70 public function delete() {
71 return $this->question->delete();
72 }
73
74 /**
75 * Returns the unique id of the object
76 * @access public
77 * @return integer The objects's unique id
78 */
79 public function getId() {
80 return $this->question->questionId;
81 }
82
83 /**
84 * Returns the "answer" for the given Option Number
85 * @access public
86 * @param integer $optionNumber The number of the option to return, 1 through 5 are valid.
87 * @return string The "answer" for the given Option Number.
88 * @throws Exception 1 if $optionNumber is out of bounds.
89 */
90 public function getOption( $optionNumber ) {
91 switch ($optionNumber ) {
92 case 1:
93 return $this->question->questionOption1;
94 break;
95 case 2:
96 return $this->question->questionOption2;
97 break;
98 case 3:
99 return $this->question->questionOption3;
100 break;
101 case 4:
102 return $this->question->questionOption4;
103 break;
104 case 5:
105 return $this->question->questionOption5;
106 break;
107 case 0:
108 case "":
109 return "You Did Not Answer This Question.";
110 break;
111 default:
112 throw new Exception( 'Option ' . $optionNumber . ' Out Of Bounds.', 1 );
113 return false;
114 break;
115 }
116 }
117
118 /**
119 * Sets the "answer" for the given option number to the given string.
120 * @access public
121 * @param integer $optionNumber The number of the option to set, 1 through 5 are valid.
122 * @param string $string The string which is to be the "answer".
123 * @return boolean True on success, false otherwise.
124 * @throws Exception 1 if optionNumber is out of bounds.
125 */
126 public function setOption( $optionNumber, $string ) {
127 switch ($optionNumber ) {
128 case 1:
129 return $this->question->questionOption1 = $string;
130 break;
131 case 2:
132 return $this->question->questionOption2 = $string;
133 break;
134 case 3:
135 return $this->question->questionOption3 = $string;
136 break;
137 case 4:
138 return $this->question->questionOption4 = $string;
139 break;
140 case 5:
141 return $this->question->questionOption5 = $string;
142 break;
143 default:
144 throw new Exception( 'Option ' . $optionNumber . ' Out Of Bounds.', 1 );
145 return false;
146 break;
147 }
148 }
149
150 /**
151 * Returns the "question" for this question.
152 * @access public
153 * @return string Question Body.
154 */
155 public function getBody() {
156 return $this->question->questionBody;
157 }
158
159 /**
160 * Sets the "question" for this question.
161 * @access public
162 * @param string $body Question Body.
163 * @return boolean True on successful set, false otherwise.
164 */
165 public function setBody( $body ) {
166 return $this->question->questionBody = $body;
167 }
168
169 /**
170 * Returns the amount of time given in seconds to answer this question. 0 is unlimited.
171 * @access public
172 * @return integer Time in seconds.
173 */
174 public function getTime() {
175 return $this->question->questionTime;
176 }
177
178 /**
179 * Sets the amount of time given in seconds to answer this question. 0 is unlimited.
180 * @access public
181 * @param integer $time Time in seconds.
182 * @return boolean True on successful set, false otherwise.
183 */
184 public function setTime( $time ) {
185 return $this->question->questionTime = $time;
186 }
187
188 /**
189 * Returns the option number of the correct question option.
190 * @access public
191 * @return integer Option number.
192 */
193 public function getAnswer() {
194 return $this->question->questionAnswer;
195 }
196
197 /**
198 * Sets the option number of the correct question option.
199 * @access public
200 * @param integer $answer Correct Option Number
201 * @return boolean True on successful set, false otherwise.
202 */
203 public function setAnswer( $answer ) {
204 return $this->question->questionAnswer = $answer;
205 }
206
207 /**
208 * Returns the Id of the learning under which this question exists.
209 * @access public
210 * @return integer Learning Id
211 */
212 public function getLearningId() {
213 return $this->question->learningId;
214 }
215
216 /**
217 * Sets the Id of the learning under which this question exists.
218 * @access public
219 * @param integer $id Learning Id
220 * @return boolean True on successful set, false otherwise.
221 */
222 public function setLearningId( $id ) {
223 return $this->question->learningId = $id;
224 }
225
226 /**
227 * Returns the order number of the question. First question is 1, second question is 2, etc.
228 * @access public
229 * @return integer Question Number
230 */
231 public function getQuestionNumber() {
232 return $this->question->questionNumber;
233 }
234
235 /**
236 * Sets the order number of the question. First question is 1, second question is 2, etc.
237 * @access public
238 * @param integer $id Learning Id
239 * @return boolean True on successful set, false otherwise.
240 */
241 public function setQuestionNumber( $number ) {
242 return $this->question->questionNumber = $number;
243 }
244
245 /**
246 * Returns the difficulty of the question. 1 is easiest, 5 is hardest.
247 * @access public
248 * @return integer Question Difficulty
249 */
250 public function getDifficulty() {
251 return $this->question->questionDifficulty;
252 }
253
254 /**
255 * Sets the difficulty of the question. 1 is easiest, 5 is hardest.
256 * @access public
257 * @param integer $difficutly Question Difficutly
258 * @return boolean True on successful set, false otherwise.
259 */
260 public function setDifficulty( $difficulty ) {
261 return $this->question->questionDifficulty = $difficulty;
262 }
263
264 /**
265 * Returns the text of the questions first option.
266 * @access public
267 * @return string Question Option
268 */
269 public function getOption1() {
270 return $this->question->questionOption1;
271 }
272
273 /**
274 * Sets the text of the questions first option.
275 * @access public
276 * @param string $string Question Option
277 * @return boolean True on successful set, false otherwise.
278 */
279 public function setOption1( $string ) {
280 return $this->question->questionOption1 = $string;
281 }
282
283 /**
284 * Returns the text of the questions second option.
285 * @access public
286 * @return string Question Option
287 */
288 public function getOption2() {
289 return $this->question->questionOption2;
290 }
291
292 /**
293 * Sets the text of the questions second option.
294 * @access public
295 * @param string $string Question Option
296 * @return boolean True on successful set, false otherwise.
297 */
298 public function setOption2( $string ) {
299 return $this->question->questionOption2 = $string;
300 }
301
302 /**
303 * Returns the text of the questions third option.
304 * @access public
305 * @return string Question Option
306 */
307 public function getOption3() {
308 return $this->question->questionOption3;
309 }
310
311 /**
312 * Sets the text of the questions third option.
313 * @access public
314 * @param string $string Question Option
315 * @return boolean True on successful set, false otherwise.
316 */
317 public function setOption3( $string ) {
318 return $this->question->questionOption3 = $string;
319 }
320
321 /**
322 * Returns the text of the questions fourth option.
323 * @access public
324 * @return string Question Option
325 */
326 public function getOption4() {
327 return $this->question->questionOption4;
328 }
329
330 /**
331 * Sets the text of the questions forth option.
332 * @access public
333 * @param string $string Question Option
334 * @return boolean True on successful set, false otherwise.
335 */
336 public function setOption4( $string ) {
337 return $this->question->questionOption4 = $string;
338 }
339
340 /**
341 * Returns the text of the questions fifth option.
342 * @access public
343 * @return string Question Option
344 */
345 public function getOption5() {
346 return $this->question->questionOption5;
347 }
348
349 /**
350 * Sets the text of the questions fifth option.
351 * @access public
352 * @param string $string Question Option
353 * @return boolean True on successful set, false otherwise.
354 */
355 public function setOption5( $string ) {
356 return $this->question->questionOption5 = $string;
357 }
358
359 /**
360 * Returns the question number that should be used for a new question for the given learning.
361 * i.e. If there are five question, getNextQuestionNumber() will return an integer 6.
362 * @access public
363 * @param integer $learningId Learning Id
364 * @return integer Question Number
365 */
366 public static function getNextQuestionNumber( $learningId ) {
367 $question = new DataObjects_Question();
368 $question->learningId = $learningId;
369 $count = $question->find();
370 return $count + 1;
371 }
372 }
373 ?>
1 <?php
2 /**
3 * QuestionSet.php
4 * This file contains the code for the class KuoteObjects_QuestionSet.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteObjects QuestionSet
11 *
12 * The KuoteObjects QuestionSet represents a collection of Question objects
13 * in the Kuote system. It must implement the interfaces
14 * KuoteInterfaces_ObjectSet, and KuoteInterfaces_QuestionSet.
15 * @package KuoteObjects
16 * @subpackage QuestionSet
17 * @author Kyle Hall
18 * @copyright 2006
19 */
20 class KuoteObjects_QuestionSet
21 implements KuoteInterfaces_ObjectSet, KuoteInterfaces_QuestionSet {
22 /**
23 * Array to hold Question objects
24 * @access private
25 */
26 protected $questions = array();
27
28 /**
29 * Returns the first Question in the set on the first call.
30 * The next Question in the set on each successive call.
31 *
32 * Example:
33 * <code> while ( $question = $questionSet->fetch() { doSomething(); }</code>
34 * @access public
35 * @return KuoteObjects_LearningOffering A LearningOffering object.
36 * OR boolean False if there are no more LearningOfferings in the set.
37 */
38 public function fetch() {
39 if ( ! isset( $this->index ) ) {
40 $this->index = 0;
41 }
42
43 if ( $this->index < count( $this->questions ) ) {
44 return $this->questions[$this->index++];
45 } else {
46 $this->index = 0;
47 return false;
48 }
49 }
50
51 /**
52 * After calling reset(), fetch() will begin from the beginning of the set again.
53 * @access public
54 * @return boolean True on successful reset, false otherwise.
55 */
56 public function reset() {
57 return $this->index = 0;
58 }
59
60 /**
61 * Returns the number of Enrollments in this set.
62 * @access public
63 * @return integer Number of Enrollments currently in this set.
64 */
65 public function count() {
66 return count( $this->questions );
67 }
68
69 /**
70 * Populates the question set with questions that are part of the given Learning's quiz.
71 * @access public
72 * @param integer $learningId The Id of the Learning whose questions to find.
73 * @return integer Number of questions found
74 */
75 public function getByLearningId( $learningId ) {
76 // Lookup all the courses created by this user.
77 $question_DAO = DB_DataObject::factory( 'Question' );
78 $question_DAO->learningId = $learningId;
79 $question_DAO->orderBy( 'questionNumber' );
80 $numberOfRows = $question_DAO->find();
81
82 if ( $numberOfRows ) {
83 while ( $question_DAO->fetch() ) {
84 $question = new KuoteObjects_Question();
85 $question->get( $question_DAO->questionId );
86 array_push( $this->questions, $question );
87 }
88 return count( $this->questions );
89 } else {
90 // This this learning has no questions.
91 return 0;
92 }
93 }
94 }
95
96 ?>
1 <?php
2 /**
3 * QuestionAnswered.php
4 * This file contains the code for the class KuoteObjects_QuestionAnswered.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteObjects QuestionAnswered
11 *
12 * The KuoteObjects QuestionAnswered represents a student having
13 * answered a question as part of quiz in the Kuote system.
14 * It must implement the interfaces KuoteInterfaces_Object, and KuoteInterfaces_QuestionAnswered
15 * @package KuoteObjects
16 * @subpackage QuestionAnswered
17 * @author Kyle Hall
18 * @copyright 2006
19 */
20 class KuoteObjects_QuestionAnswered
21 implements KuoteInterfaces_Object, KuoteInterfaces_QuestionAnswered {
22 /**
23 * Private variable to contain a DB_DataObjects object derived from MySQL or another DB.
24 * @access private
25 */
26 private $questionAnswered;
27
28 /**
29 * Constructor instantiates {@link $enrollment} as a DataObjects_Enrollment object.
30 * @link http://pear.php.net/package/DB_DataObject/
31 */
32 public function __construct() {
33 return $this->questionAnswered = new DataObjects_Questionanswered;
34 }
35
36 /**
37 * Loads the object from the data store by its unique identifier.
38 * @access public
39 * @param integer $id Unique identifier of a course in the data store.
40 * @return boolean True on success, false otherwise.
41 */
42 public function get( $id ) {
43 return $this->questionAnswered->get( $id );
44 }
45
46 /**
47 * Takes the currently set properties of the object and inserts them into the data store
48 * as a new instance with its own unique id.
49 * @access public
50 * @return boolean True on success, false otherwise.
51 */
52 public function insert() {
53 return $this->questionAnswered->insert();
54 }
55
56 /**
57 * Updates the datastore to reflect the currently set properties of the object.
58 * Updates by the current Id.
59 * @access public
60 * @return boolean True on success, false otherwise.
61 */
62 public function update() {
63 return $this->questionAnswered->update();
64 }
65
66 /**
67 * Removes the object from the datastore based on it's Id
68 * @access public
69 * @return boolean True on success, false otherwise.
70 */
71 public function delete() {
72 return $this->questionAnswered->delete();
73 }
74
75 /**
76 * Returns the unique id of the object
77 * @access public
78 * @return integer The objects's unique id
79 */
80 public function getId() {
81 return $this->questionAnswered->questionAnsweredId;
82 }
83
84 /**
85 * Creates a new QuestionAnswered in the datastore based on the given Question Id
86 * and LearningOfferTaken Id.
87 * @access public
88 * @param KuoteObjects_Question $question The Question being answered.
89 * @param KuoteObjects_LearningOfferTaken $learningOfferTaken The LearningOfferTaken for this quiz.
90 * @return boolean True if created successfully, false otherwise.
91 */
92 public function initialize( $question, $learningOfferTaken ) {
93 $this->questionAnswered->questionId = $question->getId();
94 $this->questionAnswered->learningOfferTakenId = $learningOfferTaken->getId();
95
96 return $this->questionAnswered->insert();
97 }
98
99 /**
100 * Returns the selected choice of the questions answer options
101 * @access public
102 * @return integer Question Option.
103 */
104 public function getChoice() {
105 return $this->questionAnswered->questionAnsweredChoice;
106 }
107
108 /**
109 * Sets the selected choice of the questions answer options
110 * @access public
111 * @param integer $choice Question Option.
112 * @return boolean True on successful set, false otherwise.
113 */
114 public function setChoice( $choice ) {
115 return $this->questionAnswered->questionAnsweredChoice = $choice;
116 }
117
118 /**
119 * Returns true if the selected answer is correct.
120 * @access public
121 * @return boolean True if selected answer is correct, false otherwise.
122 */
123 public function getIsCorrect() {
124 return $this->questionAnswered->questionAnsweredIsCorrect;
125 }
126
127 /**
128 * Sets whether the selected answer is correct or not.
129 * @access public
130 * @param boolean $bool True if correct, otherwise False
131 * @return boolean True on successful set, false otherwise.
132 */
133 public function setIsCorrect( $bool ) {
134 return $this->questionAnswered->questionAnsweredIsCorrect = $bool;
135 }
136
137 /**
138 * Returns the Id of the Question this QuestionAnswered is answering.
139 * @access public
140 * @return integer Question Id
141 */
142 public function getQuestionId() {
143 return $this->questionAnswered->questionId;
144 }
145
146 /**
147 * Sets the Id of the Question this QuestionAnswered is answering.
148 * @access public
149 * @param integer $id Question Id
150 * @return boolean True on successful set, false otherwise.
151 */
152 public function setQuestionId( $id ) {
153 return $this->questionAnswered->questionId = $id;
154 }
155
156 /**
157 * Returns the Id of the LearningOfferTaken for the quiz of the question
158 * this QuestionAnswered is answering.
159 * @access public
160 * @return integer LearningOfferTaken Id
161 */
162 public function getLearningOfferTakenId() {
163 return $this->questionAnswered->learningOfferTakenId;
164 }
165
166 /**
167 * Sets the Id of the LearningOfferTaken for the quiz of the question
168 * @access public
169 * @param integer $id LearningOfferTaken Id
170 * @return boolean True on successful set, false otherwise.
171 */
172 public function setLearningOfferTakenId( $id ) {
173 return $this->questionAnswered->learningOfferTakenId = $id;
174 }
175 }
176 ?>
1 <?php
2 /**
3 * Result.php
4 * This file contains the code for the class KuoteObjects_Result.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteObjects Result
11 *
12 * The KuoteObjects Result represents the final score of a quiz taken by a studnet.
13 * It must implement the interfaces KuoteInterfaces_Object, and KuoteInterfaces_Result
14 * @package KuoteObjects
15 * @subpackage Result
16 */
17 class KuoteObjects_Result implements KuoteInterfaces_Object, KuoteInterfaces_Result {
18 /**
19 * Private variable to contain a DB_DataObjects object derived from MySQL or another DB.
20 * @access private
21 */
22 private $result; // A DataObjects_Course Object
23
24 /**
25 * Constructor instantiates {@link $result} as a DataObjects_Result object.
26 * @link http://pear.php.net/package/DB_DataObject/
27 */
28 public function __construct() {
29 return $this->result = new DataObjects_Result;
30 }
31
32 /**
33 * Loads the object from the data store by its unique identifier.
34 * @access public
35 * @param integer $id Unique identifier of a course in the data store.
36 * @return boolean True on success, false otherwise.
37 */
38 public function get( $id ) {
39 return $this->result->get( $id );
40 }
41
42 /**
43 * Takes the currently set properties of the course and inserts them into the data store
44 * as a new course with its own unique id.
45 * @access public
46 * @return boolean True on success, false otherwise.
47 */
48 public function insert() {
49 return $this->result->insert();
50 }
51
52 /**
53 * Updates the datastore to reflect the currently set properties of the object.
54 * Updates by the current Id.
55 * @access public
56 * @return boolean True on success, false otherwise.
57 */
58 public function update() {
59 return $this->result->update();
60 }
61
62 /**
63 * Removes the course from the datastore based on the course Id
64 * @access public
65 * @return boolean True on success, false otherwise.
66 */
67 public function delete() {
68 return $this->result->delete();
69 }
70
71 /**
72 * Returns the unique id of the course
73 * @access public
74 * @return integer The course's unique id
75 */
76 public function getId() {
77 return $this->result->resultId;
78 }
79
80 /**
81 * Returns the number of questions answered correctly.
82 * @access public
83 * @return boolean True on successful increment, False otherwise.
84 */
85 public function incrementCorrectQuestionsCount() {
86 return $this->result->resultCountCorrect = $this->result->resultCountCorrect + 1;
87 }
88
89 /**
90 * Returns the number of questions answered correctly.
91 * @access public
92 * @return integer The number of questions answered correctly.
93 */
94 public function getCorrectQuestionsCount() {
95 return $this->result->resultCountCorrect;
96 }
97
98 /**
99 * Sets the number of questions answered correctly.
100 * @access public
101 * @param integer $numberCorrect The number of correctly answered questions.
102 * @return boolean True if successful, false if not.
103 */
104 public function setCorrectQuestionsCount( $numberCorrect ) {
105 return $this->result->resultCountCorrecty = $numberCorrect;
106 }
107
108 /**
109 * Returns the total number of questions.
110 * @access public
111 * @return integer The number of questions answered correctly.
112 */
113 public function getQuestionsCount() {
114 return $this->result->resultCountTotal;
115 }
116
117 /**
118 * Sets the total number of questions.
119 * @access public
120 * @param integer $count The number of correctly answered questions.
121 * @return boolean True if successful, false if not.
122 */
123 public function setQuestionsCount( $count ) {
124 return $this->result->resultCountTotal = $count;
125 }
126
127 /**
128 * Returns the timestamp of when the Result was created or last modified.
129 * @access public
130 * @return string Timestamp.
131 */
132 public function getTimestamp() {
133 return $this->result->resultTimestamp;
134 }
135
136 /**
137 * Returns the Id of the Result's Learning
138 * @access public
139 * @return integer Learning Id
140 */
141 public function getLearningId() {
142 return $this->result->learningId;
143 }
144
145 /**
146 * Sets the Id of the Result's Learning
147 * @access public
148 * @param integer $id Learning Id
149 * @return boolean True on success, false otherwise.
150 */
151 public function setLearningId( $id ) {
152 return $this->result->learningId = $id;
153 }
154
155 /**
156 * Returns the Id of the Result's Learning Offering
157 * @access public
158 * @return integer Learning Offering Id
159 */
160 public function getLearningOfferingId() {
161 return $this->result->learningOfferingId;
162 }
163
164 /**
165 * Sets the Id of the Result's Learning Offering
166 * @access public
167 * @param integer $id Learning Offering Id
168 * @return boolean True on success, false otherwise.
169 */
170 public function setLearningOfferingId( $id ) {
171 return $this->result->learningOfferingId = $id;
172 }
173
174 /**
175 * Returns the Id of the Result's Course
176 * @access public
177 * @return integer Course Id
178 */
179 public function getCourseId() {
180 return $this->result->courseId;
181 }
182
183 /**
184 * Sets the Id of the Result's Course
185 * @access public
186 * @param integer $id Course Id
187 * @return boolean True on success, false otherwise.
188 */
189 public function setCourseId( $id ) {
190 return $this->result->courseId = $id;
191 }
192
193 /**
194 * Returns the Id of the Result's Course Offering
195 * @access public
196 * @return integer Course Offering Id
197 */
198 public function getCourseOfferingId() {
199 return $this->result->courseOfferingId;
200 }
201
202 /**
203 * Sets the Id of the Result's Course Offering
204 * @access public
205 * @param integer $id Course Offering Id
206 * @return boolean True on success, false otherwise.
207 */
208 public function setCourseOfferingId( $id ) {
209 return $this->result->courseOfferingId = $id;
210 }
211
212 /**
213 * Returns the unique user id of the course's creator
214 * @access public
215 * @return int User Id.
216 */
217 public function getUserId() {
218 return $this->result->userId;
219 }
220
221 /**
222 * Sets the unique user id of the course's creator.
223 * @access public
224 * @param integer $id User Id of the Course Creator.
225 * @return boolean True on success, false otherwise.
226 */
227 public function setUserId( $id ) {
228 return $this->result->userId = $id;
229 }
230
231 /**
232 * Returns the Id of the Learning Offer Taken for this result.
233 * @access public
234 * @return int User Id.
235 */
236 public function getLearningOfferingTakenId() {
237 return $this->result->learningOfferTakenId;
238 }
239
240 /**
241 * Sets the Id of the Learning Offer Taken for this result.
242 * @access public
243 * @param integer $id User Id of the Course Creator.
244 * @return boolean True on success, false otherwise.
245 */
246 public function setLearningOfferingTakenId( $id ) {
247 return $this->result->learningOfferTakenId = $id;
248 }
249 }
250
251 ?>
1 <?php
2 /**
3 * ResultSet.php
4 * This file contains the code for the class KuoteObjects_ResultSet.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteObjects ResultSet
11 *
12 * The KuoteObjects ResultSet represents a collection of Result objects
13 * in the Kuote system. It must implement the interfaces
14 * KuoteInterfaces_ObjectSet, and KuoteInterfaces_ResultSet.
15 * @package KuoteObjects
16 * @subpackage ResultSet
17 * @author Kyle Hall
18 * @copyright 2006
19 */
20 class KuoteObjects_ResultSet
21 implements KuoteInterfaces_ObjectSet, KuoteInterfaces_ResultSet {
22 /**
23 * Array to hold Result objects
24 * @access private
25 */
26 protected $results = array();
27
28 /**
29 * Returns the first Result in the set on the first call.
30 * The next Result in the set on each successive call.
31 *
32 * Example:
33 * <code> while ( $question = $questionSet->fetch() { doSomething(); }</code>
34 * @access public
35 * @return KuoteObjects_Resul A Result object.
36 * OR boolean False if there are no more Results in the set.
37 */
38 public function fetch() {
39 if ( ! isset( $this->index ) ) {
40 $this->index = 0;
41 }
42
43 if ( $this->index < count( $this->results ) ) {
44 return $this->results[$this->index++];
45 } else {
46 $this->index = 0;
47 return false;
48 }
49 }
50
51 /**
52 * After calling reset(), fetch() will begin from the beginning of the set again.
53 * @access public
54 * @return boolean True on successful reset, false otherwise.
55 */
56 public function reset() {
57 return $this->index = 0;
58 }
59
60 /**
61 * Returns the number of Enrollments in this set.
62 * @access public
63 * @return integer Number of Enrollments currently in this set.
64 */
65 public function count() {
66 return count( $this->results );
67 }
68
69 /**
70 * Populates the ResultSet with all Results pertaining to the given learning quiz.
71 * @access public
72 * @param integer $id The Id of the Learning whose questions to find.
73 * @return integer Number of results found
74 */
75 public function getByLearningId( $id ) {
76 $results = new DataObjects_Result();
77 $results->learningId = $id;
78 $results->find();
79
80 while ( $results->fetch() ) {
81 $result = new KuoteObjects_Result();
82 $result->get( $results->resultId );
83 array_push( $this->results, $result );
84 }
85
86 return count( $this->results );
87 }
88
89 /**
90 * Populates the ResultSet with all Results pertaining to the given
91 * learning offering's quiz.
92 * @access public
93 * @param integer $id The Id of the Learning Offering whose results we are to find.
94 * @return integer Number of results found
95 */
96 public function getByLearningOfferingId( $id ) {
97 $results = new DataObjects_Result();
98 $results->learningOfferingId = $id;
99 if ( ! $results->find() ) {
100 throw new Exception( 'No Results Found for Learning Offering Id ' . $id, 1 );
101 }
102
103 while ( $results->fetch() ) {
104 $result = new KuoteObjects_Result();
105 $result->get( $results->resultId );
106 array_push( $this->results, $result );
107 }
108
109 return count( $this->results );
110 }
111
112 /**
113 * Populates the ResultSet with all Results pertaining to the given course.
114 * @access public
115 * @param integer $id The Id of the Course whose results we are to find.
116 * @return integer Number of questions found
117 */
118 public function getByCourseId( $id ) {
119 $results = new DataObjects_Result();
120 $results->courseId = $id;
121 $results->find();
122
123 while ( $results->fetch() ) {
124 $result = new KuoteObjects_Result();
125 $result->get( $results->resultId );
126 array_push( $this->results, $result );
127 }
128
129 return count( $this->results );
130 }
131
132 /**
133 * Populates the ResultSet with all Results pertaining to the given course offering.
134 * @access public
135 * @param integer $id The Id of the CourseOffering whose results we are to find.
136 * @return integer Number of questions found
137 */
138 public function getByCourseOfferingId( $id ) {
139 $results = new DataObjects_Result();
140 $results->courseOfferingId = $id;
141 $results->find();
142
143 while ( $results->fetch() ) {
144 $result = new KuoteObjects_Result();
145 $result->get( $results->resultId );
146 array_push( $this->results, $result );
147 }
148
149 return count( $this->results );
150 }
151
152 /**
153 * Populates the ResultSet with all Results pertaining to the given user and course offering.
154 * @access public
155 * @param integer $userId The Id of the User whose results we are to find.
156 * @param integer $courseOfferingId The Id of the Course Offering whose results we are to find.
157 * @return integer Number of questions found
158 */
159 public function getByUserIdAndCourseOfferingId( $userId, $courseOfferingId ) {
160 $results = new DataObjects_Result();
161 $results->userId = $userId;
162 $results->courseOfferingId = $courseOfferingId;
163 $results->find();
164
165 while ( $results->fetch() ) {
166 $result = new KuoteObjects_Result();
167 $result->get( $results->resultId );
168 array_push( $this->results, $result );
169 }
170
171 return count( $this->results );
172 }
173
174 /**
175 * Returns the average grade of all results as a percent.
176 * @access public
177 * @return float Grade average.
178 */
179 public function getAverage(){
180 $total = 0;
181 $correct = 0;
182
183 foreach ( $this->results as $result ) {
184 $total += $result->getQuestionsCount();
185 $correct += $result->getCorrectQuestionsCount();
186 }
187
188 return $correct / $total;
189 }
190
191 }
192
193 ?>
1 <?php
2 /**
3 * User.php
4 * This file contains the code for the class KuoteObjects_User.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteObjects User
11 *
12 * The KuoteObjects User represents a student or instructor in the Kuote system.
13 * It must implement the interfaces KuoteInterfaces_Object, and KuoteInterfaces_Enrollment
14 * @package KuoteObjects
15 * @subpackage User
16 * @author Kyle Hall
17 * @copyright 2006
18 */
19 class KuoteObjects_User implements KuoteInterfaces_Object, KuoteInterfaces_User {
20 /**
21 * Private variable to contain a DB_DataObjects object derived from MySQL or another DB.
22 * @access private
23 */
24 protected $user;
25
26 /**
27 * Constructor instantiates {@link $enrollment} as a DataObjects_Enrollment object.
28 * @link http://pear.php.net/package/DB_DataObject/
29 */
30 public function __construct() {
31 return $this->user = new DataObjects_User();
32 }
33
34 /**
35 * Loads the object from the data store by its unique identifier.
36 * @access public
37 * @param integer $id Unique identifier of a course in the data store.
38 * @return boolean True on success, false otherwise.
39 */
40 public function get( $userId ) {
41 return $this->user->get( $userId );
42 }
43
44 /**
45 * Takes the currently set properties of the object and inserts them into the data store
46 * as a new instance with its own unique id.
47 * @access public
48 * @return boolean True on success, false otherwise.
49 */
50 public function insert() {
51 return $this->user->insert();
52 }
53
54 /**
55 * Updates the datastore to reflect the currently set properties of the object.
56 * Updates by the current Id.
57 * @access public
58 * @return boolean True on success, false otherwise.
59 */
60 public function update() {
61 return $this->user->update();
62 }
63
64 /**
65 * Removes the object from the datastore based on it's Id
66 * @access public
67 * @return boolean True on success, false otherwise.
68 */
69 public function delete() {
70 return $this->user->delete();
71 }
72
73 /**
74 * Returns the unique id of the object
75 * @access public
76 * @return integer The objects's unique id
77 */
78 public function getId() {
79 return $this->user->userId;
80 }
81
82 /**
83 * Tests whether the given userlogin and password match those in the datastore.
84 *
85 * If a match is found, the user for the given username is loaded into the User object.
86 * @param string $userLogin The user's login name
87 * @param string $userPassword The password submitted for authentication.
88 */
89 public function verify( $userLogin, $userPassword ) {
90 $user = new DataObjects_User();
91
92 $user->userLogin = $userLogin;
93 $user->userPassword = $userPassword;
94
95 $user->limit( 0, 1 ); #Start at row 0, and get only one user.
96 $wasFound = $user->find();
97
98 if ( $wasFound ) {
99 $user->fetch();
100 $this->user = clone( $user );
101 return true;
102 } else {
103 return false;
104 }
105 }
106
107 /**
108 * Returns a string of the format "Lastname, Firstname".
109 * @return string String of format "Lastname, Firstname".
110 */
111 public function getNameLastFirst() {
112 return $this->user->userNameLast . ', ' . $this->user->userNameFirst;
113 }
114
115 /**
116 * Returns the first name of the user.
117 * @return string First Name
118 */
119 public function getNameFirst() {
120 return $this->user->userNameFirst;
121 }
122
123 /**
124 * Sets the first name of the user.
125 * @param string $firstname First Name
126 * @return boolean True on successful set, False otherwise.
127 */
128 public function setNameFirst( $firstname ) {
129 return $this->user->userNameFirst = $firstname;
130 }
131
132 /**
133 * Returns the last name of the user.
134 * @return string Last Name
135 */
136 public function getNameLast() {
137 return $this->user->userNameLast;
138 }
139
140 /**
141 * Sets the last name of the user.
142 * @param string $lastname Last Name
143 * @return boolean True on successful set, False otherwise.
144 */
145 public function setNameLast( $lastname ) {
146 return $this->user->userNameLast = $lastname;
147 }
148
149 /**
150 * Returns the email of the user.
151 * @return string Email
152 */
153 public function getEmail() {
154 return $this->user->userEmail;
155 }
156
157 /**
158 * Sets the email of the user.
159 * @param string $email Email
160 * @return boolean True on successful set, False otherwise.
161 */
162 public function setEmail( $email ) {
163 return $this->user->userEmail = $email;
164 }
165
166 /**
167 * Returns the hashed password of the user.
168 * @return string Password Hash
169 */
170 public function getPassword() {
171 return $this->user->userPassword;
172 }
173
174 /**
175 * Sets the password of the user.
176 * Pass the password in plaintext, the method will hash it.
177 * @param string $password Plaintext Password
178 * @return boolean True on successful set, False otherwise.
179 */
180 public function setPassword( $password ) {
181 return $this->user->userPassword = $password;
182 }
183
184 /**
185 * Returns the login name of the user.
186 * @return string Password Hash
187 */
188 public function getLogin() {
189 return $this->user->userLogin;
190 }
191
192 /**
193 * Sets the login name of the user.
194 * @param string $login User Login
195 * @return boolean True on successful set, False otherwise.
196 */
197 public function setLogin( $login ) {
198 return $this->user->userLogin = $login;
199 }
200
201 /**
202 * Returns the type of the user.
203 * Type may be either 'student' or 'instructor'
204 * @return string User Type
205 */
206 public function getType() {
207 return $this->user->userType;
208 }
209
210 /**
211 * Sets the type of the user.
212 * Type must be either 'student' or 'instructor'
213 * @param string $type User Type
214 * @return boolean True on successful set, False otherwise.
215 */
216 public function setType( $type ) {
217 return $this->user->userType = $type;
218 }
219 }
220
221 ?>
1 <?php
2 /**
3 * Quiz.php
4 * This file contains the code for the class KuoteObjects_Quiz.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteObjects Quiz
11 *
12 * The KuoteObjects_Quiz is used for a student to actually take a quiz.
13 * It is a child of KuoteObjects_QuestionSet. It's methods supply a way to
14 * start a quiz, get questions, answer questions and so forth.
15 * The Quiz handles all the responibilities of writing said data to the datastore.
16 * @package KuoteObjects
17 * @subpackage Quiz
18 * @author Kyle Hall
19 * @copyright 2006
20 */
21 class KuoteObjects_Quiz extends KuoteObjects_QuestionSet implements KuoteInterfaces_Quiz {
22 // protected $questions = array(); FROM PARENT
23 /**
24 * Private variable to contain a DB_DataObjects object derived from MySQL or another DB.
25 * @access private
26 */
27 protected $learningOffering;
28 /**
29 * Private variable to contain a DB_DataObjects object derived from MySQL or another DB.
30 * @access private
31 */
32 protected $learning;
33 /**
34 * Private variable to contain a DB_DataObjects object derived from MySQL or another DB.
35 * @access private
36 */
37 protected $enrollment;
38 /**
39 * Private variable to contain a DB_DataObjects object derived from MySQL or another DB.
40 * @access private
41 */
42 protected $user;
43 /**
44 * Private variable to contain a DB_DataObjects object derived from MySQL or another DB.
45 * @access private
46 */
47 protected $learningOfferTaken;
48 /**
49 * Private variable to contain a DB_DataObjects object derived from MySQL or another DB.
50 * @access private
51 */
52 protected $result;
53
54 /**
55 * Array to containt the set of Question objects that have been asked
56 * @access private
57 */
58 protected $questionsUsed = array();
59 /**
60 * Array to containt the set of Question objects that have <i>not yet</i> been asked
61 * @access private
62 */
63 protected $questionsUnused = array();
64
65 /**
66 * Array to containt the set of QuestionAnswered objects for questions that have been asked
67 * @access private
68 */
69 protected $questionsAnsweredUsed = array();
70 /**
71 * Array to containt the set of QuestionAnswered objects for
72 * questions that have <i>not yet</i> been asked
73 * @access private
74 */
75 protected $questionsAnsweredUnused = array();
76
77 /**
78 * Variable to contain the question currently being asked in the quiz.
79 * @access private
80 */
81 protected $currentQuestion;
82 /**
83 * Variable to contain the QuestionAnswered for the question currently being asked in the quiz.
84 * @access private
85 */
86 protected $currentQuestionAnswered;
87
88 /**
89 * Constructor instantiates all the neccessary objects for the quiz to function.
90 * @param KuoteObjects_User $user The user taking the quiz.
91 * @param KuoteObjects_Learning $learning The learning of the quiz being taken.
92 * @param KuoteObjects_LearningOffering $learningOffering The offering of the learning taken.
93 */
94 public function __construct( $user, $learning, $learningOffering ) {
95 $this->courseOffering = new DataObjects_CourseOffering;
96 $this->user = $user;
97 $this->learning = $learning;
98 $this->learningOffering = $learningOffering;
99
100 $this->enrollment = new KuoteObjects_Enrollment();
101 $this->enrollment->getByUserAndCourseOffering( $this->user, $this->learningOffering );
102
103 // Create new LearningOfferTaken
104 $this->learningOfferTaken = new KuoteObjects_LearningOfferTaken();
105 $this->learningOfferTaken->initialize( $this->learningOffering, $this->enrollment );
106
107 // Get the questions for this Quiz
108 parent::getByLearningId( $learningId = $this->learning->getId() );
109
110 $this->questionsUnused = array_reverse( $this->questions );
111
112 // Create QuestionAnswered for each question;
113 if ( $this->learning->getQuestionsRandom() ) {
114 $this->randomize();
115 }
116 foreach ( $this->questionsUnused as $question ) {
117 $questionAnswered = new KuoteObjects_QuestionAnswered();
118 $questionAnswered->initialize( $question, $this->learningOfferTaken );
119 array_push($this->questionsAnsweredUnused, $questionAnswered);
120 }
121
122 // Create the end Result of the quiz.
123 // Assume that the user answers 0 question correctly,
124 // update correct number of questions as the quiz is taken.
125 $this->result = new KuoteObjects_Result();
126 $this->result->setLearningId( $learning->getId() );
127 $this->result->setLearningOfferingId( $learningOffering->getId() );
128 $this->result->setCourseId( $learning->getCourseId() );
129 $this->result->setCourseOfferingId( $learningOffering->getCourseOfferingId() );
130 $this->result->setLearningOfferingTakenId( $this->learningOfferTaken->getId() );
131 $this->result->setUserId( $user->getId() );
132 $this->result->setCorrectQuestionsCount( 0 );
133 $this->result->setQuestionsCount( count( $this->questions ) );
134 $this->result->insert();
135 }
136
137 /**
138 * Grabs the next question for asking.
139 * @return $bool True if successful
140 * @throws Exception 3 if there are no more questions.
141 * @throws Exception 1 if the current quesiton has not been answered yet.
142 */
143 public function getQuestion() {
144 if ( empty( $this->currentQuestion ) ) {
145 if ( empty( $this->questionsUnused ) ) {
146 throw new Exception( 'No More Questions', 3 );
147 } else {
148 $this->currentQuestion = array_pop( $this->questionsUnused );
149 $this->currentQuestionAnswered = array_pop( $this->questionsAnsweredUnused );
150 return true;
151 }
152 } else {
153 throw new Exception( "Can't Get New Question, Current Question Unanswered", 1 );
154 }
155 }
156
157 /**
158 * Returns the body of the current question.
159 * @return string Question Body
160 * @throws Exception 2 if there is no current question.
161 */
162 public function getCurrentQuestionBody() {
163 if ( ! empty( $this->currentQuestion ) ) {
164 return $this->currentQuestion->getBody();
165 } else {
166 throw new Exception( "There is no current question, call getQuestion() first.", 2 );
167 }
168 }
169
170 /**
171 * Returns the text of the given question option number
172 * @param integer $optionNumber Option Number
173 * @return string Option Text
174 * @throws Exception 2 if there is no current question.
175 */
176 public function getCurrentQuestionOption( $optionNumber ) {
177 if ( ! empty( $this->currentQuestion ) ) {
178 if ( $optionNumber > 0 && $optionNumber <= 5 ) {
179 return $this->currentQuestion->getOption( $optionNumber );
180 } else {
181 throw new Exception( "Option Number Is Out Of Bounds", 4 );
182 }
183 } else {
184 throw new Exception( "There is no current question, call getQuestion() first.", 2 );
185 }
186 }
187
188 /**
189 * Returns true if there is text for the given option number
190 * @return boolean True if option is set, false otherwise.
191 * @throws Exception 2 if there is no current question.
192 */
193 public function isCurrentQuestionOption( $optionNumber ) {
194 if ( ! empty( $this->currentQuestion ) ) {
195 if ( $optionNumber > 0 && $optionNumber <= 5 ) {
196 return $this->currentQuestion->getOption( $optionNumber );
197 } else {
198 throw new Exception( "Option Number Is Out Of Bounds", 4 );
199 }
200 } else {
201 throw new Exception( "There is no current question, call getQuestion() first.", 2 );
202 }
203 }
204
205 /**
206 * Takes the given option number an 'answers' the question with it.
207 * The QuestionAnswered for the question is updated in the datastore.
208 * @param integer $selectedAnswer Selected Question Option.
209 * @return boolean True on successful answering, false otherwise.
210 * @throws Exception 2 if there is no current question.
211 */
212 public function answerQuestion( $selectedAnswer ) {
213 if ( ! empty( $this->currentQuestion ) ) {
214 $this->currentQuestionAnswered->setChoice( $selectedAnswer );
215 $isCorrect = ( $this->currentQuestion->getAnswer() == $selectedAnswer );
216 $this->currentQuestionAnswered->setIsCorrect( $isCorrect );
217
218 if ( $isCorrect ) {
219 $this->result->incrementCorrectQuestionsCount();
220 $this->result->update();
221 }
222
223 $this->currentQuestionAnswered->update();
224
225 array_push( $this->questionsUsed, $this->currentQuestion );
226 array_push( $this->questionsAnsweredUsed, $this->currentQuestionAnswered );
227
228 $this->currentQuestion = null;
229 $this->currentQuestionAnswered = null;
230 return true;
231 } else {
232 throw new Exception( "There is no current question, call getQuestion() first.", 2 );
233 }
234 }
235
236 /**
237 * Randomizes the order in which the quiz questions are asked.
238 * @return boolean True on success, false otherwise.
239 */
240 public function randomize() {
241 return shuffle( $this->questionsUnused );
242 }
243
244 /**
245 * Randomizes the order in which the quiz questions are asked, but only within sets of difficutly.
246 * @return boolean True on success, false otherwise.
247 */
248 public function sortByDifficulty() {
249 return false;
250 }
251
252 /**
253 * Returns the number of the current question.
254 * That is, if 2 questions have been asked and answered, getCurrentQuestion() will return 3.
255 * @return integer Question Number.
256 */
257 public function getCurrentQuestionNumber() {
258 return count( $this->questionsUsed ) + 1;
259 }
260
261 /**
262 * Returns the total number of questions for this quiz.
263 * @return integer Questions Count
264 */
265 public function getQuestionsCount() {
266 return count( $this->questions );
267 }
268
269 /**
270 * Returns the number of correctly answered questions for this quiz.
271 * @return integer Correct Questions Count
272 */
273 public function getQuestionsCorrectCount() {
274 if ( ! empty( $this->questionsUnused ) ) throw new Exception( 'Quiz Not Complete', 3 );
275
276 $i = 0;
277 foreach ( $this->questionsAnsweredUsed as $questionAnswered ) {
278 if ( $questionAnswered->getIsCorrect() ) $i++;
279 }
280
281 return $i;
282 }
283
284 /**
285 * Returns the number of incorrectly answered questions for this quiz.
286 * @return integer Incorrect Questions Count
287 */
288 public function getQuestionsIncorrectCount() {
289 if ( ! empty( $this->questionsUnused ) ) throw new Exception( 'Quiz Not Complete', 3 );
290
291 return $this->getQuestionsCount() - $this->getQuestionsCorrectCount();
292 }
293
294 /**
295 * Returns the title of the learning this quiz is part of.
296 * @return string Learning Title
297 */
298 public function getTitle() {
299 return $this->learning->getTitle();
300 }
301
302 /**
303 * Returns an array where each element of the array is another hashed array of the format:
304 * <code> array { "question" => KuoteObjects_Question Object,
305 * "questionAnswered" => KuoteObjects_QuestionAnswered } </code>
306 * @return integer Correct Questions Count
307 */
308 public function fetchResult() {
309 if ( ! isset( $this->fetchCounter ) ) $this->fetchCounter = 0;
310
311 if ( $this->fetchCounter < count( $this->questionsUsed ) ) {
312 return array(
313 "question" => $this->questionsUsed[$this->fetchCounter],
314 "questionAnswered" => $this->questionsAnsweredUsed[$this->fetchCounter++]
315 );
316 } else {
317 unset( $this->fetchCounter );
318 return false;
319 }
320 }
321 }
322 ?>
1 <?php
2 /**
3 * TestDrive.php
4 * This file contains the code for the class KuoteObjects_TestDrive.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * KuoteObjects Quiz
11 *
12 * The KuoteObjects_Testing is used for an instructor to try out a quiz
13 * without actually creating any data in the datastore.
14 * It is a child of KuoteObjects_Quiz, and thus of KuoteObjects_QuestionSet.
15 * It's methods supply a way to start a quiz, get questions, answer questions and so forth.
16 * @package KuoteObjects
17 * @subpackage TestDrive
18 * @author Kyle Hall
19 * @copyright 2006
20 */
21 class KuoteObjects_TestDrive extends KuoteObjects_Quiz {
22 // Properties From Parent Class
23 // protected $questions = array();
24 // protected $learningOffering;
25 // protected $learning;
26 // protected $enrollment;
27 // protected $user;
28 // protected $learningOfferTaken;
29
30 // protected $questionsUsed = array();
31 // protected $questionsUnused = array();
32
33 // protected $questionsAnsweredUsed = array();
34 // protected $questionsAnsweredUnused = array();
35
36 // protected $currentQuestion;
37 // protected $currentQuestionAnswered;
38
39 /**
40 * Constructor instantiates all the neccessary objects for the quiz to function.
41 */
42 public function __construct( $user, $learning ) {
43 $this->user = $user;
44 $this->learning = $learning;
45
46 // Get the questions for this Quiz
47 parent::getByLearningId( $learningId = $this->learning->getId() );
48
49 $this->questionsUnused = array_reverse( $this->questions );
50
51 // Create QuestionAnswered for each question;
52 if ( $this->learning->getQuestionsRandom() ) {
53 parent::randomize();
54 }
55 foreach ( $this->questionsUnused as $question ) {
56 $questionAnswered = new KuoteObjects_QuestionAnswered();
57 $questionAnswered->setQuestionId( $questionId = $question->getId() );
58 array_push($this->questionsAnsweredUnused, $questionAnswered);
59 }
60 }
61
62
63 /**
64 * Takes the given option number an 'answers' the question with it.
65 * @param integer $selectedAnswer Selected Question Option.
66 * @return boolean True on successful answering, false otherwise.
67 * @throws Exception 2 if there is no current question.
68 */
69 public function answerQuestion( $selectedAnswer ) {
70 if ( ! empty( $this->currentQuestion ) ) {
71 $this->currentQuestionAnswered->setChoice( $selectedAnswer );
72 $this->currentQuestionAnswered->setIsCorrect( $this->currentQuestion->getAnswer() ==
$selectedAnswer );
73
74 array_push( $this->questionsUsed, $this->currentQuestion );
75 array_push( $this->questionsAnsweredUsed, $this->currentQuestionAnswered );
76
77 $this->currentQuestion = null;
78 $this->currentQuestionAnswered = null;
79 } else {
80 throw new Exception( "There is no current question, call getQuestion() first.", 2 );
81 }
82 }
83 }
84 ?>
1 <?php
2 /**
3 * Template.php
4 * This file contains the code for the Template class which renders all php/html code as html.
5 * @package Kuote
6 * @author Kyle Hall
7 * @copyright 2006
8 */
9 /**
10 * Template
11 *
12 * This Template class is a very simplified templating system. Instead of using a templating language,
13 * this templating system using PHP as it's own templating language. The reasons behinds this are that
14 * most templating systems implement almost all of PHP in their syntax, so why would be bother
15 * learning another language to so the same thing?
16 * The concept of this template system is to separate business logic from display logic. That is, the
17 * template should be modify any system variables, only display them. It might calculate a grade
18 * percentage from the number of questions right divided by the number of questions wrong, but
19 * it should never do something like store that number in a datastore.
20 *
21 * @package Template
22 * @author Kyle Hall
23 * @copyright 2006
24 */
25 class Template {
26 protected $vars = array();
27
28 /**
29 * Constructor
30 * @param string $file The file name you want to load
31 * @return boolean True on successful construction, False otherwise.
32 */
33 public function __construct( $file = null ) {
34 return $this->file = $file;
35 }
36
37 /**
38 * Set a template variable.
39 * @param string $name The name the variable should have inside the template.
40 * @param value $value The value the variable $name should hold.
41 * @return boolean True on successful set, False otherwise.
42 */
43 public function set( $name, $value ) {
44 return $this->vars[$name] = $value;
45 }
46
47 /**
48 * Open, parse, and return the template file.
49 * @param string $file string the template file name.
50 * @return string HTML Code.
51 */
52 public function fetch( $file = null ) {
53 if ( ! $file ) $file = $this->file;
54
55 // Extract the vars to local namespace
56 if ( is_array( $this->vars ) ) extract( $this->vars );
57
58 ob_start(); // Start output buffering
59 include( $file ); // Include the file
60 $contents = ob_get_contents(); // Get the contents of the buffer
61 ob_end_clean(); // End buffering and discard
62 return $contents; // Return the contents
63 }
64
65 /**
66 * Open, parse, and echo the template file.
67 * @param $file string the template file name
68 */
69 public function display($file = null) {
70 echo $this->fetch( $file );
71 }
72 }
73 ?>
1 <?php
2 /**
3 * engine.php
4 * All Kuote actions are passed through this file. engine.php is given the task of of creating the
5 * Template object which all engine files must eventually use, and setting the function, subfunction,
6 * and action requests for it, if they exist.
7 * The file also checks to see if a user is logged in, logging out, or needs to be logged in
8 * and processes the requests appropriatly.
9 * @package Kuote
10 * @subpackage Engine
11 * @author Kyle Hall
12 * @copyright 2006
13 */
14 if ($debug) {echo "Entered engine/engine.php<br>";}
15
16 $template = new Template();
17 $template->set('templates', $templates);
18
19 if (isset($_REQUEST['function'])) {$template->set('function', $_REQUEST['function']);}
20 if (isset($_REQUEST['subfunction'])) {$template->set('subfunction', $_REQUEST['subfunction']);}
21 if (isset($_REQUEST['action'])) {$template->set('action', $_REQUEST['action']);}
22
23 if (isset($_REQUEST['function'])){
24 if($_REQUEST['function'] == 'logout'){
25 $_SESSION['thisUser'] = null;
26 session_destroy();
27 }
28 }
29
30 switch (isset($_SESSION['thisUser'])) {
31 case TRUE:
32 include("engine." . $_SESSION['thisUser']->getType() . ".php");
33 break;
34 case FALSE:
35 include("engine." . "login" . ".php");
36 break;
37 }
38 ?>
1 <?php
2 /**
3 * engine.login.php
4 * This file processes user logins. If engine.php does not find a current session,
5 * it loads engine.login.php which requests and processes user logins. If a given username
6 * and password match, engine.login.php loads the User object from the datastore and
7 * stores it in a session variable.
8 * @package Kuote
9 * @subpackage Engine
10 * @author Kyle Hall
11 * @copyright 2006
12 */
13 if($debug){echo "Entered engine.login.php<br>";}
14
15 // Try to validate the form
16 if ( isset( $_REQUEST['userLogin'], $_REQUEST['userPassword'] ) ) {
17 $userLogin = $_REQUEST['userLogin'];
18 $userPassword = $_REQUEST['userPassword'];
19
20 $thisUser = new KuoteObjects_User;
21
22 if( $thisUser->verify( $userLogin, $userPassword ) ) {
23 $_SESSION['thisUser'] = $thisUser;
24 jsRefresh(); #Refresh the page so that interface.php knows the user is logged in.
25 } else {
26 $template->set('loginErrorMessage', 'Login and password do not match.');
27 }
28 }
29
30 // Output the form
31 echo $template->fetch('login.template.php');
32 ?>
1 <?php
2 /**
3 * engine.instructor.php
4 * All instructor activity is directed through this file. It's purpose is to look at the
5 * function and subfunction (if it exists) and direct the flow of data to the correct
6 * engine file. For example, if the function requested is 'create' and the subfunction is 'course'
7 * engine.instructor.php will redirect the data flow to engine.intructor.create.course.
8 * @package Kuote
9 * @subpackage Engine
10 * @author Kyle Hall
11 * @copyright 2006
12 */
13 if (!isset($_REQUEST['function'])) {
14 $_REQUEST['function'] = 'create';
15 $_REQUEST['subfunction'] = 'course';
16 $template->set( 'function', 'create' );
17 $template->set( 'subfunction', 'course' );
18 } elseif (!isset($_REQUEST['subfunction'])) {
19 $_REQUEST['subfunction'] = 'course';
20 $template->set( 'subfunction', 'course' );
21 }
22
23 //Read in the helpfile contents for the given function and subfunction
24 $file = 'templates/' . $templates . '/help/instructor.' . $_REQUEST['function'] . '.' . $_REQUEST['subfunction']
. '.help.html';
25 $filePointer = fopen( $file, 'r' );
26 $contents = fread( $filePointer, filesize( $file ) );
27 fclose( $filePointer );
28 $template->set( 'helpFileContents', $contents );
29
30 require_once('engine.instructor.' . $_REQUEST['function'] . '.' . $_REQUEST['subfunction'] . '.php');
31
32 ?>
1 <?php
2 /**
3 * engine.instructor.create.course.php
4 * This page looks for a submitted course form. If it does not find one, it displays the
5 * create course form using instructor.create.course.form.template.php .
6 * If it does find one, it inserts the data into the datastore and creates
7 * the directory where any learning tutorials would be stored. It then displays
8 * instuctor.create.course.submitted.template.php which will tell the user if it
9 * was successful or not.
10 * @package Kuote
11 * @subpackage Engine
12 * @author Kyle Hall
13 * @copyright 2006
14 */
15 if ( $debug ) echo( "<br />Entered engine.instructor.create.course.php<br />" );
16
17 if ( isset( $_REQUEST['courseSubmitted'] ) ) {
18 $course = new KuoteObjects_Course();
19 $course->setTitle( $_REQUEST['crsTitle'] );
20 $course->setDescription( $_REQUEST['crsDesc'] );
21 $course->setIsOpen( $_REQUEST['crsIsOpen'] );
22 $course->setIsPublic( $_REQUEST['crsIsPublic'] );
23 $course->setUserId( $_SESSION['thisUser']->getId() );
24
25 if ( $courseId = $course->insert() ) {
26 $template->set('courseAdded', true);
27 } else {
28 $template->set('courseAdded', false);
29 }
30
31 //Create the folder for this Courses learnings
32 $thisDir = LEARNINGS_ROOT . DIRECTORY_SEPARATOR . $courseId;
33 if ( mkdir( $thisDir, 0700 ) ) {
34 $template->set( 'dirCreated', true );
35 } else {
36 $template->set( 'dirCreated', false );
37 }
38 echo $template->fetch('instructor.create.course.submitted.template.php');
39
40 } else {//For Hasn't been submitted yet, output the form
41 echo $template->fetch('instructor.create.course.form.template.php');
42 }
43 ?>
1 <?php
2 /**
3 * engine.instructor.create.learning.php
4 * This file will first look to see if the user has submitted a learning to be created.
5 * If the user has not, it will display the template instructor.create.learning.form.template.php
6 * If there are courses to choose from, otherwise it will display an error page.
7 * If a learning has been submitted, the file will attempt to insert the data into the datastore,
8 * and create the learnings tutorial storage directory in the parent course's directory.
9 * @package Kuote
10 * @subpackage Engine
11 * @author Kyle Hall
12 * @copyright 2006
13 */
14
15 if ( $debug ) echo( 'Entered engine.instructor.create.learning.php<br>' );
16
17 if ( isset( $_REQUEST['learningSubmitted'] ) ) { //Form Submitted
18 $learning = new KuoteObjects_Learning();
19 $learning->setTitle( $_REQUEST['learningTitle'] );
20 $learning->setDescription( $_REQUEST['learningDesc'] );
21 $learning->setCourseId( $_REQUEST['crsId'] );
22
23 if ( $learningId = $learning->insert() ) {
24 $template->set( 'learningAdded', true );
25 } else {
26 $template->set( 'learningAdded', false );
27 }
28
29 //Create the folder for this Courses learnings
30 $tutorialDir = LEARNINGS_ROOT . '/' . $_REQUEST['crsId'] . '/' . $learning->getId();
31 if ( $learningId ) {
32 if ( mkdir( $tutorialDir, 0700 ) ) {
33 $template->set( 'dirCreated', true );
34 } else {
35 $template->set( 'dirCreated', false );
36 $learning->delete();
37 }
38 } else {
39 $template->set( 'dirCreated', false );
40 }
41
42 // Proccess the tutorial file
43 $upload = new HTTP_Upload('en');
44 $file = $upload->getFiles('tutorialFile');
45
46 $unknownFileType = false;
47 $fileMovedSuccessfully = true;
48
49 if ( $file->isValid() ) {
50 switch ( $file->getProp("ext") ) {
51 case 'htm':
52 case 'html':
53 $moved = $file->moveTo( $tutorialDir );
54 $fileMovedSuccessfully = ( ! PEAR::isError( $moved ) );
55 if ( $fileMovedSuccessfully ) {
56 $learning->setTutorialFileName( $file->getProp('name') );
57 $learning->update();
58 } else {
59 $learning->delete();
60 }
61 break;
62 default:
63 $unknownFileType = true;
64 $learning->delete();
65 break;
66 }
67 }
68
69 $template->set( 'fileMovedSuccessfully', $fileMovedSuccessfully );
70 $template->set( 'unknownFileType', $unknownFileType );
71 echo $template->fetch('instructor.create.learning.template.php');
72 } else {//Display the Form
73 $coursesHash = KuoteObjects_Course::getCoursesHash( $_SESSION['thisUser'] );
74
75 if ( ! empty( $coursesHash ) ) {
76 $template->set( 'coursesHash', $coursesHash );
77 echo $template->fetch( 'instructor.create.learning.form.template.php' );
78 } else {
79 $template->set( 'title', 'No Courses Exist' );
80 $template->set( 'message', 'You cannot create a learning because you have no Courses. Please create a
new Course first.' );
81 echo $template->fetch( 'instructor.generic.message.template.php' );
82 }
83 }
84
85 ?>
1 <?php
2 /**
3 * engine.instructor.create.question.php creates questions for a learning's quiz.
4 * The first thing it does is to check for a passed Course Id, if there isn't one, it displays
5 * the form instructor.create.question.selectCourse.template.php to get one. Second, it checks
6 * for a passed Learning Id, if there isn't one, it displays the form
7 * instructor.create.question.selectLearning.template.php to ask for one.
8 * Third, if the Course Id and Learning Id have been passed, it looks for a submitted question.
9 * If it does not find one it displays the create question form
10 * instructor.create.question.form.template.php . If it does find a question has been submitted
11 * the file creates the question in the datastore.
12 * @package Kuote
13 * @subpackage Engine
14 * @author Kyle Hall
15 * @copyright 2006
16 */
17 if ( ! isset( $_REQUEST['courseId'] ) ) { //Display the select course form
18 $coursesHash = KuoteObjects_Course::getCoursesHash( $_SESSION['thisUser'] );
19 $template->set( 'coursesHash', $coursesHash );
20 echo $template->fetch( 'instructor.create.question.selectCourse.template.php' );
21 } elseif ( ! isset( $_REQUEST['learningId'] ) ) { //Display the select learning form
22 $learningsHash = KuoteObjects_Learning::getLearningsHash( $_REQUEST['courseId'] );
23 $template->set( 'learningsHash', $learningsHash );
24 $template->set( 'courseId', $_REQUEST['courseId'] );
25 echo $template->fetch( 'instructor.create.question.selectLearning.template.php' );
26 } elseif ( ! isset( $_REQUEST['questionNumber'] ) ) { //Display the create question form
27 $questionNumber = KuoteObjects_Question::getNextQuestionNumber( $_REQUEST['learningId'] );
28 $template->set( 'courseId', $_REQUEST['courseId'] );
29 $template->set( 'learningId', $_REQUEST['learningId'] );
30 $template->set( 'questionNumber', $questionNumber );
31 echo $template->fetch( 'instructor.create.question.form.template.php' );
32 } else { //Process the submitted question, display a new create question form.
33 $question = new KuoteObjects_Question();
34 $question->setLearningId( $_REQUEST['learningId'] );
35 $question->setQuestionNumber( $_REQUEST['questionNumber'] );
36 $question->setBody( $_REQUEST['questionBody'] );
37 $question->setOption1( $_REQUEST['questionOption1'] );
38 $question->setOption2( $_REQUEST['questionOption2'] );
39 $question->setOption3( $_REQUEST['questionOption3'] );
40 $question->setOption4( $_REQUEST['questionOption4'] );
41 $question->setOption5( $_REQUEST['questionOption5'] );
42 $question->setAnswer( $_REQUEST['questionAnswer'] );
43 $question->setDifficulty( $_REQUEST['questionDifficulty'] );
44 $question->setTime( $_REQUEST['questionTime'] );
45
46 $success = $question->insert();
47 $questionNumber = $_REQUEST['questionNumber'] + 1;
48
49 if ( $success ) {
50 $template->set( 'courseId', $_REQUEST['courseId'] );
51 $template->set( 'learningId', $_REQUEST['learningId'] );
52 $template->set( 'questionNumber', $questionNumber );
53 echo $template->fetch( 'instructor.create.question.form.template.php' );
54 } else {
55 $template->set( 'title', 'Failed To Create Question' );
56 $template->set( 'message', 'Your Question Was Not Created, Please Try Again Or Contact Your Quote
Administrator' );
57 }
58 }
59 ?>
1 <?php
2 /**
3 * engine.instructor.update.course.php
4 * This file updates the data of a course that has already been created.
5 * It checks to see if a Course Id has been passed, and displays
6 * instructor.update.course.selectCourse.template.php if it has not.
7 * Next it checks to see if the updated course data has been submitted, displaying
8 * instructor.update.course.form.template if it has not. If the updated data has been
9 * submitted, the file will attempt to update the course in the data store and display it's
10 * success or failure to the instructor.
11 * @package Kuote
12 * @subpackage Engine
13 * @author Kyle Hall
14 * @copyright 2006
15 */
16 if ($debug) {echo("<br />Entered engine.instructor.update.course.php<br />");}
17
18 if ( ! isset( $_REQUEST['courseId'] ) ) {
19 $coursesHash = KuoteObjects_Course::getCoursesHash( $_SESSION['thisUser'] );
20 $template->set( 'coursesHash', $coursesHash );
21 echo $template->fetch( 'instructor.update.course.selectCourse.template.php' );
22 } elseif ( ! isset( $_REQUEST['courseSubmitted'] ) ) {
23 $course = new KuoteObjects_Course();
24 $course->get( $_REQUEST['courseId'] );
25 $template->set( 'course' , $course );
26 echo $template->fetch( 'instructor.update.course.form.template.php' );
27 } else {
28 $course = new KuoteObjects_Course();
29 $course->get( $_REQUEST['courseId'] );
30 $course->setTitle( $_REQUEST['crsTitle'] );
31 $course->setDescription( $_REQUEST['crsDesc'] );
32 $course->setIsOpen( $_REQUEST['crsIsOpen'] );
33 $course->setIsPublic( $_REQUEST['crsIsPublic'] );
34
35 if ( $course->update() ) {
36 echo $template->fetch( 'instructor.update.course.success.template.php' );
37 } else {
38 echo $template->fetch( 'instructor.update.course.failure.template.php' );
39 }
40 }
41 ?>
1 <?php
2 /**
3 * engine.instructor.update.learning.php
4 * This file updates the data of a learning that has already been created.
5 * It checks to see if a Course Id has been passed, and displays
6 * instructor.update.learning.selectCourse.template.php if it has not.
7 * Next it repeates this action, but for the Learning Id using
8 * instructor.update.learning.selectLearning.template.php .
9 * Then it checks to see if the updated learning data has been submitted, displaying
10 * instructor.update.learning.form.template if it has not. If the updated data has been
11 * submitted, the file will attempt to update the learning in the data store, and the
12 * tutorial file in the learnings directory and displays it's success or failure to the instructor.
13 * @package Kuote
14 * @subpackage Engine
15 * @author Kyle Hall
16 * @copyright 2006
17 */
18 if ( ! isset( $_REQUEST['courseId'] ) ) {
19 $template->set( 'coursesHash', KuoteObjects_Course::getCoursesHash( $_SESSION['thisUser'] ) );
20 echo $template->fetch( 'instructor.update.learning.selectCourse.template.php' );
21 } elseif ( ! isset( $_REQUEST['learningId'] ) ) {
22 $learningsHash = KuoteObjects_Learning::getLearningsHash( $_REQUEST['courseId'] );
23 $template->set( 'learningsHash', $learningsHash );
24 $template->set( 'courseId', $_REQUEST['courseId'] );
25 echo $template->fetch( 'instructor.update.learning.selectLearning.template.php' );
26 } elseif ( ! isset( $_REQUEST['learningSubmitted'] ) ) {
27 $learning = new KuoteObjects_Learning();
28 $learning->get( $_REQUEST['learningId'] );
29
30 $template->set( 'coursesHash', KuoteObjects_Course::getCoursesHash( $_SESSION['thisUser'] ) );
31 $template->set( 'courseId', $_REQUEST['courseId'] );
32 $template->set( 'learningId', $_REQUEST['learningId'] );
33 $template->set( 'learning', $learning );
34 echo $template->fetch( 'instructor.update.learning.form.template.php' );
35 } else {
36 $learning = new KuoteObjects_Learning();
37 $learning->get( $_REQUEST['learningId'] );
38 $learning->setTitle( $_REQUEST['learningTitle'] );
39 $learning->setDescription( $_REQUEST['learningDesc'] );
40 $learning->setCourseId( $_REQUEST['crsId'] );
41
42 // Proccess the tutorial file
43 $upload = new HTTP_Upload('en');
44 $file = $upload->getFiles('tutorialFile');
45
46 $unknownFileType = false;
47 $fileMovedSuccessfully = true;
48
49 if ( $file->isValid() ) {
50 switch ( $file->getProp("ext") ) {
51 case 'htm':
52 case 'html':
53 $tutorialDir = LEARNINGS_ROOT . $_REQUEST['crsId'] . '/' . $learning->getId();
54 if ( $learning->hasTutorial() ) {
55 if ( ! rm( $tutorialDir . '*' ) )
56 { throw new Exception("rm( $tutorialDir ) Failed"); }
57 if ( ! mkdir( $tutorialDir, 0700 ) )
58 { throw new Exception("mkdir( $tutorialDir ) Failed"); }
59 }
60
61 $moved = $file->moveTo( $tutorialDir );
62 $fileMovedSuccessfully = ( ! PEAR::isError( $moved ) );
63 if ( $fileMovedSuccessfully ) {
64 $learning->setTutorialFileName( $file->getProp('name') );
65 }
66 break;
67 default:
68 $unknownFileType = true;
69 break;
70 }
71 }
72
73
74 if ( $fileMovedSuccessfully ) { //File updated successfully or No file to update
75 if ( $learning->update() ) {
76 echo $template->fetch( 'instructor.update.learning.success.template.php' );
77 } else {
78 echo $template->fetch( 'instructor.update.learning.learningFailure.template.php' );
79 }
80 } else {
81 if ( $learning->update() ) {//File update failed, still try learning update.
82 echo $template->fetch( 'instructor.update.learning.fileFailure.template.php' );
83 } else {
84 echo $template->fetch( 'instructor.update.learning.failure.template.php' );
85 }
86 }
87
88
89 }
90 ?>
1 <?php
2 /**
3 * engine.instructor.update.course.php
4 * This file updates the data of a question that has already been created.
5 * It checks to see if a Course Id has been passed, and displays
6 * instructor.update.question.selectCourse.template.php if it has not.
7 * Next it repeates this action, but for the Learning Id using
8 * instructor.update.learning.selectLearning.template.php .
9 * Then it checks to see if the updated questions data has been submitted, displaying
10 * instructor.update.learning.displayQuestions.template if it has not. If the updated data has been
11 * submitted, the file will attempt to update the questions in the data store,
12 * displaying it's success or failure to the instructor.
13 * @package Kuote
14 * @subpackage Engine
15 * @author Kyle Hall
16 * @copyright 2006
17 */
18
19 if ($debug) {echo("<br />Entered engine.instructor.update.question.php<br />");}
20
21 if ( ! isset( $_REQUEST['courseId'] ) ) { //Display the select course form
22 $coursesHash = KuoteObjects_Course::getCoursesHash( $_SESSION['thisUser'] );
23 $template->set( 'coursesHash', $coursesHash );
24 echo $template->fetch('instructor.update.question.selectCourse.template.php');
25 } elseif ( ! isset( $_REQUEST['learningId'] ) ) { //Display the select learning form
26 $learningsHash = KuoteObjects_Learning::getLearningsHash( $_REQUEST['courseId'] );
27 $template->set( 'learningsHash', $learningsHash );
28 $template->set( 'courseId', $_REQUEST['courseId'] );
29 echo $template->fetch('instructor.update.question.selectLearning.template.php');
30 } elseif ( ! isset( $_REQUEST['q1_questionId'] ) ) {
31 //User has selected the proper course and learning, now display the questions for updating.
32 $questions = new KuoteObjects_QuestionSet();
33 $questions->getByLearningId( $_REQUEST['learningId'] );
34 $template->set( 'courseId', $_REQUEST['courseId'] );
35 $template->set( 'learningId', $_REQUEST['learningId'] );
36 $template->set('questions', $questions);
37 $template->set('questionsCount', $questions->count() );
38 echo $template->fetch('instructor.update.question.displayQuestions.template.php');
39 } else {
40 //Update Questions
41 $anyFailures = array();
42 for($i = 1; $i <= $_REQUEST['questionsCount']; $i++){
43 $question = new KuoteObjects_Question();
44 $question->get($_REQUEST['q' . $i . '_questionId']);
45
46 $question->setBody( $_REQUEST['q' . $i . '_questionBody'] );
47 $question->setTime( $_REQUEST['q' . $i . '_questionTime'] );
48 $question->setAnswer( $_REQUEST['q' . $i . '_questionAnswer'] );
49 $question->setQuestionNumber( $_REQUEST['q' . $i . '_questionNumber'] );
50 $question->setDifficulty( $_REQUEST['q' . $i . '_questionDifficulty'] );
51 $question->setOption1( $_REQUEST['q' . $i . '_questionOption1'] );
52 $question->setOption2( $_REQUEST['q' . $i . '_questionOption2'] );
53 $question->setOption3( $_REQUEST['q' . $i . '_questionOption3'] );
54 $question->setOption4( $_REQUEST['q' . $i . '_questionOption4'] );
55 $question->setOption5( $_REQUEST['q' . $i . '_questionOption5'] );
56
57 if( $question->update() ) {
58 $anyFailures[$i] = false;
59 } else {
60 $anyFailures[$i] = true;
61 }
62 }
63
64 $template->set('anyFailures', $anyFailures);
65 echo $template->fetch('instructor.update.question.processQuestions.template.php');
66 }
67 ?>
1 <?php
2 /**
3 * engine.instructor.update.courseoffer.php
4 * This file updates the data of a course offering that has already been created.
5 * This file needs updated to remove the use of HTML_Quickform.
6 * @package Kuote
7 * @subpackage Engine
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 if ($debug) {echo("<br />Entered engine.instructor.edit.courseoffer.php<br />");}
12
13 $selectCourseOfferForm = createSelectCourseOfferForm();
14 if (!isset($_REQUEST['courseOffering'])){ //If a course offering isn't passed, make user select a course.
15 $selectCourseOfferForm->display();
16 } else {//Course id is passed
17 if ($selectCourseOfferForm->validate()) {//We now have a course offering, pull the course and prefill the
editCourseForm
18 if (!isset($_REQUEST['crsOfferTitle'])){//If the user has just selected a course offering, prefill
the form with that oferings data, otherwise leave thier submitted data in.
19 $thisCourseOffering = unserialize(base64_decode($_REQUEST['courseOffering']));
20 updateRequestAndPostValues($thisCourseOffering);
21 $offerCourseForm = createOfferCourseForm();
22 $offerCourseForm->display();
23 } else {//The user has subitted an updated set of course offering data
24 $offerCourseForm = createOfferCourseForm();
25 if($offerCourseForm->validate()){//New data valid, enter into database
26 } else {//New data invalid, redisplay form
27 $offerCourseForm->display();
28 }
29 }
30
31
32 } else {//Select Course Offer Form did not validate
33 $selectCourseOfferForm->display();
34 }
35 }
36
37 function processLearningOffering ($data) {
38 //Form Validated, so we enter the Question into the database
39 # DB_DataObject::debugLevel(1);
40 //<span class="style4">YYYY-MM-DD</span>
41
42 $startDate = $data['learningOfferStart']['Y'] . '-' . $data['crsOfferStart']['M'] . '-' . $data['
crsOfferStart']['d'];
43 $endDate = $data['learningOfferEnd']['Y'] . '-' . $data['crsOfferEnd']['M'] . '-' . $data['crsOfferEnd']['d'
];
44
45 $thisLearningOffering = DB_DataObject::factory('LearningOffering');
46
47 $thisLearningOffering->learningOfferTitle = $data['learningOfferTitle'];
48 $thisLearningOffering->learningOfferStart = $startDate;
49 $thisLearningOffering->learningOfferEnd = $endDate;
50 $thisLearningOffering->crsOfferId = $data['crsOfferId'];
51 $thisLearningOffering->userId = $_SESSION['thisUser']->getId();
52
53
54 $thisLearningOfferingId = $thisLearningOffering->insert();
55 if($thisLearningOfferingId){
56 echo("Learning Offering: " . $thisLearningOffering->learningOfferTitle . " Added Successfully!");
57 }
58 }
59 ?>
1 <?php
2 /**
3 * engine.instructor.offer.course.php
4 * This file creates course offerings. It checks to see if a course offering has been submitted.
5 * The one has not, it dispalys the create course offering template
6 * instructor.offer.course.form.template . If an offering has been submitted, it inserts that offering
7 * data into the datastore and displays it success to the user.
8 * @package Kuote
9 * @subpackage Engine
10 * @author Kyle Hall
11 * @copyright 2006
12 */
13 if ( $debug ) echo("Entered engine.instructor.create.course.php<br />");
14
15 if ( isset( $_REQUEST['crsOfferSubmitted'] ) ) { // Offer Submitted
16 $courseOffering = new KuoteObjects_CourseOffering();
17 $courseOffering->setCourseId( $_REQUEST['crsId'] );
18 $courseOffering->setTitle( $_REQUEST['crsOfferTitle'] );
19 $courseOffering->setStart(
20 get_date_string(
21 $_REQUEST['crsOfferStart']['Y'],
22 $_REQUEST['crsOfferStart']['M'],
23 $_REQUEST['crsOfferStart']['d']
24 )
25 );
26 $courseOffering->setEnd(
27 get_date_string(
28 $_REQUEST['crsOfferEnd']['Y'],
29 $_REQUEST['crsOfferEnd']['M'],
30 $_REQUEST['crsOfferEnd']['d']
31 )
32 );
33
34 $courseOffering->setUserId( $_SESSION['thisUser']->getId() );
35
36 if ( isset( $_REQUEST['crsOfferPassword'] ) ) {
37 $courseOffering->setPassword( $_REQUEST['crsOfferPassword'] );
38 }
39
40 if ( $courseOffering->insert() ) {
41 echo $template->fetch( 'instructor.offer.course.success.template.php' );
42 } else {
43 $template->set( 'title', 'Failed To Offer Course' );
44 $template->set( 'message', 'Unable To Offer This Course, Please Contact Your Kuote Administrator.' );
45 echo $template->fetch( 'generic.message.template.php' );
46 }
47
48 } else { // No Offer Submitted, Display Form
49 $coursesHash = KuoteObjects_Course::getCoursesHash( $_SESSION['thisUser'] );
50 $template->set( 'coursesHash', $coursesHash );
51 echo $template->fetch( 'instructor.offer.course.form.template.php' );
52 }
53 ?>
1 <?php
2 /**
3 * engine.instructor.offer.learning.php
4 * This file processes Learning Offerings. It checks to see if a Course Offering Id has been passed.
5 * If one has not been passed, it displays the
6 * instructor.offer.learning.selectCourseOffering.template.php form. Second, it checks to see
7 * if a Learning Offering has been submitted, if not, it displays the
8 * instructor.offer.learning.form.template.php template. If an offering has been passed,
9 * the file attempts to create the offering in the datastore and displays its success or failure.
10 * @package Kuote
11 * @subpackage Engine
12 * @author Kyle Hall
13 * @copyright 2006
14 */
15 if ( ! isset( $_REQUEST['courseOfferingId'] ) ) { //Display Select Course Offering Form
16 $courseOfferingsHash =
17 KuoteObjects_CourseOffering::getCourseOfferingsHash( $_SESSION['thisUser'] );
18
19 $template->set( 'courseOfferingsHash', $courseOfferingsHash);
20 echo $template->fetch( 'instructor.offer.learning.selectCourseOffering.template.php' );
21 } elseif ( ! isset( $_REQUEST['offerSubmitted'] ) ) {
22 $courseOffering = new KuoteObjects_CourseOffering();
23 $courseOffering->get( $_REQUEST['courseOfferingId'] );
24 $learningsHash = KuoteObjects_Learning::getLearningsHash( $courseOffering->getCourseId() );
25
26 $template->set( 'courseOfferingId', $_REQUEST['courseOfferingId'] );
27 $template->set( 'learningsHash', $learningsHash );
28 echo $template->fetch( 'instructor.offer.learning.form.template.php' );
29
30 } else { //process learning offer.
31 $learningOffer = new KuoteObjects_LearningOffering();
32 $learningOffer->setTitle( $_REQUEST['learningOfferTitle'] );
33 $learningOffer->setStart(
34 get_date_string(
35 $_REQUEST['learningOfferStart']['Y'],
36 $_REQUEST['learningOfferStart']['M'],
37 $_REQUEST['learningOfferStart']['d']
38 )
39 );
40 $learningOffer->setEnd(
41 get_date_string(
42 $_REQUEST['learningOfferEnd']['Y'],
43 $_REQUEST['learningOfferEnd']['M'],
44 $_REQUEST['learningOfferEnd']['d']
45 )
46 );
47 $learningOffer->setCourseOfferingId( $_REQUEST['courseOfferingId'] );
48 $learningOffer->setLearningId( $_REQUEST['learningId'] );
49
50 if ( $learningOffer->insert() ) {
51 echo $template->fetch( 'instructor.offer.learning.success.template.php' );
52 } else {
53 $template->set( 'title', 'Failed To Offer Learning' );
54 $template->set( 'message', 'Unable To Offer This Learning, Please Contact Your Kuote Administrator.' );
55 echo $template->fetch( 'generic.message.template.php' );
56 }
57
58 }
59 ?>
1 <?php
2 /**
3 * engine.instructor.testdrive.learning.php
4 * This file is part of the instructor Test Drive system that allows an instructor to try
5 * out his or her learnings. This file displays the links to the learning's tutorial, and to the
6 * learnings quiz.
7 * @package Kuote
8 * @subpackage Engine
9 * @author Kyle Hall
10 * @copyright 2006
11 */
12 if ( $debug ) echo( "<br />Entered engine.instructor.testdrive.course.php<br />" );
13
14 if ( ! isset( $_REQUEST['courseSelected'] ) ) {
15 //User must select the proper course
16 $courseList = KuoteObjects_Course::getCoursesHash( $_SESSION['thisUser'] );
17 $template->set( 'courseList', $courseList );
18 echo $template->fetch( 'instructor.testdrive.selectCourse.template.php' );
19 } elseif ( ! isset( $_REQUEST['learningSelected'] ) ) {
20 //User has selected the proper course, and now must select the proper learning
21 $thisCourse = returnCourseObject( $_REQUEST['crsId'] );
22 $learningList = createLearningListArray(base64_encode(serialize($thisCourse)));
23 $template->set('learningList', $learningList);
24 echo $template->fetch('instructor.testdrive.selectLearning.template.php');
25 } else {
26 $learning = new KuoteObjects_Learning();
27 $learning->get( $_REQUEST['learningId'] );
28
29 $template->set( 'learning', $learning );
30 echo $template->fetch( 'instructor.testdrive.showTutorialAndQuizLinks.template.php' );
31 }
32 ?>
1 <?php
2 /**
3 * engine.instructor.testdrive.quiz.php
4 * This file is part of the instructor Test Drive system that allows an instructor to try
5 * out his or her learnings. This file is processed when the instructor clicks the take quiz link.
6 * It instantiates a TestDrive object and takes the instructor through the entire quiz.
7 * @package Kuote
8 * @subpackage Engine
9 * @author Kyle Hall
10 * @copyright 2006
11 */
12 if ( $debug ) echo 'Entered instructor.testdrive.runQuiz<br />';
13
14 if ( ! isset( $_SESSION['quiz'] ) ) {
15 $learning = form_object_decode( $_REQUEST['learning'] );
16
17 $quiz = new KuoteObjects_TestDrive($user = $_SESSION['thisUser'], $learning);
18 $_SESSION['quiz'] = $quiz; //Couldn't get object instantiated directly in $_SESSION{}
19
20 $_SESSION['quiz']->getQuestion();
21
22 } else {
23 //If 'options' comes in empty, user didn't make a choice, insert 0 for no answer
24 if ( ! isset( $_REQUEST['options'] ) ) { $_REQUEST['options'] = 0; }
25 $_SESSION['quiz']->answerQuestion( $_REQUEST['options'] );
26
27 try {
28 $_SESSION['quiz']->getQuestion();
29 } catch ( Exception $e ) {
30 if ( $e->getCode() == 3 ) { //No More Questions
31 //End of quiz, do some tallying
32 $template->set( 'quiz', $_SESSION['quiz'] );
33 echo $template->fetch( 'universal.quiz.endOfQuiz.template.php' );
34 unset($_SESSION['quiz']);
35 exit;
36 } else {
37 throw $e;
38 }
39 }
40
41 }
42
43 $template->set( 'quiz', $_SESSION['quiz'] );
44 $template->set( 'function', 'testdrive');
45 $template->set( 'subfunction', 'quiz' );
46 echo $template->fetch('universal.quiz.template.php');
47
48 ?>
1 <?php
2 /**
3 * engine.instructor.grades.php
4 * This file allows the instructor to view the grades of student's who have taken his or her
5 * learnings.
6 * @package Kuote
7 * @subpackage Engine
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 if ( $debug ) echo( "<br />Entered engine.instructor.grades.php<br />" );
12
13 if ( ! isset( $_REQUEST['viewBy'] ) ) {
14 echo $template->fetch( 'instructor.grades.view.template.php' );
15 } else {
16 // viewby my be: learning, learningOffering, course, courseOffering or student.
17 include( 'engine.instructor.grades.viewBy.' . $_REQUEST['viewBy'] . '.php' );
18 }
19 ?>
1 <?php
2 /**
3 * engine.instructor.grades.viewBy.learningOffering.php displays the grades for a
4 * particualar Learning Offering.
5 * @package Kuote
6 * @subpackage Engine
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 if ( ! isset( $_REQUEST['courseId'] ) ) { //Display the select course form
11 $coursesHash = KuoteObjects_Course::getCoursesHash( $_SESSION['thisUser'] );
12 $template->set( 'coursesHash', $coursesHash );
13 echo $template->fetch( 'instructor.grades.viewby.learningOffering.selectCourse.template.php' );
14 } elseif ( ! isset( $_REQUEST['learningId'] ) ) { //Display the select learning form
15 $learningsHash = KuoteObjects_Learning::getLearningsHash( $_REQUEST['courseId'] );
16 $template->set( 'learningsHash', $learningsHash );
17 $template->set( 'courseId', $_REQUEST['courseId'] );
18 echo $template->fetch( 'instructor.grades.viewby.learningOffering.selectLearning.template.php' );
19 } elseif ( ! isset( $_REQUEST['learningOfferingId'] ) ) { //Display the create question form
20 $hash = KuoteObjects_LearningOffering::getLearningOfferingsHash( $_REQUEST['learningId'] );
21 $template->set( 'learningOfferingsHash', $hash );
22 $template->set( 'courseId', $_REQUEST['courseId'] );
23 $template->set( 'learningId', $_REQUEST['learningId'] );
24 echo $template->fetch( 'instructor.grades.viewby.learningOffering.selectLearningOffering.template.php' );
25 } else { //Display the grades.
26 $course = new KuoteObjects_Course();
27 $course->get( $_REQUEST['courseId'] );
28
29 $learning = new KuoteObjects_Learning();
30 $learning->get( $_REQUEST['learningId'] );
31
32 $learningOffering = new KuoteObjects_LearningOffering();
33 $learningOffering->get( $_REQUEST['learningOfferingId'] );
34
35 $results = new KuoteObjects_ResultSet();
36 $results->getByLearningOfferingId( $_REQUEST['learningOfferingId'] );
37
38 $template->set( 'course', $course );
39 $template->set( 'learning', $learning );
40 $template->set( 'learningOffering', $learningOffering );
41 $template->set( 'results', $results );
42 echo $template->fetch( 'instructor.grades.viewby.learningOffering.showGrades.template.php' );
43 }
44 ?>
1 <?php
2 /**
3 * student.enroll.php
4 * This code directs the data flow to the correct student engine file based on the passed function
5 * and subfunction variables.
6 * @package Kuote
7 * @subpackage Engine
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 if (!isset($_REQUEST['function'])) {
12 $_REQUEST['function'] = 'learn';
13 $template->set( 'function', 'learn' );
14 }
15
16 //Read in the helpfile contents for the given function and subfunction
17 if ( isset( $_REQUEST['subfunction'] ) ) {
18 $file = 'templates/' . $templates . '/help/student.' . $_REQUEST['function'] . '.' . $_REQUEST['subfunction'
] . '.help.html';
19 } else {
20 $file = 'templates/' . $templates . '/help/student.' . $_REQUEST['function'] . '.help.html';
21 }
22 $filePointer = fopen( $file, 'r' );
23 $contents = fread( $filePointer, filesize( $file ) );
24 fclose( $filePointer );
25 $template->set( 'helpFileContents', $contents );
26
27 if ( isset( $_REQUEST['subfunction'] ) ) {
28 require_once('engine.student.' . $_REQUEST['function'] . '.' . $_REQUEST['subfunction'] . '.php');
29 } else {
30 require_once('engine.student.' . $_REQUEST['function'] . '.php');
31 }
32
33 ?>
1 <?php
2 /**
3 * engine.student.learn.php
4 * This file looks up all available learnings for a given student for each course offering
5 * the student is enrolled in. It displays them grouped by course offering. If a student
6 * clicks on a given learning, the file loads the Learning and LearningOffering objects
7 * and displays the tutorial and quiz links for that learning.
8 * @package Kuote
9 * @subpackage Engine
10 * @author Kyle Hall
11 * @copyright 2006
12 */
13 if ($debug) echo("<br />Entered engine.student.enroll.php<br />");
14
15 $action = ( isset( $_REQUEST['action'] ) ) ? $_REQUEST['action'] : "displayLearningOfferingSelectionForms";
16
17 switch ($action) {
18 case "displayLearningOfferingSelectionForms":
19 if ($debug) {echo("<br />displayLearningOfferingSelectionForms<br />");}
20 displayLearningOfferingSelectionForms( $template );
21 break;
22 case 'processSelectedLearningOffering':
23 if ( $debug ) {echo("<br />processSelectedLearningOffering<br />");}
24 processSelectedLearningOffering( $template );
25 break;
26 }
27
28 function displayLearningOfferingSelectionForms( $template ) {
29 //For each enrolled course offering, get all available learning offerings.
30 $enrollmentSet = new KuoteObjects_EnrollmentSet();
31 $enrollmentSet->getByUser( $_SESSION['thisUser'] );
32
33 $learningsData = array();
34
35 while ( $enrollment = $enrollmentSet->fetch() ) {
36 $courseOffering = new KuoteObjects_CourseOffering();
37 $courseOffering->get( $enrollment->getCourseOfferingId() );
38
39 $learningOfferingSet = new KuoteObjects_LearningOfferingSet();
40 $learningOfferingSet->getCurrentByCourseOffering( $courseOffering );
41
42 $offeringData = array();
43 $offeringData['courseOffering'] = $courseOffering;
44 $offeringData['learningOfferingSet'] = $learningOfferingSet;
45
46 array_push($learningsData, $offeringData);
47 }
48
49 $template->set( 'learningsData', $learningsData );
50 echo $template->fetch( 'student.learn.displayLearnings.template.php' );
51
52 }
53
54 function processSelectedLearningOffering( $template ){
55 $learningOffering = new KuoteObjects_LearningOffering();
56 $learningOffering->get( $_REQUEST['learningOfferingId'] );
57
58 $learning = new KuoteObjects_Learning();
59 $learning->get( $learningOffering->getLearningId() );
60
61 $template->set( 'learningOffering', $learningOffering );
62 $template->set( 'learning', $learning );
63 echo $template->fetch( 'student.learn.showTutorialAndQuizLinks.template.php' );
64 }
65 ?>
1 <?php
2 /**
3 * engine.student.enroll.php
4 * This file allows a student to enroll in a course offering. First it displays a list of available
5 * course offerings, and processes requests for enrollment in a given course offering.
6 * @package Kuote
7 * @subpackage Engine
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 if ( $debug ) echo("<br />Entered engine.student.enroll.php<br />");
12
13 // Designed for future action additions.
14 if( isset( $_REQUEST['action'] ) ) {
15 if( $_REQUEST['action'] == 'enroll' ){
16 //Course offering passed for enrollment
17 $id = $_REQUEST['crsOfferId'];
18 $courseOffering = new KuoteObjects_CourseOffering();
19 $courseOffering->get( $id );
20
21 if( ! $courseOffering->hasPassword() ) {
22 //No password on this offering, go ahead and enroll student.
23 try{
24 KuoteObjects_Enrollment::enroll($_SESSION['thisUser']->getId(), $courseOffering->getId());
25 } catch (Exception $e) {
26 if ($e->getCode() == 3){ // Error Code 3 means user is already enrolled in this course offering
27 $template->set('title', 'Course Offering Enrollment Error');
28 $template->set('message', 'You Are Already Enrolled in Course Offering: ' . $courseOffering-
>getTitle());
29 echo $template->fetch('student.generic.message.template.php');
30 } else {
31 throw $e;
32 }
33 }
34
35 //No error was caught, so the enrollment succeeded
36 $template->set('title', 'Course Offering Enrollment.');
37 $template->set('message', 'You Are Now Enrolled in the Course Offering: '
38 . $courseOffering->getTitle());
39 echo $template->fetch('generic.message.template.php');
40 } else {
41 //Password Protected Course Offering, pass off to password verification page.
42 $template->set('courseOffering', $courseOffering);
43 echo $template->fetch('student.enroll.getPassword.template.php');
44 }
45 }
46 } else {
47 //No Course offering passed, display offering list.
48 $set = new KuoteObjects_CourseOfferingSet();
49 $set->getAvailableCourseOfferings( $_SESSION['thisUser'] );
50
51 if ( ! $set->count() ) {
52 echo $template->fetch( 'student.enroll.noAvailableOfferings.template.php' );
53 exit();
54 }
55
56 $courseOfferingData = array();
57
58 //Create an array of data containing the offering data, the course data
59 // and the instructor data for each course offering.
60 while( $offering = $set->fetch() ){
61 $user = new KuoteObjects_User();
62 $user->get( $offering->getUserId() );
63
64 $course = new KuoteObjects_Course();
65 $course->get( $offering->getCourseId() );
66
67 $id = $offering->getId();
68 $courseOfferingData[$offering->getId()] = array();
69 $courseOfferingData[$offering->getId()]['courseOffering'] = $offering;
70 $courseOfferingData[$offering->getId()]['course'] = $course;
71 $courseOfferingData[$offering->getId()]['instructor'] = $user;
72
73 }
74
75 $template->set('courseOfferingData', $courseOfferingData);
76 echo $template->fetch('student.enroll.displayOfferings.template.php');
77 }
78 ?>
1 <?php
2 /**
3 * engine.student.enroll.verifyPassword.php
4 * If a student attempts to enroll in a course offering that is password protected, the data
5 * flow is passed to this file which requests a password and processes the password check.
6 * @package Kuote
7 * @subpackage Engine
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 if ($debug) {echo("<br />Entered engine.student.enroll.verifyPassword.php<br />");}
12
13 if(isset($_REQUEST['crsOfferPassword'])){
14 //Course offering passed for enrollment
15 $id = $_REQUEST['crsOfferId'];
16 $courseOffering = new KuoteObjects_CourseOffering();
17 $courseOffering->get($id);
18
19 if($courseOffering->verifyPassword($_REQUEST['crsOfferPassword'])){
20 try{ // Passwords match, attempt to enroll.
21 $success = KuoteObjects_Enrollment::enroll($_SESSION['thisUser']->getId(), $courseOffering->getId())
;
22 } catch (Exception $e) {
23 if ($e->getCode() == 3){ // Error Code 3 means user is already enrolled in this course offering
24 $template->set('title', 'Course Offering Enrollment Error');
25 $template->set('message', 'You Are Already Enrolled in Course Offering: '
26 . $courseOffering->getTitle());
27 echo $template->fetch('student.generic.message.template.php');
28 }
29 }
30
31 //No error was caught, so the enrollment succeeded
32 $template->set('title', 'Course Offering Enrollment.');
33 $template->set('message', 'You Are Now Enrolled in the Course Offering: '
34 . $courseOffering->getTitle());
35 echo $template->fetch('student.generic.message.template.php');
36
37 } else {
38 //Passwords don't match.
39 $template->set('title', 'Course Offering Enrollment Error');
40 $template->set('message', 'Incorrect Password.');
41 echo $template->fetch('student.generic.message.template.php');
42 }
43 } else {
44 //No Password Was Passed
45 $template->set('title', 'Course Offering Enrollment Error');
46 $template->set('message', 'No Password Was Passed.');
47 echo $template->fetch('student.generic.message.template.php');
48 }
49 ?>
1 <?php
2 /**
3 * engine.student.quiz.php
4 * This file handles all the details of a student actually taking a learning's quiz. It
5 * asks the questions, processes the answers, and displays the final scores.
6 * @package Kuote
7 * @subpackage Engine
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 if ( $debug ) echo 'Entered engine.student.quiz.php<br />';
12
13 if ( ! isset( $_SESSION['quiz'] ) ) {
14 $learning = form_object_decode( $_REQUEST['learning'] );
15 $learningOffering = form_object_decode( $_REQUEST['learningOffering'] );
16
17 $quiz = new KuoteObjects_Quiz($user = $_SESSION['thisUser'], $learning, $learningOffering);
18 $_SESSION['quiz'] = $quiz; //Couldn't get object instantiated directly in $_SESSION{}
19
20 $_SESSION['quiz']->getQuestion();
21
22 } else {
23 //If 'options' comes in empty, user didn't make a choice, insert 0 for no answer
24 if ( ! isset( $_REQUEST['options'] ) ) { $_REQUEST['options'] = 0; }
25 $_SESSION['quiz']->answerQuestion( $_REQUEST['options'] );
26
27 try {
28 $_SESSION['quiz']->getQuestion();
29 } catch ( Exception $e ) {
30 if ( $e->getCode() == 3 ) { //No More Questions
31 //End of quiz, do some tallying
32 $template->set( 'quiz', $_SESSION['quiz'] );
33 echo $template->fetch( 'universal.quiz.endOfQuiz.template.php' );
34 unset($_SESSION['quiz']);
35 exit;
36 } else {
37 throw $e;
38 }
39 }
40
41 }
42
43 $template->set( 'quiz', $_SESSION['quiz'] );
44 echo $template->fetch('universal.quiz.template.php');
45
46 ?>
1 <?php
2 /**
3 * engine.student.grades.php
4 * This file allows students to view the grades of learning quizzes they have taken.
5 * @package Kuote
6 * @subpackage Engine
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10
11 if ( ! isset( $_REQUEST['courseOfferingId'] ) ) {
12 $hash = KuoteObjects_CourseOffering::getEnrolledCourseOfferingsHash( $_SESSION['thisUser'] );
13 $template->set( 'courseOfferingsHash', $hash );
14 echo $template->fetch( 'student.grades.selectCourseOffering.template.php' );
15 } else {
16 $resultSet = new KuoteObjects_ResultSet();
17 $resultSet->getByUserIdAndCourseOfferingId(
18 $userId = $_SESSION['thisUser']->getId(),
19 $courseOfferingId = $_REQUEST['courseOfferingId']
20 );
21
22 $learningsByResult = array();
23 //get the related learnings, we'll want to print the titles
24 while ( $result = $resultSet->fetch() ) {
25 $learning = new KuoteObjects_Learning();
26 $learning->get( $result->getLearningId() );
27 $learningsByResult[ $result->getId() ] = $learning;
28 }
29
30 $courseOffering = new KuoteObjects_CourseOffering();
31 $courseOffering->get( $_REQUEST['courseOfferingId'] );
32
33 $template->set( 'resultSet', $resultSet );
34 $template->set( 'learningsByResult', $learningsByResult );
35 $template->set( 'courseOffering', $courseOffering );
36 echo $template->fetch( 'student.grades.showGrades.template.php' );
37 }
38 ?>
1 <?
2 /**
3 * head.template.php
4 * This file is included at the very beginning of every template.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
12 <html xmlns="http://www.w3.org/1999/xhtml">
13 <head>
14 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15 <title>Kuote Universal Online Testing Environment</title>
16 <link href="/kuote/templates/simple/styles.css" rel="stylesheet" type="text/css" />
17
18 <!-- These files are neccessary for the tooltip popups -->
19 <script type="text/javascript" language="javascript" src="js/domTT/domLib.js"></script>
20 <script type="text/javascript" language="javascript" src="js/domTT/fadomatic.js"></script>
21 <script type="text/javascript" language="javascript" src="js/domTT/domTT.js"></script>
22 <script>
23 var domTT_styleClass = 'domTTOverlib';
24 var domTT_oneOnly = true;
25 </script>
26
27 <?php //This javascript function includes the correct help file for the given page ?>
28 <?php if ( isset( $_SESSION['thisUser'] ) ) : ?>
29 <script language="JavaScript">
30 function openHelpWindow() {
31 popupWin = window.open('<?=SITEROOT?>templates/<?=$templates?>/help/<?=$_SESSION['thisUser']->getType();?>.<?=
$function;?><?=( isset( $subfunction ) ) ? '.' . $subfunction : '';?>.help.html',
32 'open_window',
33 'scrollbars, resizable, dependent, width=320, height=400, left=10000, top=0')
34 }
35 </script>
36 <?php endif; ?>
37 </head>
1 <?php
2 /**
3 * instructor.body.top.template.php
4 * This file is included at the beginning of every instructor template, right after head.template.php.
5 * This file includes all the html for the "header" of each page, except for the inclusion
6 * of the tabs graphic, which differs depending on the action, and is left to be included
7 * in each individual template file.
8 * @package Kuote
9 * @subpackage Templates
10 * @author Kyle Hall
11 * @copyright 2006
12 */
13 ?>
14 <body>
15 <div id="kuoteHeaderBackgroundBox" />
16 <img src="<?=SITEROOT?>templates/<?=$templates?>/images/header.png" alt="Kuote" name="kuoteHeader" width="745"
height="85" id="kuoteHeader" />
17
18 <a
19 href="javascript:openHelpWindow();"
20
21 onmouseover="this.style.color = '#D17E62'; domTT_activate(this, event, 'content', '<?=$helpFileContents;?>',
'trail', true, 'fade', 'both', 'fadeMax', 87, 'styleClass', 'niceTitle');"
22 onmouseout="this.style.color = ''; domTT_mouseout(this, event);"
23 >
24 <img
25 id="kuoteHelpButton"
26 src="<?=SITEROOT?>templates/<?=$templates?>/images/button_help.png"
27 border="0"
28 alt="Help"
29 />
30 </a>
31
32 <a href="<?=$_SERVER['PHP_SELF']?>?function=logout"
33 onmouseover="this.style.color = '#D17E62'; domTT_activate(this, event, 'content', 'Logout<p>Click Here To
Log Yourself Out Of Kuote.</p>', 'trail', true, 'fade', 'both', 'fadeMax', 87, 'styleClass', 'niceTitle');"
34 onmouseout="this.style.color = ''; domTT_mouseout(this, event);">
35 <img
36 src="<?=SITEROOT?>templates/<?=$templates?>/images/button_logout.png"
37 alt="Logout"
38 name="kuoteLogoutButton"
39 border="0"
40 id="kuoteLogoutButton"
41 />
42 </a>
43
44 <map name="kuoteTabsMap" id="kuoteTabsMap">
45 <area shape="rect" coords="536,2,680,41" href="kuote.php?function=grades&subfunction=view" />
46 <area shape="rect" coords="407,2,535,40" href="kuote.php?function=testdrive&subfunction=learning" />
47 <area shape="rect" coords="273,2,401,40" href="kuote.php?function=offer&subfunction=course" />
48 <area shape="rect" coords="6,2,134,40" href="kuote.php?function=create&subfunction=course" />
49 <area shape="rect" coords="141,2,269,40" href="kuote.php?function=update&subfunction=course" />
50 </map>
51
1 <?php
2 /**
3 * student.body.top.template.php
4 * This file is included at the beginning of every student template, right after head.template.php.
5 * This file includes all the html for the "header" of each page, except for the inclusion
6 * of the tabs graphic, which differs depending on the action, and is left to be included
7 * in each individual template file.
8 * @package Kuote
9 * @subpackage Templates
10 * @author Kyle Hall
11 * @copyright 2006
12 */
13 ?>
14 <body>
15 <div id="kuoteHeaderBackgroundBox" />
16 <img id="kuoteHeader" src="<?=SITEROOT?>templates/<?=$templates?>/images/header.png" width="745" height="85"
alt="Kuote" />
17
18 <a
19 href="javascript:openHelpWindow();"
20
21 onmouseover="this.style.color = '#D17E62'; domTT_activate(this, event, 'content', '<?=$helpFileContents;?>',
'trail', true, 'fade', 'both', 'fadeMax', 87, 'styleClass', 'niceTitle');"
22 onmouseout="this.style.color = ''; domTT_mouseout(this, event);"
23 >
24 <img
25 id="kuoteHelpButton"
26 src="<?=SITEROOT?>templates/<?=$templates?>/images/button_help.png"
27 border="0"
28 alt="Help"
29 />
30 </a>
31
32 <a href="<?=$_SERVER['PHP_SELF']?>?function=logout"
33 onmouseover="this.style.color = '#D17E62'; domTT_activate(this, event, 'content', 'Logout<p>Click Here To
Log Yourself Out Of Kuote.</p>', 'trail', true, 'fade', 'both', 'fadeMax', 87, 'styleClass', 'niceTitle');"
34 onmouseout="this.style.color = ''; domTT_mouseout(this, event);">
35 <img
36 src="<?=SITEROOT?>templates/<?=$templates?>/images/button_logout.png"
37 alt="Logout"
38 name="kuoteLogoutButton"
39 border="0"
40 id="kuoteLogoutButton"
41 />
42 </a>
43
44 <map name="kuoteTabsMap" id="kuoteTabsMap">
45 <area shape="rect" coords="6,2,134,40" href="kuote.php?function=enroll" />
46 <area shape="rect" coords="141,2,269,40" href="kuote.php?function=learn" />
47 <area shape="rect" coords="273,2,401,40" href="kuote.php?function=grades" />
48 <!-- <area shape="rect" coords="407,2,535,40" href="kuote.php?function=futureUse" /> -->
49 </map>
1 <?php
2 /**
3 * body.tail.template.php
4 * This file is included at the end of every template.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <div align="center"><br />
12 Proudly Powered by Kuote
13 </div>
14 </body>
15 </html>
1 <?php
2 /**
3 * snippet.pulldown.course.php
4 * This snippet displays a pulldown menu of courses from a hashed array $coursesHash of $id => $title.
5 * @package Kuote
6 * @subpackage Snippets
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <select name="courseId">
12 <?php foreach ( $coursesHash as $id => $title ) : ?>
13 <option value="<?=$id;?>"><?=$title;?></option>
14 <?php endforeach; ?>
15 </select>
1 <?php
2 /**
3 * snippet.pulldown.learning.php
4 * This snippet displays a pulldown menu of learnings
5 * from a hashed array $learningsHash of $id => $title.
6 * @package Kuote
7 * @subpackage Snippets
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <select name="learningId">
13 <?php foreach ( $learningsHash as $id => $title ) : ?>
14 <option value="<?=$id;?>"><?=$title;?></option>
15 <?php endforeach; ?>
16 </select>
1 <?php
2 /**
3 * snippet.pulldown.learningOffering.php
4 * This snippet displays a pulldown menu of learning offerings
5 * from a hashed array $learningOfferingsHash of $id => $title.
6 * @package Kuote
7 * @subpackage Snippets
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <select name="learningOfferingId">
13 <?php foreach ( $learningOfferingsHash as $id => $title ) : ?>
14 <option value="<?=$id;?>"><?=$title;?></option>
15 <?php endforeach; ?>
16 </select>
1 <?php
2 /**
3 * snippet.pulldown.learningOffering.php
4 * This snippet displays a pulldown menu of learning offerings
5 * from a hashed array $learningOfferingsHash of $id => $title.
6 * @package Kuote
7 * @subpackage Snippets
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <select name="courseOfferingId">
13 <?php foreach ( $courseOfferingsHash as $id => $title ) : ?>
14 <option value="<?=$id;?>"><?=$title;?></option>
15 <?php endforeach; ?>
16 </select>
1 <?php
2 /**
3 * login.template.php
4 * This template is displayed if Kuote detects that the user is not currently logged in.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12
13 <?php if(isset($loginErrorMessage)): ?>
14 <div id="error"><?=$loginErrorMessage?></div>
15 <?php endif; ?>
16
17
18 <script type="text/javascript">
19 //<![CDATA[
20 function validate_loginForm(frm) {
21 var value = '';
22 var errFlag = new Array();
23 var _qfGroups = {};
24 _qfMsg = '';
25
26 value = frm.elements['userLogin'].value;
27 if (value == '' && !errFlag['userLogin']) {
28 errFlag['userLogin'] = true;
29 _qfMsg = _qfMsg + '\n - Please enter your login';
30 }
31
32 value = frm.elements['userPassword'].value;
33 if (value == '' && !errFlag['userPassword']) {
34 errFlag['userPassword'] = true;
35 _qfMsg = _qfMsg + '\n - Please enter your password';
36 }
37
38 if (_qfMsg != '') {
39 _qfMsg = 'Invalid information entered.' + _qfMsg;
40 _qfMsg = _qfMsg + '\nPlease correct these fields.';
41 alert(_qfMsg);
42 return false;
43 }
44 return true;
45 }
46 //]]>
47 </script>
48
49 <form action="/kuote/kuote.php" method="post" name="loginForm" id="loginForm" onsubmit="try { var myValidator =
validate_loginForm; } catch(e) { return true; } return myValidator(this);">
50 <div>
51
52 <table border="0">
53
54 <tr>
55 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="2"><b>
Login</b></td>
56 </tr>
57 <tr>
58 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Enter your login:</b></td>
59 <td valign="top" align="left"><input size="50" maxlength="255" name="userLogin" type="text" /></td>
60
61 </tr>
62 <tr>
63 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Enter your password:</b></td>
64 <td valign="top" align="left"><input size="50" maxlength="255" name="userPassword" type="password" /></
td>
65 </tr>
66 <tr>
67 <td align="right" valign="top"><b></b></td>
68 <td valign="top" align="left"><input value="Send" type="submit" /></td>
69
70 </tr>
71 <tr>
72 <td></td>
73 <td align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="font-size:80%
;"> denotes required field</span></td>
74 </tr>
75 </table>
76 </div>
77 </form>
78
79 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.create.course.form.template.php
4 * This template displays a form for creating a new course.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13
14 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.create.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
15
16 <a href="kuote.php?function=create&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-selected.png" border="0" /></a>
17
18 <a href="kuote.php?function=create&subfunction=learning">
19 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-unselected.png" border="
0" />
20 </a>
21
22 <a href="kuote.php?function=create&subfunction=question">
23 <img id="subTab-3" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-question-unselected.png" border="
0" />
24 </a>
25
26 <dl>
27 <dt>Create Course</dt>
28 <dd>
29 <script type="text/javascript">
30 //<![CDATA[
31 function validate_courseForm(frm) {
32 var value = '';
33 var errFlag = new Array();
34 var _qfGroups = {};
35 _qfMsg = '';
36
37 value = frm.elements['crsTitle'].value;
38 if (value == '' && !errFlag['crsTitle']) {
39 errFlag['crsTitle'] = true;
40 _qfMsg = _qfMsg + '\n - Please enter a Title for this Course.';
41 }
42
43 value = frm.elements['crsDesc'].value;
44 if (value == '' && !errFlag['crsDesc']) {
45 errFlag['crsDesc'] = true;
46 _qfMsg = _qfMsg + '\n - Please enter a Description for this Course.';
47 }
48
49 value = '';
50 for (var i = 0; i < frm.elements['crsIsOpen'].length; i++) {
51 if (frm.elements['crsIsOpen'][i].checked) {
52 value = frm.elements['crsIsOpen'][i].value;
53 }
54 }
55 if (value == '' && !errFlag['crsIsOpen']) {
56 errFlag['crsIsOpen'] = true;
57 _qfMsg = _qfMsg + '\n - Please choose Yes or No for \"Course Is Open\".';
58 }
59
60 value = '';
61 for (var i = 0; i < frm.elements['crsIsPublic'].length; i++) {
62 if (frm.elements['crsIsPublic'][i].checked) {
63 value = frm.elements['crsIsPublic'][i].value;
64 }
65 }
66 if (value == '' && !errFlag['crsIsPublic']) {
67 errFlag['crsIsPublic'] = true;
68 _qfMsg = _qfMsg + '\n - Please choose Yes or No for \"Course Is Public\".';
69 }
70
71 if (_qfMsg != '') {
72 _qfMsg = 'Invalid information entered.' + _qfMsg;
73 _qfMsg = _qfMsg + '\nPlease correct these fields.';
74 alert(_qfMsg);
75 return false;
76 }
77 return true;
78 }
79 //]]>
80 </script>
81
82 <form action="<?=$_SERVER['PHP_SELF'];?>" method="post" name="courseForm" id="courseForm" onsubmit="try { var
myValidator = validate_courseForm; } catch(e) { return true; } return myValidator(this);">
83 <div>
84 <input name="function" type="hidden" value="create" />
85 <input name="subfunction" type="hidden" value="course" />
86 <input name="courseSubmitted" type="hidden" value="1" />
87
88 <table border="0">
89
90 <tr>
91 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="2"><b>
Create New Course</b></td>
92 </tr>
93 <tr>
94 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Course Title:</b></td>
95 <td valign="top" align="left"><input size="50" maxlength="255" id="crsTitle" name="crsTitle" type="
text" /></td>
96
97 </tr>
98 <tr>
99 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Description:</b></td>
100 <td valign="top" align="left"><input size="50" maxlength="255" name="crsDesc" type="text" /></td>
101 </tr>
102 <tr>
103 <td align="right" valign="top"><b>Course Is Open:</b></td>
104
105 <td valign="top" align="left">An Open Course Can Be Used By Any Instructor</td>
106 </tr>
107 <tr>
108 <td align="right" valign="top"><span style="color: #ff0000">*</span><b></b></td>
109 <td valign="top" align="left"><input name="crsIsOpen" value="1" type="radio" id="qf_3341d3" /><label
for="qf_3341d3">Yes</label></td>
110 </tr>
111 <tr>
112
113 <td align="right" valign="top"><span style="color: #ff0000">*</span><b></b></td>
114 <td valign="top" align="left"><input name="crsIsOpen" value="0" type="radio" id="qf_354aa5" /><label
for="qf_354aa5">No</label></td>
115 </tr>
116 <tr>
117 <td align="right" valign="top"><b>Course Is Public:</b></td>
118 <td valign="top" align="left">A Public Course Can Be Taken By Any Student</td>
119 </tr>
120
121 <tr>
122 <td align="right" valign="top"><span style="color: #ff0000">*</span><b></b></td>
123 <td valign="top" align="left"><input name="crsIsPublic" value="1" type="radio" id="qf_53e438" /><label
for="qf_53e438">Yes</label></td>
124 </tr>
125 <tr>
126 <td align="right" valign="top"><span style="color: #ff0000">*</span><b></b></td>
127 <td valign="top" align="left"><input name="crsIsPublic" value="0" type="radio" id="qf_15a24c" /><label
for="qf_15a24c">No</label></td>
128
129 </tr>
130 <tr>
131 <td align="right" valign="top"><b></b></td>
132 <td valign="top" align="left"><input value="Submit" type="submit" /></td>
133 </tr>
134 <tr>
135 <td></td>
136 <td align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="font-size:
80%;"> denotes required field</span></td>
137
138 </tr>
139 </table>
140 </div>
141 </form>
142 <script language="javascript">document.courseForm.courseTitle.focus()</script>
143
144 <br /><br />
145 </dd>
146 </dl>
147 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.create.course.submitted.template.php
4 * This template is displayed after a course creation form is submitted.
5 * It tells the user if the course creation was successsful or not.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/instructor.body.top.template.php"); ?>
14
15 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.create.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
16
17 <a href="kuote.php?function=create&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-selected.png" border="0" /></a>
18
19 <a href="kuote.php?function=create&subfunction=learning">
20 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-unselected.png" border="0"
/>
21 </a>
22
23 <a href="kuote.php?function=create&subfunction=question">
24 <img id="subTab-3" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-question-unselected.png" border="0"
/>
25 </a>
26
27 <dl>
28 <dt>Create Course</dt>
29 <dd>
30 <br />
31 <?php if($courseAdded && $dirCreated) : ?>
32 <p>Your Course Was Added Successfully!</p>
33 <p>Click 'Learning' under the 'Create' menu to a a Learning to this Course.</p>
34 <?php else : ?>
35 <p>Your Course Did Not Get Added, Please Contact Your System Administrator</p>
36 <?php endif; ?>
37 <br /><br /><br />
38 </dd>
39 </dl>
40 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.create.learning.template.php
4 * This template is display after a new learning has been submitted for create.
5 * It lets the instructor know what, if anything, went wrong in the process.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/instructor.body.top.template.php"); ?>
14
15 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.create.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
16
17 <a href="kuote.php?function=create&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a>
18
19 <a href="kuote.php?function=create&subfunction=learning">
20 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-selected.png" border="0" /
>
21 </a>
22
23 <a href="kuote.php?function=create&subfunction=question">
24 <img id="subTab-3" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-question-unselected.png" border="0"
/>
25 </a>
26
27 <dl>
28 <dt>Create Learning</dt>
29 <dd>
30 <?php if ( ! $dirCreated ) : ?>
31 Attempt to create the directory to store your Tutorial file has failed. Please Contact Your Kuote
Administrator.
32 <?php elseif ( ! $fileMovedSuccessfully ) : ?>
33 Attempt to move file to the correct directory has failed. Please Contact Your Kuote Administrator.
34 <?php elseif ( $unknownFileType ) : ?>
35 Kuote cannot use the type of file you have uploaded. Please try a different file type.
36 <?php elseif ( $learningAdded ) : ?>
37 Your Learning Has Been Added Successfully. Click the 'Questions' tab on the left to add questions
to this Learning.
38 <?php else : ?>
39 Your Learning was not added. Please try again or contact your Kuote Administrator.
40 <?php endif; ?>
41
42 <br /><br /><br /><br />
43 </dd>
44 </dl>
45
46 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.create.learning.form.template.php
4 * This template displays a form for creating a new learning.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13
14 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.create.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
15
16 <a href="kuote.php?function=create&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a><br />
17
18 <a href="kuote.php?function=create&subfunction=learning"> <img id="subTab-2" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-learning-selected.png" border="0" /> </a>
19
20 <a href="kuote.php?function=create&subfunction=question"> <img id="subTab-3" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-question-unselected.png" border="0" /> </a>
21
22 <dl>
23 <dt>Create Learning</dt>
24 <dd>
25 <script type="text/javascript">
26 //<![CDATA[
27 function validate_learningForm(frm) {
28 var value = '';
29 var errFlag = new Array();
30 var _qfGroups = {};
31 _qfMsg = '';
32
33 value = frm.elements['learningTitle'].value;
34 if (value == '' && !errFlag['learningTitle']) {
35 errFlag['learningTitle'] = true;
36 _qfMsg = _qfMsg + '\n - Please enter a Title for this Learning.';
37 }
38
39 value = frm.elements['learningDesc'].value;
40 if (value == '' && !errFlag['learningDesc']) {
41 errFlag['learningDesc'] = true;
42 _qfMsg = _qfMsg + '\n - Please enter a Description for this Learning.';
43 }
44
45 value = frm.elements['crsId'].selectedIndex == -1? '': frm.elements['crsId'].options[frm.elements['crsId'].
selectedIndex].value;
46
47 if (value == '' && !errFlag['crsId']) {
48 errFlag['crsId'] = true;
49 _qfMsg = _qfMsg + '\n - You have no Courses! Please create a Course to add a Learning to.';
50 }
51
52 if (_qfMsg != '') {
53 _qfMsg = 'Invalid information entered.' + _qfMsg;
54 _qfMsg = _qfMsg + '\nPlease correct these fields.';
55 alert(_qfMsg);
56 return false;
57 }
58 return true;
59 }
60 //]]>
61 </script>
62 <form action="/kuote/kuote.php" method="post" name="learningForm" id="learningForm" enctype="multipart/
form-data" onsubmit="try { var myValidator = validate_learningForm; } catch(e) { return true; } return
myValidator(this);">
63 <div>
64 <input name="MAX_FILE_SIZE" type="hidden" value="2097152" />
65 <input name="function" type="hidden" value="create" />
66 <input name="subfunction" type="hidden" value="learning" />
67 <input name="learningSubmitted" type="hidden" value="1" />
68 <table border="0">
69 <tr>
70 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="2"><
b>Create New Learning</b></td>
71 </tr>
72 <tr>
73 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Select Course:</b></td>
74 <td valign="top" align="left"><select name="crsId">
75 <?php foreach ( $coursesHash as $id => $title ) : ?>
76 <option value="<?=$id;?>">
77 <?=$title;?>
78 </option>
79 <?php endforeach; ?>
80 </select></td>
81 </tr>
82 <tr>
83 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Learning Title:</b></td>
84 <td valign="top" align="left"><input size="50" maxlength="255" name="learningTitle" type="text" /><
/td>
85 </tr>
86 <tr>
87 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Description:</b></td>
88 <td valign="top" align="left"><input size="50" maxlength="255" name="learningDesc" type="text" /></
td>
89 </tr>
90 <tr>
91 <td align="right" valign="top"><b></b></td>
92 <td valign="top" align="left">Tutorial File must be a single HTML file only.</td>
93 </tr>
94 <tr>
95 <td align="right" valign="top"><b>Tutorial File:</b></td>
96 <td valign="top" align="left"><input name="tutorialFile" type="file" /></td>
97 </tr>
98 <tr>
99 <td align="right" valign="top"><b></b></td>
100 <td valign="top" align="left"><input value="Send" type="submit" /></td>
101 </tr>
102 <tr>
103 <td></td>
104 <td align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="
font-size:80%;"> denotes required field</span></td>
105 </tr>
106 </table>
107 </div>
108 </form>
109 <br />
110 <br />
111 <br />
112 </dd>
113 </dl>
114 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.create.question.selectCourse.template.php
4 * This template displays a form containing a pulldown menu of courses created by
5 * the instructor.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/instructor.body.top.template.php"); ?>
14
15 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.create.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
16
17 <a href="kuote.php?function=create&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a>
18
19 <a href="kuote.php?function=create&subfunction=learning"><img id="subTab-2" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-learning-unselected.png" border="0" /> </a>
20
21 <a href="kuote.php?function=create&subfunction=question"> <img id="subTab-3" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-question-selected.png" border="0" /> </a>
22
23 <dl>
24 <dt>Create Question</dt>
25 <dd>
26 <form action="<?=$_SERVER['PHP_SELF'];?>" method="post" name="selectCourseForm" id="selectCourseForm" >
27 <div>
28 <input name="function" type="hidden" value="create" />
29 <input name="subfunction" type="hidden" value="question" />
30 <table border="0">
31 <tr>
32 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="2"><
b>Select A Course</b></td>
33 </tr>
34 <tr>
35 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Select Course:</b></td>
36 <td valign="top" align="left"><select name="courseId">
37 <?php foreach ( $coursesHash as $id => $title ) : ?>
38 <option value="<?=$id;?>"><?=$title;?></option>
39 <?php endforeach; ?>
40 </select></td>
41 </tr>
42 <tr>
43 <td align="right" valign="top"><b></b></td>
44 <td valign="top" align="left"><input value="Select" type="submit" /></td>
45 </tr>
46 <tr>
47 <td></td>
48 <td align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="font-
size:80%;"> denotes required field</span></td>
49 </tr>
50 </table>
51 </div>
52 </form>
53 <br />
54 <br />
55 </dd>
56 </dl>
57 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructo.create.question.selectLearning.template.php
4 * This template displays a form with only a pulldown menu of Learnings
5 * the instructor has created.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/instructor.body.top.template.php"); ?>
14
15 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.create.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
16
17 <a href="kuote.php?function=create&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a>
18
19 <a href="kuote.php?function=create&subfunction=learning"><img id="subTab-2" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-learning-unselected.png" border="0" /> </a>
20
21 <a href="kuote.php?function=create&subfunction=question"> <img id="subTab-3" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-question-selected.png" border="0" /> </a>
22
23 <dl>
24 <dt>Create Question</dt>
25 <dd>
26 <form action="<?=$_SERVER['PHP_SELF'];?>" method="post" name="selectCourseForm" id="selectCourseForm"
onsubmit="try { var myValidator = validate_selectCourseForm; } catch(e) { return true; } return myValidator(
this);">
27 <div>
28 <input name="function" type="hidden" value="create" />
29 <input name="subfunction" type="hidden" value="question" />
30 <input name="courseId" type="hidden" value="<?=$courseId;?>" />
31 <table border="0">
32 <tr>
33 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="2"><
b>Select A Learning</b></td>
34 </tr>
35 <tr>
36 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Select Learning:</b></td>
37 <td valign="top" align="left"><select name="learningId">
38 <?php foreach ( $learningsHash as $id => $title ) : ?>
39 <option value="<?=$id;?>"><?=$title;?></option>
40 <?php endforeach; ?>
41 </select></td>
42 </tr>
43 <tr>
44 <td align="right" valign="top"><b></b></td>
45 <td valign="top" align="left"><input value="Select" type="submit" /></td>
46 </tr>
47 <tr>
48 <td></td>
49 <td align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="font-
size:80%;"> denotes required field</span></td>
50 </tr>
51 </table>
52 </div>
53 </form>
54 <br />
55 <br />
56 </dd>
57 </dl>
58 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.create.question.form.template.php
4 * This template displays a form for creating a new question.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13
14 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.create.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
15
16 <a href="kuote.php?function=create&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a>
17
18 <a href="kuote.php?function=create&subfunction=learning"><img id="subTab-2" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-learning-unselected.png" border="0" /> </a>
19
20 <a href="kuote.php?function=create&subfunction=question"> <img id="subTab-3" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-question-selected.png" border="0" /> </a>
21
22 <dl>
23 <dt>Create Question</dt>
24 <dd>
25 <script type="text/javascript">
26 //<![CDATA[
27 function validate_questionForm(frm) {
28 var value = '';
29 var errFlag = new Array();
30 var _qfGroups = {};
31 _qfMsg = '';
32
33 value = frm.elements['questionBody'].value;
34 if (value == '' && !errFlag['questionBody']) {
35 errFlag['questionBody'] = true;
36 _qfMsg = _qfMsg + '\n - Please enter a Question for Question .';
37 }
38
39 value = frm.elements['questionOption1'].value;
40 if (value == '' && !errFlag['questionOption1']) {
41 errFlag['questionOption1'] = true;
42 _qfMsg = _qfMsg + '\n - Please enter an Option 1 for Question .';
43 }
44
45 value = frm.elements['questionOption2'].value;
46 if (value == '' && !errFlag['questionOption2']) {
47 errFlag['questionOption2'] = true;
48 _qfMsg = _qfMsg + '\n - Please enter an Option 2 for Question .';
49 }
50
51 value = frm.elements['questionAnswer'].selectedIndex == -1? '': frm.elements['questionAnswer'].options[frm.
elements['questionAnswer'].selectedIndex].value;
52
53 if (value == '' && !errFlag['questionAnswer']) {
54 errFlag['questionAnswer'] = true;
55 _qfMsg = _qfMsg + '\n - Please choose an Answer for Question .';
56 }
57
58 value = frm.elements['questionDifficulty'].selectedIndex == -1? '': frm.elements['questionDifficulty'].
options[frm.elements['questionDifficulty'].selectedIndex].value;
59
60 if (value == '' && !errFlag['questionDifficulty']) {
61 errFlag['questionDifficulty'] = true;
62 _qfMsg = _qfMsg + '\n - Please choose a Difficulty for Question .';
63 }
64
65 value = frm.elements['questionTime'].value;
66 if (value == '' && !errFlag['questionTime']) {
67 errFlag['questionTime'] = true;
68 _qfMsg = _qfMsg + '\n - Please enter a Time Limit for Question .';
69 }
70
71 if (_qfMsg != '') {
72 _qfMsg = 'Invalid information entered.' + _qfMsg;
73 _qfMsg = _qfMsg + '\nPlease correct these fields.';
74 alert(_qfMsg);
75 return false;
76 }
77 return true;
78 }
79 //]]>
80 </script>
81
82 <form action="<?=$_SERVER['PHP_SELF'];?>" method="post" name="questionForm" id="questionForm" onsubmit="try {
var myValidator = validate_questionForm; } catch(e) { return true; } return myValidator(this);">
83 <div>
84 <input name="function" type="hidden" value="create" />
85 <input name="subfunction" type="hidden" value="question" />
86 <input name="courseId" type="hidden" value="<?=$courseId;?>" />
87 <input name="learningId" type="hidden" value="<?=$learningId;?>" />
88 <input name="questionNumber" type="hidden" value="<?=$questionNumber;?>" />
89 <table border="0">
90
91
92 <tr>
93 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="4"><b>
Question #<?=$questionNumber;?></b></td>
94 </tr>
95
96 <tr>
97 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Question:</b></td>
98 <td colspan="3" align="left" valign="top"><textarea rows="2" cols="50" name="questionBody"></textarea><
/td>
99 </tr>
100 <tr>
101 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Option 1:</b></td>
102
103 <td colspan="3" align="left" valign="top"><input size="50" maxlength="255" name="questionOption1" type=
"text" /></td>
104 </tr>
105 <tr>
106 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Option 2:</b></td>
107 <td colspan="3" align="left" valign="top"><input size="50" maxlength="255" name="questionOption2" type=
"text" /></td>
108 </tr>
109 <tr>
110 <td align="right" valign="top"><b>Option 3:</b></td>
111
112 <td colspan="3" align="left" valign="top"><input size="50" maxlength="255" name="questionOption3" type=
"text" /></td>
113 </tr>
114 <tr>
115 <td align="right" valign="top"><b>Option 4:</b></td>
116 <td colspan="3" align="left" valign="top"><input size="50" maxlength="255" name="questionOption4" type=
"text" /></td>
117 </tr>
118 <tr>
119 <td align="right" valign="top"><b>Option 5:</b></td>
120
121 <td colspan="3" align="left" valign="top"><input size="50" maxlength="255" name="questionOption5" type=
"text" /></td>
122 </tr>
123 <tr>
124 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Answer:</b></td>
125 <td valign="top" align="left"><select size="5" name="questionAnswer">
126 <option value="1">1</option>
127 <option value="2">2</option>
128
129 <option value="3">3</option>
130 <option value="4">4</option>
131 <option value="5">5</option>
132 </select></td>
133 <td valign="top" align="left"><div align="right"><span style="color: #ff0000">*</span><b>Difficulty:</
b></div></td>
134 <td valign="top" align="left"><select size="5" single="single" name="questionDifficulty">
135 <option value="1">Very Easy</option>
136 <option value="2">Easy</option>
137 <option value="3" selected="selected">Average</option>
138 <option value="4">Hard</option>
139 <option value="5">Very Hard</option>
140 </select></td>
141 </tr>
142 <tr>
143 <td align="right" valign="top"><b>Time Limit:</b></td>
144 <td colspan="3" align="left" valign="top">Time Limit In Seconds (0 is No Time Limit)</td>
145 </tr>
146 <tr>
147 <td align="right" valign="top"><span style="color: #ff0000">*</span><b></b></td>
148
149 <td colspan="3" align="left" valign="top"><input size="50" maxlength="255" name="questionTime" type="
text" value="0" /></td>
150 </tr>
151 <tr>
152 <td align="right" valign="top"><b></b></td>
153 <td colspan="3" align="left" valign="top"><input value="Add Question" type="submit" /></td>
154 </tr>
155 <tr>
156 <td></td>
157 <td colspan="3" align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="
font-size:80%;"> denotes required field</span></td>
158 </tr>
159 </table>
160 </div>
161 </form>
162 <script language="javascript">document.questionForm.questionBody.focus()</script>
163 <br />
164 <br />
165 <br />
166 </dd>
167 </dl>
168 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.update.course.selectCourse.template.php
4 * This template displays a form containing a pulldown menu of courses available to update.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13
14 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.update.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
15
16 <a href="kuote.php?function=update&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-selected.png" border="0" /></a>
17
18 <a href="kuote.php?function=update&subfunction=learning">
19 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-unselected.png" border="0"
/>
20 </a>
21
22 <a href="kuote.php?function=update&subfunction=question">
23 <img id="subTab-3" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-question-unselected.png" border="0"
/>
24 </a>
25
26 <dl>
27 <dt>Update A Course</dt>
28 <dd>
29 <form action="<?=$_SERVER['PHP_SELF'];?>" method="post" name="selectCourseForm" id="selectCourseForm" >
30 <div>
31 <input name="function" type="hidden" value="update" />
32 <input name="subfunction" type="hidden" value="course" />
33 <table border="0">
34 <tr>
35 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="2"><
b>Select A Course</b></td>
36 </tr>
37 <tr>
38 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Select Course:</b></td>
39 <td valign="top" align="left"><select name="courseId">
40 <?php foreach ( $coursesHash as $id => $title ) : ?>
41 <option value="<?=$id;?>"><?=$title;?></option>
42 <?php endforeach; ?>
43 </select></td>
44 </tr>
45 <tr>
46 <td align="right" valign="top"><b></b></td>
47 <td valign="top" align="left"><input value="Select" type="submit" /></td>
48 </tr>
49 <tr>
50 <td></td>
51 <td align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="font-
size:80%;"> denotes required field</span></td>
52 </tr>
53 </table>
54 </div>
55 </form>
56 <br />
57 <br />
58 </dd>
59 </dl>
60 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.update.course.form.template.php
4 * This template displays the selected course's information so that an instructor may change it.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13
14 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.create.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
15
16 <a href="kuote.php?function=create&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-selected.png" border="0" /></a>
17
18 <a href="kuote.php?function=create&subfunction=learning">
19 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-unselected.png" border="
0" />
20 </a>
21
22 <a href="kuote.php?function=create&subfunction=question">
23 <img id="subTab-3" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-question-unselected.png" border="
0" />
24 </a>
25
26 <dl>
27 <dt>Update Course</dt>
28 <dd>
29 <script type="text/javascript">
30 //<![CDATA[
31 function validate_courseForm(frm) {
32 var value = '';
33 var errFlag = new Array();
34 var _qfGroups = {};
35 _qfMsg = '';
36
37 value = frm.elements['crsTitle'].value;
38 if (value == '' && !errFlag['crsTitle']) {
39 errFlag['crsTitle'] = true;
40 _qfMsg = _qfMsg + '\n - Please enter a Title for this Course.';
41 }
42
43 value = frm.elements['crsDesc'].value;
44 if (value == '' && !errFlag['crsDesc']) {
45 errFlag['crsDesc'] = true;
46 _qfMsg = _qfMsg + '\n - Please enter a Description for this Course.';
47 }
48
49 value = '';
50 for (var i = 0; i < frm.elements['crsIsOpen'].length; i++) {
51 if (frm.elements['crsIsOpen'][i].checked) {
52 value = frm.elements['crsIsOpen'][i].value;
53 }
54 }
55 if (value == '' && !errFlag['crsIsOpen']) {
56 errFlag['crsIsOpen'] = true;
57 _qfMsg = _qfMsg + '\n - Please choose Yes or No for \"Course Is Open\".';
58 }
59
60 value = '';
61 for (var i = 0; i < frm.elements['crsIsPublic'].length; i++) {
62 if (frm.elements['crsIsPublic'][i].checked) {
63 value = frm.elements['crsIsPublic'][i].value;
64 }
65 }
66 if (value == '' && !errFlag['crsIsPublic']) {
67 errFlag['crsIsPublic'] = true;
68 _qfMsg = _qfMsg + '\n - Please choose Yes or No for \"Course Is Public\".';
69 }
70
71 if (_qfMsg != '') {
72 _qfMsg = 'Invalid information entered.' + _qfMsg;
73 _qfMsg = _qfMsg + '\nPlease correct these fields.';
74 alert(_qfMsg);
75 return false;
76 }
77 return true;
78 }
79 //]]>
80 </script>
81
82 <form action="/kuote/kuote.php" method="post" name="courseForm" id="courseForm" onsubmit="try { var
myValidator = validate_courseForm; } catch(e) { return true; } return myValidator(this);">
83 <div>
84 <input name="function" type="hidden" value="update" />
85 <input name="subfunction" type="hidden" value="course" />
86 <input name="courseSubmitted" type="hidden" value="1" />
87 <input name="courseId" type="hidden" value="<?=$course->getId(); ?>"
88
89 <table border="0">
90
91 <tr>
92 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="2"><b>
Update Course</b></td>
93 </tr>
94 <tr>
95 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Course Title:</b></td>
96 <td valign="top" align="left"><input name="crsTitle" type="text" value="<?=$course->getTitle();?>"
size="50" maxlength="255" /></td>
97
98 </tr>
99 <tr>
100 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Description:</b></td>
101 <td valign="top" align="left"><input name="crsDesc" type="text" value="<?=$course->getDescription();?>"
size="50" maxlength="255" /></td>
102 </tr>
103 <tr>
104 <td align="right" valign="top"><b>Course Is Open:</b></td>
105
106 <td valign="top" align="left">An Open Course Can Be Used By Any Instructor</td>
107 </tr>
108 <tr>
109 <td align="right" valign="top"><span style="color: #ff0000">*</span><b></b></td>
110 <td valign="top" align="left"><input name="crsIsOpen" type="radio" id="qf_3341d3" value="1" <?php if (
$course->getIsOpen() ) : ?>checked="checked" <?php endif; ?> />
111 <label for="qf_3341d3">Yes</label></td>
112 </tr>
113 <tr>
114
115 <td align="right" valign="top"><span style="color: #ff0000">*</span><b></b></td>
116 <td valign="top" align="left"><input name="crsIsOpen" value="0" type="radio" id="qf_354aa5"
117 <?php if ( ! $course->getIsOpen() ) : ?>checked="checked" <?php endif; ?> /><label for="qf_354aa5">No</
label></td>
118 </tr>
119 <tr>
120 <td align="right" valign="top"><b>Course Is Public:</b></td>
121 <td valign="top" align="left">A Public Course Can Be Taken By Any Student</td>
122 </tr>
123
124 <tr>
125 <td align="right" valign="top"><span style="color: #ff0000">*</span><b></b></td>
126 <td valign="top" align="left"><input name="crsIsPublic" value="1" type="radio" id="qf_53e438" <?php
if ( $course->getIsPublic() ) : ?>checked="checked" <?php endif; ?> /><label for="qf_53e438">Yes</label></td>
127 </tr>
128 <tr>
129 <td align="right" valign="top"><span style="color: #ff0000">*</span><b></b></td>
130 <td valign="top" align="left"><input name="crsIsPublic" value="0" type="radio" id="qf_15a24c" <?php if
( ! $course->getIsPublic() ) : ?>checked="checked" <?php endif; ?> /><label for="qf_15a24c">No</label></td>
131
132 </tr>
133 <tr>
134 <td align="right" valign="top"><b></b></td>
135 <td valign="top" align="left"><input value="Submit" type="submit" /></td>
136 </tr>
137 <tr>
138 <td></td>
139 <td align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="font-size:
80%;"> denotes required field</span></td>
140
141 </tr>
142 </table>
143 </div>
144 </form>
145 <br /><br />
146 </dd>
147 </dl>
148 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.update.course.success.template.php
4 * This template is displayed if a course has been successfully updated.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13
14 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.update.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
15
16 <a href="kuote.php?function=update&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-selected.png" border="0" /></a>
17
18 <a href="kuote.php?function=update&subfunction=learning">
19 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-unselected.png" border="0"
/>
20 </a>
21
22 <a href="kuote.php?function=update&subfunction=question">
23 <img id="subTab-3" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-question-unselected.png" border="0"
/>
24 </a>
25
26 <dl>
27 <dt>Update A Course</dt>
28 <dd>
29 Your Course Has Been Updated Successfully.
30 <br />
31 <br />
32 <br />
33 </dd>
34 </dl>
35 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.update.learning.template.php
4 * This file was used to update a learning. It should not be used by the system
5 * @deprecated
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/instructor.body.top.template.php"); ?>
14
15 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.update.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
16
17 <a href="kuote.php?function=update&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a>
18
19 <a href="kuote.php?function=update&subfunction=learning">
20 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-selected.png" border="0" /
>
21 </a>
22
23 <a href="kuote.php?function=update&subfunction=question">
24 <img id="subTab-3" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-question-unselected.png" border="0"
/>
25 </a>
26
27 <dl>
28 <dt>Update a Learning</dt>
29 <dd>
30 <?php
31 if (isset($selectCourseForm)) {
32 $selectCourseForm->display();
33 } elseif (isset($selectLearningForm)) {
34 $selectLearningForm->display();
35 } elseif (isset($editLearningForm)) {
36 $editLearningForm->display();
37 } elseif (isset($updateProcessed)) {
38 if($updateProcessed){
39 if (isset($learningUpdated) && isset($fileUploaded)) {
40 echo "Your learning has been updated successfully.";
41 } else {
42 if (!isset($learningUpdated)){
43 echo "Your learning failed to update!<br />";
44 }
45
46 if (!isset($fileUploaded)){
47 echo "Your tuturial file failed to upload!<br />";
48 }
49
50 echo "Please try again of contact your Kuote administrator<br />";
51 }
52 }
53 }
54 ?>
55 <br /><br />
56 </dd>
57 </dl>
58 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.update.learning.selecLearning.template.php
4 * This template displays a form containing a pulldown menu of learnings
5 * available to update.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/instructor.body.top.template.php"); ?>
14
15 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.update.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
16
17 <a href="kuote.php?function=update&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a>
18
19 <a href="kuote.php?function=update&subfunction=learning">
20 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-selected.png" border="0" /
>
21 </a>
22
23 <a href="kuote.php?function=update&subfunction=question">
24 <img id="subTab-3" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-question-unselected.png" border="0"
/>
25 </a>
26 <dl>
27 <dt>Update Learning </dt>
28 <dd>
29 <form action="<?=$_SERVER['PHP_SELF'];?>" method="post" name="selectCourseForm" id="selectCourseForm"
onsubmit="try { var myValidator = validate_selectCourseForm; } catch(e) { return true; } return myValidator(
this);">
30 <div>
31 <input name="function" type="hidden" value="update" />
32 <input name="subfunction" type="hidden" value="learning" />
33 <input name="courseId" type="hidden" value="<?=$courseId;?>" />
34 <table border="0">
35 <tr>
36 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="2"><
b>Select A Learning</b></td>
37 </tr>
38 <tr>
39 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Select Learning:</b></td>
40 <td valign="top" align="left"><select name="learningId">
41 <?php foreach ( $learningsHash as $id => $title ) : ?>
42 <option value="<?=$id;?>"><?=$title;?></option>
43 <?php endforeach; ?>
44 </select></td>
45 </tr>
46 <tr>
47 <td align="right" valign="top"><b></b></td>
48 <td valign="top" align="left"><input value="Select" type="submit" /></td>
49 </tr>
50 <tr>
51 <td></td>
52 <td align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="font-
size:80%;"> denotes required field</span></td>
53 </tr>
54 </table>
55 </div>
56 </form>
57 <br />
58 <br />
59 </dd>
60 </dl>
61 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.update.learning.form.template.php
4 * This template is displays a form prefilled with the selected learnings data so that
5 * the instructor may update it.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/instructor.body.top.template.php"); ?>
14
15 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.update.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
16
17 <a href="kuote.php?function=update&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a>
18
19 <a href="kuote.php?function=update&subfunction=learning">
20 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-selected.png" border="0"
/>
21 </a>
22
23 <a href="kuote.php?function=update&subfunction=question">
24 <img id="subTab-3" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-question-unselected.png" border="
0" />
25 </a>
26
27 <dl>
28 <dt>Update Learning</dt>
29 <dd>
30 <script type="text/javascript">
31 //<![CDATA[
32 function validate_learningForm(frm) {
33 var value = '';
34 var errFlag = new Array();
35 var _qfGroups = {};
36 _qfMsg = '';
37
38 value = frm.elements['learningTitle'].value;
39 if (value == '' && !errFlag['learningTitle']) {
40 errFlag['learningTitle'] = true;
41 _qfMsg = _qfMsg + '\n - Please enter a Title for this Learning.';
42 }
43
44 value = frm.elements['learningDesc'].value;
45 if (value == '' && !errFlag['learningDesc']) {
46 errFlag['learningDesc'] = true;
47 _qfMsg = _qfMsg + '\n - Please enter a Description for this Learning.';
48 }
49
50 value = frm.elements['crsId'].selectedIndex == -1? '': frm.elements['crsId'].options[frm.elements['crsId'].
selectedIndex].value;
51
52 if (value == '' && !errFlag['crsId']) {
53 errFlag['crsId'] = true;
54 _qfMsg = _qfMsg + '\n - You have no Courses! Please create a Course to add a Learning to.';
55 }
56
57 if (_qfMsg != '') {
58 _qfMsg = 'Invalid information entered.' + _qfMsg;
59 _qfMsg = _qfMsg + '\nPlease correct these fields.';
60 alert(_qfMsg);
61 return false;
62 }
63 return true;
64 }
65 //]]>
66 </script>
67 <form action="<?=$_SERVER['PHP_SELF'];?>" method="post" name="learningForm" id="learningForm" enctype="
multipart/form-data" onsubmit="try { var myValidator = validate_learningForm; } catch(e) { return true; }
return myValidator(this);">
68 <div>
69 <input name="MAX_FILE_SIZE" type="hidden" value="2097152" />
70 <input name="function" type="hidden" value="update" />
71 <input name="subfunction" type="hidden" value="learning" />
72 <input name="courseId" type="hidden" value="<?=$courseId;?>" />
73 <input name="learningId" type="hidden" value="<?=$learningId;?>"
74 <input name="learningSubmitted" type="hidden" value="1" />
75 <table border="0">
76 <tr>
77 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="2"><
b>Update Learning</b></td>
78 </tr>
79 <tr>
80 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Select Course:</b></td>
81 <td valign="top" align="left"><select name="crsId">
82 <?php foreach ( $coursesHash as $id => $title ) : ?>
83 <option value="<?=$id;?>" <?php if ( $id == $courseId ) : ?> selected <?php endif; ?>>
84 <?=$title;?>
85 </option>
86 <?php endforeach; ?>
87 </select></td>
88 </tr>
89 <tr>
90 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Learning Title:</b></td>
91 <td valign="top" align="left"><input name="learningTitle" type="text" value="<?=$learning->
getTitle();?>" size="50" maxlength="255" /></td>
92 </tr>
93 <tr>
94 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Description:</b></td>
95 <td valign="top" align="left"><input name="learningDesc" type="text" value="<?=$learning->
getDescription();?>" size="50" maxlength="255" /></td>
96 </tr>
97 <tr>
98 <td align="right" valign="top"><b></b></td>
99 <td valign="top" align="left">Leave Blank To Retain Your Current Tutorial. </td>
100 </tr>
101 <tr>
102 <td align="right" valign="top"><b>Tutorial File:</b></td>
103 <td valign="top" align="left"><input name="tutorialFile" type="file" /></td>
104 </tr>
105 <tr>
106 <td align="right" valign="top"><b></b></td>
107 <td valign="top" align="left"><input value="Submit" type="submit" /></td>
108 </tr>
109 <tr>
110 <td></td>
111 <td align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="
font-size:80%;"> denotes required field</span></td>
112 </tr>
113 </table>
114 </div>
115 </form>
116 <br />
117 <br />
118 <br />
119 </dd>
120 </dl>
121 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.update.learning.success.template.php
4 * This template is displayed if a learning has been successfully updated.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13
14 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.update.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
15
16 <a href="kuote.php?function=update&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a>
17
18 <a href="kuote.php?function=update&subfunction=learning">
19 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-selected.png" border="0" /
>
20 </a>
21
22 <a href="kuote.php?function=update&subfunction=question">
23 <img id="subTab-3" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-question-unselected.png" border="0"
/>
24 </a>
25 <dl>
26 <dt>Update Learning </dt>
27 <dd>
28 You're Learning Has Been Updated Successfully.
29 <br />
30 <br />
31 <br />
32 <br />
33 </dd>
34 </dl>
35 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.update.learning.fileFailure.template.php
4 * This template is displayed if a learning is entered into the database, but the attempt
5 * to update the passed tutorial file fails.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/instructor.body.top.template.php"); ?>
14
15 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.update.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
16
17 <a href="kuote.php?function=update&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a>
18
19 <a href="kuote.php?function=update&subfunction=learning">
20 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-selected.png" border="0" /
>
21 </a>
22
23 <a href="kuote.php?function=update&subfunction=question">
24 <img id="subTab-3" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-question-unselected.png" border="0"
/>
25 </a>
26 <dl>
27 <dt>Update Learning</dt>
28 <dd>
29 The data about your Learning has been updated, but the attempt to update the tutorial has failed. Please
try again or contact your Kuote Administrator.
30 <br />
31 <br />
32 <br />
33 </dd>
34 </dl>
35 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.update.learning.selectCourse.template.php
4 * This template displays a form with a pulldown menu of available courses to select.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13
14 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.update.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
15
16 <a href="kuote.php?function=update&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a>
17
18 <a href="kuote.php?function=update&subfunction=learning">
19 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-selected.png" border="0" /
>
20 </a>
21
22 <a href="kuote.php?function=update&subfunction=question">
23 <img id="subTab-3" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-question-unselected.png" border="0"
/>
24 </a>
25 <dl>
26 <dt>Update Learning </dt>
27 <dd>
28 <form action="<?=$_SERVER['PHP_SELF'];?>" method="post" name="selectCourseForm" id="selectCourseForm" >
29 <div>
30 <input name="function" type="hidden" value="update" />
31 <input name="subfunction" type="hidden" value="learning" />
32 <table border="0">
33 <tr>
34 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="2"><
b>Select A Course</b></td>
35 </tr>
36 <tr>
37 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Select Course:</b></td>
38 <td valign="top" align="left"><select name="courseId">
39 <?php foreach ( $coursesHash as $id => $title ) : ?>
40 <option value="<?=$id;?>"><?=$title;?></option>
41 <?php endforeach; ?>
42 </select></td>
43 </tr>
44 <tr>
45 <td align="right" valign="top"><b></b></td>
46 <td valign="top" align="left"><input value="Select" type="submit" /></td>
47 </tr>
48 <tr>
49 <td></td>
50 <td align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="font-
size:80%;"> denotes required field</span></td>
51 </tr>
52 </table>
53 </div>
54 </form>
55 <br />
56 <br />
57 </dd>
58 </dl>
59 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.update.learning.failure.template.php
4 * This template is displayed if an attempted update to a learning fails.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13
14 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.update.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
15
16 <a href="kuote.php?function=update&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a>
17
18 <a href="kuote.php?function=update&subfunction=learning">
19 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-selected.png" border="0" /
>
20 </a>
21
22 <a href="kuote.php?function=update&subfunction=question">
23 <img id="subTab-3" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-question-unselected.png" border="0"
/>
24 </a>
25 <dl>
26 <dt>Update Learning </dt>
27 <dd>
28 You're Learning Has Not Been Updated.
29 Either you did not change any of the Learning's properties, or the system has failed to update the Learning.
Please try again or contact your Kuote Administrator. <br />
30 <br />
31 <br />
32 </dd>
33 </dl>
34 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.update.question.selectCourse.template.php
4 * This template displays a form with a pulldown menu of courses available to select.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13
14 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.update.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
15
16 <a href="kuote.php?function=update&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a>
17
18 <a href="kuote.php?function=update&amp;subfunction=learning">
19 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-unselected.png" border="0"
/>
20 </a>
21
22 <a href="kuote.php?function=update&amp;subfunction=question">
23 <img id="subTab-3" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-question-selected.png" border="0" /
>
24 </a>
25
26 <dl>
27 <dt>Update a Question</dt>
28 <dd>
29
30 <script type="text/javascript">
31 //<![CDATA[
32 function validate_selectCourseForm(frm) {
33 var value = '';
34 var errFlag = new Array();
35 var _qfGroups = {};
36 _qfMsg = '';
37
38 value = frm.elements['crsId'].selectedIndex == -1? '': frm.elements['crsId'].options[frm.elements['crsId'].
selectedIndex].value;
39
40 if (value == '' && !errFlag['crsId']) {
41 errFlag['crsId'] = true;
42 _qfMsg = _qfMsg + '\n - You have no Courses! Please create a Course.';
43 }
44
45 if (_qfMsg != '') {
46 _qfMsg = 'Invalid information entered.' + _qfMsg;
47 _qfMsg = _qfMsg + '\nPlease correct these fields.';
48 alert(_qfMsg);
49 return false;
50 }
51 return true;
52 }
53 //]]>
54 </script>
55
56 <form action="/kuote/kuote.php" method="post" name="selectCourseForm" id="selectCourseForm" onsubmit="try { var
myValidator = validate_selectCourseForm; } catch(e) { return true; } return myValidator(this);">
57 <div>
58 <input name="function" type="hidden" value="update" />
59 <input name="subfunction" type="hidden" value="question" />
60 <table border="0">
61
62 <tr>
63 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="2"><b>
Update Questions</b></td>
64 </tr>
65 <tr>
66 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Select Course:</b></td>
67 <td valign="top" align="left">
68 <select name="courseId">
69 <?php foreach ($coursesHash as $id => $title) { ?>
70 <option value="<?=$id?>"><?=$title?></option>
71 <?php } ?>
72 </select>
73 </td>
74 </tr>
75 <tr>
76 <td align="right" valign="top"><b>
77 </b></td>
78 <td valign="top" align="left"><input value="Select" type="submit" /></td>
79 </tr>
80 <tr>
81 <td></td>
82
83 <td align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="font-size:80%
;"> denotes required field</span></td>
84 </tr>
85 </table>
86 </div>
87 </form> <br /><br />
88 </dd>
89 </dl>
90
91 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.update.question.selectLearning.template.php
4 * This template displays a form with a pulldown menu of available learnings to select.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13
14 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.update.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
15
16 <a href="kuote.php?function=update&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a>
17
18 <a href="kuote.php?function=update&amp;subfunction=learning">
19 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-unselected.png" border="0"
/>
20 </a>
21
22 <a href="kuote.php?function=update&amp;subfunction=question">
23 <img id="subTab-3" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-question-selected.png" border="0" /
>
24 </a>
25
26 <dl>
27 <dt>Update a Question</dt>
28 <dd>
29
30 <script type="text/javascript">
31 //<![CDATA[
32 function validate_selectLearningForm(frm) {
33 var value = '';
34 var errFlag = new Array();
35 var _qfGroups = {};
36 _qfMsg = '';
37
38 value = frm.elements['learningId'].selectedIndex == -1? '': frm.elements['learningId'].options[frm.elements['
learningId'].selectedIndex].value;
39
40 if (value == '' && !errFlag['learningId']) {
41 errFlag['learningId'] = true;
42 _qfMsg = _qfMsg + '\n - You have no Learnings! Please create a Learning to add Questions to.';
43 }
44
45 if (_qfMsg != '') {
46 _qfMsg = 'Invalid information entered.' + _qfMsg;
47 _qfMsg = _qfMsg + '\nPlease correct these fields.';
48 alert(_qfMsg);
49 return false;
50 }
51 return true;
52 }
53 //]]>
54 </script>
55
56 <form action="/kuote/kuote.php" method="post" name="selectLearningForm" id="selectLearningForm" onsubmit="try {
var myValidator = validate_selectLearningForm; } catch(e) { return true; } return myValidator(this);">
57 <div>
58
59 <input name="function" type="hidden" value="update" />
60 <input name="subfunction" type="hidden" value="question" />
61 <input name="courseId" type="hidden" value="<?=$courseId;?>"/>
62
63 <table border="0">
64
65 <tr>
66 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="2"><b>
Select A Learning.</b></td>
67 </tr>
68 <tr>
69 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Select Learning:</b></td>
70
71 <td valign="top" align="left"><select name="learningId">
72 <?php foreach ($learningsHash as $id => $title) { ?>
73 <option value="<?=$id?>"><?=$title?></option>
74 <?php } ?>
75 </select></td>
76 </tr>
77 <tr>
78 <td align="right" valign="top"><b></b></td>
79
80 <td valign="top" align="left"><input value="Select" type="submit" /></td>
81 </tr>
82 <tr>
83 <td></td>
84 <td align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="font-size:80%
;"> denotes required field</span></td>
85 </tr>
86 </table>
87 </div>
88
89 </form> <br /><br />
90 </dd>
91 </dl>
92
93 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.update.question.displayQuestions.template.php
4 * This template displays all the questions from a learning so that they may be updated.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.update.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" /> <a href="kuote.php?function=update&amp;
subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-course-
unselected.png" border="0" /></a> <a href="kuote.php?function=update&amp;subfunction=learning"> <img id="
subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-unselected.png" border="0" /> </a>
<a href="kuote.php?function=update&amp;subfunction=question"> <img id="subTab-3" src="<?=SITEROOT?>templates/<
?=$templates?>/images/subTab-question-selected.png" border="0" /> </a>
14 <dl>
15 <dt>Update Questions</dt>
16 <dd>
17 <form action="<?=$_SERVER['PHP_SELF'];?>" method="post" name="questionForm" id="questionForm">
18 <div>
19 <input name="function" type="hidden" value="update" />
20 <input name="subfunction" type="hidden" value="question" />
21 <input name="courseId" type="hidden" value="<?=$courseId;?>" />
22 <input name="learningId" type="hidden" value="<?=learningId;?>" />
23 <input name="questionsCount" type="hidden" value="<?=$questionsCount;?>" />
24 <table border="0">
25 <tr>
26 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="4"><
b>Update Questions</b> </td>
27 </tr>
28 <?php while ( $thisQuestion = $questions->fetch() ) :?>
29 <tr>
30 <td style="white-space: nowrap; background-color: darkgray;" align="left" valign="top" colspan="4">
<b>Question #
31 <?=$thisQuestion->getQuestionNumber();?>
32 </b></td>
33 </tr>
34 <tr>
35 <input name="q<?=$thisQuestion->getQuestionNumber();?>_questionNumber"
36 type="hidden"
37 value="<?=$thisQuestion->getQuestionNumber();?>"
38 />
39
40 <input name="q<?=$thisQuestion->getQuestionNumber();?>_questionId"
41 type="hidden"
42 value="<?=$thisQuestion->getId();?>"
43 />
44
45 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Question:</b></td>
46 <td colspan="3" align="left" valign="top">
47 <textarea rows="3" cols="80"
48 name="q<?=$thisQuestion->getQuestionNumber();?>_questionBody"><?=$thisQuestion->getBody();?></
textarea>
49 </td>
50 </tr>
51 <tr>
52 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Option 1:</b></td>
53 <td valign="top" align="left">
54 <input
55 name="q<?=$thisQuestion->getQuestionNumber();?>_questionOption1"
56 type="text"
57 value="<?=$thisQuestion->getOption1();?>"
58 size="25"
59 maxlength="255"
60 />
61 </td>
62 <td valign="top" align="left"><b>Option 3:</b></td>
63 <td valign="top" align="left">
64 <input name="q<?=$thisQuestion->getQuestionNumber();?>_questionOption3"
65 type="text"
66 value="<?php if ( $thisQuestion->getOption3() ) echo $thisQuestion->getOption3(); ?>"
67 size="25"
68 maxlength="255"
69 />
70 </td>
71 </tr>
72 <tr>
73 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Option 2:</b></td>
74 <td valign="top" align="left">
75 <input name="q<?=$thisQuestion->getQuestionNumber();?>_questionOption2"
76 type="text"
77 value="<?=$thisQuestion->getOption2(); ?>"
78 size="25"
79 maxlength="255"
80 />
81 </td>
82 <td valign="top" align="left"><b>Option 4:</b></td>
83 <td valign="top" align="left">
84 <input name="q<?=$thisQuestion->getQuestionNumber();?>_questionOption4"
85 type="text"
86 value="<?php if ( $thisQuestion->getOption4() ) echo $thisQuestion->getOption4(); ?>"
87 size="25"
88 maxlength="255"
89 />
90 </td>
91 </tr>
92 <tr>
93 <td align="right" valign="top"><b>Option 5:</b></td>
94 <td valign="top" align="left">
95 <input name="q<?=$thisQuestion->getQuestionNumber();?>_questionOption5"
96 type="text"
97 value="<?php if ( $thisQuestion->getOption5() ) echo $thisQuestion->getOption5(); ?>"
98 size="25"
99 maxlength="255"
100 />
101 </td>
102 <td valign="top" align="left">&nbsp;</td>
103 <td valign="top" align="left">&nbsp;</td>
104 </tr>
105 <tr>
106 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Answer:</b></td>
107 <td valign="top" align="left"><select size="5" name="q<?=$thisQuestion->getQuestionNumber();?>
_questionAnswer">
108 <?php $questionAnswer = $thisQuestion->getAnswer(); ?>
109 <option <?php if($questionAnswer == 1) echo "selected"; ?> value="1">1</option>
110 <option <?php if($questionAnswer == 2) echo "selected"; ?> value="2">2</option>
111 <option <?php if($questionAnswer == 3) echo "selected"; ?> value="3">3</option>
112 <option <?php if($questionAnswer == 4) echo "selected"; ?> value="4">4</option>
113 <option <?php if($questionAnswer == 5) echo "selected"; ?> value="5">5</option>
114 </select>
115 </td>
116 <td valign="top" align="left"><span style="color: #ff0000">*</span><b>Difficulty:</b></td>
117 <td valign="top" align="left">
118 <select size="5"
119 single="single"
120 name="q<?=$thisQuestion->getQuestionNumber();?>_questionDifficulty"
121 >
122 <?php $questionDifficulty = $thisQuestion->getDifficulty(); ?>
123 <option value="1" <?php if($questionDifficulty == 1) echo "selected"; ?> >Very Easy</option>
124 <option value="2" <?php if($questionDifficulty == 2) echo "selected"; ?> >Easy</option>
125 <option value="3" <?php if($questionDifficulty == 3) echo "selected"; ?> >Average</option>
126 <option value="4" <?php if($questionDifficulty == 4) echo "selected"; ?> >Hard</option>
127 <option value="5" <?php if($questionDifficulty == 5) echo "selected"; ?> >Very Hard</option>
128 </select>
129 </td>
130 </tr>
131 <tr>
132 <td align="right" valign="top"><b>Time Limit:</b></td>
133 <td valign="top" align="left">Time Limit In Seconds (0 is No Time Limit)</td>
134 <td valign="top" align="left">&nbsp;</td>
135 <td valign="top" align="left">&nbsp;</td>
136 </tr>
137 <tr>
138 <td align="right" valign="top"><span style="color: #ff0000">*</span><b></b></td>
139 <td valign="top" align="left"><input size="5" maxlength="255" name="q<?=$thisQuestion->
getQuestionNumber();?>_questionTime" type="text" value="<?=$thisQuestion->getTime();?>" />
140 </td>
141 <td valign="top" align="left">&nbsp;</td>
142 <td valign="top" align="left">&nbsp;</td>
143 </tr>
144 <?php endwhile; ?>
145 <tr>
146 <td><br />
147 </td>
148 </tr>
149 <tr>
150 <td align="right" valign="top"><b></b></td>
151 <td valign="top" align="left"><input value="Update Questions" type="submit" />
152 </td>
153 <td valign="top" align="left">&nbsp;</td>
154 <td valign="top" align="left">&nbsp;</td>
155 </tr>
156 <tr>
157 <td></td>
158 <td align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="
font-size:80%;"> denotes required field</span></td>
159 <td align="left" valign="top">&nbsp;</td>
160 <td align="left" valign="top">&nbsp;</td>
161 </tr>
162 </table>
163 </div>
164 </form>
165 <br />
166 <br />
167 </dd>
168 </dl>
169 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.update.question.processQuestions.template.php
4 * This template is displayed after an attempt to update a learning's questions.
5 * It tells the instructor which updates succeeded and which failed, if any.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/instructor.body.top.template.php"); ?>
14
15 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.update.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
16
17 <a href="kuote.php?function=update&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a>
18
19 <a href="kuote.php?function=update&amp;subfunction=learning">
20 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-unselected.png" border="0"
/>
21 </a>
22
23 <a href="kuote.php?function=update&amp;subfunction=question">
24 <img id="subTab-3" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-question-selected.png" border="0" /
>
25 </a>
26
27 <dl>
28 <dt>Update a Question</dt>
29 <dd>
30 <?php
31 foreach($anyFailures as $questionNumber => $failure){
32 if ($failure) {
33 echo 'Question ' . $questionNumber . ' was not updated.<br />';
34 } else {
35 echo 'Question ' . $questionNumber . ' was updated.<br />';
36 }
37 }
38 ?>
39 <br />
40 Note: A question will show up as not updated if you did not make any changes to that particular
question, or there was a problem updating that particular question.
41 <br />
42 <br />
43 <br />
44 <br />
45 </dd>
46 </dl>
47
48 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.update.course.failure.template.php
4 * This template is displayed if an attempt to update a course fails.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13
14 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.update.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
15
16 <a href="kuote.php?function=update&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-selected.png" border="0" /></a>
17
18 <a href="kuote.php?function=update&subfunction=learning">
19 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-unselected.png" border="0"
/>
20 </a>
21
22 <a href="kuote.php?function=update&subfunction=question">
23 <img id="subTab-3" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-question-unselected.png" border="0"
/>
24 </a>
25
26 <dl>
27 <dt>Update A Course</dt>
28 <dd>
29 Your course has not been updated. Either you did not change any of the Course's information, or the attempt
to change it has failed. Please try again or contact your Kuote Administrator.
30 <br />
31 <br />
32 <br />
33 </dd>
34 </dl>
35 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.offer.learning.selectCourseOffering.template.php
4 * This template displays a form containg a pulldown listbox of course offerings
5 * the instructor has available.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/instructor.body.top.template.php"); ?>
14
15 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.offer.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
16
17 <a href="kuote.php?function=offer&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a>
18
19 <a href="kuote.php?function=offer&subfunction=learning">
20 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-selected.png" border="0" /
>
21 </a>
22
23 <dl>
24 <dt>Offer a Learning</dt>
25 <dd>
26 <script type="text/javascript">
27 //<![CDATA[
28 function validate_selectCourseOfferForm(frm) {
29 var value = '';
30 var errFlag = new Array();
31 var _qfGroups = {};
32 _qfMsg = '';
33
34 value = frm.elements['courseOffering'].selectedIndex == -1? '': frm.elements['courseOffering'].options[frm.
elements['courseOffering'].selectedIndex].value;
35
36 if (value == '' && !errFlag['courseOffering']) {
37 errFlag['courseOffering'] = true;
38 _qfMsg = _qfMsg + '\n - You have no Course Offerngs! Please create a Course Offering to add a Learning
Offering to.';
39 }
40
41 if (_qfMsg != '') {
42 _qfMsg = 'Invalid information entered.' + _qfMsg;
43 _qfMsg = _qfMsg + '\nPlease correct these fields.';
44 alert(_qfMsg);
45 return false;
46 }
47 return true;
48 }
49 //]]>
50 </script>
51
52 <form action="/kuote/kuote.php" method="post" name="selectCourseOfferForm" id="selectCourseOfferForm" onsubmit="
try { var myValidator = validate_selectCourseOfferForm; } catch(e) { return true; } return myValidator(this);">
53 <div>
54 <input name="function" type="hidden" value="offer" />
55 <input name="subfunction" type="hidden" value="learning" />
56 <table border="0">
57
58 <tr>
59 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="2"><b>
Select the Course Offering under which to Offer this Learning.</b></td>
60
61 </tr>
62 <tr>
63 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Select Course Offering:</b></td>
64 <td valign="top" align="left"><select name="courseOfferingId">
65 <?php foreach ( $courseOfferingsHash as $id => $title ) : ?>
66 <option value="<?=$id;?>"><?=$title;?></option>
67 <?php endforeach; ?>
68 </select></td>
69 </tr>
70 <tr>
71
72 <td align="right" valign="top"><b></b></td>
73 <td valign="top" align="left"><input value="Select" type="submit" /></td>
74 </tr>
75 <tr>
76 <td></td>
77 <td align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="font-size:80%
;"> denotes required field</span></td>
78 </tr>
79
80 </table>
81 </div>
82 </form>
83 <br /><br />
84 </dd>
85 </dl>
86 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.offer.learning.form.template.php
4 * This template displays a form for creating a new Learning Offering.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13
14 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.offer.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
15
16 <a href="kuote.php?function=offer&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a>
17
18 <a href="kuote.php?function=offer&subfunction=learning">
19 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-selected.png" border="0"
/>
20 </a>
21
22 <dl>
23 <dt>Offer a Learning</dt>
24 <dd>
25 <script type="text/javascript">
26 //<![CDATA[
27 function validate_offerLearningForm(frm) {
28 var value = '';
29 var errFlag = new Array();
30 var _qfGroups = {};
31 _qfMsg = '';
32
33 value = frm.elements['learningId'].selectedIndex == -1? '': frm.elements['learningId'].options[frm.elements['
learningId'].selectedIndex].value;
34
35 if (value == '' && !errFlag['learningId']) {
36 errFlag['learningId'] = true;
37 _qfMsg = _qfMsg + '\n - You have no Learnings to Offer for this Course Offering! Please create a Learning
for the Course you are trying to Offer.';
38 }
39
40 value = frm.elements['learningOfferTitle'].value;
41 if (value == '' && !errFlag['learningOfferTitle']) {
42 errFlag['learningOfferTitle'] = true;
43 _qfMsg = _qfMsg + '\n - Please enter a Title for this Offering.';
44 }
45
46 _qfGroups['learningOfferStart'] = {'learningOfferStart[d]': true, 'learningOfferStart[M]': true, '
learningOfferStart[Y]': true};
47 value = new Array();
48 var valueIdx = 0;
49 for (var i = 0; i < frm.elements.length; i++) {
50 var _element = frm.elements[i];
51 if (_element.name in _qfGroups['learningOfferStart']) {
52 switch (_element.type) {
53 case 'checkbox':
54 case 'radio':
55 if (_element.checked) {
56 value[valueIdx++] = _element.value;
57 }
58 break;
59 case 'select-one':
60 if (-1 != _element.selectedIndex) {
61 value[valueIdx++] = _element.options[_element.selectedIndex].value;
62 }
63 break;
64 case 'select-multiple':
65 var tmpVal = new Array();
66 var tmpIdx = 0;
67 for (var j = 0; j < _element.options.length; j++) {
68 if (_element.options[j].selected) {
69 tmpVal[tmpIdx++] = _element.options[j].value;
70 }
71 }
72 if (tmpIdx > 0) {
73 value[valueIdx++] = tmpVal;
74 }
75 break;
76 default:
77 value[valueIdx++] = _element.value;
78 }
79 }
80 }
81
82 if (value == '' && !errFlag['learningOfferStart']) {
83 errFlag['learningOfferStart'] = true;
84 _qfMsg = _qfMsg + '\n - Please choose a Start Date for your Course Offering.';
85 }
86
87 _qfGroups['learningOfferEnd'] = {'learningOfferEnd[d]': true, 'learningOfferEnd[M]': true, 'learningOfferEnd[
Y]': true};
88 value = new Array();
89 var valueIdx = 0;
90 for (var i = 0; i < frm.elements.length; i++) {
91 var _element = frm.elements[i];
92 if (_element.name in _qfGroups['learningOfferEnd']) {
93 switch (_element.type) {
94 case 'checkbox':
95 case 'radio':
96 if (_element.checked) {
97 value[valueIdx++] = _element.value;
98 }
99 break;
100 case 'select-one':
101 if (-1 != _element.selectedIndex) {
102 value[valueIdx++] = _element.options[_element.selectedIndex].value;
103 }
104 break;
105 case 'select-multiple':
106 var tmpVal = new Array();
107 var tmpIdx = 0;
108 for (var j = 0; j < _element.options.length; j++) {
109 if (_element.options[j].selected) {
110 tmpVal[tmpIdx++] = _element.options[j].value;
111 }
112 }
113 if (tmpIdx > 0) {
114 value[valueIdx++] = tmpVal;
115 }
116 break;
117 default:
118 value[valueIdx++] = _element.value;
119 }
120 }
121 }
122
123 if (value == '' && !errFlag['learningOfferEnd']) {
124 errFlag['learningOfferEnd'] = true;
125 _qfMsg = _qfMsg + '\n - Please choose an End Date for your Course Offering.';
126 }
127
128 if (_qfMsg != '') {
129 _qfMsg = 'Invalid information entered.' + _qfMsg;
130 _qfMsg = _qfMsg + '\nPlease correct these fields.';
131 alert(_qfMsg);
132 return false;
133 }
134 return true;
135 }
136 //]]>
137 </script>
138
139 <form action="<?=$_SERVER['PHP_SELF'];?>" method="post" name="offerLearningForm" id="offerLearningForm"
onsubmit="try { var myValidator = validate_offerLearningForm; } catch(e) { return true; } return myValidator(
this);">
140 <div>
141 <input name="function" type="hidden" value="offer" />
142 <input name="subfunction" type="hidden" value="learning" />
143 <input name="offerSubmitted" type="hidden" value="1" />
144 <input name="courseOfferingId" type="hidden" value="<?=$courseOfferingId;?>" />
145 <table border="0">
146
147 <tr>
148
149 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="2"><b>
Create New Learning Offering</b></td>
150 </tr>
151 <tr>
152 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Select Learning:</b></td>
153 <td valign="top" align="left"><select name="learningId">
154 <?php foreach ( $learningsHash as $id => $title ) : ?>
155 <option value="<?=$id;?>">
156 <?=$title;?>
157 </option>
158 <?php endforeach; ?>
159 </select></td>
160
161 </tr>
162 <tr>
163 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Learning Offering Title:</b></
td>
164 <td valign="top" align="left"><input size="50" maxlength="255" name="learningOfferTitle" type="text" />
</td>
165 </tr>
166 <tr>
167 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Start Date:</b></td>
168
169 <td valign="top" align="left"><select name="learningOfferStart[d]">
170 <option value="1">01</option>
171 <option value="2">02</option>
172 <option value="3">03</option>
173 <option value="4">04</option>
174 <option value="5">05</option>
175
176 <option value="6">06</option>
177 <option value="7">07</option>
178 <option value="8">08</option>
179 <option value="9">09</option>
180 <option value="10">10</option>
181 <option value="11">11</option>
182
183 <option value="12">12</option>
184 <option value="13">13</option>
185 <option value="14">14</option>
186 <option value="15">15</option>
187 <option value="16">16</option>
188 <option value="17">17</option>
189
190 <option value="18">18</option>
191 <option value="19">19</option>
192 <option value="20">20</option>
193 <option value="21">21</option>
194 <option value="22">22</option>
195 <option value="23">23</option>
196
197 <option value="24">24</option>
198 <option value="25">25</option>
199 <option value="26">26</option>
200 <option value="27">27</option>
201 <option value="28">28</option>
202 <option value="29">29</option>
203
204 <option value="30">30</option>
205 <option value="31">31</option>
206 </select><select name="learningOfferStart[M]">
207 <option value="1">Jan</option>
208 <option value="2">Feb</option>
209 <option value="3">Mar</option>
210 <option value="4">Apr</option>
211
212 <option value="5">May</option>
213 <option value="6">Jun</option>
214 <option value="7">Jul</option>
215 <option value="8">Aug</option>
216 <option value="9">Sep</option>
217 <option value="10">Oct</option>
218
219 <option value="11">Nov</option>
220 <option value="12">Dec</option>
221 </select><select name="learningOfferStart[Y]">
222 <?php $year = date('Y'); ?>
223 <?php for ($i = $year; $i <= $year + 10; $i++) : ?>
224 <option value="<?=$i;?>"><?=$i;?></option>
225 <?php endfor; ?>
226 </select></td>
227 </tr>
228 <tr>
229 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>End Date:</b></td>
230 <td valign="top" align="left"><select name="learningOfferEnd[d]">
231 <option value="1">01</option>
232 <option value="2">02</option>
233
234 <option value="3">03</option>
235 <option value="4">04</option>
236 <option value="5">05</option>
237 <option value="6">06</option>
238 <option value="7">07</option>
239 <option value="8">08</option>
240
241 <option value="9">09</option>
242 <option value="10">10</option>
243 <option value="11">11</option>
244 <option value="12">12</option>
245 <option value="13">13</option>
246 <option value="14">14</option>
247
248 <option value="15">15</option>
249 <option value="16">16</option>
250 <option value="17">17</option>
251 <option value="18">18</option>
252 <option value="19">19</option>
253 <option value="20">20</option>
254
255 <option value="21">21</option>
256 <option value="22">22</option>
257 <option value="23">23</option>
258 <option value="24">24</option>
259 <option value="25">25</option>
260 <option value="26">26</option>
261
262 <option value="27">27</option>
263 <option value="28">28</option>
264 <option value="29">29</option>
265 <option value="30">30</option>
266 <option value="31">31</option>
267 </select><select name="learningOfferEnd[M]">
268 <option value="1">Jan</option>
269
270 <option value="2">Feb</option>
271 <option value="3">Mar</option>
272 <option value="4">Apr</option>
273 <option value="5">May</option>
274 <option value="6">Jun</option>
275 <option value="7">Jul</option>
276
277 <option value="8">Aug</option>
278 <option value="9">Sep</option>
279 <option value="10">Oct</option>
280 <option value="11">Nov</option>
281 <option value="12">Dec</option>
282 </select><select name="learningOfferEnd[Y]">
283 <?php $year = date('Y'); ?>
284 <?php for ($i = $year; $i <= $year + 10; $i++) : ?>
285 <option value="<?=$i;?>"><?=$i;?></option>
286 <?php endfor; ?>
287 </select></td>
288 </tr>
289 <tr>
290 <td align="right" valign="top"><b></b></td>
291 <td valign="top" align="left"><input value="Send" type="submit" /></td>
292
293 </tr>
294 <tr>
295 <td></td>
296 <td align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="font-size:
80%;"> denotes required field</span></td>
297 </tr>
298 </table>
299 </div>
300 </form>
301 <br /><br />
302 </dd>
303 </dl>
304 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.offer.learning.success.template.php
4 * This template is displayed if a new learning has been successfully created.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13
14 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.offer.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
15
16 <a href="kuote.php?function=offer&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-unselected.png" border="0" /></a>
17
18 <a href="kuote.php?function=offer&subfunction=learning">
19 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-selected.png" border="0" /
>
20 </a>
21
22 <dl>
23 <dt>Offer a Learning</dt>
24 <dd>
25 You're Learning Has Been Offered Successfully.
26 <br /><br /><br /><br /><br />
27 </dd>
28 </dl>
29 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.offer.course.success.template.php
4 * This template is displayed if a new course offering has been successfully created.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13
14 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.offer.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
15
16 <a href="kuote.php?function=offer&amp;subfunction=course"><img id="subTab-1" src="<?=SITEROOT?>templates/<?=
$templates?>/images/subTab-course-selected.png" border="0" /></a>
17
18 <a href="kuote.php?function=offer&subfunction=learning">
19 <img id="subTab-2" src="<?=SITEROOT?>templates/<?=$templates?>/images/subTab-learning-unselected.png" border="0"
/>
20 </a>
21
22 <dl>
23 <dt>Offer a Course</dt>
24 <dd>
25 You're Course Has Been Offered Successfully. If you would like to offer learnings under this Course
Offering, click the tab 'learnings' to your left.
26 <br /><br />
27 </dd>
28 </dl>
29 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.testdrive.selectCourse.template.php
4 * This template displays a pulldown menu of courses available to testdrive.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13
14 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.testdrive.png" width="
955" height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
15
16 <dl>
17 <dt>Test Drive: Select a Course</dt>
18 <dd>
19
20 <form action="<?=$_SERVER['PHP_SELF']?>" method="post" name="selectCourseForm" id="selectCourseForm">
21 <div>
22 <input name="function" type="hidden" value="testdrive" />
23 <input name="subfunction" type="hidden" value="learning" />
24 <input name="courseSelected" type="hidden" id="courseSelected" value="true"/>
25 <table border="0">
26
27 <tr>
28 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="2"><b>
Select A Course</b></td>
29 </tr>
30 <tr>
31 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Select Course:</b></td>
32 <td valign="top" align="left">
33 <select name="crsId">
34 <?php foreach ($courseList as $id => $title) { ?>
35 <option value="<?=$id?>"><?=$title?></option>
36 <?php } ?>
37 </select>
38 </td>
39 </tr>
40 <tr>
41 <td align="right" valign="top"><b>
42 </b></td>
43 <td valign="top" align="left"><input value="Select" type="submit" /></td>
44 </tr>
45 <tr>
46 <td></td>
47
48 <td align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="font-size:80%
;"> denotes required field</span></td>
49 </tr>
50 </table>
51 </div>
52 </form> <br /><br />
53 </dd>
54 </dl>
55
56 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.testdrive.selectLearning.template.php
4 * This template displays a form containing a pulldown menu of learnings available to testdrive.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/instructor.body.top.template.php"); ?>
13
14 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.testdrive.png" width="
955" height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
15
16 <dl>
17 <dt>Test Drive: Select a Learning</dt>
18 <dd>
19 <form action="<?=$_SERVER['PHP_SELF']?>" method="post" name="selectLearningForm" id="selectLearningForm" >
20 <div>
21
22 <input name="function" type="hidden" value="testdrive" />
23 <input name="subfunction" type="hidden" value="learning" />
24 <input name="courseSelected" type="hidden" id="courseSelected" value="true"/>
25 <input name="learningSelected" type="hidden" id="learningSelected" value="true"/>
26
27 <table border="0">
28
29 <tr>
30 <td style="white-space: nowrap; background-color: #CCCCCC;" align="left" valign="top" colspan="2"><b>
Select A Learning.</b></td>
31 </tr>
32 <tr>
33 <td align="right" valign="top"><span style="color: #ff0000">*</span><b>Select Learning:</b></td>
34
35 <td valign="top" align="left"><select name="learningId">
36 <?php foreach ($learningList as $id => $title) { ?>
37 <option value="<?=$id?>"><?=$title?></option>
38 <?php } ?>
39 </select></td>
40 </tr>
41 <tr>
42 <td align="right" valign="top"><b></b></td>
43
44 <td valign="top" align="left"><input value="Select" type="submit" /></td>
45 </tr>
46 <tr>
47 <td></td>
48 <td align="left" valign="top"><span style="font-size:80%; color:#ff0000;">*</span><span style="font-size:80%
;"> denotes required field</span></td>
49 </tr>
50 </table>
51 </div>
52
53 </form> <br /><br />
54 </dd>
55 </dl>
56
57 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.testdrive.showTutorialAndQuizLinks.template.php
4 * This template displays the links to a learning's tutorial file and quiz for an instructor
5 * to try out.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/instructor.body.top.template.php"); ?>
14
15 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.testdrive.png" width="
955" height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
16
17 <dl>
18 <dt><?=$learning->getTitle()?></dt>
19 <dd>
20 <br />
21 <?php if ( $learning->hasTutorial() ): ?>
22 <a target="_blank" href="<?=LEARNINGS_ROOT . $learning->getCourseId()
23 . '/' . $learning->getId() . '/'
24 . $learning->getTutorialFileName();?>">
25 View The Tutorial for: <?=$learning->getTitle()?></a>
26 <?php endif; ?>
27
28 <br /><br />
29
30 <form action="<?=$_SERVER['PHP_SELF']?>" method="post">
31 <input name="function" type="hidden" value="testdrive" />
32 <input name="subfunction" type="hidden" value="quiz" />
33 <input name="learning" type="hidden" value="<?=form_object_encode($learning);?>" />
34 <input type="submit" value="Start Quiz" />
35 </form>
36
37 <br />
38 </dd>
39 </dl>
40
41
42
43 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.testdrive.displayQuestions.template.php
4 * This template is used for each question in a quiz. It displays all the available options
5 * as radio buttons and a submit button at the end.
6 * I believe that this template is no longer used, use universal.quiz.template.php instead.
7 * @package Kuote
8 * @subpackage Templates
9 * @author Kyle Hall
10 * @copyright 2006
11 */
12 ?>
13 <head>
14 </head>
15 <body>
16 <p>Question <?=$testDrive->getCurrentQuestionNumber();?>:
17 </p>
18 <p><?=$testDrive->getCurrentQuestionBody();?></p>
19
20 <form name="questionForm" method="post" action="<?=$_SERVER['PHP_SELF'];?>">
21 <input name="options" type="radio" value="1" id="radiobutton">
22 <label for="radiobutton"><?=$testDrive->getCurrentQuestionOption(1);?></label>
23 <br>
24
25 <input name="options" type="radio" value="2" id="radio">
26 <label for="radio"><?=$testDrive->getCurrentQuestionOption(2);?></label>
27 <br>
28
29 <?php if ($testDrive->isCurrentQuestionOption(3)) { ?>
30 <input name="options" type="radio" value="3" id="radio3">
31 <label for="radio3"><?=$testDrive->getCurrentQuestionOption(3);?></label>
32 <br>
33 <?php } ?>
34
35 <?php if ($testDrive->isCurrentQuestionOption(4)) { ?>
36 <input name="options" type="radio" value="4" id="radio4">
37 <label for="radio4"><?=$testDrive->getCurrentQuestionOption(4);?></label>
38 <br>
39 <?php } ?>
40
41 <?php if ($testDrive->isCurrentQuestionOption(5)) { ?>
42 <input name="options" type="radio" value="5" id="radio5">
43 <label for="radio5"><?=$testDrive->getCurrentQuestionOption(5);?></label>
44 <br>
45 <?php } ?>
46
47 <input name="testDrive" type="hidden" value="<?=base64_encode(serialize($testDrive));?>">
48 <input name="learning" type="hidden" value="<?=base64_encode(serialize($learning));?>">
49 <input name="quizBegun" type="hidden" value="true">
50 <input name="function" type="hidden" value="testdrive">
51 <input name="subfunction" type="hidden" value="runQuiz">
52
53 <input type="submit" name="Submit" value="Submit Answer">
54 </form>
55 </body>
1 <?php
2 /**
3 * instructor.testdrive.displayAnswers.template.php
4 * This template is displayed at the end of a quiz testdrive. It gives the number of
5 * questions answered correctly and displays each question with its correct answer, if
6 * it was answered incorrectly.
7 * This Template Is No Longer Used.
8 * @deprecated
9 * @package Kuote
10 * @subpackage Templates
11 * @author Kyle Hall
12 * @copyright 2006
13 */
14 ?>
15 <head>
16 </head>
17 <body>
18 <p>Question <?=$testDrive->getCurrentQuestionNumber();?>:
19 </p>
20 <p><?=$testDrive->getCurrentQuestionBody();?></p>
21
22 <form name="questionForm" method="post" action="<?=$_SERVER['PHP_SELF'];?>">
23 <input name="options" type="radio" value="1" id="radiobutton">
24 <label for="radiobutton"><?=$testDrive->getCurrentQuestionOption(1);?></label>
25 <br>
26
27 <input name="options" type="radio" value="2" id="radio">
28 <label for="radio"><?=$testDrive->getCurrentQuestionOption(2);?></label>
29 <br>
30
31 <?php if ($testDrive->isCurrentQuestionOption(3)) { ?>
32 <input name="options" type="radio" value="3" id="radio3">
33 <label for="radio3"><?=$testDrive->getCurrentQuestionOption(3);?></label>
34 <br>
35 <?php } ?>
36
37 <?php if ($testDrive->isCurrentQuestionOption(4)) { ?>
38 <input name="options" type="radio" value="4" id="radio4">
39 <label for="radio4"><?=$testDrive->getCurrentQuestionOption(4);?></label>
40 <br>
41 <?php } ?>
42
43 <?php if ($testDrive->isCurrentQuestionOption(5)) { ?>
44 <input name="options" type="radio" value="5" id="radio5">
45 <label for="radio5"><?=$testDrive->getCurrentQuestionOption(5);?></label>
46 <br>
47 <?php } ?>
48
49 <input name="testDrive" type="hidden" value="<?=base64_encode(serialize($testDrive));?>">
50 <input name="learning" type="hidden" value="<?=base64_encode(serialize($learning));?>">
51 <input name="quizBegun" type="hidden" value="true">
52 <input name="function" type="hidden" value="testdrive">
53 <input name="subfunction" type="hidden" value="runQuiz">
54
55 <input type="submit" name="Submit" value="Submit Answer">
56 </form>
57
58 </body>
1 <?php
2 /**
3 * instructor.testdrive.showTutorialAndQuizLinks.template.php
4 * This template displays the links to a learning's tutorial file and quiz for an instructor
5 * to try out.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/instructor.body.top.template.php"); ?>
14
15 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.grades.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
16
17 <dl>
18 <dt>View Grades</dt>
19 <dd>
20 <br />
21 <form action="<?=$_SERVER['PHP_SELF'];?>" method="post" name="getByForm">
22 <input name="function" type="hidden" value="grades" />
23 <input name="subfunction" type="hidden" value="view" />
24
25 <table width="0%" border="0" align="center">
26 <tr>
27 <td>View By:</td>
28 <td>&nbsp;</td>
29 <td>&nbsp;</td>
30 </tr>
31 <tr>
32 <td><select name="viewBy" size="5" disabled="disabled">
33 <option value="learning">Learning</option>
34 <option value="learningOffering" selected="selected">Learning Offering</option>
35 <option value="course">Course</option>
36 <option value="courseOffering">Course Offering</option>
37 <option value="student">Student</option>
38 </select>
39
40 <input name="viewBy" type="hidden" value="learningOffering" /> </td>
41 <td>&nbsp;</td>
42 <td><input name="Input" type="submit" /></td>
43 </tr>
44 </table>
45 </form>
46 <br /><br /><br />
47 </dd>
48 </dl>
49
50
51
52 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.testdrive.showTutorialAndQuizLinks.template.php
4 * This template displays the links to a learning's tutorial file and quiz for an instructor
5 * to try out.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/instructor.body.top.template.php"); ?>
14
15 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.grades.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
16
17 <dl>
18 <dt><?=$course->getTitle();?> : <?=$learning->getTitle();?> : <?=$learningOffering->getTitle();?> </dt>
19 <dd>
20 <br />
21 <table width="0%" border="0">
22 <tr>
23 <td>Class Average:</td>
24 <td><?=sprintf("%01.2f", $results->getAverage() * 100 );?>%</td>
25 </tr>
26 <tr>
27 <td>&nbsp;</td>
28 <td>&nbsp;</td>
29 </tr>
30 <tr>
31 <td>Student Id</td>
32 <td>Grade</td>
33 </tr>
34 <?php while ( $result = $results->fetch() ) : ?>
35 <tr>
36 <td><?=$result->getUserId();?></td>
37 <td><?=sprintf("%01.2f", $result->getCorrectQuestionsCount() / $result->getQuestionsCount() * 100 );
?>%</td>
38 </tr>
39 <?php endwhile; ?>
40 </table>
41 <br /><br /><br />
42 </dd>
43 </dl>
44
45
46
47 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.testdrive.showTutorialAndQuizLinks.template.php
4 * This template displays the links to a learning's tutorial file and quiz for an instructor
5 * to try out.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/instructor.body.top.template.php"); ?>
14
15 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.grades.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
16
17 <dl>
18 <dt>View by Learning Offering : Select Course</dt>
19 <dd>
20 <br />
21 <form action="<?=$_SERVER['PHP_SELF'];?>" method="post">
22 <input name="function" type="hidden" value="grades" />
23 <input name="subfunction" type="hidden" value="view" />
24 <input name="viewBy" type="hidden" value="learningOffering" />
25
26 <table width="0%" border="0" align="center">
27 <tr>
28 <td><?php include('snippet.pulldown.course.php'); ?></td>
29 <td>&nbsp;</td>
30 <td><input type="submit" /></td>
31 </tr>
32 </table>
33 </form>
34 <br /><br /><br />
35 </dd>
36 </dl>
37
38
39
40 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.testdrive.showTutorialAndQuizLinks.template.php
4 * This template displays the links to a learning's tutorial file and quiz for an instructor
5 * to try out.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/instructor.body.top.template.php"); ?>
14
15 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.grades.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
16
17 <dl>
18 <dt>View by Learning Offering : Select Learning</dt>
19 <dd>
20 <br />
21 <form action="<?=$_SERVER['PHP_SELF'];?>" method="post">
22 <input name="function" type="hidden" value="grades" />
23 <input name="subfunction" type="hidden" value="view" />
24 <input name="viewBy" type="hidden" value="learningOffering" />
25 <input name="courseId" type="hidden" value="<?=$courseId;?>" />
26 <input name="learningId" type="hidden" value="<?=$learningId;?>" />
27
28 <table width="0%" border="0" align="center">
29 <tr>
30 <td><?php include('snippet.pulldown.learningOffering.php'); ?></td>
31 <td>&nbsp;</td>
32 <td><input type="submit" /></td>
33 </tr>
34 </table>
35 </form>
36 <br /><br /><br />
37 </dd>
38 </dl>
39
40
41
42 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.testdrive.showTutorialAndQuizLinks.template.php
4 * This template displays the links to a learning's tutorial file and quiz for an instructor
5 * to try out.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/instructor.body.top.template.php"); ?>
14
15 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.grades.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
16
17 <dl>
18 <dt>View by Learning Offering : Select Learning</dt>
19 <dd>
20 <br />
21 <form action="<?=$_SERVER['PHP_SELF'];?>" method="post">
22 <input name="function" type="hidden" value="grades" />
23 <input name="subfunction" type="hidden" value="view" />
24 <input name="viewBy" type="hidden" value="learningOffering" />
25 <input name="courseId" type="hidden" value="<?=$courseId;?>" />
26
27 <table width="0%" border="0" align="center">
28 <tr>
29 <td><?php include('snippet.pulldown.learning.php'); ?></td>
30 <td>&nbsp;</td>
31 <td><input type="submit" /></td>
32 </tr>
33 </table>
34 </form>
35 <br /><br /><br />
36 </dd>
37 </dl>
38
39
40
41 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * instructor.generic.message.template.php
4 * This template is a simple an easy way to display a message to an instructor without creating
5 * a templated dedicated to displaying said message.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/instructor.body.top.template.php"); ?>
14
15 <img id="kuoteTabs" src="<?=SITEROOT?>templates/<?=$templates?>/images/instructor.tabs.create.png" width="955"
height="41" border="0" usemap="#kuoteTabsMap" id="kuoteTabs" />
16
17 <dl>
18 <dt><?=$title?></dt>
19 <dd>
20 <div><?=$message?></div>
21 </dd>
22 </dl>
23 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * student.enroll.displayOfferings.template.php
4 * This template displays a list of course offerings available for the student to enroll in.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/student.body.top.template.php"); ?>
13 <img id='kuoteTabs' src='<?=SITEROOT?>templates/<?=$templates?>/images/student.tabs.enroll.png' width='955'
height='41' border='0' usemap='#kuoteTabsMap' id='kuoteTabs' />
14 <dl>
15 <dt>Enroll</dt>
16 <dd>
17 <table width="100%" border="0">
18 <tr>
19 <th scope="col">Title</th>
20 <th scope="col">Description</th>
21 <th scope="col">Instructor</th>
22 <th scope="col"></th>
23 </tr>
24 <?php $i = 0; ?>
25 <?php foreach($courseOfferingData as $data): ?>
26 <tr class=<?="d".($i++ & 1)?>>
27 <td>
28 <?=$data['courseOffering']->getTitle()?>
29 </td>
30 <td>
31 <?=$data['course']->getDescription()?>
32 </td>
33 <td>
34 <?=$data['instructor']->getNameLastFirst()?>
35 </td>
36 <td><form action="<?=$_SERVER['PHP_SELF']?>" method="post" name="enrollForm" id="enrollForm">
37 <div align="left">
38 <input name="function" type="hidden" value="enroll" />
39 <input name="action" type="hidden" value="enroll" />
40 <input name="crsOfferId" type="hidden" value="<?=$data['courseOffering']->getId()?>" />
41 <input name="submit" type="submit" value="Enroll" />
42 </div>
43 </form>
44 </td>
45 </tr>
46 <?php endforeach; ?>
47 </table>
48 </dd>
49 </dl>
50 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * student.enroll.noAvailableOfferings.template.php
4 * This template is displayed if there are currently no course offerings available
5 * for the student to enroll in.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/student.body.top.template.php"); ?>
14 <img id='kuoteTabs' src='<?=SITEROOT?>templates/<?=$templates?>/images/student.tabs.enroll.png' width='955'
height='41' border='0' usemap='#kuoteTabsMap' id='kuoteTabs' />
15 <dl>
16 <dt>Enroll</dt>
17 <dd>
18 <div>There are no new Course Offerings for you to enroll in at this time.</div>
19 <br /><br /><br /><br />
20 </dd>
21 </dl>
22 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * student.enroll.getPassword.template.php
4 * This template is displayed to accept a password if the course offering the student
5 * attempted to enroll in is password protected.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/student.body.top.template.php"); ?>
14 <img id='kuoteTabs' src='<?=SITEROOT?>templates/<?=$templates?>/images/student.tabs.enroll.png' width='955'
height='41' border='0' usemap='#kuoteTabsMap' id='kuoteTabs' />
15 <dl>
16 <dt>Course Offering Enrollment: Enter Password</dt>
17 <dd>
18 <div>This Course Offering is Password Protected. Please Enter the correct Password to Enroll in this Course
Offering</div>
19 <br />
20 <form action="<?=$_SERVER['PHP_SELF']?>" method="post" name="courseOfferingPasswordForm"><input name="
crsOfferPassword" type="password" size="20" />
21 <input name="crsOfferId" type="hidden" value="<?=$courseOffering->getId()?>" />
22 <input name="function" type="hidden" value="enroll" />
23 <input name="subfunction" type="hidden" value="verifyPassword" />
24 <input name="" type="submit" value="Submit" />
25 </form>
26 <br />
27 </dd>
28 </dl>
29 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * student.learning.displayLearnings.template.php
4 * This template displays a list of learnings available for the student to take for each
5 * of his or her enrolled course offerings.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/student.body.top.template.php"); ?>
14 <img id='kuoteTabs' src='<?=SITEROOT?>templates/<?=$templates?>/images/student.tabs.learn.png' width='955'
height='41' border='0' usemap='#kuoteTabsMap' id='kuoteTabs' />
15
16 <dl>
17 <dt>Available Learnings</dt>
18 <dd>
19 <br />
20 <?php foreach($learningsData as $learning): ?>
21 <table width="100%" border="0">
22 <tr>
23 <th colspan="4" scope="col"><div align="left"><?=$learning['courseOffering']->getTitle()?></div></
th>
24 </tr>
25 <?php while( $thisLearningOffer = $learning['learningOfferingSet']->fetch() ): ?>
26 <tr>
27 <td>&nbsp;</td>
28 <td><?=$thisLearningOffer->getTitle()?></td>
29 <td>&nbsp;</td>
30 <td>
31 <form action="<?=$_SERVER['PHP_SELF']?>" method='post'>
32 <input name="learningOfferingId" type="hidden" value="<?=$thisLearningOffer->getId()?>"
/>
33 <input name="function" type="hidden" value="learn" />
34 <input name="action" type="hidden" value="processSelectedLearningOffering" />
35 <input name="Submit" type="submit" value="Learn!" />
36 </form>
37 </td>
38 </tr>
39 <?php endwhile; ?>
40 </table>
41
42 <?php endforeach; ?>
43 <br />
44 </dd>
45 </dl>
46
47
48
49 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * student.learn.showTutorialAndQuizLinks.template.php
4 * This template displays the links to the quiz and tutorial file for a given learning.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <?php include_once("includes/head.template.php"); ?>
12 <?php include_once("includes/student.body.top.template.php"); ?>
13 <img id='kuoteTabs' src='<?=SITEROOT?>templates/<?=$templates?>/images/student.tabs.learn.png' width='955'
height='41' border='0' usemap='#kuoteTabsMap' id='kuoteTabs' />
14
15 <dl>
16 <dt><?=$learning->getTitle()?></dt>
17 <dd>
18 <br />
19 <?php if ( $learning->hasTutorial() ): ?>
20 <a target="_blank" href="<?=LEARNINGS_ROOT . $learning->getCourseId()
21 . '/' . $learning->getId() . '/'
22 . $learning->getTutorialFileName();?>">
23 View The Tutorial for: <?=$learning->getTitle()?></a>
24 <?php endif; ?>
25
26 <br /><br />
27
28 <form action="<?=$_SERVER['PHP_SELF']?>" method="post">
29 <input name="function" type="hidden" value="quiz" />
30 <input name="learning" type="hidden" value="<?=form_object_encode($learning);?>" />
31 <input name="learningOffering" type="hidden" value="<?=form_object_encode( $learningOffering );?>" /
>
32 <input type="submit" value="Start Quiz" />
33 </form>
34
35 <br />
36 </dd>
37 </dl>
38
39
40
41 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * student.grades.selectCourseOffering.template.php
4 * This template displays a list of course offerings the student has enrolled it
5 * and allows the student to choose one so the the student may view the grades
6 * for the learning quizzes he or she has taken for that course offering.
7 * @package Kuote
8 * @subpackage Templates
9 * @author Kyle Hall
10 * @copyright 2006
11 */
12 ?>
13 <?php include_once("includes/head.template.php"); ?>
14 <?php include_once("includes/student.body.top.template.php"); ?>
15 <img id='kuoteTabs' src='<?=SITEROOT?>templates/<?=$templates?>/images/student.tabs.grades.png' width='955'
height='41' border='0' usemap='#kuoteTabsMap' id='kuoteTabs' />
16
17 <dl>
18 <dt>View Grades by Course Offering</dt>
19 <dd>
20 <br />
21 <?php foreach ( $courseOfferingsHash as $id => $title ) : ?>
22 <a href="<?=$_SERVER['PHP_SELF'];?>?function=grades&courseOfferingId=<?=$id;?>">
23 <?=$title;?>
24 </a>
25 <?php endforeach; ?>
26 <br />
27 </dd>
28 </dl>
29
30
31
32 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * student.grades.selectCourseOffering.template.php
4 * This template displays a list of course offerings the student has enrolled it
5 * and allows the student to choose one so the the student may view the grades
6 * for the learning quizzes he or she has taken for that course offering.
7 * @package Kuote
8 * @subpackage Templates
9 * @author Kyle Hall
10 * @copyright 2006
11 */
12 ?>
13 <?php include_once("includes/head.template.php"); ?>
14 <?php include_once("includes/student.body.top.template.php"); ?>
15 <img id='kuoteTabs' src='<?=SITEROOT?>templates/<?=$templates?>/images/student.tabs.grades.png' width='955'
height='41' border='0' usemap='#kuoteTabsMap' id='kuoteTabs' />
16
17 <dl>
18 <dt>Grades For <?=$courseOffering->getTitle();?></dt>
19 <dd>
20 <br />
21 <table width="0%" border="0" align="center">
22 <tr>
23 <th scope="col">Learning Title</th>
24 <th></th>
25 <th scope="col">Grade</th>
26 </tr>
27 <?php while ( $result = $resultSet->fetch() ) : ?>
28 <tr>
29 <td><?=$learningsByResult[ $result->getId() ]->getTitle();?></td>
30 <td></td>
31 <td><?=sprintf("%01.2f", $result->getCorrectQuestionsCount() / $result->getQuestionsCount() * 100 );
?>%</td>
32 </tr>
33 <?php endwhile; ?>
34 </table>
35 <br />
36 </dd>
37 </dl>
38
39
40
41 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * student.generic.message.template.php
4 * This template is used to display a simple message to the student without the need
5 * to created a template dedicated to displaying said message.
6 * @package Kuote
7 * @subpackage Templates
8 * @author Kyle Hall
9 * @copyright 2006
10 */
11 ?>
12 <?php include_once("includes/head.template.php"); ?>
13 <?php include_once("includes/student.body.top.template.php"); ?>
14 <img id='kuoteTabs' src='<?=SITEROOT?>templates/<?=$templates?>/images/student.tabs.enroll.png' width='955'
height='41' border='0' usemap='#kuoteTabsMap' id='kuoteTabs' />
15 <dl>
16 <dt><?=$title?></dt>
17 <dd>
18 <div><?=$message?></div>
19 </dd>
20 </dl>
21 <?php include_once("includes/body.tail.template.php"); ?>
1 <?php
2 /**
3 * universal.quiz.template.php
4 * This template is used for displaying and answering question for both instructors and students.
5 * @package Kuote
6 * @subpackage Templates
7 * @author Kyle Hall
8 * @copyright 2006
9 */
10 ?>
11 <head>
12 </head>
13 <body>
14 <p>Question <?=$quiz->getCurrentQuestionNumber();?>:
15 </p>
16 <p><?=$quiz->getCurrentQuestionBody();?></p>
17
18 <form name="questionForm" method="post" action="<?=$_SERVER['PHP_SELF'];?>">
19 <input name="options" type="radio" value="1" id="radiobutton">
20 <label for="radiobutton"><?=$quiz->getCurrentQuestionOption(1);?></label>
21 <br>
22
23 <input name="options" type="radio" value="2" id="radio">
24 <label for="radio"><?=$quiz->getCurrentQuestionOption(2);?></label>
25 <br>
26
27 <?php if ($quiz->isCurrentQuestionOption(3)) { ?>
28 <input name="options" type="radio" value="3" id="radio3">
29 <label for="radio3"><?=$quiz->getCurrentQuestionOption(3);?></label>
30 <br>
31 <?php } ?>
32
33 <?php if ($quiz->isCurrentQuestionOption(4)) { ?>
34 <input name="options" type="radio" value="4" id="radio4">
35 <label for="radio4"><?=$quiz->getCurrentQuestionOption(4);?></label>
36 <br>
37 <?php } ?>
38
39 <?php if ($quiz->isCurrentQuestionOption(5)) { ?>
40 <input name="options" type="radio" value="5" id="radio5">
41 <label for="radio5"><?=$quiz->getCurrentQuestionOption(5);?></label>
42 <br>
43 <?php } ?>
44
45 <input name="function" type="hidden" value="<?=$function;?>">
46 <?php if ( isset($subfunction) ): ?>
47 <input name="subfunction" type="hidden" value="<?=$subfunction;?>"
48 <?php endif; ?>
49
50 <input type="submit" name="Submit" value="Submit Answer">
51 </form>
52 </body>
1 <?php
2 /**
3 * universal.quiz.endOfQuiz.template.php
4 * This template is used for both the student quiz and the instructor testdrive to display
5 * the final tally of questions answered correctly, the question body, and the answer if
6 * the question was answered incorrectly.
7 * @package Kuote
8 * @subpackage Templates
9 * @author Kyle Hall
10 * @copyright 2006
11 */
12 ?>
13 <head>
14 </head>
15 <body>
16
17 <h1>Quiz Complete</h1>
18
19 <h2>Results for <?=$quiz->getTitle();?></h2>
20
21 <h3>You answered <?=$quiz->getQuestionsCorrectCount();?> of <?=$quiz->getQuestionsCount();?> correct.</h3>
22
23 <?php while( $result = $quiz->fetchResult() ): ?>
24 <h4><?=$result['question']->getBody();?></h4>
25 <h5>You answered:
26 <?=$result['question']->getOption( $result['questionAnswered']->getChoice() );?>
27 </h5>
28
29 <h5>You were <?=( $result['questionAnswered']->getIsCorrect() ) ? "Correct" : "Incorrect"; ?></h5>
30
31 <?php if ( ! $result['questionAnswered']->getIsCorrect() ): ?>
32 <h6>The correct answer was:
33 <strong>
34 <?=$result['question']->getOption( $result['question']->getAnswer() );?>
35 </strong>
36 </h6>
37 <?php endif; ?>
38
39 <?php endwhile; ?>
40
41 </body>
1 /*
2 This CSS document defines all the css controlled elements for this template set.
3 */
4 #enrollElement{
5 align: left;
6 }
7
8 #kuoteHeader{
9 z-index: 2;
10 left: 0px;
11 top: 0px;
12 position: absolute;
13 }
14
15 #kuoteTabs{
16 z-index: 2;
17 left: 0px;
18 top: 84px;
19 position: absolute;
20 }
21
22 #kuoteBody{
23 z-index: 2;
24 color: #FFFFFF;
25 background-color: #FFFFFF;
26 position: absolute;
27 top: 150px;
28 left: 100px;
29 }
30
31 #kuoteHeaderBackgroundBox{
32 background-color: #990000;
33 height: 125px;
34 width: 100%;
35 position: absolute;
36 z-index: 0;
37 left: 0px;
38 top: 0px;
39 }
40
41 #kuoteLoggedInAs{
42 }
43
44 #kuoteHelpButton{
45 top: 50px;
46 right: 50px;
47 position: absolute;
48 z-index: 3;
49 }
50
51 #kuoteLogoutButton{
52 top: 50px;
53 right: 5px;
54 position: absolute;
55 z-index: 3;
56 }
57
58 #subTab-1 {
59 z-index: 1;
60 position: absolute;
61 top: 175px;
62 left: 10px;
63 }
64
65 #subTab-2 {
66 z-index: 1;
67 position: absolute;
68 top: 235px;
69 left: 10px;
70 }
71
72 #subTab-3 {
73 z-index: 1;
74 position: absolute;
75 top: 295px;
76 left: 10px;
77 }
78
79 #subTab-4 {
80 z-index: 1;
81 position: absolute;
82 top: 355px;
83 left: 10px;
84 }
85
86 #subTab-5 {
87 z-index: 1;
88 position: absolute;
89 top: 415px;
90 left: 10px;
91 }
92
93 dl { /* block position that can be changed at will */
94 position: absolute;
95 left: 125px;
96 top: 150px;
97 width: 872px; /* width of block according to your background image */
98 }
99
100 dl, dt, dd { /* suppression of all margins and paddings */
101 margin: 0;
102 padding: 0;
103 }
104
105 dl { /* by default background on the entire block */
106 background: url(images/bodyTable_bottom.gif) bottom left no-repeat;
107 padding-bottom: 40px; /* so that text will not appear on the bottom rounded edge */
108 }
109
110 dt { /* bloc title definition */
111 height: 40px;
112 background: url(images/bodyTable_top.gif) top left no-repeat;
113 font-size: 1.3em;
114 font-weight: bold;
115 text-align: center;
116 }
117
118 dd {
119 padding: 0 20px 0 10px; /* internal block spaces administration */
120 /*text-align: justify;*/
121 background: url(images/bodyTable_middle.gif) top left repeat-y; /* internal background */
122 }
123
124 /* Sets the alignment for all table rows*/
125 tr {
126 text-align: left;
127 vertical-align: baseline;
128 }
129
130 /* These two declarations conrol the colors of alternating table rows*/
131 tr.d0 td {
132 background-color: #999999; color: black;
133 }
134 tr.d1 td {
135 background-color: #CCCCCC; color: black;
136 }
137
138 /* Default DOM Tooltip Style */
139 div.domTT {
140 border: 1px solid #333333;
141 background-color: #333333;
142 }
143 div.domTT .caption {
144 font-family: serif;
145 font-size: 12px;
146 font-weight: bold;
147 padding: 1px 2px;
148 color: #FFFFFF;
149 }
150 div.domTT .contents {
151 font-size: 12px;
152 font-family: sans-serif;
153 padding: 3px 2px;
154 background-color: #F1F1FF;
155 }
156
157 /* Classic Style */
158 div.domTTClassic {
159 border: 1px solid black;
160 background-color: InfoBackground;
161 }
162 div.domTTClassic .caption {
163 font-family: serif;
164 font-size: 13px;
165 _font-size: 12px;
166 font-weight: bold;
167 font-style: italic;
168 padding: 1px 2px;
169 }
170 div.domTTClassic .contents {
171 color: InfoText;
172 font-size: 13px;
173 _font-size: 12px;
174 font-family: Arial, sans-serif;
175 padding: 1px 2px;
176 _padding-bottom: 0;
177 }
178
179 /* Win9x Style */
180 div.domTTWin {
181 border: 2px outset #BFBFBF;
182 background-color: #808080
183 }
184 div.domTTWin .caption {
185 border: 0px solid #BFBFBF;
186 border-width: 1px 1px 0px 1px;
187 background-color: #00007F;
188 padding: 2px;
189 font-size: 12px;
190 font-weight: bold;
191 font-family: sans-serif;
192 color: white;
193 }
194 div.domTTWin .contents {
195 border: 1px solid #BFBFBF;
196 }
197
198 /* Overlib Style */
199 div.domTTOverlib {
200 border: 1px solid #333366;
201 background-color: #333366;
202 }
203 div.domTTOverlib .caption {
204 font-family: Verdana, Helvetica;
205 font-size: 10px;
206 font-weight: bold;
207 color: #FFFFFF;
208 }
209 div.domTTOverlib .contents {
210 font-size: 10px;
211 font-family: Verdana, Helvetica;
212 padding: 2px;
213 background-color: #F1F1FF;
214 }
215
216 /* Nicetitle Style */
217 div.niceTitle
218 {
219 background-color: #333333;
220 color: #FFFFFF;
221 font-weight: bold;
222 font-size: 13px;
223 font-family: "Trebuchet MS", sans-serif;
224 width: 250px;
225 left: 0;
226 top: 0;
227 padding: 4px;
228 position: absolute;
229 text-align: left;
230 z-index: 20;
231 -moz-border-radius: 0 10px 10px 10px;
232 filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87);
233 -moz-opacity: .87;
234 -khtml-opacity: .87;
235 opacity: .87;
236 }
237 div.niceTitle .contents
238 {
239 margin: 0;
240 padding: 0 3px;
241 filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);
242 -moz-opacity: 1;
243 -khtml-opacity: 1;
244 opacity: 1;
245 }
246 div.niceTitle p
247 {
248 color: #D17E62;
249 font-size: 9px;
250 padding: 3px 0 0 0;
251 margin: 0;
252 text-align: left;
253 -moz-opacity: 1;
254 }
255
256 /* Context Menu Style */
257 div.domTTMenu {
258 width: 150px;
259 border: 2px outset #E6E6E6;
260 }
261 div.domTTMenu .caption {
262 font-size: 12px;
263 font-family: sans-serif;
264 background-color: #E6E6E6;
265 }
266 div.domTTMenu .contents {
267 padding: 1px 0;
268 background-color: #E6E6E6;
269 }

Вам также может понравиться