Home › Forums › Legacy Support › 4.0 Bugs & Issues › Admin to handle timing units
Tagged: admin timing unit
- This topic has 9 replies, 3 voices, and was last updated 3 years, 7 months ago by Anshuman Sahu.
Viewing 10 posts - 1 through 10 (of 10 total)
-
AuthorPosts
-
September 14, 2020 at 9:32 pm #310640szabonyelviskolaSpectatorFor my quizzes, I have to use the drip-feed timing function of units. It is working after lot of tests... (It is important that the first unit can not be timed it works only from 2nd.) But now I have faced another problem. How to check the working system in this status? I have though that Admin roll could overwrite the timings, but if the timer is working I can not get in even in Admin. I can not switch the timing of because of the users, not see the quiz earlier than it is necessary, but I need to check my quiz in course for formatting issues. (The in course is very important in my situation) How can I do that?September 15, 2020 at 11:45 am #311004DianaParticipantDisable the Drip Feed and then do your editing work and other stuff If you want the drip-feed Starts from Unit 2 then enable "Previous Unit" Based Drip FeedSeptember 15, 2020 at 2:23 pm #311112szabonyelviskolaSpectatorBut if I disable the Drip Feed, for that time the users will see the exam too! I can not allow that. I need a solution where Admin can access but student not.September 16, 2020 at 2:04 pm #311440Anshuman SahuKeymasterthis will disable drip feed for admins. : please try adding this given code in your wplms-customizer.php file in wplms customizer plugin :
add_filter('vibe_total_drip_duration','total_drip_duration',11,4); function total_drip_duration($value,$course_id,$unit_id,$pre_unit_id){ if(current_user_can('manage_options')){ $value= 0; } return $value; }
September 16, 2020 at 4:46 pm #311485szabonyelviskolaSpectatorI have tried the code but unfortunately does not work. I will describe my structure, to be closer to the solution. I have a quiz which should be started at a given time. For that, I have created 2 additional units. (there are only 3 elements in course): 1. Welcome unit, no starting time given in unit. 2. Pre quiz unit, in this unit I have set up the starting time of the quiz 3. Course inline Quiz, no any starting information here In course settings: the previous unit should be completed before next switch, on Drip feed, on Drip feed origin, previous unit Drip feed type, unit duration type, static drip duration, 1 sec I have tried different structures but for me this was the only one working. Now the student starts with welcome, proceed to Prequize unit wait for time to elapse, and to access the quiz, then after 1 sec he can reach the course inline quiz. I have tried without Welcome unit but in this case, the starting time setup in Prequiz unit did not work at all. I do not know that in this case, your above code could work? If you could suggest me a more simple solution for the given problem, where your code is working, It would be also great.September 17, 2020 at 3:28 pm #311782Anshuman SahuKeymasterWell the code disable drip feed for administrators only . Well the unit start date and time does not works for quizzes . It will only work for units . But also this does not works for the very first unit as well. So i get your case . you can the quiz to start at very specific timing . Please provide some time till we get a code for this for you .September 17, 2020 at 5:25 pm #311817szabonyelviskolaSpectatorThanks! I'm waiting for your suggestions to get into such a structure in admin mode.September 18, 2020 at 3:08 pm #312086Anshuman SahuKeymasterHi before doing this I want to confirm do you want quiz start date time ?is this the exact thing you want ? and this date and time will remain same for all and should be disabled for admin , admin should get access to quiz anytime he wants to?September 18, 2020 at 5:30 pm #312110szabonyelviskolaSpectatorI have different starting date+time for each quiz. Plus in one course I have more quizzes (with different starting date+time). The members of the course if they are students, are not allowed to see the quiz before the specified starting date+time. But the instructor and mainly admin should get access to the quiz anytime he wants to, as you wrote. Even if in the course we have two quizzes with different starting date+time. The main reason for that, that we are using in course quizzes, and checking the real results and formats of the quiz is only possible from course, to start it as a member of the course.October 3, 2020 at 2:32 pm #315804Anshuman SahuKeymasterRemove the previous both codes and use this one :add_action('init',function(){ if(class_exists('WPLMS_tips')){ $tups = WPLMS_tips::init(); add_filter('wplms_quiz_metabox',array($tups,'show_unit_date_time_backend')); add_filter('wplms_drip_value','apply_unit_date_time_drip_feed_custom',10001,4); } }); function apply_unit_date_time_drip_feed_custom($value,$pre_unit_id,$course_id,$unit_id){ if(current_user_can('manage_options')){ $value= 0; } return $value; }
-
AuthorPosts
Viewing 10 posts - 1 through 10 (of 10 total)
- The topic ‘Admin to handle timing units’ is closed to new replies.