Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3846310
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:22:42+00:00 2026-05-19T16:22:42+00:00

My teacher want to create some virtual lessons for his object and he created

  • 0

My teacher want to create some virtual lessons for his object and he created a version for the student and one for the teacher.

He now asked me how to redirect students using the teacher control panel, from one part of the lesson to another.

I can do the PHP part for the teacher panel and the server file to be called every 2-3 seconds to see if a redirect is mandatory. Maybe this is a JSON/AJAX thing?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T16:22:42+00:00Added an answer on May 19, 2026 at 4:22 pm

    You can do in this way. (for student)

    from student panel, make a periodic request to server (in interval of 5-10 s).

    //data is returned by server as json object
    //data.route = true or false as validated from database
    //data.location is the location new url
    
    $.post("server.php", { "id": "studentid" },
       function(data){  //data is returned by server as json object
         if(data.route)
         {
            window.location = data.location
         }
    
       }, 
       "json");
    

    On the server side you can do

    if(student is to be routed){ //check from the database
        $data['route'] = true;
        $data['location'] = 'location';
    }
    else{
        $data['route'] = false;
    }
    echo json_encode($data);
    

    UPDATE::

    put the above ajax code insde a function

    function fun1()
    {
    //put your ajax code herer
    } 
    

    and on document ready funcion

    $(function(){ setInterval( 'fun1()', 1000) }); 
    //use setInterval function
    // to call function periodically
    

    you might wanna see this

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to customize a object's behavior before the object is created. I think
I am trying to develop a page to display student/class results by subject/teacher. Some
A sysadmin teacher told me one day that I should learn to use make
I have two classes, a Teacher class and a Student class. In my program
I have two classes Teacher and Student . I am trying to get teacher
I have built my database design and diagram. Now i want to build a
I am working on an application where I can have Teacher, Student etc role.
I have 2 models - Teacher and Subject . A want to connect them
I have a teacher rating system. When I got to create a new comment
I'm using joomla 1.7 and I want for some users to not have the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.