How to insert a field to a page

Home Forums Legacy Support Support queries Other issues How to insert a field to a page

Tagged: 

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #312551
    szabonyelviskola
    Spectator
    I would like to know how can I insert using the customizer plugin an existing field for example "quiz_remarks_in_result" to the object created after pressing the Check results button. The reason for that, that I need only quiz_remarks in quiz results for students. I could hide all the information from result page, but only together. I could not hide part by part, because in this case those element was also missing from evaluation and from instructor stat page. So I hide the all result page, and I would like to insert back the quiz-remarks. Any idea, how can I do that?
    #312858
    Anshuman Sahu
    Keymaster
    please try adding this given code in your wplms-customizer.php file in wplms customizer plugin :
    add_action('wplms_after_quiz_message',function($item_id,$user_id){
        $remarks = get_user_meta($user_id,'quiz_remarks'.$item_id,true);
        echo $remarks;
    },10,2);
    #313157
    szabonyelviskola
    Spectator
    Thanks for the idea! It is working on some way, but this is not exactly what I was thinking. Now the quiz_remarks are shown always in post_quiz message window without pressing the check results button. I was thinking to show them in the window which is opened after presssing the check results button. Now it is empty because I was hide with div.user_quiz_result{display:none;} css code all the information. And also I would add the Retake button too. But if you will show me one element, I will try to do the other one based on your code. :) And same, after student pressing the link of quiz in his courses/results/quizes window. All information are hidden because of above css code and instead I would like to insert only the quiz_remarks for student. The above css code was the only solution to hide the questions from students but not hide the questions from instructors to evaluate and print out anytime from their stats. But this version completly hiding everything from students window (questions, remark, grade, retake button, previous evaluations) I'm working with in course quiz.
    #313747
    Anshuman Sahu
    Keymaster
    remove previous code and add this one :
    
    add_action('wplms_after_quiz_message',function($item_id,$user_id){
        if(bp_course_get_user_quiz_status($user_id,$item_id)==4){
             $remarks = get_user_meta($user_id,'quiz_remarks'.$item_id,true);
            echo $remarks;
        }
       
    },10,2);
    #314047
    szabonyelviskola
    Spectator
    I have tried, but nothing happened. let's forgot the results. make the problem simple: After pressing the Check results button in my in course quiz, earlier a window popped up with questions and results. I have hide the whole content of the window with div.user_quiz_result{display:none;} But this also hide the Retake button. How can I reinsert this Retake button to empty results window?
    #314063
    Veronica
    Moderator
    aahhaa! if you want this: But this also hides the Retake button. How can I reinsert this Retake button to empty the results window? then please share the url of the course/quiz with the credential of the admin who has already performed the test and removes this code: div.user_quiz_result{display:none;} after that i will share the code with you which hide all details except retake course button
    #314064
    Veronica
    Moderator
    aahhaa! if you want this: But this also hides the Retake button. How can I reinsert this Retake button to empty the results window? then please share the url of the course/quiz with the credential of the admin who has already performed the test and removes this code: div.user_quiz_result{display:none;} after that i will share the code with you which hide all details except retake course button
    #314188
    szabonyelviskola
    Spectator
    This reply has been marked as private.
    #314447
    Veronica
    Moderator
    hi the delay in response due to support holiday please add this code:
    .quiz_result ul.quiz_questions li .q .matchgrid_options ul li {
        display:none;
    }
    .quiz_result ul.quiz_questions li .q p, h5, ol li,ul li em{display:none !important;}
    this will hide all questions: http://prntscr.com/up3b56
    #314512
    szabonyelviskola
    Spectator
    I think you did not read my previous message or did not take into account it. This solution is not helping me. This solution hiding the questions everywhere, also at the instructor's side. In course admin/members/stat/quiz section too. I need a solution, but I have several times pointed this out, where the questions and answers are hidden on student side but not on the instructor side. I have a better solution than yours, because it hides on student side but not on instructor: div.user_quiz_result{display:none;} But this also hide the Retake button. How can I reinsert this Retake button to an empty results window?
    #314760
    Veronica
    Moderator
    with your provided code tried this
    .user_quiz_result .quiz_result{display:none;}
    
    #314961
    szabonyelviskola
    Spectator
    Thanks Veronica! You find me the solution I was waiting for! Thank you again, and you can close the topic.
    #315072
    Veronica
    Moderator
    good to know😊 closing this one
Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘How to insert a field to a page’ is closed to new replies.