// Genuine-correct (the 1/2 is a real operand) → just advance to unreviewed. $adv = [4310,7068,7070,7079,7083,7088,7098,7101,4294]; DB::table('questions')->whereIn('id',$adv)->update(['qa_status'=>'unreviewed','updated_at'=>now()]); echo "advanced_genuine=".count($adv)."\n"; // Truly corrupted → rebuilt as clean variants of their parent question. $regen = [ 7439 => ['type_id'=>1, 'question'=>'Find the sum of \(\dfrac{5}{8}\) + \(\dfrac{5}{8}\) + \(\dfrac{5}{8}\).', 'answer0'=>'\(\dfrac{5}{6}\)','answer1'=>'1\(\dfrac{1}{2}\)','answer2'=>'1\(\dfrac{2}{3}\)','answer3'=>'None of the above','correct_answer'=>3, 'explanation'=>'\(\dfrac{5}{8}\)+\(\dfrac{5}{8}\)+\(\dfrac{5}{8}\) = \(\dfrac{15}{8}\) = 1\(\dfrac{7}{8}\), which is not listed, so "None of the above".'], 6638 => ['type_id'=>1, 'question'=>'A rectangular tank 60 cm long and 40 cm wide was filled with water to 80% of its height. When 18 litres of water were removed, it became \(\dfrac{1}{2}\) full. Find the height of the tank.', 'answer0'=>'25 cm','answer1'=>'20 cm','answer2'=>'30 cm','answer3'=>'24 cm','correct_answer'=>0, 'explanation'=>'Base = 60 x 40 = 2400 cm². Water removed corresponds to (80% - 50%) = 30% of height. 0.3 x 2400 x h = 18000 cm³, so 720h = 18000, h = 25 cm.'], 6644 => ['type_id'=>1, 'question'=>'A rectangular tank has a base measuring 30 cm by 20 cm. It was filled with oil to a height of 6 cm. When 6 litres of oil were poured in, the oil level rose to \(\dfrac{4}{5}\) of the tank\'s height. Find the height of the tank.', 'answer0'=>'20 cm','answer1'=>'15 cm','answer2'=>'25 cm','answer3'=>'18 cm','correct_answer'=>0, 'explanation'=>'Base = 30 x 20 = 600 cm². Oil before = 600 x 6 = 3600 cm³. After adding 6000 cm³: 9600 cm³ = \(\dfrac{4}{5}\) x 600 x h = 480h, so h = 20 cm.'], 7581 => ['type_id'=>2, 'question'=>'Solve \(\dfrac{3}{4}\) ÷ \(\dfrac{1}{2}\). Express your answer in the form \(\dfrac{a}{b}\) where a = [?] and b = [?].', 'answer0'=>'3','answer1'=>'2','answer2'=>null,'answer3'=>null,'correct_answer'=>null, 'explanation'=>'\(\dfrac{3}{4}\) ÷ \(\dfrac{1}{2}\) = \(\dfrac{3}{4}\) x \(\dfrac{2}{1}\) = \(\dfrac{6}{4}\) = \(\dfrac{3}{2}\). So a = 3, b = 2.'], ]; foreach ($regen as $id=>$d) { $d['qa_status']='unreviewed'; $d['updated_at']=now(); DB::table('questions')->where('id',$id)->update($d); } echo "regenerated=".count($regen)."\n";