Академический Документы
Профессиональный Документы
Культура Документы
DRLO - Marifah
Digital Repository for Learning Objects
To the
Graduation Project Committee
Submitted by
Name ID#
Najla Alturaiki 424202408
Rana Qahtani 424201836
Sara Alkhudhair 424200339
Roaa Alsulaiman 424200928
Jawaher Alabdulkareem 424202685
Dhoha Almazroa 424200026
Supervised by:
Dr. Hend Al-Khalifa
ABSTRACT ................................................................................................................. 5
1. Introduction ............................................................................................................. 6
2. Background.............................................................................................................. 8
3. Literature Review.................................................................................................. 10
3.1. World-wide Learning Object Repositories:................................................. 10
3.1.1. MERLOT (Multimedia Educational Resource for Learning and
Online Teaching):.............................................................................................. 10
3.1.2. ARIADNE ................................................................................................ 10
3.1.3. ALI (Apple learning interchange) ......................................................... 10
3.1.4. LOLA EXCHANGE (Learning Objects, Learning Activities) ........... 11
3.1.5. Intute ........................................................................................................ 11
3.1.6. Wisc-online............................................................................................... 11
3.1.7. Connexions............................................................................................... 11
3.1.8. EducaNext ................................................................................................ 11
3.1.9. DELOR (Distributed Egyptian Learning Object Repository)............ 12
3.2. General Purpose Open Source (OS) Digital Repositories: ......................... 16
3.2.1. DSpace:..................................................................................................... 16
3.2.2. Fedora....................................................................................................... 17
3.2.3.CDSware (CERN Document Server Software) ..................................... 18
3.2.4. EPrints...................................................................................................... 19
4. Problem Definition ................................................................................................ 23
5. Metadata ................................................................................................................ 23
6. Objectives............................................................................................................... 26
7. Functional specifications ...................................................................................... 28
8. Recommender Systems ......................................................................................... 30
8.1. Introduction .................................................................................................... 30
8.2. RECOMMENDER SYSTEMS .................................................................... 31
8.2.1. memory- based collaborative filtering technique:................................... 32
8.2.2. model- based collaborative filtering technique: ...................................... 34
8.3. Our Approach................................................................................................. 36
8.3.1. LO Similarity Computation:..................................................................... 38
8.3.2. Prediction Computation:........................................................................... 38
8.3.3. Recommendation Generation: ................................................................. 38
9. System Analysis ..................................................................................................... 39
9.1. USE CASE DIAGRAM: ................................................................................ 39
9.2. Conceptual Model: ......................................................................................... 40
9.3. Use Case,SSD,Contract,Collaboration Diagrams ....................................... 41
9.4. Class Diagram: ............................................................................................... 74
9.5. ER Diagram:................................................................................................... 75
................................................................................................................................. 75
9.6. Data Base Schema: ......................................................................................... 76
9.7. Data Base Dictionary ..................................................................................... 77
10. Implementation.................................................................................................... 84
10.1 Registration.................................................................................................... 85
10.2 Login........................................................................................................... 86
10.3 User's Home Page.......................................................................................... 87
10.4 Recommender System................................................................................... 87
1
10.5 Browse ............................................................................................................ 87
10.6 View Learning Object................................................................................... 88
10.7 Tell a Friend................................................................................................... 90
10.8 Sort Learning Objects................................................................................... 90
10.9 Search ............................................................................................................. 90
10.9.1 Simple Search ......................................................................................... 90
10.9.2 Advanced Search .................................................................................... 91
10.10 Contribute a Learning Object.................................................................... 91
10.11 What is New ................................................................................................. 93
10.12 RSS................................................................................................................ 94
10.13 Average Rate................................................................................................ 94
10.14 Number Of Votes......................................................................................... 95
10.15 My Personal Collections ............................................................................. 95
10.15.1 Create a Personal Collection ............................................................... 96
10.15.2 Delete a Personal Collection ................................................................ 96
10.15.3 Rename a Personal Collection............................................................. 96
10.15.4 Add to Personal Collection .................................................................. 96
10.15.5 Delete a Personal Collection ................................................................ 96
10.16 Add Comment.............................................................................................. 97
10.17 Rating ........................................................................................................... 97
10.18 Report Back ................................................................................................. 98
10.19 Contatct Us............................................................................... 98
10.20 Password Recovery .................................................... 99
10. 21 Change Password ..................................................................................... 100
10.22 Update User's Profile ................................................................................ 100
10.23 Update .......................................................................................... 102
10.24 Download.................................................................................. 102
10.25 Number Of Downloads ...................................... 103
10.26 Number of Views.......................................................... 103
10.27 Number of Comments ......................................... 103
10.28 Users Report ...................................................................... 103
10.29 Learning Objects Report ............................... 104
10.30 Count LO report........................................................... 104
10.31 Admin Pages ........................................................................ 105
10.31.1 View Accounts Pages..................................... 106
10.31.2 Edit User Information Page .............. 107
10.31.3 Online Users Page............................................... 107
10.31.4 Filter Users By Roles Page................................................................. 108
10.31.4 Create User Page.................................................. 108
10.31.5 Manage Roles Page........................................... 109
10.31.6 Edit Main Categories Page ................. 109
10.31.7 Edit Sub Categories Page ...................... 110
10.31.8 Main categories page..................................... 110
10.31.9 Add New Main Category........................ 111
10.31.10 Add New Sub Category............................. 111
10.31.11 View learning object page..................... 112
10.31.12 Edit Learning Objects Page .............. 112
4.31.13 View comments page.......................................................................... 113
10.31.14 Unapproved Comments page .......................................................... 113
10.31.15 View Report Back Page ................................................................... 114
2
10.31.16 Send message to mailing list page ................................................... 114
1. 11. Testing......................................................................................... 115
11.1 Purpose .......................................................................................... 115
11.2 Scope ................................................................................................. 115
Testing Procedure...................................................................................................... 115
11.3 The Testers................................................................................ 115
Dhoha A. Almazroa............................................................. 115
Roa’a M. Alsulaiman ........................................................ 115
11.4 The procedure....................................................................... 115
Test Cases.............................................................................................................. 117
12.Bugging and Debugging..................................................................................... 146
12.1 Bugging......................................................................................................... 146
12.2 Debugging .................................................................................................... 146
13. Conclusion.......................................................................................................... 150
14. Future Work ...................................................................................................... 151
15. References .......................................................................................................... 152
16. Appendices ......................................................................................................... 154
16.1 TrackBack: .................................................................................................. 154
16.2 RSS................................................................................................................ 156
16.3 Federated Search......................................................................................... 157
16.4 Issues with Dspace....................................................................................... 163
16.5 Source Codes................................................................................................ 164
Table of Illustrations
Table of Figures
Figure 1.1: A Survey conducted and published by Open DOAR ………… ….7
Figure 8.1: The user-based collaborative filtering process……………………… ..32
Figure 8.2: Isolation of the co-rated items and similarity computation……………35
Figure 10.1: Registration Form................................................................................ 85
Figure 10.2:Validation of registration ..................................................................... 86
Figure 10.3: Login Form.......................................................................................... 86
Figure 10.4:User's home page.................................................................................. 87
Figure 10.5:Browse :.................................................................................................88
Figure 10.6:Browse sub category............................................................................. 88
Figure 10.7:View learning object............................................................................. 89
Figure 10.8:Tell a friend form.................................................................................. 90
Figure 10.9: Advanced Search................................................................................. 91
Figure 10.10:Upload form.................... ................................................................... 92
Figure 10.11: Upload help........................................................................................ 92
Figure 10.12:What is new......................................................................................... 93
Figure 10.13:RSS :.....................................................................................................93
Figure 10.14: My Personal collections..................................................................... 94
Figure 10.15:Add comment ..................................................................................... 95
Figure 10.16:Rating.................................................................................................. 97
Figure 10.17: Contact us........................................................................................... 97
Figure 10.18: Password recovery ............................................................................. 98
3
Figure 10.19: Change password................................................................................ 99
Figure 10.20:Location of user profile in .................................................................. 100
Figure 10.21:Update user's profile form:...................................................................101
Figure 10.22:Update learning object......................................................................... 101
Figure 10.23:Download window............................................................................... 102
Figure 10.24:Users report......................................................................................... 103
Figure 10.25: LO report............................................................................................ 104
Figure 10.26:Count LO page.................... ................................................................ 104
Figure 10.27: Admin page......................................................................................... 105
Figure 10.28:View accounts administration............................................................. 106
Figure 10.29:Edit user information........................................................................... 107
Figure 10.30: Online users........................................................................................ 107
Figure 10.31:Filter users by role .............................................................................. 108
Figure 10.32:Create a new user............................ ................................................... 108
Figure 10.33:Manage Roles...................................................................................... 109
Figure 10.34:Edit main categories page.................................................................... 109
Figure 10.35:Sub categories administration ...................................... ...................... 110
Figure 10.36: Categories administration................................................................... 110
Figure 10.37:Add new category................... ........................................................... 111
Figure 10.38: Add new sub category........................................................................ 111
Figure 10.39:LO administration..................................... ......................................... 112
Figure 10.40:Edit LO :..............................................................................................112
Figure 10.41: Comments Administration................................................................. 113
Figure 10.42:Unapproved comments ...................................................................... 113
Figure 10.43: Report back Administration............................................................... 114
Figure 10.44: Report back page............................................................................... 114
Table of tables
4
ABSTRACT
learning units or what is usually called as learning objects that are stored in digital
repositories with their kind of catalog entries or what it usually known as metadata of
learning objects.
In our project we propose a design for a digital repository that is dedicated for storing
Arabic learning objects. This is because there is a lack of digital repositories that offer
Arabic learning objects .The final design was reached through reviewing the current
In this documentation we will present the concept of learning objects and digital
repositories. Then we will discuss the objectives of our project, a review of the
literature, steps of system analysis and finally the proposed design of the learning
object repository.
5
1. Introduction
In recent years, the concept of learning object has been widely used and
digital, reusable piece of content that can be used to accomplish a learning objective.
That means that a learning object could be a text document, a movie, an mp3, a
Due to the large increase in the number of learning objects on the Internet, the need
for digital repositories that host them has appeared, and many of these digital
repositories have emerged to provide teachers and learners with digital learning
resources.
to store, manage, search, retrieve and deliver digital resources that are used to perform
reuse them.
As other communities, Arabs have their own learning objects. They share
knowledge with each other in different formats and using different kinds of websites.
knowledge could be published as a post in a forum. Despite the fact that Arabic
learning objects are widely available on the Internet, they are not kept in a centralized
digital repository which makes them difficult to be found and managed. According to
a survey conducted and published by “Open DOAR” website, there were no Arabic
digital repositories found among the Digital Learning Object Repository (DLOR) that
6
exists on the web. For this reason, our project will focus on developing a DLOR to
7
2. Background
researchers. An educated society has learning implication on its members since they
have to have the required knowledge to shape their lives. This projects aims to help in
clarifies the need for a digital learning repository where searchable and reliable
resources are stored. A digital repository can hold a wide range of materials for a
variety of purposes and users. It can support research, learning, and administrative
processes.
In the learning environment, academic staff and students need to store and
retain their intellectual assets. They also need to make their work available and visible
to others, while managing their digital rights and maintaining the integrity of their
work.
which they are stored in digital repositories. Learning objects, as defined by IEEE's
content, learning objectives, instructional software and software tools, persons and
organizations.
as data that describe learning objects in different aspects for the purpose of their
and software to utilize the learning object, the level of the learning objects;
8
(Elementary, Secondary, or High Education), type of object, author, owner, terms of
9
3. Literature Review
Since we determine to build our learning object repository, it was the time to
examine the available repositories to find out the features provided, and to decide
what functionality and features must be included in our system. The second step was
to determine which Open Source general purpose digital repositories we will be re-
Teaching):
3.1.2. ARIADNE
A European Association opened to the World, for Knowledge Sharing and Reuse.
repositories.
The Apple Learning interchange (ALI) is a social network for educators. Has a wealth
of content ranging from simple lesson ideas to in-depth curriculum units for K-12
10
3.1.4. LOLA EXCHANGE (Learning Objects, Learning Activities)
3.1.5. Intute
Intute is a free online service providing you with access to the very best Web
3.1.6. Wisc-online
(WTCS).
3.1.7. Connexions
A place to view and share educational material made of small knowledge chunks
3.1.8. EducaNext
EducaNext is a service supporting the creation and sharing of knowledge for Higher
11
3.1.9. DELOR (Distributed Egyptian Learning Object Repository)
• Since 2005
12
Table 3.1: Comparison between the examined repositories.
13
14
15
3.2. General Purpose Open Source (OS) Digital Repositories:
3.2.1. DSpace:
• Features:
o BSD license
o Import/export capabilities.
o Stackable Authentication.
Example websites
• Cambridge University
16
3.2.2. Fedora
• Features
o Version management
o Preservation worthy
Example websites
(USA).
17
3.2.3.CDSware (CERN Document Server Software)
Features:
Example website
18
3.2.4. EPrints
Features
· Web-based interface
· RSS output
Example websites
• California Institute of Technology
19
Table 3.2: Comparison between the Open Sources repositories.
20
21
22
4. Problem Definition
There are many Arabic educational resources on the web scattered in personal
websites and forums, and created by members of the community. Searching for such
resources using regular search engines is not an easy task. The project main goal is to
create a digital repository for hosting learning objects and serving the needs of the
Arabic educational community. The repository will integrates advanced features that
5. Metadata
In any learning object repository, ‘Search’ and ‘Browse’ are the most used
methods to find a learning object. However, if these learning objects are not
for a learning object to be accessible, it must be indexed with some form of Metadata.
attributes of a resource, and each element can have one or more values.”1 Sometimes
There are many Metadata schemes that are used on the web; the most popular
1
Chris Taylor, “An Introduction to Metadata”, (2003), <http://www.library.uq.edu.au/iad/ctmeta4.html>
23
The Dublin Core Education (DCEdu) schema will be used. “The original
objective of the Dublin Core was to define a set of elements that could be used by
authors to describe their own Web resources. The Dublin Core was developed to be
simple and concise, and to describe Web-based documents.”2 Metadata will be stored
2
“Understanding Metadata”, (2004), < http://www.niso.org/standards/resources/UnderstandingMetadata.pdf>
24
7. Date Label: "Date"
A date associated with the creation or availability of the resource.
25
6. Objectives
The project aims to create an Arabic Digital Repository for Learning Objects
(DRLO) that serves the educational community in the Arab World. Although there
were a few attempts to create DRLOs by Arabs3, the need for a DRLO repository
arises because these attempts were not effective. These attempts did not gain
popularity among the educational community for reasons such as the use of English
interface, the restricted memberships, and the weak construction of the site. As a
result, our project’s vision is to be ‘The premiere online community for Arabs where
learning objects created by Arabs. “There is some existence of Arabic learning objects
on the internet created by some members of the community”. However, these learning
’Searching for these learning objects are a waste of time and resources; as there is no
learning object might find usage beyond its original audience and instructional
context. Given the relatively high cost of developing good learning objects, the
3
Examples of learning object repositories created by Arabs, Specifically Egyptians, are the Egyptian Digital
Learning Object Repository (EDLOR) (http://www.freewebs.com/alaasadik1/bottom.htm) and the Distributed
Egyptian Learning Object Repository (DELOR) by Almansoura University.
4
“MERLOT - Multimedia Educational Resources for Learning and Online Teaching”, November 10, 2007, <
http://taste.merlot.org/>.
5
H. S. Al-Khalifa, “AraCore: an Arabic Learning Object Metadata for Indexing Learning Resources”, (2006),
<http://eprints.ecs.soton.ac.uk/13220/01/AraCore.pdf>.
6
j. Murali, “Learning objects repositories, “The Hindu (2003), Nov 17, 2003,
<http://www.hindu.com/biz/2003/11/17/stories/2003111700070200.htm>.
26
promise of reusability receives considerable attention from administrators and
publishers who are trying to amortize the cost of production and maximize the
Finally, the project will hopefully enrich the learning process in the Arabic
educational field. Since the Saudi government policies are seeking for the informative
society, the educational field will support this ambition by concentrating on e-learning
projects. Therefore, our project will be considered as on of the important basis of the
7
G. Richards, “The Evolution of Learning Object Repository Technologies: Portals for On-line Objects for
Learning”, JOURNAL OF DISTANCE EDUCATION (2002), <http://cade.athabascau.ca/vol17.3/richards.pdf>
27
7. Functional specifications
2. LO Manipulation
1. Contributing:
Upload a new Learning Object to the repository. This operation is simply
done by uploading the LO and filling the required metadata fields.
2. Deleting a LO:
Delete the LO from the repository. Deletion can be done manually by the
administrator.
3. Modifying metadata:
Modify existing metadata for a LO.
3. LO Evaluation/ Ranking:
1. Rating :
Users can rate the quality and the usability of a given LO.
2. Recommendation:
This feature will recommend new LO to the system user, based on LO
rating, collected statistics and other useful information such as favorite
collections.
28
3. Reports and statistics:
Give statistical reports on the use of the repository by users; also give
information about the usage of LO within the system.
4. Quality Control:
Keep the quality of the Learning Objects high by providing services such
as "Reporting weak LO" and "Checking LO links".
5. Track back and RSS
These two features will enable our DLOR to disseminate its content
easily.
4. Administration:
1. Registration and authentication:
Allow unregistered user to join the members of the repository by filling
the registration form. For a member, (s)he must login to the system by
his/her username and password.
2. mailing:
Send e-mails to members (mailing list and update notifier) or non-
members (email an object to a friend).
7.1. Tools:
29
8. Recommender Systems
8.1. Introduction
being added. According to a study done by Basex, a leading company in research and
people cannot cope with this growth of information. Therefore, people are spending
more time looking for what they need because search engines’ results are not
sufficient anymore. Thus, there is a strong need for a new technology that can sieve
all the information on the web and extracts what people are really looking for.9
users locate what they really need easily. Recommender Systems in other way read
drawn from users’ known behavior to recommend ‘items’ they have not yet seen.”10
There are several techniques that could implement a Recommender System. One of
these Techniques is using Collaborative Filtering (CF) which is the most widely used
preference for items by users.” Recommended items of a user are derived from
databases of “neighbors” whom they have similar database preferences with that user.
8
Nate Anderson, “2008: The Year of Information Overload?“ ars technica (2008), Dec 26, 2007,
< http://arstechnica.com/news.ars/post/20071226-interruptions-info-overload-cost-us-economy-650-billion.html >.
9, 4
Badrul Sarwar, “Item-Based Collaborative Filtering Recommendation Algorithms”, (2001),
< http://www.inf.ed.ac.uk/teaching/courses/tts/papers/sarwar.pdf>.
10
Duncan Pemberton, “GroupMark: A WWW Recommender System Combining Collaborative and
Information Filtering”,(2000), < http://ui4all.ics.forth.gr/UI4ALL-
2000/files/Long_papers/Pemberton.pdf>
30
Most collaborative filtering approaches are rating-based automated recommender
systems. “Collaborative filtering has been very successful in both research and
There are two main approaches for building a Recommender System using
the other approach is the Item-based (Model-based). We will address the two
Objects. Since number of learning objects will increase after launching the site,
result in LOs that do not match a user preference; moreover, there might be LOs that
are not shown in search results but are the most LOs that match a user preference.
Thus a Recommender System will help users in exploring the desired LOs. However,
to make a Recommender System works properly, users’ must participate with the
There are many recommendation algorithms and techniques which are used in many
applications. In this section we focus on one of the earliest and most successful
2. model-based (item-base)
31
8.2.1. memory- based collaborative filtering technique:
This technique recommends an item to a target user based on the opinions of other
users. It employs statistical techniques to find a set of users known as neighbors, that
8.2.1.1. Representation:
on m items. This is usually presented as nxm matrix A. such that A(i,j) is one if the
11
Badrul Sarwar ,"Analysis of Recommendation Algorithms for Ecommerce", (2000), Accessed
January 14, 2008 from http://www.cs.umn.edu/~karypis/publications/Papers/PDF/ec00.pdf.
32
8.2.1.2. Neighborhood formation:
The most important step which compute the similarity between users to form a
users.
This process is the model-building or learning process of this algorithm and it works
as follow:
For each user u found an ordered list of l users N ={N1,N2,…,Nl} such that u∉N
There are number of different methods to compute a similarity between two things,
Cosine-based Similarity:
In this method the two users are thought of as vectors, formally the similarity is given
by:
|| i ||2 * || j ||2
corri,j.
33
Sim(i,j) = corri,j = Σu∈U (Ru,i - R i )(R u,j - R j )
The final step in the recommender system, is to derive the top-N recommendation
matrix to identify relations between different items and then to use these relations to
compute the prediction score for a given user-item pair. This technique does not need
This approach looks into the set of items that has been rated by the target user,
and compute how similar they are to the target item i and then select the k most
similar items.
This process can be divided into three subtasks: item Similarity computation,
34
8.2.2.1. Item Similarity Computation:
The basic idea is to isolate the users who have rated both items i and j, and then apply
the similarity computation techniques to determine the similarity between these two
Methods used here are the same methods mentioned in section 8.2.1.2
Once we isolate the set of most similar items based on the similarity measures, the
next step is to look into the target user ratings and compute the prediction on item i
prediction on the target item i for the user u use the following:
12
Badrul Sarwar, “Item-Based Collaborative Filtering Recommendation Algorithms”, (2001),
Accessed January 14, 2008 from: http://www.inf.ed.ac.uk/teaching/courses/tts/papers/sarwar.pdf
35
Pu,i = Σall similar items,N (Si,N * Ru,N )
Σall similar items,N (| Si,N |)
The last step is to recommend the target user with the items with top-N Prediction.
found that using the item-based collaborative filtering is more suitable for a learning
First, the performances of item-based algorithms are significantly better than user-
based algorithms.13 Since number of users registering to the repository is far higher
than number of learning objects getting uploaded, item-based algorithms avoid any
The second reason is that item-based algorithms provide better quality than user-
13 4
Badrul Sarwar, “Item-Based Collaborative Filtering Recommendation Algorithms”, (2001),
< http://www.inf.ed.ac.uk/teaching/courses/tts/papers/sarwar.pdf>.
36
degree of quality whether number of neighbors is increasing or not. This is due to the
fact that item based algorithms concentrate on a user’s preference in the first place;
the recommendations are given based on what items he/she preferred in the past not
on what other people have preferred. As a result, item-based algorithms are more
Our Approach
In our system we have data more than just rating to generate the prediction, Therefore
Table 8.1: Data participate in prediction computation with its corresponding percentage.
Data Value
Total 100%
Suppose we have a user u, u has a list of LOs that he rated them stored in his history.
37
For each LO under the category u has specified them in his interests' fields,
This computation is to determine the similarity between the current LO and all
To compute the prediction on the current LO, we used the weighted sum method:
Replace each [Rating] in the original equation with [(0.7 * Rating) + (0.2 * No.
F2
Pu,i = Σall similar items,N (Si,N × Vu,N )
Σall similar items,N (| Si,N |)
The last step is to recommend the user u with top three LOs.
38
9. System Analysis
"requires"
ReportBack Create a Personal
Collection Add To Personal
Collection
"requires"
Register
"requires"
Log-in
Log out
Search "includes"
ViewLO
User
Browse
"includes"
Contribute "requires"
Rate
Modify
AddComment
Tell a Friend "equivalents"
Delete
Send Emails
Admin
39
9.2. Conceptual Model:
40
9.3. Use Case,SSD,Contract,Collaboration Diagrams
Actor: user
Overview: a user will provide information about him/her self as well as a password
in order to be a member.
Type: primary
Cross reference: --
repository.
41
Alternative Courses:
Line 5: either required fields are empty, data invalid or username/Email already exist,
system
user
EnterRegistrationInfo(UserName,Pswd,Email,…)
RedirectToHomePage( )
Operation Contract:EnterRegistrationInfo
Name: EnterRegistrationInfo(UserName:string,Pswd:string,Email:string…)
Pre-conditions: None
Post-conditions:
42
Collaboration Diagram: EnterRegistrationInfo
EnterRegistrationInfo(UserName,Pswd,Email,..)
:Repository
1.U:=Create(UserName,Pswd,Email,..)User U:User
2.add(U)
:User
43
Use case: Log-in
Actor: user
Overview: a user will enter his username and password in order to be able to use
the repository.
Type: primary
Cross reference:
Use Cases: the user must complete the Register use case.
the repository.
Alternative Courses:
Line 3: either fields are empty or invalid data is entered, redisplay the page again
indicating errors.
44
SSD for Log-in
system
user
LogIn(UserName,Pswd)
Permission ( )
Operation Contract:LogIn
Name: LogIn(UserName:string,Pswd:string)
LogIn(UserName,Pswd)
:Repository
2.SetToActive( )
U:User
45
Use Case Contribute.
Actors: User.
Overview: A user adds a new learning object to the repository with a complete
Type: Primary.
Cross reference:
Use Cases: the user must complete the Log-in use case.
contribution:
repository.
46
Section: Upload LO:
clicks Add.
: System
User
AddLO(UserId ,Type,Creator ,SubCatID......etc).
Confirm-contribution(msg)
47
Operation Contract: AddLO.
Responsibilities: Add a new LO along with its Meta Data to the repository.
Collaboration Diagram:AddLO
AddLO(UserId,...) 1:CreateLO(UserId,…)
:Repository lo:LO
2:CreateMD(Creator,…)
Md:MetaData
3:Add(lo)
:LO
48
Use Case Browse.
Actors: User.
Type: Primary.
object.
49
SSD for Browse
: System
User
Browse (SubCatID)
Display(LO)
Pre-Condition: none.
Post-Condition: none
Browse(SubCatID)
:Repository
1.Browse(SubCatID)
1.2*.[for each]Display(LOID)
Lo:LO
50
Use case : Search
Actor : user.
Type : primary
Cross reference:
Use Cases: the user must complete the Log-in use case.
"Search" button.
Advanced search
51
Section : Advanced search
metadata to be specified.
the metadata
: System
User
Search (Keyword)
Results(LO))
Pre-Condition: none.
Post-Condition: none
52
Collaboration Diagram: Search
2*.[for each]Display(LOID)
Lo:LO
53
Use Case: Rate LO
Actors: User
Type: Optional
Cross Reference:
Use Case: A user must have completed the Log-in use case.
: System
User
RateLO (StarNo, LOID)
NewRate(Rate)
54
Operation contract: RateLO
Responsibilities: To rate a LO .
RateLO (StarNo)
: Repository 1. RateLO (StarNo) lo: LO
1.1 CreateRaing(StarNo,LOID,UserId)
r:Rating
55
Use Case: modify
Actors: User
Type: Optional
Cross references:
Use Cases: A user must have completed the Log-in use case
: System
User
Modify (LOID)
CurrentInfo(Creator,title,.. )
NewInfo(Creator,title,.. )
Confirm (msg)
56
Operation contract: Modify
Post-Condition: none
md:MD Lo:LO
57
Collaboration Diagram: NewInfo
2.NewMDInfo(Creator,title,..) md:MD
58
Use Case: Delete
Actors: Admin
Type: Optional
Cross references:
Use Cases: Admin must have completed the Log-in use case
: System
User
Delete (LOID)
Confirm (msg)
59
Operation contract: Delete
Delete (LOID)
: Repository 1. Delete (LOID) : lo
60
Use Case: ReportBack
Actors: User
Type: optional
Cross References:
Use cases: the user must have completed the Log-in use case .
"Report" button.
report
message
61
SSD for ReportBack:
:System
User
ReportBack (LOID, Reason)
Confirm (Message)
62
Use case : Create a Personal Collection
Actor : User.
Type : optional
Cross Reference:
Use case : a user must have completed the Log-in use case.
collection.
Collection.
63
Alternative Courses
: System
User
CreateaCollection (name,UserId)
RedisplayPage( )
Post conditions :
CreateCollection(UserId,name) : Repository
1. Create(UserId,name) Personal
collection
64
Use Case: AddToPersonalCollection
Actors: User
Overview: A user chooses to add the current LO to my favorites then selects the
Type: Optional
Cross Reference:
Use Case: A user must have completed the Log-in use case.
65
SSD for AddToPersonalCollection (CollectionID, LOID)
: System
User
AddToPersonalCollection (PCID, LOID)
ConfirmMessage(Mesage )
2. AddToPC (LOID)
: pc
1. pc= RetrievePC(PCID)
: PC
66
Use Case: Tell a Friend
Actors: User
Overview: The user specifies the message and the recipient of the mail and
Type: Optional
Alternative Courses
67
SSD for Tell a Friend :
system
user
TellaFriend(Msg,SEmail,REmail)
confirm()
Operation: TellaFriend
Pre-Condition: none.
Post-Condition: none.
68
Use Case: Send e-mails
Actors: Administrator
Type: Optional
Cross Reference:
Use Case: An administrator must have completed the Log-in use case.
69
SSD for Send Email:
system
user
SendEmail(Msg)
confirm()
2*.[for each][RecieveMail=True].sendeamil(Msg )
U:User
70
Use case: Log out
Actor: user
Type: primary
Cross reference:
Use Cases: the user must complete the Log-in use case.
system
user
LogOut()
EndSession()
71
Operation Contract:LogOut
Name: LogOut( )
Post conditions:
72
Recommender System:
73
9.4. Class Diagram:
74
9.5. ER Diagram:
75
9.6. Data Base Schema:
aspnet_PersonalizationPerUser
aspnet_WebEvent_Events Id
aspnet_Paths
Lower edApplicat ionNam e
EventTim e Com pat ibleSchem aVersion
PageSet t ings
Applic ationI d
EventType I sCurr ent Ver sion Applic at ionI d
LastUpdatedDat e
Descr ipt ion
EventSequence PathId
EventOccur rence
aspnet_Membership Path
Applic at ionI d
EventCode LoweredPat h
User Id
EventDetailCode
Password
M essage
PasswordFor m at
Applic at ionPath
PasswordSalt
M achineNam e
M obilePIN
aspnet_PersonalizationAllUsers
Em ail PathI d
Request Ur l
LoweredEm ail
PageSet tings
Except ionType
PasswordQuestion
Last Updat edDate
Det ails
PasswordAnswer
I sAppr oved
I sLockedOut
aspnet_Roles
CreateDat e
Last LoginDat e
Applic ationId
Com m ent
Comment
Cno
LOI D
com m ent
dat e
UserI d
I sAppr oved
aspnet_UsersInRoles
UserI d
RoleId
Viewing
LOID
User Id
aspnet_Profile
User Id
Pr oper t yNam es
Pr oper t yValuesBinary
aspnet_Users
Applicat ionI d
UserI d
UserNam e
User_InterestFields
Lower edUser Nam e
M obileAlias
User I d
IsAnonym ous
Inter est Field
LastActiv it yDat e
LO
LOI D
SubCat I D
BundleURL
NoOf Downloads
MetaData audience
LOI D
I dentif ier
reason
User Id
Tit le
dat e
PersonalCollection Creator
UserI d
PCI D
Language
PCNam e
For m at
UserI d
Dat e
Cont ribut or
Description
Coverage Rating
UserI d
Publis her
Relat ion
SubCategory LOI D
SubCatI D
Right s
TrackBack NoStar s
PersonalCollection_LO Sour ce
SubCatNam e
LOID
PCID Cat ID
Subj ect TBID
LOID
Type Tit le
excer pt
ur l
Category
Cat ID
Cat Name
76
9.7. Data Base Dictionary
Tables
Table Description
aspnet_Applications --
aspnet_Membership User's membership
aspnet_Paths --
aspnet_PersonalizationAllUsers --
aspnet_PersonalizationPerUser --
aspnet_Profile --
aspnet_Roles --
aspnet_SchemaVersions --
aspnet_Users User's accounts
aspnet_UsersInRoles --
aspnet_WebEvent_Events --
Category Main Categories
Comment Comments on LO
LO Learning Object
MetaData MetaData for LO
PersonalCollection User Personal Collection
PersonalCollection_LO LO contained in PC
Rating Ratings on LO
ReportBack Reports on LO
SubCategory Sub Categories
TrackBack TrackBack on LO
User_InterestFields Users interest fields
Viewing Viewing of LO
Columns
77
aspnet_Membership Password NVarChar User's
(128) password
aspnet_Membership PasswordFormat Int -
aspnet_Membership PasswordSalt NVarChar -
(128)
aspnet_Membership MobilePIN NVarChar -
(16)
aspnet_Membership Email NVarChar User's email
(256)
aspnet_Membership LoweredEmail NVarChar -
(256)
aspnet_Membership PasswordQuestion NVarChar -
(256)
aspnet_Membership PasswordAnswer NVarChar -
(128)
aspnet_Membership IsApproved Bit -
aspnet_Membership IsLockedOut Bit -
aspnet_Membership CreateDate DateTime -
aspnet_Membership LastLoginDate DateTime -
aspnet_Membership LastPasswordChangedDate DateTime -
aspnet_Membership LastLockoutDate DateTime -
aspnet_Membership FailedPasswordAttemptCount Int -
aspnet_Membership FailedPasswordAttemptWindow DateTime -
Start
aspnet_Membership FailedPasswordAnswerAttemptC Int -
ount
aspnet_Membership FailedPasswordAnswerAttempt DateTime -
WindowStart
aspnet_Membership Comment NText -
aspnet_Paths ApplicationId UniqueIdent Link to
ifier aspnet_Applic
ations table
aspnet_Paths PathId UniqueIdent Primary key
ifier
aspnet_Paths Path NVarChar -
(256)
aspnet_Paths LoweredPath NVarChar -
(256)
aspnet_Personalization PathId UniqueIdent Link to
AllUsers ifier aspnet_Paths
table
aspnet_Personalization PageSettings Image -
AllUsers
aspnet_Personalization LastUpdatedDate DateTime -
AllUsers
aspnet_Personalization Id UniqueIdent Primary key
PerUser ifier
aspnet_Personalization PathId UniqueIdent Link to
78
PerUser ifier aspnet_Paths
table
aspnet_Personalization UserId UniqueIdent Link to
PerUser ifier aspnet_Users
table
aspnet_Personalization PageSettings Image -
PerUser
aspnet_Personalization LastUpdatedDate DateTime -
PerUser
aspnet_Profile UserId UniqueIdent Link to
ifier aspnet_Users
table
aspnet_Profile PropertyNames NText -
aspnet_Profile PropertyValuesString NText -
aspnet_Profile PropertyValuesBinary Image -
aspnet_Profile LastUpdatedDate DateTime -
aspnet_Roles ApplicationId UniqueIdent Link to
ifier aspnet_Applic
ations table
aspnet_Roles RoleId UniqueIdent Primary key
ifier
aspnet_Roles RoleName NVarChar -
(256)
aspnet_Roles LoweredRoleName NVarChar -
(256)
aspnet_Roles Description NVarChar -
(256)
aspnet_SchemaVersion Feature NVarChar Primary key
s (128)
aspnet_SchemaVersion CompatibleSchemaVersion NVarChar Primary key
s (128)
aspnet_SchemaVersion IsCurrentVersion Bit -
s
aspnet_Users ApplicationId UniqueIdent Link to
ifier aspnet_Applic
ations table
aspnet_Users UserId UniqueIdent Primary key
ifier
aspnet_Users UserName NVarChar -
(256)
aspnet_Users LoweredUserName NVarChar -
(256)
aspnet_Users MobileAlias NVarChar -
(16)
aspnet_Users IsAnonymous Bit -
aspnet_Users LastActivityDate DateTime -
aspnet_UsersInRoles UserId UniqueIdent Link to
ifier aspnet_Users
79
table
aspnet_UsersInRoles RoleId UniqueIdent Link to
ifier aspnet_Roles
table
aspnet_WebEvent_Eve EventId Char (32) Primary key
nts
aspnet_WebEvent_Eve EventTimeUtc DateTime -
nts
aspnet_WebEvent_Eve EventTime DateTime -
nts
aspnet_WebEvent_Eve EventType NVarChar -
nts (256)
aspnet_WebEvent_Eve EventSequence Decimal -
nts (19,0)
aspnet_WebEvent_Eve EventOccurrence Decimal -
nts (19,0)
aspnet_WebEvent_Eve EventCode Int -
nts
aspnet_WebEvent_Eve EventDetailCode Int -
nts
aspnet_WebEvent_Eve Message NVarChar -
nts (1024)
aspnet_WebEvent_Eve ApplicationPath NVarChar -
nts (256)
aspnet_WebEvent_Eve ApplicationVirtualPath NVarChar -
nts (256)
aspnet_WebEvent_Eve MachineName NVarChar -
nts (256)
aspnet_WebEvent_Eve RequestUrl NVarChar -
nts (1024)
aspnet_WebEvent_Eve ExceptionType NVarChar -
nts (256)
aspnet_WebEvent_Eve Details NText -
nts
Category CatID Int Primary key
Category CatName VarChar category name
(50)
Comment Cno Int Primary key
Comment LOID Int Link to LO
table
Comment comment Text the comment
Comment date SmallDateT when it was
ime added
Comment UserId UniqueIdent Link to
ifier aspnet_Users
table
Comment IsApproved Bit To approve
comments
80
before
displaying
them
LO LOID Int Primary key
LO SubCatID Int Link to
SubCategory
table
LO BundleURL VarChar Learning
(100) Object URL
LO NoOfDownloads Int number of
downloads for
this LO
LO NoOfViews Int number of
Views for this
LO
LO TrackBacks Int number of
TrackBacks
for this LO
LO audience VarChar LO target
(50)
LO UserId UniqueIdent Link to
ifier aspnet_Users
table
MetaData Identifier Int Link to LO
table
MetaData Title VarChar LO title
(50)
MetaData Creator VarChar LO creator
(50)
MetaData Language VarChar (5) Language of
the contents
MetaData Format VarChar format of the
(20) LO (ex: pdf,
swf,..etc)
MetaData Date SmallDateT when it was
ime added
MetaData Contributor VarChar who was
(50) responsible for
making
contributions
to the LO
MetaData Description Text breif
description of
the contents
MetaData Coverage Text The spatial or
temporal topic
of the LO, the
spatial
applicability of
81
the LO, or the
jurisdiction
under which
the LO is
relevant.
MetaData Publisher VarChar who is
(50) responsible for
making the LO
available
MetaData Relation Text related Los
MetaData Rights Text Information
about rights
held in and
over the LO.
MetaData Source Text related
resource from
which the
described LO
is derived
MetaData Subject VarChar topic of the LO
(100)
MetaData Type VarChar The nature or
(50) genre of the
LO (ex:image,
sound, text,
..etc)
PersonalCollection PCID SmallInt Primary key
PersonalCollection PCName VarChar personal
(50) collection
name
PersonalCollection UserId UniqueIdent Link to
ifier aspnet_Users
table
PersonalCollection_LO PCID SmallInt Link to
PersonalCollec
tion table
PersonalCollection_LO LOID Int Link to LO
table
Rating UserId UniqueIdent Link to
ifier aspnet_Users
table
Rating LOID Int Link to LO
table
Rating NoStars SmallInt the rating
degree
representing
by 5 stars scale
ReportBack RBID Int Primary key
ReportBack LOID Int Link to LO
82
table
ReportBack reason VarCharMa reason of the
x report
ReportBack date SmallDateT when it was
ime added
ReportBack UserId UniqueIdent Link to
ifier aspnet_Users
table
SubCategory SubCatID Int Primary key
SubCategory SubCatName VarChar sub category
(50) name
SubCategory CatID Int Link to
Category table
TrackBack LOID Int Link to
SubCategory
table
TrackBack TBID Int Id of the
TrackBack
TrackBack Title VarCharMa title of the
x TrackBack
TrackBack excerpt VarCharMa the msg
x
TrackBack url VarCharMa URL of the
x other site
User_InterestFields UserId UniqueIdent Link to
ifier aspnet_Users
table
User_InterestFields InterestField VarChar Partial key
(500)
Viewing LOID Int Link to the LO
table
Viewing UserId UniqueIdent Id of the user
ifier who viewed
the LO
83
10. Implementation
Marifah
LO
LO Search and LO Manipulation: Evaluation/Ranking: Registration & Administration:
Retreiving: Authentication:
-Contribute LO - Rating
- Search. - Delet LO - Registration - Admin Pages.
- Advanced Search -Modify Metadata
- Reports & tatistics - Login - Managing Roles.
-Browsing -Personal Collections - RSS Feeds. -Categories Administration
- Report back - Recommendation - Metadata Administration
-Comment - Membership
Administration
84
10.1 Registration
Registration process adds a visitor of Marifa to the member list. This begins
when a user clicks on "bcbd مbfghi آklmhn " link under the form of login.
The user will be directed to a page that contains a form to be filled with his
information including his user name, password, e-mail, first name, last name and his
educational level as shown in figure 1.1. In addition, the user will check on his
interest fields in the check boxes. When the user clicks on "klmhon" button , a query
will be sent to the database to add this user with his information to the users table.
Figure 10.1
In the case of wrong entered information to the form of registration, the same page
will be displayed again and the user will be informed with the reason and the place of
the wrong input as shown in figure 1.2:
85
Figure 10.2
10.2 Login
Login is the process of authenticating registered users .It starts when the user
clicks on "لqor دklmhon" button after writing his user name and password. A query will
be sent to the database to make sure that entered information are found and true. If the
user is authenticated, he logs in and can access his profile and other services offered
by Marifa, otherwise he redirected to the previous page and forced to write valid
information. Figure 1.3 shows the location of login form.
Figure 10.3
86
10.3 User's Home Page
After Logging in, the user will be directed to his home page. This page allows
the user to control his personal account and any learning object added by him. In
addition, it contains a link to add a new learning object. Figure 1.4 shows the user's
home page.
Figure 10.4
10.5 Browse
Browsing learning objects is the process of exploring all learning objects in a
categorized way in order to help the user to find the desired learning object easily.
Browsing learning objects can be done in two ways; either by clicking on the list of
subcategories in the home page or by clicking on the link “tlholuvwم اyhoz{ ”اwhich is
found in the home page that directs the user to the page “Browse. asp” which lists all
categories with their sub categories as shown in figure 1.5 . When the user clicks on a
sub category, a query will be sent with the ID of the clicked sub category to get all
87
learning objects available in this sub category and will be displayed as shown in
figure 1.6.
Figure 10.5
Figure 10.6
88
or search result pages, to the learning object page”ViewLO.asp” .The linking code is
shown below:
LOID is added to the query that views the intended learning object and its associated
metadata; the query is as follows:
Figure 10.7
89
10.7 Tell a Friend
Tell a friend is a process that allows a user to tell his/her friend about a certain
learning object, this process begins when the user clicks on "}cbo~ }cbow ko "أرbutton,
fills the form with his name,his email,his friend's email and if he want to write a
message ,then he clicks on "k"إرbutton as shown in figure 1.8.
Figure 10.8
10.9 Search
10.9.1 Simple Search
Searching for learning objects is the process to find the desired learning object
easily.Simple search begins when the user adds keywords in the text box at the top of
the home page, chooses the type of matching; match any word or match the sentences
exactly then clicks on "o
" button. If there is a result, they will appear in a separate
page. Otherwise, a message will appear to inform the user that there were no results.
90
10.9.2 Advanced Search
Advanced search begins when the user clicks on the "مbog o
"link in the
site’s home page , the AdvancedSearch page will be opened and the user will fill the
form with information including: the title, keywords, author ,description and clicks on
"o
" button. If there is, results found they would be listed. Otherwise, a message that
informs the user that there were no results. Figure 1.9 shows advanced search page.
Figure 10.9
91
Figure 10.10
Upload page is divided into three main parts:
1. The necessary fields (required fields) are:
• Title
• Creator
• Subject and Keywords
• Audience
• Resource type
• Category
• Language
92
Figure 10.11
As shown in the previous figure, the help page is designed to use collapse
panels. In the case of a successful uploading, the confirmation page will appear.
And in case of failure uploading caused by missing the required fields the page will
be redisplayed indicating the missing fields with red "*" and a description of the error
at the end of the required fields part of the page. Other failure cases will display the
error page to the user.
Figure 10.12
93
10.12 RSS
RSS web feed formats are used to publish frequently updated content of the
main categories .This process begins when the users click on "ك انvgo"اlink, then he
chooses the category and click on subscribe to this field. As shown in figure 1.13.
Figure 10.13
RSS is shown below:
<channel>
</channel>
</rss>
94
<ajaxToolkit:Rating
ID="Rating1" runat="server" AutoPostBack="True" CssClass="ratingStar"
CurrentRating='<%# MyFunc("Rating1",Container.DataItem("LOID")) %>'
Direction="RightToLeft" EmptyStarCssClass="Empty"
FilledStarCssClass="Saved" RatingDirection="RightToLeftBottomToTop"
StarCssClass="ratingItem" WaitingStarCssClass="Filled" Width="76px"
ReadOnly="True" BehaviorID="Rating1_RatingExtender" Enabled="False"
EnableTheming="False" EnableViewState="False">
</ajaxToolkit:Rating>
Figure 10.14
95
10.15.1 Create a Personal Collection
It allows the member to create his own personal collection. When the user
writes the name of the new personal collection in the text box and clicks on "ءyo"إ
button, a query will be sent to the database to add this new user's collection. A
validation will be made to make sure that the name of the new personal collection is
unique in the previously created personal collections by that user.
After viewing learning object, the user can add a learning object to his
personal collection. This can be done by clicking on "go ow إo "أbutton. Then, a
query will be sent to the database to add this learning object to the list of learning
objects in this specific collection. Also, a validation will be performed to check if this
learning object is already exists in that collection .If so, a message will appear to
inform the user with this error.
96
10.16 Add Comment
Is the process to add comment for learning object, this process begins when the user
clicks on "}oln tyo "اimage and and write the comment then clicks on send the
comment as shown in figur 1.15.
Figure 10.15
10.17 Rating
Is a process to rating the learnig object in five star scale, this process begins when the
user moves the mouse cursor on the rating control and choose number of stars as
shown in figuer 4.16
Figure 10.16
97
10.18 Report Back
Is the process that allows users to send a message to administrator if there is a
problem in a specific learning object, this process begins when the user clicks on
"¡ol¢n" icon in the page of viewing the learning object , writes a message in the text
box . When he clicks on "k "أرthe mesage will be sent to the Administrator.
10.19 Contatct Us
Is the process which allows the user to send an email to the administrator , this
process begins when the user clicks on contact us link , fills the form of Contact Us
with his name , email, and the message text . When he clicks on "ko "أرas shown in
figure 1.17:
Figure 10.17
98
10.20 Password Recovery
This process helps registered users when someone forgets his password and cannot
login.When a user clicks on "ورviw اti آ¤lh" under the form of login .Then, he will be
directed to a page with a form to allow the user to enter his email as figure 1.18
shows. When the user clicks on "لyo " ارbutton , a messagelcontaining his password
will be sent to his email.
Figure 10.18
99
10. 21 Change Password
This process is available only for logged in users. The user can change his
password by clicking on "vhow اtoi آvoll¥n " link in the user's home page. He will be
directed to a page contains a form to write the old and new password then he will
clicks on "ورvoiw اtoi آvoll¥n " then the new password will replace the old one .Figure
1.19 shows the form of changing passwords.
Figure 10.19
100
Figure 10.20
Figure 10.21
101
10.23 Update
This process is available for members only.It allows them to update the metadata
of any learning object they added previously. This page is accessed by clicking on
"tolilgwدري اyo" in the user's home page , a list if all categories will be displayed
,when the user clicks on one of these categories a list of all learning objects added by
that user will be displayed . The user will click on "kcbogw yo¨ هª¥ "اto display a form
of metadada for a specific learning object (figure 1.22). The user change desired fields
.When he clicks on "تcbogw¦ اo" , aquery will be sent to the database to update the
Metadata of that learning object.
Figure 10.22
10.24 Download
After viewing a learning object, the user can download it to his PC, if the learning object is
uploaded to the database of Marifa repository, the user can download it by clicking on " ةbهyo
oiw "اbutton in the page that views the learning object's metadata, a window will appear to ask
the user if he wants to save it or just open this object (figure 1.23), if he selects to save it , he will
choose the location in his PC to save that object. Otherwise, the learning object is not uploaded
to the database . In other words , the database contains a URL to that learning object and the
user will be directed to the learning object page.
Figure 10.23
102
10.25 Number Of Downloads
Is the process of counting the number of downloads of a specific learning object,
this process begins when user clicks on "kooli
n" button, a counter variable is
incremented by one and a new query will be sent to the database to update the number
of downloads of that learning object . Finally , this number is diplayed in
"viewLO.aspx" page under "ةbهy" lable.
Figure 10.24
103
10.29 Learning Objects Report
This report will display the repository categories, sub categories and the LOID, title
and the creator for each LO. when the user clicks on one of the mentioned LO fields,
you will see the rest of Metadata for the chosen LO. We use Crystal Report to
compute this statistics (figure 1.25).
Figure 10.25
Figure 10.26
104
10.31 Admin Pages
The purpose of these pages is for administrating the repository. They are dealing
directly with the pages and information stored in the database (figure 1.27).
Figure 10.27
All admin pages codes are consisted of gridviews that are connected to the database
through SQLDataSource. a sample of these pages shows the code of the Categories
administration page is shown below:
105
ProviderName="<%$
ConnectionStrings:DBConnectionString2.ProviderName %>"
SelectCommand="SELECT [CatID], [CatName] FROM [Category]"
UpdateCommand="UPDATE [Category] SET [CatName] = @CatName
WHERE [CatID] = @CatID">
<DeleteParameters>
<asp:Parameter Name="CatID" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="CatName" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="CatName" Type="String" />
<asp:Parameter Name="CatID" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
Figure 10.28
106
10.31.2 Edit User Information Page
The page shows member’s information when the administrator clicks on "view"
button. This information can be edited by clicking on edit button, and editing the
information, and then click on update button.
On the other hand, this user can be deleted by clicking on delete button, also the role
of user (member, administrators) can be edited by checking the checkbox of the role,
then clicking on update role (figure 1.29).
Figure 10.29
Figure 10.30
107
10.31.4 Filter Users By Roles Page
When the administrator clicks on "to qimiw اho ءyo ض اvo " , she will select the
type of filtering, by member, by Administrators or all users .Then, a page is displayed
which lists all users filtered by the selected role.(figure 1.31).
Figure 10.31
Figure 10.32
108
10.31.5 Manage Roles Page
This page allows the administrator to manage roles of users registered in
Marifah . This page is accessed when she clicks on "تyo qimiw "إدارة اbutton , a page
will be dispayed contains a table of roles includes: Role name , number of users in
each role and a button to delete this role. In addition , this page allows the
administrator to create a new role by writing the name of the new role in a text box
and clicking on "Add Role" button (figure 1.33).
Figure 10.33
Figure 10.34
109
10.31.7 Edit Sub Categories Page
The page lists all subcategories in the repository .These records can be deleted, edited,
and filtered (selected)." this view is derived from a single database table" see figure
1.35.
Figure 10.35
Figure 10.36
110
10.31.9 Add New Main Category
This page allows to the administrator to add a new main category to the repository .As
shown in figure 1.37 the administrator can create a new category by writing its name
in the text box and clicks on "ty"إ.
Figure 10.37
Figure 10.38
111
10.31.11 View learning object page
The page lists all the stored Learning Objects in the repository along with their
metadata (figure1.39) .
Figure 10.39
Figure 10.40
112
4.31.13 View comments page
This page lists all comments on the stored LO in the repository.These records can be
deleted, edited, and new records can be added only if the described LO is already
added, this view is derived from a single database table (figure 1.41).
Figure 10.41
this page lists all the unapproved comments on a stored LO in the repository. These
records can be deleted, edited, and approved.This view is derived from a single
database table, if the comment approved then it will be sent automatically to view
comments page (figure 1.42).
Figure 10.42
113
10.31.15 View Report Back Page
The page lists all report backs on the stored LO in the repository. These records can
be deleted. This view is derived from a single database table (figure 1.43).
Figure 10.43
Figure 10.44
114
1. 11. Testing
11.1 Purpose
The purpose of this chapter is to present some of the test cases made on
Marifah site that have been done by the testing team. The document will contain
information about the testers, the procedure performed and results. The document will
explain how the discovered bugs during the test phase were debugged.
11.2 Scope
The chapter is divided to five main sections which are the main segments of
the site. The sections are the following: LO search and retrieval, LO manipulation, LO
evaluation and ranking, Registration and Authentication, and Administration. Within
each section, several subsections that focus on the site functionalities and within each
functionality there are several test cases trying to cover all the possible actions made
by the user. The total number of test cases made on Marifah site is 74 test cases.
Testing Procedure
115
find out defects related to bad design or bad implementation of the system.”14 Tests
were performed as black-box tests but because testers do know the internal working
of the site, testers can make better-informed test cases choices.
As we stated earlier, the actual test phase started after the final integration
phase where we tried to perform all the possible actions made by the user to figure out
which actions went wrong after the integration. . Of the 74 test cases made by the
testers, only 6 test cases have failed which means most of the test cases have passed.
Then came the bugging and debugging phase were bugs are identified and fixed by
members of the team.
14
definition from “Testing Geek” website, http://www.testinggeek.com/graybox.asp
116
Test Cases
Number T1
Title Search
Description This function submits the search query to the search service within the site. It
returns links of learning objects in case results were found or a string
representing there were no results.
Test Cases Test Case Number T1a
Details Input a string that is known to be present.
Input Text box="ءqqw "اand selecting radio button
“ti أي آty®”
Expected Output One result, a link to the learning object " t~
ءqqw" ا
Actual Output One result, a link to the Learning Object " t~
ءqqw" ا
Result Pass
Test Case Number T1b
Details Input a string that is not known to be present.
Input Text box="vhw "اand selecting radio button
“ti أي آty®”
Expected Output A string indicates that no results were found.
Actual Output A string indicates that no results were found.
Result Pass
Test Case Number T1c
Details Click on search button with no text in the
textbox.
Input Empty string
Expected Output Nothing happens.
Actual Output Nothing happens.
Result Pass
117
b. Advanced Search
Number T2
Title Advanced search
Description This function submits the search query to the advanced search service within the
site. It returns links of learning objects in case results were found or a string
representing there were no results.
Test Cases Test Case Number T2a
Details Leave all fields blank, and press the search button
Input Clicking the search button
Excepted Output A string indicates that no results were found.
Actual Output Incorrect syntax
Result Failed
Test Case Number T2b
Details Choose " tluاbg اtviw "اfrom the Audience field,
leave the rest of fields empty, and press the search
button
Input Audience= " tluاbg اtviw"ا
Expected Output One result, a link to the Learning Object
"vwر اq
"
Actual Output A string indicates that no results were found.
Result Failed
Test Case Number T2c
Details Input a LO title that is known to be present.
Input Title= “vwر اq
”
Expected Output One result, a link to the Learning Object
"vwر اq
"
Actual Output One result, a link to the Learning Object
"vwر اq
"
Result Passed
Test Case Number T2d
Details Search for LOs with a specific language.
Input Language=”tlvw”ا
Expected Output 118 LOs found with language=”tlvw”ا
Actual Output 118 LOs found with language=”tlvw”ا
Result Passed
118
Test Case Number T2e
Details Search for LOs in a specific Subcategory
Input Subcategory=”bcqmgwان و اvw"ا
Expected Output 3 LOs found with Subcategory=”bcqmgwان و اvw"ا
Actual Output 3 LOs found with Subcategory=”bcqmgwان و اvw"ا
Result Passed
Test Case Number T2f
Details Search for LOs with a specific format.
Input Format=”document”
Expected Output 3 LOs found with Format=”document”
Actual Output 3 LOs found with Format=”document”
Result Passed
Test Case Number T2g
Details Search for LO by matching the whole sentence.
Input Title=”v¯°w ”~ة اand selecting radio button
“yl آtimw اty®”
Expected Output No learning objects found.
Actual Output No learning objects found.
Result Passed
Test Case Number T2h
Details Search for LO by matching any word in the sentence.
Input Title=”v¯°w ”~ة اand selecting radio button
“ti أي آty®”
Expected Output 18 LOs found with each title containing the word
“”~ة
Actual Output 18 LOs found with each title containing the word
“”~ة
Result Passed
119
c. Browsing
Number T3
Title Browse
Description Browsing through categories then subcategories in order to reach learning objects.
Test Cases Test Case Number T3a
Details Clicking on a category then a sub category to reach
learning object(s).
Input Clicking on category "tl± اtcvw "اand
subcategory "bcqmgwان و اvw" ا
Expected Output List of 6 learning objects.
Actual Output All learning objects that is within the Subcategory "
"bcqmgwان و اvwا
Result Pass
Test Case Number T3b
Details Clicking on a category then a sub category to reach
learning object(s).
Input Clicking on Category "tlvw اt¥w "اand Subcategory "
"vwا{دب ا
Expected Output No list of results and a message “ tliln تy bdqn
انg vw اl¨gw ”ها اsince this subcategory is
empty.
Actual Output No list of results and a message “ tliln تy bdqn
انg vw اl¨gw ”ها اand the LO sorting
dropdown list.
Result Fail
120
2. LO manipulation
a. Contributing a LO
Number T4
Title Contribute a LO
Description Adding a learning object to the database either by uploading a LO or linking
a webpage that contains a LO, and specifying the metadata of the added LO.
Test Cases Test Case Number T4a
Details Reaching upload page by URL with user not
signed- in.
Input Typing the URL
“http://localhost:1066/MA3RIFAH/uplaod.aspx”
Expected Output A massage indicating that the user can not reach
upload page without being signed- in.
Actual Output Upload page appears.
Result Failed
Test Case Number T4b
Details Reaching upload page by URL with user
signed- in.
Input Typing the URL
“http://localhost:1066/MA3RIFAH/uplaod.aspx”
Expected Output Upload page appears.
Actual Output Upload page appears.
Result Pass
Test Case Number T4c
Details A user fills the required fields only and links a
LO to the site
Input Title="thifwء اyi{ "اAuthor=" vyd blw"و
Keywords="b اqz-thir" Audience= tviw"ا
"t®qgiw اresource type="ضv /³uاv"
language= "v "and upload=”
http://www.schoolarabia.net/arabic
/asma_khamse_tadreeb/asma1.htm”
Expected Output A confirmation message of the contribution
process, and the LO has been added to the
database.
Actual Output A confirmation message of the contribution
process, and the LO has been added to the
database.
Result Pass
121
Test Case Number T4d
Details A member fills some of the required fields only
and links a LO to the site
Input Title="y¯nاqrن و أy"آ, Audience="t®qgiw اtviw"ا
Resource Type=""ش, language="v "
Expected Output Asterisks appear next to the empty required
fields (author and keyword fields) and a message
indicates that author and keywords fields are
empty and must be filled.
Actual Output Asterisks appear next to the empty required
fields (author and keyword fields) and a message
indicates that author and keywords fields are
empty and must be filled.
Result Pass
Test Case Number T4e
Details A member fills the required fields only and
uploads a file to the site.
Input Title=”ylµ رةyz”, Author=”bi
نy®”,
Keywords=”wyw ا-رةyz -yl”ا, Audience=” tviwا
t®qgiw”ا, Resource Type=”Video”,
Language=”v ”, And Upload Fields=”
C:\myfile\Asia.3gp”.
Expected Output A confirmation message of the contribution
process, and the LO has been added to the
database.
Actual Output A confirmation message of the contribution
process, and the LO has been added to the
database.
Result Pass
Test Case Number T4f
Details A member fills some of the required fields only
and uploads a LO to the site
Input Title=”ءyiw”دورة ا, Audience=”t®qgiw اtviw”ا,
resource type=”video”, language=”v ”, and
upload fields=” C:\myfile\water cycle.3gp”.
Expected Output Asterisks appear next to the empty required
fields (author and keyword fields) and a message
indicates that author and keywords fields are
empty and must be filled.
122
Actual Output Asterisks appear next to the empty required
fields (author and keyword fields) and a message
indicates that author and keywords fields are
empty and must be filled.
Result Pass
123
b. Deleting a LO
Number T5
Title Delete a LO
Description An administrator deletes a learning object from the database.
Test Cases Test Case Number T5a
Details An administrator logs to the admin page, selects the
“Learning object” choice then selects the “Edit LO
Information” then types the LOID in order to remove
it from the database.
Input An integer=“24” in the textbox indicating the LOID
of the LO to be removed.
Expected Output Reload LO table with LO of the LOID=24 removed
and the associated metadata.
Actual Output Reload LO table with LO of the LOID=24 removed
and the associated metadata.
Result Pass
Test Case Number T5b
Details An administrator logs to the admin page, selects the
“Learning Object” choice then selects the “Edit LO
Information” then clicks the “Remove” button
without specifying the LOID
Input Empty string
Expected Output Nothing happens
Actual Output Nothing happens
Result Pass
Test Case Number T5c
Details An administrator logs to the admin page, selects the
“Learning Object” choice then selects the “Edit LO
Information” then clicks the “remove” button with a
wrong LOID
Input An integer=“1” in the textbox indicating the LOID of
the LO to be removed.
Expected Output Error Message appears indicating that a LO with the
specified LOID does not exist.
Actual Output Nothing happens
Result Fail
124
c. Modify Metadata
Number T6
Title Modify LO Metadata
Description This function retrieves the metadata for the selected LOID, it allows a user to
replace the inserted values with new ones by placing them in the fields, then
pressing the update button
Test Cases Test Case Number T6a
Details After a specific LOID has been chosen to be
updated, and the page loads, Delete what has been
inserted in the title text box, and press the update
button.
Input All original meta data table values, except for the
title being deleted, and the original audience from
LO table.
Excepted Output A message indicates that the title field is required.
Actual Output A message indicates that the title field is required.
Result Passed
Test Case Number T6b
Details After a specific LOID has been chosen to be
updated, and the page loads, replace what has been
written in the creator text box, with new value and
press the update button
Input All original meta data table values, the new creator
value, and the original audience from LO table.
Expected output A message indicates that the update has been
successfully performed.
Actual output A message indicating that the update has been
successfully performed.
Result Pass
125
d. Personal Collections
Number T7
Title Personal Collection Manipulation
Description A user creates a Personal Collection (PC) or multiple PCs with the ability to
rename or delete a PC. Learning Objects are added to PCs for a quick access
to favorite LOs. LOs can be removed from PCs.
Test Cases Test Case Number T7a
Details Access MyPC page without signing-in.
Input Access MyPC page indirectly through the
following URL: http://localhost:2620/MA3RIFAH/
reg/MyPC.aspx
Expected Output A message indicating that the user cannot
access the page without being signed-in.
Actual Output MyPC page of last user signed-in in the user’s
computer loads.
Result Fail
Test Case Number T7b
Details Access MyPC page through “My Home Page”
and user is signed-in.
Input Click on My Personal Collection link.
Expected Output My Personal Collection page appears.
Actual Output My Personal Collection page appears.
Result Pass
Test Case Number T7c
Details Adding a LO to a PC with no PC have been
created.
Input Click on “Add to My PC” in any LO page.
Expected Output Message indicating the no PCs were created.
Actual Output Message indicating the no PCs were created.
Result Pass
Test Case Number T7d
Details Rename a PC with an existing PC name
Input A String of the new name
Expected Output A message indicating that a PC with the
specified name has been created before.
Actual Output A message indicating that a PC with the
specified name has been created before.
Result Pass
Test Case Number T7e
Details Adding LO to a PC with user not signed- in
126
Input Click on “Add to my PC” in any LO page.
Expected Output Message indicating that the user did not sign-
in.
Actual Output Message indicating that the user did not sign-
in.
Result Pass
Test Case Number T7f
Details Rename a PC with an existing PC name.
Input A String of the new name
Expected Output A message indicating that a PC with the
specified name has been created before.
Actual Output A message indicating that a PC with the
specified name has been created before.
Result Pass
127
e. Report Back
Number T8
Title Report about a Learning Object.
Description A user reports about a Learning Object in cases where there is something
wrong about a Learning object such as a broken link, inaccurate content, or
placed in a wrong category.
Test Cases Test Case Number T8a
Details Report Back without signing-in.
Input Clicking on report back link in any LO page.
Expected Output A popup window with message indicating that
the user did not sign-in.
Actual Output A popup window with message indicating that
the user did not sign-in.
Result Pass
Test Case Number T8b
Details Report Back twice for the same LO.
Input Clicking on report back link in any LO page.
Expected Output A popup window with message indicating that
the user had reported about the LO before.
Actual Output A popup window with message indicating that
the user had reported about the LO before.
Result Pass
Test Case Number T8c
Details Report Back once with user signed-in
Input Clicking on report back link.
Expected Output A popup window with a text box to fill out the
reason of reporting.
Actual Output A popup window with a text box to fill out the
reason of reporting.
Result Pass
128
f. Comments
Number T9
Title Viewing and Adding comments for each learning object.
Description Users may read comments posted by other members about their opinion on
the LO; plus, members can post a comment about any LO. Comments are not
view to the public until it gets an approval by an administrator.
Test Cases Test Case Number T9a
Details A user adds a comment while he/she is not
signed-in.
Input A click on “Add a Comment” link in any LO
page.
Expected Output A message indicating that the user is not
signed-in.
Actual Output A message indicating that the user is not
signed-in.
Result Pass
Test Case Number T9b
Details A user adds a comment while he/she is signed-
in.
Input A click on “Add a Comment” link in a LO
page.
Expected Output A text box and a “Submit” button appear.
Actual Output A text box and a “Submit” button appear.
Result Pass
Test Case Number T9c
Details A user submits a comment about a specific LO.
Input A string “klid ”درسis typed in the message
text box in LOID=163 page.
Expected Output A new page appears with a confirmation
message, the page will redirect to the LO page
within 5 seconds.
Actual Output A new page appears with a confirmation
message, the page will redirect to the LO page
within 5 seconds.
Result Pass
129
3. LO Evaluation/Ranking
a. Rating
Number T10
Title Rate a LO
Description A user rates a learning object by specifying the number of stars the LO
deserves from a five star scale.
Test Cases Test Case Number T10a
Details Un logged user tries to rate a LO.
Input A Click on the third star on the 5 stars scale.
Expected Output A message indicates that the user cannot rate
without being logged-in.
Actual Output A message indicates that the user cannot rate
without being logged-in.
Result Pass
Test Case Number T10b
Details A logged user tries to rate a LO
Input A Click on the first star on the 5 stars scale
Expected Output A “Thank You” message appears and the new
rate average is updated.
Actual Output A “Thank You” message appears and the new
rate average is updated.
Result Pass
Test Case Number T10c
Details A logged user tries to rate an LO that he has
rated it once before
Input A Click on the fifth star on the 5 star scale.
Expected Output A message indicating that the user has rated
before
Actual Output A message indicating that the user has rated
before
Result Pass
130
b. Reports And Statistics
Number T11
Title Display reports and statistics
Description These tools present general statistics about the LOs usage, providing charts that
show how popular each Lo is, according to the entered rating.
Test Case Test Case Number T11a
Details Choose to view any of the reports while not
being connected to the existing server; the server
name have not been set to the current name
Input Click to preview a report
Expected Output A page showing a non existing server name
Actual output A page showing a non existing server name
Result Pass
131
c. RSS Feeds
Number T12
Title RSS Feed
Description This function allows the user to subscribe in of the allowable categories. Then,
he will be updated with the latest feeds.
Test cases Test Case Number T12a
Details The user tries to subscribe in a field that he has
already subscribed in it.
Input A click on a category from the list of the categories
in the RSS page
Expected Output A message indicating that the user has already
subscribed in the selected field
Result Pass
Result Pass
132
d. Recommendation
To test the recommender system, we created 10 users with each user having a
unique number. Some users have Interest fields and some don’t as shown on the
following table.
User no. 10 9 8 7 6 5 4 3 2 1
User
bwyr tyأ ازq افq bi
رةq ءylه اءvإ v
cر
Name
ان وvwا
اءةvwا
bcqmgwا
و cb
wا
¹wوا
twy®iwا cvwا
Interest vlhgwوا blqn مq cb
wا
None None None و ¹wا انvwا
Fields وblqnو ¹ و y
wا cvwا
cb
wا و
ةbl
و bcqmgwا
cb
wوا
ºcرygwا
cvwا
1 2
5 and
SubCatID ,2,4,5, None None and None 10 4 27 5
1
and 6 4
The following table shows subcategories that we are interested in exploring them.
مq اء وvwا cb
wا ان وvwا
SubCatName ºcرygwا ¹wا
y
wا twy®iwا cvwا bcqmgwا
SubCatID 13 27 10 5 4 1
Number of
0
3 0 16 29 2
LOs
133
The following table shows for each user what learning objects have he/she
rated, in which sub category the rated learning object follows and how many stars the
user gave to the learning object on a five star scale.
Then, users have added 11 learning object from different fields as shown below.
134
Based on the information about the users and their behavior, we will try to test
all possible situations that the recommender system may deal with; in other words, the
possible situations when the recommender system will recommend LOs for a user and
the situations when the recommender system will not recommend LOs for a user.
Note: IF indicated interest fields, and numbers indicate subcategories.
Number T13
Title Test The Recommender System
Description The Recommender System suggests LOs for users based on their LO rating,
number of track backs, number of downloads, and the user’s interest fields.
Test Cases Test Case Number T13a
Details The case when a user has an interest field and
votes within the interest fields and other fields
(Case of User 1)
Input IF=5 Rate= 5,5,7
Expected Output A recommendation of an LO within
SubCatID 5
Actual Output A recommendation of an LO within
SubCatID 5
Result Pass
Test Case Number T13b
Details The case when a user has more than 1 interest
fields and votes within the interest fields and
other fields (Case of User 2)
Input IF= 5,1 Rate=1,5,5,7
Expected Output A recommendation of an LO within
SubCatID 1
Actual Output A recommendation of an LO within
SubCatID 1
Result Pass
Test Case Number T13c
Details The case when a user has an interest field and
votes out of the interest field(Case of User 3)
Input IF= 27 Rate=8
Expected Output No recommendation
Actual Output No recommendation
Result Pass
Test Case Number T13d
Details The case when a user has an interest field and
135
did not vote at all (Case of User 4)
Input IF=10
Expected Output No recommendation
Actual Output No recommendation
Result Pass
Test Case Number T13e
Details The case when a user has interest fields and
votes within one if the interest field(Case of
User 5)
Input IF= 10,5, 13 Rate=5,5,5
Expected Output A recommendation of an LO within
SubCatID 5
Actual Output A recommendation of an LO within
SubCatID 5
Result Pass
Test Case Number T13f
Details The case when a user has no interest fields but
votes (Case of user 6)
Input Rate=6,6
Expected Output No recommendation
Actual Output No recommendation
Result Pass
Test Case Number T13g
Details The case when a user has no interest fields and
did not vote which is usually the case of a new
member (case of user 8)
Input None
Expected Output No recommendation
Actual Output No recommendation
Result Pass
136
4. Registration and Authentication
a. Registration
Number T14
Title Test the registration of a new user
Description Test the register function using correct and incorrect values to check that valid
entries are accepted and invalid entries are rejected
Test Case Test Case Number T14a
Details Fill all the fields in the registration form , with a
user name that is already exist then click the
"register" button"
Input All registration form fields with the user name
filled with "admin"
Expected Output A message indicating that the user name already
exist , with a pleasure to choose another name
Actual output A message indicating that the user name already
exist , with a pleasure to choose another name
Result Pass
Test Case Number T14b
Details Fill all the fields in the registration form with a
password that consist if two characters only,
then click the "register" button
Input All the registration form fields with the
password "hi"
Expected Output A message indicating that the password must
consist of at least 4 characters
Actual Output A message indicating that the password must
consist of at least 4 characters
Result Pass
Test Case Number T14b
Details Fill all the fields in the registration form , with
an email address that is already exist then click
the "register" button"
Input All registration form fields with the email filled
with "star1319@hotmail.com"
Expected Output A message indicating that the entered email
address is already in use
Actual Output A message indicating that the entered email
address is already in use
Result Pass
137
b. Log-in
Number T15
Title Test the login mechanism
Description Test the login function using correct and incorrect values to check that valid
users are accepted and invalid users are rejected.
Test Case Test Case Number T15a
Details Enter a correct user name in the user name text
box and a wrong password in the password text
box
Input A user name "admin" and a password
"12admon"
Expected Output A message indicating that the entered user name
and/or password is incorrect
Actual output A message indicating that the entered user name
and/or password is incorrect
Result Pass
Test Case Number T15b
Details Enter a wrong user name in the user name text
box and a wrong password in the password text
box
Input A user name "aduser" and a password
"12admon"
Expected Output A message indicating that the entered user name
and/or password is incorrect
Actual Output A message indicating that the entered user name
and/or password is incorrect
Result Pass
Test Case Number T15c
Details Enter an invalid user name in the user name text
box and a valid password in the password text
box
Input A user name "aduser" and a password "admin"
Expected Output A message indicating that the entered user name
and/or password is incorrect
Actual Output A message indicating that the entered user name
and/or password is incorrect
Result Pass
Test Case Number T15d
Details Enter a valid user name and a valid password
138
Input A user name "admin" and a password "admin"
Expected Output Redirecting the user to his home page
Actual Output Redirecting the user to his home page
Result Pass
139
5. Administration
a. Admin Pages
Number T16
Title Test the admin pages
Description After logging in as an admin, try to access all the privileges that the admin has
Test cases Test Case Number T16a
Details Choose one of the users "3beer", then try to change
the assigned role from a member to an admin
Input A click on the "update role" button.
Expected Output A message indicating that the role has been updates
successfully
Actual Output A message indicating that the role has been updates
successfully
Result Pass
Test Case Number T16b
Details Changing the user email address by clicking the edit
button
Input The new email address 3beer@yahoo.com, click on
"edit"
Expected Output View to the page again, with the new email shown ,
and the message "updated' appears
Actual Output View to the page again, with the new email shown ,
and the message "updated' appears
Result Pass
Test Case Number T16c
Details Editing the user profile information by clicking the
"edit" button under the profile, then clearing the first
name field
Input All previous values with the first name field, click on
"edit"
Expected Output A message indicating that all the fields must be filled
and the operation have not performed successfully
Actual Output A message indicating that all the fields must be filled
and the operation have not performed successfully
Result Pass
Test Case Number T16d
Details Choosing to delete the current user
Input A click on the "delete user " button
Expected Output A prompt asking if the admin is sure to delete the
140
user
Actual Output A prompt asking if the admin is sure to delete the
user
Result Pass
Test Case Number T16e
Details Fill all the form fields and leave the email field
empty
Input Click on the "create" button
Expected Output A message indicating that the email field must be
filled
Actual Output A message indicating that the email field must be
filled
Result Pass
Test Case Number T16f
Details Fill all the form fields, with the user name filled with
"3beer"
Input Click on the "create" button
Expected Output A message indicating that the user name already exist
Actual Output A message indicating that the user name already exist
Result Pass
141
b. Managing Roles
Number T17
Title Manage Roles
Description This function tests the performance of the two role ; administration and
members
Test Cases Test Case Number T17a
Details Choose to add a role without entering any text
in the new role text bob
Input A click on the "add Role" button
Expected Output A message indicating that the parameter "new
Role" must not be empty
Actual Output A message indicating that the parameter "new
Role" must not be empty
Result Pass
Test Case Number T17b
Details Enter the text "moderator" in the new Role
text box
Input A click on the "add a role" button
Expected Output A message indicating that the new role has
been created successfully
Actual Output A message indicating that the new role has
been created successfully
Result Pass
Test Case Number T17c
Details Choose to delete the moderator role
Input Click on the "delete" button beside the
moderator
Expected Output A prompt if the admin is sure to delete the role
Actual Output A prompt if the admin is sure to delete the role
Result Pass
142
c. Categories Administration
Number T18
Title Categories Administration
Description In this function, The admin select one of the categories, modify its name, add
new categories and sub categories and delete existing ones.
Test Case Test Case Number T18a
Details Choose to edit the name of one of the main
categories "
Input Replace "tl± اtcvw " اwith a new category
name "tcvwا," then click on the "update button"
Expected Output The new category name " tcvw "اappears
Actual output The new category name " tcvw "اappears
Result Pass
Test Case Number T18b
Details Choose to Add the new category" »w ا " by
typing it on the category text box
Input Click on the " ty "إbutton
Expected Output A message indicating that the category has been
successfully added
Actual output A message indicating that the category has been
successfully added
Result Pass
Test Case Number T18c
Details Choose the "tlvw اt¥w "اcategory from the drop
down menu , then enter " t¼¢w "اin the text box
Input Click on the " ty "إbutton
Expected Output A message indicating that the sub category has
been successfully added
Actual Output A message indicating that the sub category has
been successfully added
Result Pass
Test Case Number T18d
Details Choose to edit the sub category "t¼¢w "اby
clicking the edit button beside its ID "36", then
enter " t¼¢w ا " in the sub category name text
box
Input A click on the "update" button
Expected Output The row appear again with the modification has
been performed
143
Actual Output The row appear again with the modification has
been performed
Result Pass
Test Case Number T18e
Details Choose to delete the subcategory "t¼¢w ا "
Input Click on the "delete" button
Expected Output The list of subcategories appear without the
subcategory "t¼¢w ا "
Actual Output The list of subcategories appear without the
subcategory "t¼¢w ا "
Result Pass
144
d. Metadata Administration
Number T19
Title Metadata Administration
Description In this function , the admin Modify values of metadata
Test Case Test Case Number T19a
Details Choose to modify the metadata for the LO with
the identifier 27 by clicking on the "edit" button
, then enter "unknown" in the contributor field
Input Click on the update button
Expected Output The row appears again with the contributor field
has been modified
Actual output The row appears again with the contributor field
has been modified
Result Pass
e. Membership Administration
Number T20
Title Membership Administration
Description In this function, The admin Deletes a member
Test Case Test Case Number T20a
Details Choose to delete one of the members
Input Click on the "delete" button In the specified
member row
Expected Output The list of members appear again with the
specified member has been deleted
Actual output The list of members appear again with the
specified member has been deleted
Result Pass
145
12.Bugging and Debugging
12.1 Bugging
After testing all the sites’ functions, 6 test cases have failed. For test case
T2a which was clicking the search button and leaving all the fields empty, the
error was a syntax error. For test case T2b which was choosing the “Audience”
field only and then clicking search button, the problem was that the search engine
did not find any match although there were expected LOs to appear. For test case
T3b which was browsing an empty subcategory. The sorting drop down menu
appears although there were no LOs to sort. For test case T4a which was
accessing upload page through URL by anonymous, the user have gained the
access to the page although he/she did not sign in. For test case T5e which was
delete a LO that is does not exist. Nothing indicates that the LO with the specified
LO does not exist. For test case T7a which was accessing “My PC” page through
URL by anonymous; the user have gained the access to the page although he/she
did not sign in.
12.2 Debugging
In the debugging phase, we try to correct all the errors that were discovered
during the test phase. Test cases T2a and T2b were fixed by placing a Boolean
variable that shows if the user has filled at least one field. Test case T3b was fixed
by binding the visibility of the dropdown menu with number of LOs in the sub
category, it the sub category is empty, and then the sorting dropdown menu will
be invisible. For test cases T4a and T7a, the solution was to aggregate all the
pages that require log-in in one folder. Test case T5e was fixed by placing a label
indicates that there are no LO with the specified LOID, the label appears each
time an administrator wishes to delete a LO that does not exist.
146
Actual Output A string indicates that no results were found.
Result Pass
147
object(s).
Input Clicking on Category "tlvw اt¥w "اand Subcategory "vw" ا{دب ا
Expected Output No list of results and a message “ l¨gw ها اtliln تy bdqn
انg vw ”اsince this subcategory is empty.
Actual Output No list of results and a message “ l¨gw ها اtliln تy bdqn
انg vw ”اand the LO sorting dropdown list.
Result Pass
reg/MyPC.aspx
Expected Output A message indicating that the user cannot access the page
without being signed-in.
Actual Output A message indicating that the user cannot access the page
without being signed-in.
Result Pass
148
Number T1
Title
Description
Test Case Test Case Number T1a
Details
Input
Expected Output
Actual output
Result Pass
Test Case Number T1b
Details
Input
Expected Output
Actual Output
Result Pass
149
13. Conclusion
Fortunately, we have managed to develop Marifah site within 10 months
starting on august 2007 and ending on July 2008. The analysis and design phase were
completed by the end of the first semester whereas the implementation phase was
completed by the end of the second semester.
Marifah site contains many useful tools for managing learning objects. Users
can contribute learning object in two ways either by linking a webpage or uploading
directly to the repository. This is a unique feature that few repositories on the web can
deal with. Moreover, users can explore the site easily and in an organized way by
organizing learning object into categories then sub categories and providing many
tools to evaluate, distribute, and comment on learning objects. Finally, the
recommender system, the sites most unique feature and the latest trend on the web
that will assist members of Marifah in choosing what learning objects are suitable for
their interest.
The project has consumed all of our time and effort and it was a struggle for us
to complete Marifah website ontime; however, after the completion of the website, we
felt, as members of the project team, so proud that we could manage to achieve what
we have done and we hopefully could manage to accomplish our vision which was
creating a premiere online community for Arabs where faculty, staff, and students
share their learning materials.
150
14. Future Work
The website at the present contains the basic functionalities that any digital
repository for learning object has plus the unique feature of LO recommendation;
moreover, the site is capable to encompass extra functionalities that will enhance the
site in the future. The functionalities that will be added in the future are the following:
151
15. References
“ the digital repository comes of age “ , (2003, July), (edu cause :
transforming education through information technologies) Available:
http://www.educause.edu/ir/library/pdf/NLI0358.pdf (Accessed:
2007,october 22)
- Powell, Andy ( 1998, July 15), "Metadata for the web" ,(UKOLN),
Available:http://www.ukoln.ac.uk/metadata/presentations/ukolug98/tsld001.htm,(
Accessed:2007,October 19).
“watch and learn : how recommendation systems are redefining the web”
(2006,dec,13), (user interface engineering), Available :
www.uie.com/articles/recommendation-systems/, Accessed: (2007,oct)
" RSS Syndication and Aggregation ", (2007), (web reference), Available:
http://www.webreference.com/authoring/languages/xml/rss/intro/2.html
(Accessed: 2007,oct, 31)
" WebRef and the Future of RSS", (2007), (web reference), Available:
http://www.webreference.com/authoring/languages/xml/rss/intro/3.html
(Accessed: 2007,oct, 31)
152
Pilgrim, Mark. (December 18, 2002), " What Is RSS ", (O'reilly xml.com),
Available: http://www.xml.com/pub/a/2002/12/18/dive-into-xml.html
(Accessed: 2007,oct, 31).
" Federated Search Engines ", (16-19 Mr/Ap 2004), (search right), Available:
http://www.searchitright.com/federated_search_engines.htm (Accessed:
2007,oct, 28).
" Federated Search in an Age of Web Services ", (2005), (E-prints in Library
and Information Science), Available: http://eprints.rclis.org/archive/00006828/
(Accessed: 2007,oct, 28).
153
16. Appendices
16.1 TrackBack:
A Linkback is a method for Web authors to obtain notifications when other authors link to
(ping) from Site 2 to the Site 1. The Site 1 often publishes a link back to Site 2 indicating its
worthiness.
• Pingback is a signal (ping) sent from Site 2 to Site 1. However, it's also a link. When
Site1 receives the notification signal, it automatically goes back to Site 2 checking for the
existence of a live incoming link. If that link exists, the Pingback is recorded successfully.
154
Trackback Pingback
Notification
HTTP POST XML-RPC call
medium
Additional
information
IP address of linking server
presented to
linked server
• Notification mechanism
All the information desired by
has a complete technical
the linked server (Linking site
specification
beneficent
name, post title, excerpt) is
• Less susceptible to
present in the notification itself
spamming
155
16.2 RSS
4) The reader visits the specified XML Web page at specific intervals and
check for updates.
You can arrange your feeds into folders and even set alerts and sounds for
when a particular web feed is updated
156
16.3 Federated Search
retrieval systems.
• consists of:
• In traditional search engines such as Google, only sources that have been
and accessed.
technology.
157
• Federated searching resolves this issue and makes these deep Web
refers to World Wide Web content that is not part of the surface
search list.
o Access details for the individual databases must be preset in the portal
by its owner
• Federated search need not place any requirements or burdens on owners of the
• The types of resources that can be searched include local and remote library
• When the search vocabulary or data model of the search system is different
from the data model of one or more of the foreign target systems the query
must be translated into the each of the foreign target systems. This can be
translation:
158
o Hand-coded, graphical manual :
language or C++.
o Data-driven mapping:
transformation logic.
metadata registry.
159
• Challenges:
o The use of multiple names to describe the same thing plagues the
information industry
through
if they are too loose, items that are not really duplicates may be
merged.
• Z39.50:
o Setup is straightforward
160
• API (application Programming Interface)
• XML Gateway:
• HTTP connector:
o metasearch engines run searches via multiple Web search engines that
sources.
161
• limitations of the current generation of federated search engines include:
used.
and more applications, not just in the library world but the commercial
sector as well, to save time and money and to enhance the user's search
experience.
162
16.4 Issues with Dspace
During the first two weeks of the current semester ,we were trying to use the Dspace
Open source in order to reengineer it. So we began to download the required tools and
install them, but we faced many issues within and after the installation of the Dspace
such as:
• Undefined Errors The resulting errors were ambiguous and not defined.
All actions seemed to be incorrect and had the same error message which
is "Internal System Error" and that was a time consuming for us since we
were trying to do the steps over and over again and finding the same errors
appears. After completing the installation , we found that some of the
operations in Dspace like Submission were led us to the same error
message.
• Uncooperative Community The supporting team of Dspace were not
responding, we sent a lot of e-mails asking them to help us in solving some
issues that we failed to fix, but unfortunately no one replied.
• Language One of the demands that the interface of the repository
should be in Arabic and when we tried to change the language by
following some steps written for that reason, unfortunately nothing has
been changed, we tried a lot of things by changing some of the code but
we got the same result. After doing some search for repositories written in
Arabic using the Dspace we note that there were no presence of Arabic
interface using Dspace nor any previous attempt came out with what we
wanted.
There were some difficulties to understand this open source, and other problems we
failed to answer, all that could be solved but would cost us more time, and the time
was our concern so we decided to move on and start to build and implement the
system from scratch.
163
16.5 Source Codes
1-Search
The search code in search.aspx.vb as follow:
******************
Sub Simple()
If Request.QueryString("Type").ToString() = 1 Then
Dim conn As SqlConnection
Dim dt As DataTable
conn = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
Dim cmd As SqlCommand = conn.CreateCommand()
finaltext.Append("MetaData.Title='#####')")
164
cmd.CommandText = "SELECT LO.LOID, LO.SubCatID, LO.UserId,
LO.BundleURL, LO.NoOfDownloads, LO.NoOfViews, LO.TrackBacks,
LO.rating, LO.audience, MetaData.Identifier, MetaData.Title,
MetaData.Creator, MetaData.Language, MetaData.Format, MetaData.Date,
MetaData.Contributor, MetaData.Description, MetaData.Coverage,
MetaData.Publisher, MetaData.Relation, MetaData.Rights,
MetaData.Source, MetaData.Subject, MetaData.Type FROM LO INNER
JOIN MetaData ON LO.LOID = MetaData.Identifier WHERE ( " &
finaltext.ToString()
If dt.Rows.Count = 0 Then
Me.ResultLabel.Text = "r sH5 رDu48 اvFA wx yLKz; .. "
Me.numResults.Visible = False
Me.Label1.Visible = False
Me.DropDownList1.Visible = False
Else
Me.numResults.Text = "{ دK} & " اdt.Rows.Count.ToString()
& " 3~:H"
Me.DataList1.DataSource = dt
DataList1.DataBind()
End If
Else
SimpleExactPhrase() 'exact phrase
End If
End Sub
**********************
Sub advance()
If Request.QueryString("SearchType").ToString() = 1 Then
'search for any word
End If
165
If finaltext.Length <> 0 Then
finaltext.Append("and ")
End If
For Each str As String In s2
finaltext.Append("MetaData.Subject LIKE '%" & str
& "%' or ")
Next
finaltext.Append("MetaData.Subject='#####'")
End If
166
finaltext.Append("and ")
End If
finaltext.Append("LO.SubCatID=" & s7)
End If
If dt.Rows.Count = 0 Then
Me.ResultLabel.Text = "r sH5 رDu48 اvFA wx yLKz; .. "
Me.numResults.Visible = False
Me.Label1.Visible = False
Me.DropDownList1.Visible = False
Else
Me.numResults.Text = "{ دK}& " ا
dt.Rows.Count.ToString() & " 3~:H"
Me.DataList1.DataSource = dt
DataList1.DataBind()
End If
Else
CompExactPhrase() 'exact phrase
End If
End Sub
**************************
Sub SimpleExactPhrase()
167
Dim conn As SqlConnection
Dim dt As DataTable
conn = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
If Me.DropDownList1.SelectedValue = 1 Then
finaltext.Append(" ORDER BY MetaData.Title ASC")
ElseIf Me.DropDownList1.SelectedValue = 2 Then
finaltext.Append(" ORDER BY MetaData.Creator ASC")
ElseIf Me.DropDownList1.SelectedValue = 3 Then
finaltext.Append(" ORDER BY MetaData.Date ASC")
ElseIf Me.DropDownList1.SelectedValue = 4 Then
finaltext.Append(" ORDER BY MetaData.Date DESC")
Else 'default option
finaltext.Append(" ORDER BY MetaData.Date DESC")
End If
If dt.Rows.Count = 0 Then
Me.ResultLabel.Text = "r sH5 رDu48 اvFA wx yLKz; .. "
Me.numResults.Visible = False
Me.Label1.Visible = False
Me.DropDownList1.Visible = False
Else
Me.numResults.Text = "{ دK}& " ا
dt.Rows.Count.ToString() & " 3~:H"
Me.DataList1.DataSource = dt
DataList1.DataBind()
End If
End Sub
**************************
Sub CompExactPhrase()
Dim conn As SqlConnection
168
Dim dt As DataTable
conn = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
End If
169
If finaltext.Length <> 0 Then
finaltext.Append("and ")
End If
finaltext.Append("MetaData.Type LIKE '%" & s6 & "%'")
End If
If dt.Rows.Count = 0 Then
Me.ResultLabel.Text = "r sH5 رDu48 اvFA wx yLKz; .. "
Me.numResults.Visible = False
Me.Label1.Visible = False
Me.DropDownList1.Visible = False
Else
Me.numResults.Text = "{ دK}& " ا
dt.Rows.Count.ToString() & " 3~:H"
Me.DataList1.DataSource = dt
170
DataList1.DataBind()
End If
End Sub
The advanced search in AdvancedSearch.aspx.vb as follow:
Response.Redirect(url.ToString.Replace(Microsoft.VisualBasic.vbLf,
""))
End Sub
2- RSS
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0">
<channel>
</channel>
</rss>
171
3- Users Report
<body>
<form id="form1" runat="server">
<div>
<cr:crystalreportviewer id="CrystalReportViewer1"
runat="server" autodatabind="True"
height="50px" reportsourceid="CrystalReportSource1"
style="position: relative"
width="350px"></cr:crystalreportviewer>
<cr:crystalreportsource id="CrystalReportSource1"
runat="server">
<Report FileName="usersstats.rpt"></Report>
</cr:crystalreportsource>
</div>
</form>
</body>
4- LO Report
<body>
<form id="form1" runat="server">
<div>
<CR:CrystalReportViewer ID="CrystalReportViewer1"
runat="server" AutoDataBind="True"
Height="50px" ReportSourceID="CrystalReportSource1"
Style="position: relative"
Width="350px" />
<CR:CrystalReportSource ID="CrystalReportSource1"
runat="server">
<Report FileName="book.rpt">
</Report>
</CR:CrystalReportSource>
</div>
</form>
</body>
5- Count LO Report
<body>
<form id="form1" runat="server">
<div>
<CR:CrystalReportViewer ID="CrystalReportViewer1"
runat="server" AutoDataBind="True"
Height="50px" ReportSourceID="CrystalReportSource1"
Style="position: relative"
Width="350px" />
<CR:CrystalReportSource ID="CrystalReportSource1"
runat="server">
<Report FileName="countLO.rpt"></Report>
172
</CR:CrystalReportSource>
</div>
</form>
</body>
6- Browse:
Imports System.IO
Imports System.data
Imports System.Data.SqlClient
Try
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
reader = myCommand.ExecuteReader()
reader.Read()
C = CInt(reader(0))
reader.Close()
myCommand.ExecuteNonQuery()
myTransaction.Commit()
Catch ex As Exception
If (myTransaction.Equals(Nothing) = False) Then
myTransaction.Rollback()
End If
Finally
173
myConnection.Dispose()
End Try
If C <= 0 Then
Label1.Visible = True
Label2.Visible = False
Me.DropDownList1.Visible = False
Else
Me.HyperLink1.Visible = True
End If
If Me.DropDownList1.SelectedValue = 1 Then
DataList1.DataSourceID = ("SqlDataSource3")
End Sub
Public Function MyFunc(ByVal r As Object, ByVal LOID As String)
As Integer
Try
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
reader = myCommand.ExecuteReader()
reader.Read()
avg = CInt(reader(0))
174
reader.Close()
myTransaction.Commit()
Catch ex As Exception
If (myTransaction.Equals(Nothing) = False) Then
myTransaction.Rollback()
test = False
Return 0
End If
Finally
myConnection.Dispose()
End Try
If test = True Then
Return avg
End If
End Function
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
reader = myCommand.ExecuteReader()
175
reader.Read()
con = CInt(reader(0))
reader.Close()
myTransaction.Commit()
Catch ex As Exception
If (myTransaction.Equals(Nothing) = False) Then
myTransaction.Rollback()
test = False
Return 0
End If
Finally
myConnection.Dispose()
End Try
If test = True Then
Return con
End If
End Function
End Sub
End Class
Query string method was used in linking subcategories to the next page; example of
the links as follows:
Data list is used to arrange the learning objects in the page; part of the code is as
follows:
176
<asp:DataList ID="DataList1" runat="server" DataKeyField="LOID"
DataSourceID="SqlDataSource1"
Style="position: static">
<ItemTemplate>
<table style="position: static" dir="rtl">
<tr>
<td align="right" colspan="7" style="height: 34px">
<asp:Label ID="TitleLabel"
runat="server" Font-Bold="True" Font-Size="11pt" ForeColor="#F20000"
Style="direction: rtl; position: static;
text-align: right" Text='<%# Eval("Title") %>'></asp:Label></td>
<td align="right" colspan="1" style="height:
34px; width: 50px;" dir="rtl">
177
<asp:SqlDataSource ID="SqlDataSource5" runat="server"
ConnectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\DB.mdf;Integrate
d Security=True;User Instance=True"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT LO.LOID,
LO.SubCatID, LO.UserId, LO.BundleURL, LO.NoOfDownloads, LO.NoOfViews,
LO.TrackBacks, LO.rating, LO.audience, MetaData.Identifier,
MetaData.Title, MetaData.Creator, MetaData.Language, MetaData.Format,
MetaData.Date, MetaData.Contributor, MetaData.Description,
MetaData.Coverage, MetaData.Publisher, MetaData.Relation,
MetaData.Rights, MetaData.Source, MetaData.Subject, MetaData.Type
FROM LO INNER JOIN MetaData ON LO.LOID = MetaData.Identifier WHERE
(LO.SubCatID = @SubCatID) ORDER BY MetaData.Title ASC">
<SelectParameters>
<asp:QueryStringParameter Name="SubCatID"
QueryStringField="SubCatID" />
</SelectParameters>
</asp:SqlDataSource>
Try
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
178
myCommand.Parameters.AddWithValue("SubCatID",
Request.QueryString("SubCatID"))
reader = myCommand.ExecuteReader()
reader.Read()
C = CInt(reader(0))
reader.Close()
myCommand.ExecuteNonQuery()
myTransaction.Commit()
Catch ex As Exception
If (myTransaction.Equals(Nothing) = False) Then
myTransaction.Rollback()
End If
Finally
myConnection.Dispose()
End Try
If C <= 0 Then
Label1.Visible = True
Else
Me.HyperLink1.Visible = True
End If
If Me.DropDownList1.SelectedValue = 1 Then
DataList1.DataSourceID = ("SqlDataSource3")
End Sub
8-Average rate:
The form of rating control is:
<ajaxToolkit:Rating
ID="Rating1" runat="server" AutoPostBack="True" CssClass="ratingStar"
CurrentRating='<%# MyFunc("Rating1",Container.DataItem("LOID")) %>'
Direction="RightToLeft" EmptyStarCssClass="Empty"
FilledStarCssClass="Saved" RatingDirection="RightToLeftBottomToTop"
StarCssClass="ratingItem" WaitingStarCssClass="Filled" Width="76px"
ReadOnly="True" BehaviorID="Rating1_RatingExtender" Enabled="False"
EnableTheming="False" EnableViewState="False">
179
</ajaxToolkit:Rating>
Try
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
reader = myCommand.ExecuteReader()
reader.Read()
avg = CInt(reader(0))
reader.Close()
myTransaction.Commit()
Catch ex As Exception
If (myTransaction.Equals(Nothing) = False) Then
myTransaction.Rollback()
test = False
Return 0
180
End If
Finally
myConnection.Dispose()
End Try
If test = True Then
Return avg
End If
End Function
9- Number of votes
Public Function count(ByVal LOID As String) As Integer
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
reader = myCommand.ExecuteReader()
reader.Read()
con = CInt(reader(0))
reader.Close()
myTransaction.Commit()
Catch ex As Exception
181
If (myTransaction.Equals(Nothing) = False) Then
myTransaction.Rollback()
test = False
Return 0
End If
Finally
myConnection.Dispose()
End Try
If test = True Then
Return con
End If
End Function
Form View was used to arrange page; part of the code is as follows:
182
Dim user As MembershipUser F= Membership.GetUser()
Dim filename As String =
CType(FormView1.FindControl("BundleURLLabel"), Label).Text
If filename.StartsWith("http://") Then
Dim scriptString As String = "<script
language='JavaScript'>window.open('" + filename + "');</script>"
ClientScript.RegisterStartupScript(Me.GetType(), "",
scriptString)
Else
Response.Clear()
Response.ContentType = "application/octet-stream"
Response.AddHeader("Content-Disposition", _
"attachment; filename=""" & filename & """")
Response.Flush()
Response.WriteFile(filename)
End If
End Sub
End Class
Number of download:
Is the process to count the number of user who download this learning
object, this process begins when user click on the download button
Dim i As String =
CType(FormView1.FindControl("NoOfDownloadsLabel"), Label).Text
i = i + 1
Dim myConnection As SqlConnection
Dim myTransaction As SqlTransaction = Nothing
Try
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
myCommand.Parameters.AddWithValue("NoOfDownloads", i)
myCommand.Parameters.AddWithValue("LOID",
CType(FormView1.FindControl("LOIDLabel"), Label).Text)
myCommand.ExecuteNonQuery()
myTransaction.Commit()
Catch ex As Exception
If (myTransaction.Equals(Nothing) = False) Then
myTransaction.Rollback()
End If
Finally
myConnection.Dispose()
183
End Try
End sub
Try
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
myCommand.Parameters.AddWithValue("LOID",
CType(FormView1.FindControl("LOIDLabel"), Label).Text)
myCommand.Parameters.AddWithValue("date", DateTime.Now())
myCommand.Parameters.AddWithValue("comment",
TextBox1.Text)
myCommand.Parameters.AddWithValue("UserId",
user.ProviderUserKey.ToString())
myCommand.ExecuteNonQuery()
myTransaction.Commit()
Catch ex As Exception
If (myTransaction.Equals(Nothing) = False) Then
myTransaction.Rollback()
End If
Finally
myConnection.Dispose()
End Try
Response.Redirect("AddCommSuccess.aspx?LOID=" +
CType(FormView1.FindControl("LOIDLabel"), Label).Text)
End Sub
184
SelectCommand="SELECT COUNT(Cno) AS NoCount FROM Comment
WHERE (LOID = @LOID)">
<SelectParameters>
14- Rating:
Protected Sub Rating1_Changed(ByVal sender As Object, ByVal e As
AjaxControlToolkit.RatingEventArgs) Handles Rating1.Changed
Try
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
myCommand.Parameters.AddWithValue("UserId",
user.ProviderUserKey.ToString())
myCommand.Parameters.AddWithValue("LOID", LO)
myCommand.Parameters.AddWithValue("NoStars",
Rating1.CurrentRating)
myCommand.ExecuteNonQuery()
185
myTransaction.Commit()
Catch ex As Exception
If (myTransaction.Equals(Nothing) = False) Then
myTransaction.Rollback()
If Not (My.User.IsAuthenticated) Then
Rating1.CurrentRating = 0
Rating1.ReadOnly = True
labelValue1.ForeColor = Drawing.Color.Red
labelValue1.Text = "ًاDPA..r sG :~HL لD
8"ا
test = False
Else
Rating1.CurrentRating = 0
Rating1.ReadOnly = True
labelValue1.ForeColor = Drawing.Color.Red
labelValue1.Text = "ً
اDPA..
G8 E s::GH8KL K
ًG;"
test = False
End If
End If
Finally
myConnection.Dispose()
End Try
If (test = True) Then
Rating1.ReadOnly = True
labelValue1.Text = "ا6..HرآK7I s::GH8"ا
End If
End Sub
End If
Dim i As String =
CType(FormView1.FindControl("NoOfViewsLabel"), Label).Text
i = i + 1
Dim myConnection As SqlConnection
Dim myTransaction As SqlTransaction = Nothing
186
Dim cmd As String
cmd = " UPDATE LO SET NoOfViews = @NoOfViews WHERE (LOID =
@LOID)"
Try
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
myCommand.Parameters.AddWithValue("NoOfViews", i)
myCommand.Parameters.AddWithValue("LOID",
CType(FormView1.FindControl("LOIDLabel"), Label).Text)
myCommand.ExecuteNonQuery()
myTransaction.Commit()
Catch ex As Exception
If (myTransaction.Equals(Nothing) = False) Then
myTransaction.Rollback()
End If
Finally
myConnection.Dispose()
End Try
End Sub
Try
Dim ToAddress As String = TextBox3.Text
msg.IsBodyHtml = False
msg.SubjectEncoding =
System.Text.Encoding.GetEncoding("windows-1256")
msg.BodyEncoding =
System.Text.Encoding.GetEncoding("windows-1256")
187
smtp.DeliveryMethod = SmtpDeliveryMethod.Network
smtp.Send(msg)
Label6.Text = "Message sent successesfully !"
Catch ex As SmtpException
Label6.Text = "Error : " + ex.Message
End Try
End Sub
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
Dim myCommand As SqlCommand = New SqlCommand(cmd,
myConnection, myTransaction)
myCommand.Parameters.AddWithValue("LOID",
Request.QueryString("LOID"))
myCommand.Parameters.AddWithValue("reason", TextBox1.Text)
myCommand.Parameters.AddWithValue("date", DateTime.Now())
myCommand.Parameters.AddWithValue("UserId",
user.ProviderUserKey.ToString())
Label1.Visible = True
myCommand.ExecuteNonQuery()
myTransaction.Commit()
End Sub
188
cmd = " SELECT COUNT(RBID)FROM ReportBack WHERE
UserId=@UserId AND LOID=@LOID"
'Try
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
myCommand.Parameters.AddWithValue("LOID",
Request.QueryString("LOID"))
myCommand.Parameters.AddWithValue("UserId",
user.ProviderUserKey.ToString())
reader = myCommand.ExecuteReader()
reader.Read()
count = CInt(reader(0))
reader.Close()
End Sub
mailClient.Host = mailServerName
mailClient.Port = 25
mailClient.Send(message)
message.Dispose()
End Sub
189
All codes of admin pages consists of gridviews that are connected to the database
through SQLDataSource. A sample of these pages that shows the code of Categories
administration page is shown below:
190
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AllowSorting="True"
AutoGenerateColumns="False" BackColor="White"
BorderColor="#DEDFDE" BorderStyle="None"
BorderWidth="1px" CellPadding="4"
DataSourceID="SqlDataSource2" EmptyDataText="There are no data
records to display."
ForeColor="Black" GridLines="Vertical">
<FooterStyle BackColor="#CCCC99" />
<RowStyle BackColor="#F7F7DE" />
<Columns>
<asp:TemplateField SortExpression="UserName">
<HeaderTemplate>view</HeaderTemplate>
<ItemTemplate >
<a href="EditUser.aspx?username=<%# Eval("UserName")
%>">view</a>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="UserId"
HeaderText="UserId" SortExpression="UserId" ReadOnly="True" />
<asp:BoundField DataField="UserName"
HeaderText="UserName" SortExpression="UserName" />
<asp:BoundField DataField="Password"
HeaderText="Password" SortExpression="Password" />
<asp:BoundField DataField="Email" HeaderText="Email"
SortExpression="Email" />
<asp:BoundField DataField="InterestField"
HeaderText="InterestField" SortExpression="InterestField" />
<asp:BoundField DataField="CreateDate"
HeaderText="CreateDate" SortExpression="CreateDate" ReadOnly="True"
/>
<asp:BoundField DataField="LastLoginDate"
HeaderText="LastLoginDate" SortExpression="LastLoginDate"
ReadOnly="True" />
</Columns>
<PagerStyle BackColor="#F7F7DE" ForeColor="Black"
HorizontalAlign="Right" />
<SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True"
ForeColor="White" />
<HeaderStyle BackColor="#6B696B" Font-Bold="True"
ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:DBConnectionString2 %>"
DeleteCommand="DELETE FROM [aspnet_Users] WHERE [UserId]
= @UserId" InsertCommand="INSERT INTO [aspnet_Users]
([ApplicationId], [UserId], [UserName], [LoweredUserName],
[MobileAlias], [IsAnonymous], [LastActivityDate]) VALUES
(@ApplicationId, @UserId, @UserName, @LoweredUserName, @MobileAlias,
@IsAnonymous, @LastActivityDate)"
ProviderName="<%$
ConnectionStrings:DBConnectionString2.ProviderName %>"
SelectCommand="SELECT aspnet_Users.UserId, aspnet_Users.UserName,
aspnet_Membership.Password, aspnet_Membership.Email,
aspnet_Membership.CreateDate, aspnet_Membership.LastLoginDate,
aspnet_Profile.PropertyValuesString,
User_InterestFields.InterestField FROM aspnet_Users INNER JOIN
aspnet_Membership ON aspnet_Users.UserId = aspnet_Membership.UserId
191
INNER JOIN aspnet_Profile ON aspnet_Users.UserId =
aspnet_Profile.UserId INNER JOIN User_InterestFields ON
aspnet_Users.UserId = User_InterestFields.UserId"
UpdateCommand="UPDATE [aspnet_Users] SET [ApplicationId]
= @ApplicationId, [UserName] = @UserName, [LoweredUserName] =
@LoweredUserName, [MobileAlias] = @MobileAlias, [IsAnonymous] =
@IsAnonymous, [LastActivityDate] = @LastActivityDate WHERE [UserId] =
@UserId">
<DeleteParameters>
<asp:Parameter Name="UserId" Type="Object" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="ApplicationId" Type="Object" />
<asp:Parameter Name="UserId" Type="Object" />
<asp:Parameter Name="UserName" Type="String" />
<asp:Parameter Name="LoweredUserName" Type="String"
/>
<asp:Parameter Name="MobileAlias" Type="String" />
<asp:Parameter Name="IsAnonymous" Type="Boolean" />
<asp:Parameter Name="LastActivityDate"
Type="DateTime" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="ApplicationId" Type="Object" />
<asp:Parameter Name="UserName" Type="String" />
<asp:Parameter Name="LoweredUserName" Type="String"
/>
<asp:Parameter Name="MobileAlias" Type="String" />
<asp:Parameter Name="IsAnonymous" Type="Boolean" />
<asp:Parameter Name="LastActivityDate"
Type="DateTime" />
<asp:Parameter Name="UserId" Type="Object" />
</UpdateParameters>
</asp:SqlDataSource>
</div>
</form>
</body>
username = Request.QueryString("username")
Response.Redirect("MainPage.aspx")
End If
user = Membership.GetUser(username)
192
user2 = Profile.GetProfile(username)
Next
End If
End Sub
Membership.DeleteUser(username, True)
Response.Redirect("MainPage.aspx")
End Sub
Try
user.Email = e.NewValues(0).ToString()
user.IsApproved = e.NewValues(1).ToString()
Membership.UpdateUser(user)
e.Cancel = True
UserInfo.ChangeMode(DetailsViewMode.ReadOnly)
Label1.Text = "updated.."
Catch ex As Exception
e.Cancel = True
UserInfo.ChangeMode(DetailsViewMode.ReadOnly)
End Try
End Sub
Try
user2.ReciveMail = e.NewValues(0).ToString()
user2.FirstNme = e.NewValues(1).ToString()
user2.EducationalLevel = e.NewValues(2).ToString()
user2.LastName = e.NewValues(3).ToString()
user2.Save()
e.Cancel = True
UserProfile.ChangeMode(DetailsViewMode.ReadOnly)
Label3.Text = "updated.."
Catch ex As Exception
193
Label3.Text = "
; آ34 B: لDGا.. r sH 3:FE48ا
7L ¡:OQ"
e.Cancel = True
UserProfile.ChangeMode(DetailsViewMode.ReadOnly)
End Try
End Sub
End Sub
filteredUsers.Add(user)
End If
Next
Users.DataSource = filteredUsers
Users.DataBind()
End Sub
194
End Sub
filteredUsers.Add(user)
Exit For
End If
Next
Next
Else
filteredUsers = allUsers
End If
Users.DataSource = filteredUsers
Users.DataBind()
End Sub
If (rolebox.Selected) Then
Roles.AddUserToRole(UserName.Text, rolebox.Text)
End If
Next
Catch ex As MembershipCreateUserException
Msg.Text = GetErrorMessage(ex.StatusCode)
Catch ex As HttpException
Msg.Text = ex.Message
195
End Try
End Sub
Case MembershipCreateStatus.DuplicateEmail
Return "
5¦8¨و§ ا8©«ي ا8 اHF
م أد¢H; K
ًـG;"
Case MembershipCreateStatus.InvalidPassword
Return "3EFور آ6I ® ا3O:OQ ، ¯} أنG© A 4 ."
Case MembershipCreateStatus.InvalidEmail
Return "
5¦8¨و§ ا8©¡ ® ا:OQ ءK£68 ا38وK°ة ا6;
ى6"أ
Case MembershipCreateStatus.InvalidAnswer
Return " "
Case MembershipCreateStatus.InvalidQuestion
Return " "
Case MembershipCreateStatus.InvalidUserName
Return "s=
م ا¢HI¡ ® ا:OQ ، ءK£68 ا38وK°ة ا6; ى6"أ
Case MembershipCreateStatus.ProviderError
Return "=
G8
ثz ءK³´ أ:~H8 ا، ءK£68ا
38وK°ة ا6; ى6" ا
Case MembershipCreateStatus.UserRejected
Return "=
G8
ثz ءK³´ أ:~H8 ا، ءK£68ا
38وK°ة ا6; ى6" ا
Case Else
Return "=
G8
ثz ءK³´ أ:~H8 ا، ءK£68ا
38وK°ة ا6; ى6" ا
End Select
End Function
196
Dim numberOfUsersInRole As Integer =
Roles.GetUsersInRole(roleName).Length
Dim roleRow As String() = {roleName,
numberOfUsersInRole.ToString()}
RoleList.Rows.Add(roleRow)
Next
UserRoles.DataSource = RoleList
UserRoles.DataBind()
If (createRoleSuccess) Then
NewRole.Text = ""
End If
End Sub
Try
Roles.CreateRole(NewRole.Text)
label1.Text = "Role was added successfuly"
createRoleSuccess = True
Catch ex As Exception
label1.Text = ex.Message
createRoleSuccess = False
End Try
End Sub
Roles.DeleteRole(e.CommandArgument.ToString())
label1.Text = "Role was deleted successfuly"
Catch ex As Exception
label1.Text = ex.Message
End Try
End Sub
197
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="CatID" HeaderText="CatID"
InsertVisible="False" ReadOnly="True"
SortExpression="CatID" />
<asp:BoundField DataField="CatName"
HeaderText="CatName" SortExpression="CatName" />
<asp:BoundField DataField="SubCatID"
HeaderText="SubCatID" InsertVisible="False"
ReadOnly="True" SortExpression="SubCatID" />
<asp:BoundField DataField="SubCatName"
HeaderText="SubCatName" SortExpression="SubCatName" />
</Columns>
<FooterStyle BackColor="#CCCC99" />
<RowStyle BackColor="#F7F7DE" />
<PagerStyle BackColor="#F7F7DE" ForeColor="Black"
HorizontalAlign="Right" />
<SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True"
ForeColor="White" />
<HeaderStyle BackColor="#6B696B" Font-Bold="True"
ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:DBConnectionString1 %>"
SelectCommand="SELECT Category.CatID, Category.CatName,
SubCategory.SubCatID, SubCategory.SubCatName FROM Category INNER JOIN
SubCategory ON Category.CatID = SubCategory.CatID">
</asp:SqlDataSource>
198
<HeaderStyle BackColor="#6B696B" Font-Bold="True"
ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:DBConnectionString2 %>"
DeleteCommand="DELETE FROM [SubCategory] WHERE
[SubCatID] = @SubCatID" InsertCommand="INSERT INTO [SubCategory]
([SubCatName], [CatID]) VALUES (@SubCatName, @CatID)"
ProviderName="<%$
ConnectionStrings:DBConnectionString2.ProviderName %>"
SelectCommand="SELECT [SubCatID], [SubCatName], [CatID] FROM
[SubCategory]"
UpdateCommand="UPDATE [SubCategory] SET [SubCatName]
= @SubCatName, [CatID] = @CatID WHERE [SubCatID] = @SubCatID">
<DeleteParameters>
<asp:Parameter Name="SubCatID" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="SubCatName" Type="String" />
<asp:Parameter Name="CatID" Type="Int32" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="SubCatName" Type="String" />
<asp:Parameter Name="CatID" Type="Int32" />
<asp:Parameter Name="SubCatID" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
199
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:DBConnectionString2 %>"
DeleteCommand="DELETE FROM [Category] WHERE [CatID] =
@CatID" InsertCommand="INSERT INTO [Category] ([CatName]) VALUES
(@CatName)"
ProviderName="<%$
ConnectionStrings:DBConnectionString2.ProviderName %>"
SelectCommand="SELECT [CatID], [CatName] FROM [Category]"
UpdateCommand="UPDATE [Category] SET [CatName] = @CatName
WHERE [CatID] = @CatID">
<DeleteParameters>
<asp:Parameter Name="CatID" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="CatName" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="CatName" Type="String" />
<asp:Parameter Name="CatID" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
Try
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
myCommand.Parameters.AddWithValue("CatName",
TextBox1.Text)
myCommand.ExecuteNonQuery()
myTransaction.Commit()
Catch ex As Exception
If (myTransaction.Equals(Nothing) = False) Then
200
myTransaction.Rollback()
correct = False
End If
Finally
myConnection.Dispose()
End Try
End Sub
Try
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
reader = myCommand.ExecuteReader()
reader.Read()
ID = CInt(reader(0))
reader.Close()
201
cmd = "INSERT INTO SubCategory (CatID,SubCatName) Values
(@CatID,@SubCatName)"
myCommand.Parameters.AddWithValue("CatID", ID)
myCommand.Parameters.AddWithValue("SubCatName",
TextBox1.Text)
myCommand.ExecuteNonQuery()
myTransaction.Commit()
Catch ex As Exception
If (myTransaction.Equals(Nothing) = False) Then
myTransaction.Rollback()
correct = False
End If
Finally
myConnection.Dispose()
End Try
End Sub
202
SortExpression="LOID" />
<asp:BoundField DataField="Title" HeaderText="Title"
SortExpression="Title" />
<asp:BoundField DataField="SubCatName"
HeaderText="SubCatName" SortExpression="SubCatName" />
<asp:BoundField DataField="UserName"
HeaderText="UserName" SortExpression="UserName" />
<asp:BoundField DataField="NoOfViews"
HeaderText="NoOfViews" SortExpression="NoOfViews" />
<asp:BoundField DataField="NoOfDownloads"
HeaderText="NoOfDownloads" SortExpression="NoOfDownloads" />
<asp:BoundField DataField="TrackBacks"
HeaderText="TrackBacks" SortExpression="TrackBacks" />
<asp:TemplateField SortExpression="UserName">
<HeaderTemplate>view</HeaderTemplate>
<ItemTemplate >
<a href="EditLO.aspx?LOID=<%# Eval("LOID") %>">view</a>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:DBConnectionString2 %>"
DeleteCommand="DELETE FROM [LO] WHERE [LOID] = @LOID"
InsertCommand="INSERT INTO [LO] ([SubCatID], [BundleURL],
[NoOfDownloads], [NoOfViews], [TrackBacks], [rating], [audience],
[UserId]) VALUES (@SubCatID, @BundleURL, @NoOfDownloads, @NoOfViews,
@TrackBacks, @rating, @audience, @UserId)"
ProviderName="<%$
ConnectionStrings:DBConnectionString2.ProviderName %>"
SelectCommand="SELECT LO.LOID, LO.NoOfDownloads, LO.NoOfViews,
LO.TrackBacks, MetaData.Title, SubCategory.SubCatName,
aspnet_Users.UserName FROM LO INNER JOIN MetaData ON LO.LOID =
MetaData.Identifier INNER JOIN aspnet_Users ON LO.UserId =
aspnet_Users.UserId INNER JOIN SubCategory ON LO.SubCatID =
SubCategory.SubCatID"
UpdateCommand="UPDATE [LO] SET [SubCatID] = @SubCatID,
[BundleURL] = @BundleURL, [NoOfDownloads] = @NoOfDownloads,
[NoOfViews] = @NoOfViews, [TrackBacks] = @TrackBacks, [rating] =
@rating, [audience] = @audience, [UserId] = @UserId WHERE [LOID] =
@LOID">
<DeleteParameters>
<asp:Parameter Name="LOID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="SubCatID" Type="Int32" />
<asp:Parameter Name="BundleURL" Type="String" />
<asp:Parameter Name="NoOfDownloads" Type="Int32" />
<asp:Parameter Name="NoOfViews" Type="Int32" />
<asp:Parameter Name="TrackBacks" Type="Int32" />
<asp:Parameter Name="rating" Type="Double" />
<asp:Parameter Name="audience" Type="String" />
<asp:Parameter Name="UserId" Type="Object" />
<asp:Parameter Name="LOID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="SubCatID" Type="Int32" />
<asp:Parameter Name="BundleURL" Type="String" />
<asp:Parameter Name="NoOfDownloads" Type="Int32" />
<asp:Parameter Name="NoOfViews" Type="Int32" />
<asp:Parameter Name="TrackBacks" Type="Int32" />
203
<asp:Parameter Name="rating" Type="Double" />
<asp:Parameter Name="audience" Type="String" />
<asp:Parameter Name="UserId" Type="Object" />
</InsertParameters>
</asp:SqlDataSource>
Try
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
reader = myCommand.ExecuteReader()
reader.Read()
filename = CStr(reader(0))
reader.Close()
myCommand.ExecuteNonQuery()
If (filename.Contains("c\Uploads")) Then
File.Delete(Server.MapPath(filename))
End If
myTransaction.Commit()
Catch ex As Exception
If (myTransaction.Equals(Nothing) = False) Then
myTransaction.Rollback()
204
Label1.Text = "
ثz K; ءK³´ أ3:FEA "ا«ف
End If
Finally
myConnection.Dispose()
End Try
End Sub
205
ProviderName="<%$
ConnectionStrings:DBConnectionString2.ProviderName %>"
SelectCommand="SELECT Comment.*, Cno AS Expr1, LOID AS Expr2, comment
AS Expr3, date AS Expr4, UserId AS Expr5, IsApproved AS Expr6 FROM
Comment WHERE (IsApproved = 1)"
UpdateCommand="UPDATE [Comment] SET [IsApproved] =
@IsApproved WHERE [Cno] = @Cno AND [LOID] = @LOID">
<DeleteParameters>
<asp:Parameter Name="Cno" Type="Int32" />
<asp:Parameter Name="LOID" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="LOID" Type="Int32" />
<asp:Parameter Name="comment" Type="String" />
<asp:Parameter Name="date" Type="DateTime" />
<asp:Parameter Name="UserId" Type="Object" />
<asp:Parameter Name="IsApproved" Type="Boolean" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="IsApproved" Type="Boolean" />
<asp:Parameter Name="Cno" Type="Int32" />
<asp:Parameter Name="LOID" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
206
<HeaderStyle BackColor="#6B696B" Font-Bold="True"
ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:DBConnectionString2 %>"
DeleteCommand="DELETE FROM [Comment] WHERE [Cno] = @Cno
AND [LOID] = @LOID" InsertCommand="INSERT INTO [Comment] ([LOID],
[comment], [date], [UserId], [IsApproved]) VALUES (@LOID, @comment,
@date, @UserId, @IsApproved)"
ProviderName="<%$
ConnectionStrings:DBConnectionString2.ProviderName %>"
SelectCommand="SELECT Comment.*, Cno AS Expr1, LOID AS Expr2, comment
AS Expr3, date AS Expr4, UserId AS Expr5, IsApproved AS Expr6 FROM
Comment WHERE (IsApproved = 0)"
UpdateCommand="UPDATE [Comment] SET [IsApproved] =
@IsApproved WHERE [Cno] = @Cno AND [LOID] = @LOID">
<DeleteParameters>
<asp:Parameter Name="Cno" Type="Int32" />
<asp:Parameter Name="LOID" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="LOID" Type="Int32" />
<asp:Parameter Name="comment" Type="String" />
<asp:Parameter Name="date" Type="DateTime" />
<asp:Parameter Name="UserId" Type="Object" />
<asp:Parameter Name="IsApproved" Type="Boolean" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="IsApproved" Type="Boolean" />
<asp:Parameter Name="Cno" Type="Int32" />
<asp:Parameter Name="LOID" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
207
</Columns>
<PagerStyle BackColor="#F7F7DE" ForeColor="Black"
HorizontalAlign="Right" />
<SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True"
ForeColor="White" />
<HeaderStyle BackColor="#6B696B" Font-Bold="True"
ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:DBConnectionString2 %>"
DeleteCommand="DELETE FROM [ReportBack] WHERE [RBID] =
@RBID AND [LOID] = @LOID"
InsertCommand="INSERT INTO [ReportBack] ([RBID], [LOID],
[reason], [date], [UserId]) VALUES (@RBID, @LOID, @reason, @date,
@UserId)"
ProviderName="<%$
ConnectionStrings:DBConnectionString2.ProviderName %>"
SelectCommand="SELECT [RBID], [LOID], [reason], [date], [UserId] FROM
[ReportBack]"
UpdateCommand="UPDATE [ReportBack] SET [reason] =
@reason, [date] = @date, [UserId] = @UserId WHERE [RBID] = @RBID AND
[LOID] = @LOID">
<DeleteParameters>
<asp:Parameter Name="RBID" Type="Int32" />
<asp:Parameter Name="LOID" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="RBID" Type="Int32" />
<asp:Parameter Name="LOID" Type="Int32" />
<asp:Parameter Name="reason" Type="String" />
<asp:Parameter Name="date" Type="DateTime" />
<asp:Parameter Name="UserId" Type="Object" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="reason" Type="String" />
<asp:Parameter Name="date" Type="DateTime" />
<asp:Parameter Name="UserId" Type="Object" />
<asp:Parameter Name="RBID" Type="Int32" />
<asp:Parameter Name="LOID" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
208
Try
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
reader = myCommand.ExecuteReader()
While reader.Read()
user.GetProfile(reader(1).ToString())
reader.Close()
209
'declaration
Dim myConnection As SqlConnection
Dim myTransaction As SqlTransaction = Nothing
'database readers
Dim reader As SqlDataReader
Dim readerj As SqlDataReader
Dim readeru As SqlDataReader
Dim readeravg As SqlDataReader
Dim readeravgi As SqlDataReader
Dim readeravgj As SqlDataReader
'current user
Dim user As MembershipUser = Membership.GetUser()
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
210
Dim myCommand As SqlCommand = New SqlCommand(cmd,
myConnection, myTransaction)
myCommand.Parameters.AddWithValue("UserID",
user.ProviderUserKey.ToString())
reader = myCommand.ExecuteReader()
If reader.Read() Then
reader.Close()
reader = myCommand.ExecuteReader()
myCommand.Parameters.AddWithValue("UserId",
user.ProviderUserKey.ToString())
myCommand.Parameters.AddWithValue("ID", CInt(reader(0)))
reader.Read()
211
While (reader.Read())
myCommand.Parameters.AddWithValue("UserId",
user.ProviderUserKey.ToString())
readerj = myCommand.ExecuteReader()
While (readerj.Read())
'calculate 20% of the current number of downloads
Down_j = 0.2 * CInt(readerj(1))
'calculate 10% of the current number of trackBacks
Track_j = 0.1 * CInt(readerj(2))
'select each user who have rated BOTH i and j to calculate the
similarity between them
cmd = "SELECT UserId FROM Rating WHERE NoStars > 0 AND LOID = @j AND
UserId IN ( SELECT UserId From Rating WHERE LOID =@i AND NoStars > 0)
"
myCommand.Parameters.AddWithValue("UserId",
user.ProviderUserKey.ToString())
myCommand.Parameters.AddWithValue("i", reader(0))
myCommand.Parameters.AddWithValue("j", readerj(0))
readeru = myCommand.ExecuteReader()
212
myCommand.Parameters.AddWithValue("user", readeru(0))
readeravg = myCommand.ExecuteReader()
readeravg.Read()
myCommand.Parameters.AddWithValue("i", reader(0))
myCommand.Parameters.AddWithValue("user", readeru(0))
readeravgi = myCommand.ExecuteReader()
readeravgi.Read()
myCommand.Parameters.AddWithValue("j", readerj(0))
myCommand.Parameters.AddWithValue("user", readeru(0))
readeravgj = myCommand.ExecuteReader()
readeravgj.Read()
'some copmutations
Rate_ui = (CInt(readeravgi(0)) - CInt(readeravg(0)) * 0.7) +
Down_i + Track_i
Rate_uj = (CInt(readeravgj(0)) - CInt(readeravg(0)) * 0.7) +
Down_j + Track_j
readeravgi.Close()
readeravgj.Close()
readeravg.Close()
'next user
End While
213
'calculate the similarity between items i and j
sim = (sum1 / (System.Math.Sqrt(sum2) * System.Math.Sqrt(sum3)))
'prediction computation
sum4 += sim * readerj(3)
sum5 += sim
End If
'next j
End While
Else
prediction = 0
End If
'sort
If (Top3 > Top2) Then
temp_Top = Top3
Top3 = Top2
Top2 = temp_Top
temp_LOID = LOID3
LOID3 = LOID2
LOID2 = temp_LOID
Temp_Title = Title3
Title3 = Title2
Title2 = Temp_Title
End If
If (Top2 > Top1) Then
temp_Top = Top2
Top2 = Top1
Top1 = temp_Top
temp_LOID = LOID2
LOID2 = LOID1
LOID1 = temp_LOID
Temp_Title = Title2
Title2 = Title1
Title1 = Temp_Title
End If
End If
214
End If
'next i
End While
End If
'end of the i's list
reader.Close()
End If
End If
End If
End If
Catch ex As Exception
If (myTransaction.Equals(Nothing) = False) Then
myTransaction.Rollback()
Label2.Text = "«راA..
ثz K; ءK³´ أ3:FEA 3:QDH8"ا
End If
Finally
myConnection.Dispose()
'no errors
If (Label2.Text = "") Then
If (Top1 > 0) Then
Me.HyperLink1.NavigateUrl = "ViewLO.aspx?LOID=" +
CStr(LOID1)
Me.HyperLink1.Text = CStr(Title1)
If (Top2 > 0) Then
Me.HyperLink1.NavigateUrl = "ViewLO.aspx?LOID=" +
CStr(LOID2)
Me.HyperLink1.Text = CStr(Title2)
If (Top3 > 0) Then
Me.HyperLink1.NavigateUrl = "ViewLO.aspx?LOID=" +
CStr(LOID3)
Me.HyperLink1.Text = CStr(Title3)
End If
End If
Else
Label1.Text = " ©
£D »¼KH K:8K"
Me.HyperLink1.NavigateUrl =
"javascript:openPopup('Details.aspx')"
Me.HyperLink1.Text = ":QKPH8"ا
End If
End If
End Try
215
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim UserId As String
Dim user As MembershipUser
user = Membership.GetUser()
UserId = user.ProviderUserKey.ToString()
Dim URL As String = "~/reg/myLOs.aspx?UserId=" + UserId
Response.Redirect(URL)
End Sub
reader = myCommand.ExecuteReader()
reader.Read()
If reader.HasRows Then
Dim smtp As New SmtpClient
smtp.Host = "localhost"
smtp.Port = 25
smtp.DeliveryMethod = SmtpDeliveryMethod.Network
Else
Label1.Text = "
5¦8¨و§ ا8©¾½ اK"
End If
reader.Close()
216
21- Registration:
Dim NewUser As MembershipUser
'Dim field As ListItem
NewUser = Membership.CreateUser(Me.UserName.Text,
Me.Password.Text, Me.EmailTxtBox.Text)
Dim nn As ProfileCommon =
Profile.GetProfile(NewUser.UserName) 'create the profile
nn.LastName = Lname.Text
nn.FirstNme = Fname.Text
nn.EducationalLevel = EduLevelList.SelectedValue
nn.ReciveMail = RecieveEmails.Checked
nn.Save()
AddDrop(NewUser.ProviderUserKey.ToString())
FormsAuthentication.RedirectFromLoginPage(Me.UserName.Text, True)
'login the user directly after registration
cmd.Parameters.AddWithValue("UserId", UserID)
Dim re As Integer
Try
conn.Open()
re = cmd.ExecuteNonQuery()
If re > 0 Then
Return "Success"
Else
Return "unSuccess"
End If
Catch ex As Exception
Return "unSuccess"
Finally
conn.Close()
End Try
End Using
End Function
217
The code for handling errors in registration is:
Case MembershipCreateStatus.DuplicateEmail
Return "
5¦8¨و§ ا8©«ي ا8 اHF
م أد¢H; K
ًـG;"
Case MembershipCreateStatus.InvalidPassword
Return "3EFور آ6I ® ا3O:OQ ، ¯} أنG© A 4 ."
Case MembershipCreateStatus.InvalidEmail
Return "
5¦8¨و§ ا8©¡ ® ا:OQ ءK£68 ا38وK°ة ا6;
ى6"أ
Case MembershipCreateStatus.InvalidAnswer
Return " "
Case MembershipCreateStatus.InvalidQuestion
Return " "
Case MembershipCreateStatus.InvalidUserName
Return "s=
م ا¢HI¡ ® ا:OQ ، ءK£68 ا38وK°ة ا6; ى6"أ
Case MembershipCreateStatus.ProviderError
Return "=
G8
ثz ءK³´ أ:~H8 ا، ءK£68ا
38وK°ة ا6; ى6" ا
Case MembershipCreateStatus.UserRejected
Return "=
G8
ثz ءK³´ أ:~H8 ا، ءK£68ا
38وK°ة ا6; ى6ت اذا و ا6EH= ا3F7I< ا
ÄŸ K³ÆFL أKdzA "
Case Else
Return "=
G8
ثz ءK³´ أ:~H8 ا، ءK£68ا
38وK°ة ا6; ى6ت اذا و ا6EH= ا3F7I< اÄŸ K³ÆFL أKdzA"
End Select
End Function
218
ChangePasswordButtonText=":Æ 3EFور آ6I "اStyle="direction:
rtl; text-align: right"
CancelDestinationPageUrl="~/UserHomePage.aspx"
ChangePasswordFailureText="3EFور آ6I ® ا3O:OQ ، 3EFور آ6I
ة ا5
Éا
G© A 4 " ChangePasswordTitleText=":Æ 3ــEFور آ6I" ا
ConfirmNewPasswordLabelText="
: آ3EFور آ6I
ة ا5
É"ا
ConfirmPasswordCompareErrorMessage="3EFور آ6I
ة ا5
É ® ا3GLKzH;"
ConfirmPasswordRequiredErrorMessage="
L© ;
: آ3EFور آ6I"ا
ContinueButtonText="34LKHI"ا
ContinueDestinationPageUrl="~/UserHomePage.aspx"
NewPasswordLabelText="3EFور آ6I
ة ا5
É"ا
NewPasswordRegularExpressionErrorMessage="ءK£68ل اK اد3EFور آ6;
ى6 "أNewPasswordRequiredErrorMessage="3EFور آ6I
ة ا5
É ا3LDFz; "
PasswordLabelText="3EFور آ6I ا3Ê
G8"ا
PasswordRequiredErrorMessage="3EFور آ6I ا3Ê
G8 ا3LDFz; "
SuccessText="{ :Æ 3EFور آ6I ا3ـQKË اL" SuccessTitleText="·
3:FE48ح اK~³L" UserNameLabelText="s=
م ا¢HI "اFont-Bold="True" Font-
Size="Medium">
</asp:ChangePassword>
</asp:Content>
<ajaxToolkit:CollapsiblePanelExtender
ID="CollapsiblePanelExtender1" runat="server"
TargetControlID="titledesPanel"
ExpandControlID="titlePanel"
CollapseControlID="titlePanel"
Collapsed="true"
ImageControlID="Image1"
CollapsedImage="images/expand.jpg"
ExpandedImage="images/collapse.jpg"
SuppressPostBack= "true" >
</ajaxToolkit:CollapsiblePanelExtender>
219
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button2.Click
End If
Try
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
reader = myCommand.ExecuteReader()
reader.Read()
ID = CInt(reader(0))
reader.Close()
myCommand.Parameters.AddWithValue("UserId",
user.ProviderUserKey.ToString())
myCommand.Parameters.AddWithValue("SubCatID", ID)
myCommand.Parameters.AddWithValue("Bundle", filename)
220
myCommand.Parameters.AddWithValue("audience",
CheckBoxList1.SelectedValue)
myCommand.ExecuteNonQuery()
If (FileUpload1.Enabled = True) Then
FileUpload1.PostedFile.SaveAs(filename)
End If
ID = CInt(reader(0))
myCommand.Parameters.AddWithValue("Title", TitleBox.Text)
myCommand.Parameters.AddWithValue("Format",
System.IO.Path.GetExtension(filename))
myCommand.Parameters.AddWithValue("Creator",
CreatorBox.Text)
myCommand.Parameters.AddWithValue("Language",
LanguageList.SelectedValue)
myCommand.Parameters.AddWithValue("ID", ID)
myCommand.Parameters.AddWithValue("Description",
DescriptionBox.Text)
myCommand.Parameters.AddWithValue("Contributor",
ContributorBox.Text)
myCommand.Parameters.AddWithValue("Date", DateTime.Now())
myCommand.Parameters.AddWithValue("Coverage",
CoverageBox.Text)
myCommand.Parameters.AddWithValue("Publisher",
PublisherBox.Text)
myCommand.Parameters.AddWithValue("Relation",
RelationBox.Text)
myCommand.Parameters.AddWithValue("Rights",
RightsBox.Text)
myCommand.Parameters.AddWithValue("Source",
SourceBox.Text)
myCommand.Parameters.AddWithValue("Subject",
SubjectBox.Text)
myCommand.Parameters.AddWithValue("Type",
TypesList.SelectedValue)
myCommand.ExecuteNonQuery()
reader.Close()
221
myTransaction.Commit()
Catch ex As Exception
If (myTransaction.Equals(Nothing) = False) Then
myTransaction.Rollback()
Server.Transfer("ErrorUploading.aspx")
End If
Finally
myConnection.Dispose()
End Try
Server.Transfer("confirmUploading.aspx")
End Sub
End Sub
End Sub
Me.EmailBox.Text = user.Email.ToString()
Me.LastActiveDate.Text = user.LastActivityDate.ToString()
222
Me.CreateDate.Text = user.CreationDate.ToString()
Me.LNameBox.Text = user2.LastName.ToString()
Me.FNameBox.Text = user2.FirstNme.ToString()
If
(Me.RadioButtonList2.Items.Contains(Me.RadioButtonList2.Items.FindByV
alue(eduLevel))) Then
Me.RadioButtonList2.Items.FindByValue(eduLevel).Selected = True
End If
Me.RadioButtonList1.Items.FindByValue(recMail).Selected =
True
Try
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
reader = myCommand.ExecuteReader()
reader.Read()
If
(Me.CheckBoxList1.Items.Contains(Me.CheckBoxList1.Items.FindByValue(f
ield))) Then
Me.CheckBoxList1.Items.FindByValue(field).Selected = True
End If
End If
Next
End If
Catch ex As Exception
If (myTransaction.Equals(Nothing) = False) Then
myTransaction.Rollback()
End If
223
Finally
myConnection.Dispose()
End Try
End If
End Sub
Try
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
user.Email = EmailBox.Text
Membership.UpdateUser(user)
user2.LastName = LNameBox.Text
user2.FirstNme = FNameBox.Text
user2.EducationalLevel =
Me.RadioButtonList2.SelectedValue
user2.ReciveMail = Me.RadioButtonList1.SelectedValue
user2.Save()
myCommand.ExecuteNonQuery()
224
Catch ex As Exception
End Try
Server.Transfer("ConfirmUpdatingProfile.aspx")
End Sub
End Sub
25 - My Personal Collections:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
If Page.IsPostBack = False Then
Dim user As MembershipUser = Membership.GetUser()
Me.ListPCs.SelectParameters.Add("UserId",
user.ProviderUserKey.ToString())
End If
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim user As MembershipUser = Membership.GetUser()
Try
myConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("DBConnectionStr
ing1").ToString())
myConnection.Open()
myTransaction = myConnection.BeginTransaction()
myCommand.Parameters.AddWithValue("UserId",
user.ProviderUserKey.ToString())
myCommand.Parameters.AddWithValue("PCName",
TextBox1.Text)
225
reader = myCommand.ExecuteReader()
reader.Read()
If reader.HasRows Then
MsgBox("3FÅP; «اÍ s=©د اD£D; ءK£68 ا:Æ s=©)"ا
reader.Close()
Else
reader.Close()
myCommand = New SqlCommand(cmd2, myConnection,
myTransaction)
myCommand.Parameters.AddWithValue("PCName",
TextBox1.Text)
myCommand.Parameters.AddWithValue("UserId",
user.ProviderUserKey.ToString())
myCommand.ExecuteNonQuery()
myTransaction.Commit()
DataBind()
End If
C = reader(0)
If C = 0 Then
226
myConnection.Close()
End Sub
27- Update:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Dim loid As Integer = Request.QueryString("LOID")
myCommand.CommandText = "SELECT * FROM MetaData WHERE
Identifier =" & loid
myCommand.Connection.Open()
reader =
myCommand.ExecuteReader(CommandBehavior.CloseConnection)
reader.Read()
TitleBox.Text = reader.GetString(1)
CreatorBox.Text = reader.GetString(2)
LanguageList.Text = reader.GetString(3)
' FormatList.Text = reader.GetString(4)
ContributorBox.Text = reader.GetString(6)
DescriptionBox.Text = reader.GetString(7)
CoverageBox.Text = reader.GetString(8)
PublisherBox.Text = reader.GetString(9)
RelationBox.Text = reader.GetString(10)
RightsBox.Text = reader.GetString(11)
SourceBox.Text = reader.GetString(12)
SubjectBox.Text = reader.GetString(13)
' TypesList.Text = reader.GetString(14)
reader.Close()
End If
If Not Page.IsPostBack Then
Dim loid As Integer = Request.QueryString("LOID")
myCommand.CommandText = "SELECT audience FROM LO WHERE
LOID =" & loid
myCommand.Connection.Open()
reader =
myCommand.ExecuteReader(CommandBehavior.CloseConnection)
reader.Read()
'AudienceBox.Text = reader.GetString(0)
RadioButtonList1.Text = reader.GetString(0)
reader.Close()
End If
End Sub
227
& RightsBox.Text & "',Source='" & SourceBox.Text & "',Subject='" &
SubjectBox.Text & "',Language='" & LanguageList.SelectedValue & "'
where Identifier=" & loid
myConnection.Open()
myCommand.ExecuteNonQuery()
myConnection.Close()
myCommand.CommandText = "update LO set Audience='" &
RadioButtonList1.SelectedValue & "' where LOID =" & loid
myConnection.Open()
myCommand.ExecuteNonQuery()
myConnection.Close()
End Sub
228