I am developing a web application which will deal with online examination. The requirement is:
There can be n-number of sections in
an exam and admin users should be
able to create questions/answers and
add to an exam.
The questions should be displayed
for a certain amount of time in the
browser with timeclock and it should
move to next question automatically.
User should not be allowed to open any other instance of the browser or login from another IP if the exam is in progress.
I am seeking community vote of how would someone design the application to meet all these criterias? What patterns should be used? What components can help to reduce the development time etc..
My technology stack is C#, ASP.NET MVC or ASP.NET with SQL Server.
Thanks in advance!!!
Rather than re-invent the wheel, you should look at a solution such as the Open Source DotNetNuke and either buy/build an extension for the portion specific to your scenario.
I think for the user app, you should consider a Silverlight app as this will give you granular and secure control over the experience.
Overall the solution would be like this:
DotNetNuke provides the foundation portal/Content Management so you can create a highly customized experience around the exam experience including support for user management etc.
The DotNetNuke extension would enable authorized administrators to manage exams and exam questions.
A webservice wrapper would provide access to the business controller used by the DotNetNuke extension.
A Silverlight app would interact with the webservice to enable authenticated users to take their exams
Overall, such a solution would give you a high degree of control over the user experience while enabling you to focus time/resources that are only specific to your situation while leveraging an existing, robust and popular solution on which to build your solution.
(Full disclosure: I am one of the co-founders of the company that manages DotNetNuke. In fairness, you can replace my suggestion for DotNetNuke with Orchard or Umbraco and the solution would be equally valid.)
For the Database side of things you would want something like:
Table Exams (ExamID, ExamName) //to hold all exams
Table Users(UserID, Username, Login, Password) //to hold all users
Table OpenExams(Exam_ID, User_ID) //to hold open exams
Table ExamSections(SectionID, Exam_ID, SectionName) //to hold sections of exams
Table Questions(QuestionID, Section_ID, QuestionName, Question, Answer) //to hold questions
This of course at its most basic and only 1 approach of many. You would need to add fields where required.
As for item 2, i would probably do it in the application layer (or in VS). I dont have much experience in web dev, but i would think that ASP could handle that. For item 3, you could run a simple SQl statement to get if the user trying to access the exam is currently taking the exam.
Lets also start mapping the processes:
User:
1. User logs in (to prevent multiple exams by one user).
2. User "starts" an exam -> Time is noted on the server-side and timer triggered on client-side. User gets a dynamic exam page 1.
3. User is done with page 1, clicks next -> Ajax-reloading the page content (the questions part). Timer for page 2 is started (server and client side)
3.a) detected login from a different IP - session broken, user marked as cheater :) or the login is simply rejected.
User times out on page 2 -> the page content (answers) are automatically submited. the timers are set for page 3. user gets page 3.
User clicks finish -> the exam is finished.
Admin:
Logs in -> show "add exam" option and table of existing exams
Adds an exam - open "exam page", add a new "exam" entity
Adds a page - > new "page" entity added to this exam, questions table is loaded in the gui
adds a question -> new "question" object added to page
end page -> the page is saved. options for end exam or add page are here.
add page -> go to step 3
finish exam -> save exam
optionally mark exam as "active/inactive"
add tables with "students" and their results and stuff like that.
This needs a lot of work, but when you have this you have the idea of what you need to put in your design.
Related
So, here's the use case. I work for Salesforce Marketing Cloud as a technology architect. We have a very robust "Marketing Cloud" app which I don't do any development on. I don't have access to source code/etc. I do have access to the application though, as a user.
Quick 2 sentence overview of the application: big companies like "Company A" utilize our software to be able to send billions of emails (promotional and transactional) to their customers. So, say you get an email from "Company A" telling you of all the great products they offer - that email is sent from our system.
So, the use case: the Marketing Cloud application, for simplicity's sake, is able to create an email from HTML. Basically, the user (myself) can copy/paste HTML into the huge text field, and click Save, and the email code is saved into the back end (SQL Server table). This application does not have any kind of source control to manage the different versions of the "email" that the user decides to create/change/modify.
Now, I have access to develop a customized "whatever" via C#/SSJS that has access to all of the elements in the database that the application writes to. So, if I wanted to grab the latest version of an "email" saved by a user, I can simply write a SQL query to grab this content.
Here's my goal: To create a very simple version control system without getting into the source code of the application. Ambitious, I know. I have all the different pieces of this mapped out in a document, but the one obstacle I'm running into is "how can I capture the 'save' event for when a user clicks 'save' and saves an email"? I believe this is a client side event, but I'm not 100% sure. My initial thought is to write a browser extension, but not knowing exactly what browser extensions have the capability of doing, I'm not sure if this is a good route to take. How can I capture an event from a UI from a web based application when I don't have access to the source code?
hi i am coding my website that is an e-learning management system ( i hope ).
my database has different tables like users, Lessons , fields , Files , branches , groups , city , university and ... ( using msSql)
now i need an notification system ( not important to be real time ) to notify users when a new user join or a new branch or... are added to database.
now i want to ask that what is the best way to gather this information and show these info
for example on something like a GridView or DataList.
i decided to create a notification table to save this changes but i think its not a good way.
please help me to chose the best way.
Since you already seem to be in the MS stack I would suggest SignalR to maintain your notifications. That way you can handle notification to anyone that is currently logged on (because real time is usually better for anything collaborative). SignalR has a lot of examples available for implementing updates on your website.
For any users not logged in, simple hold their previous login datetime and send them any updates (you can create a quick view for this info sorted by updatetime) that have happened since their last login.
Hope that at least points you in the right direction.
I am learning C# using Visual Studio and I am running into some issues.
I am developing a Windows form application. The application is meant to track user's running stats.
In settings: they select how many days they run and for each day they add their workout (ie: 1: 100m sprints 2: 50m sprints 3: Run a mile).
Then in the main windows form the user will be able to add their times and save it. Meanwhile a graph is projected of their times- this will allow the user to track their progress.
My question is where should I store their times? Right now I store all settings in the settings.settings doc. For the times should I use the settings file or a SQL database of some sort?
SqlCE or SQLite or any other simple inproc database will be better than Settings file.
Settings are not meant to grow with every user input, this is a task for a database, also it will be much easier to query your data using SQL.
Answering your question in comments:
There is a difference between user data and user preferences. You have to decide which is what in your app.
I would go with Settings file with everything regarding user preferences. Like form layout, colors, sounds, window size and so on.
Since Settings managing framework is pretty sophisticated, you will save yourself some time designing tables for user preferences and developing access to that tables.
Another possibly bright side of Settings file - it can be edited manually with text editor.
It is not possible to answer you without a lot more information about what a "user's running stats" is and how it is used. I can give a few general guidelines, though.
System.Configuration.ApplicationSettings are designed for customizing an application for a specific user; for example, what language the user wants the application to use, where he wants windows to appear, or default values. Settings are part of the application; they are created when the application is installed and deleted when the application is uninstalled. If multiple users run the application, each typically gets their own settings. You typically define settings when you create the application and users never add or remove them.
Databases are used to persist user data. They are typically not tied to a specific user or application; users add the data, which is available to other users or applications. Applications typically aren't installed with all user data, nor is user data deleted when the application is uninstalled.
SQL databases are used for relational data; data that has internal structure, like "all users must have exactly one address", or "any user may have zero or more phone numbers". If your data is not relational you do not need a relational database.
These are general guidelines, specific applications may do things differently for specific purposes. If you tell us more about your application we will be able to provide more specific information.
I am creating a new support center and "self-help" customer service module for an application. The CIO really likes the flow of eBay's "Contact Us" pages, that basically work like this:
First, you select a specific topic from a group of topics (e.g. Buying, Selling, Account on eBay)
You're then presented with what appears to be one of three variable types of information, based on the topic you picked (names are just what I'm calling them in some preliminary sketches):
"Descriptive": displays rich text with possible links to other parts of the application.
"Choice": Displays a list of additional topics
"Action": Lets the user look up an item and do some action (e.g. cancel)
From some experimentation, a choice can list to other choices, or to a descriptive block of text, or to an action section.
I'm turning up blanks as to the proper architecture for this. My platform of choice is ASP.NET (WebForms, sadly; we have no desire to touch MVC here) so the "Action" areas would have to be a user control that's dynamically loaded into a placeholder, but I'm more concerned with a possible database structure for this. I would need a way to know if each topic leads to one of the three types above and then on the page dynamically load either the content, list of links, or user control which makes things a bit trickier, nevermind the fact that a non-technical user will have to update and add the information from some kind of administrative panel.
Any suggestions for doing something like this? I'm not on a tight deadline, but I can't take too long or I'll be considered to be wasting time and not producing results.
If you can store the "tree of knowledge" in some way, like a custom XML file which would organize all options / possible actions, descriptions etc. Then you can "walk" it based on user's selections and display appropriate user control with content generated on the fly based on the contents of the XML node you're currently at.
Your "admin tool" would then need to update/modify the XML file, and your "public" CMS would render user controls inside an ASPX form.
One of the projects I worked on used this methodology for intranet's user menu - effectively a knowledge base of hyperlinks / actions split in to categories so they can be drilled-down to. Each element can contain links to other elements - so you have a spider-web like navigatable chain / workflow.
Just make sure each element has a unique ID (trivial to implement) and you can always get at it through xpath.
By having users modify a "working copy" and keeping backups of the live XML file when changes are published you also get versioning / roll-back which would be difficult to do in a DB.
If I personally was doing this I would just roll some MVC3 controllers that handle the work flow steps as needed. That seems to be out for you however.
With webforms, I would most likely consider handling this using Windows Workflow Foundation (the learning curve is moderately steep on this). Here's a pretty good example on using WF Flexible Web UI Workflow application through ASP.NET MVC & Windows Workflow Foundation. It's built on MVC however you could easily replace the return Views() with return UserControls.
Following a model like this would defacto give you the MVC pattern. The controller dictating flow matches very well for a workflow scenario.
Edit: Since this even seems out of the question, at this point you're best option is just writing a controller class that will manage the flow manually (probably a bunch of state / if checks) and then redirect users or return the appropriate user control.
I want to show the number of viewer for a particular Article. How i will do it in my program?
Any strategy, someone can suggest ...
If you aren't using any framework or CMS, then you can integrate either Google Analytics or Piwik into your website. Then use their inner data to display number of views/unique views per article.
Make a table with article id/url (or whatever you technique is), IP, user agent.
In every relevant page have each page access write down these values.
To display number of views simply select count
To display number of unique views display count(distinct)